Created
July 29, 2017 09:27
-
-
Save raelga/b0896cb165a5204081c2da650001f9cc to your computer and use it in GitHub Desktop.
jLWPEY
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://unpkg.com/vue"></script> | |
<main id="app" class="site"> | |
<header class="menu">Twister</header> | |
<aside class="profile"> | |
Profile Information | |
</aside> | |
<section class="timeline"> | |
<article class="tweet" v-for="tweet in tweets"> | |
{{ tweet.text }} | |
</article> | |
</section> | |
</main> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new Vue({ | |
el: '#app', | |
data: { | |
tweets: [ | |
{ text: '1fgsdgsdfgsedgf' }, | |
{ text: 'sdgsdgdgs2' }, | |
{ text: '3sdgfsdgfsdgfsdfggdf' } | |
] | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.tweet { | |
margin: 2em auto; | |
} | |
.site { | |
max-width: 960px; | |
background-color: #fff; | |
color: #444; | |
padding: 1em 3% 1em 3%; | |
margin: 0 auto 1em auto; | |
font-family: Helvetica Neue,Helvetica,Arial,sans-serif; | |
} | |
.menu { grid-area: menu; } | |
.profile { grid-area: profile; } | |
.timeline { grid-area: timeline; } | |
@media only screen and (min-width: 460px) and (max-width: 700px) { | |
.site { | |
display: grid; | |
width: 90%; | |
grid-template-columns: auto; | |
grid-template-rows: auto ; | |
grid-template-areas: | |
"menu" | |
"profile" | |
"timeline"; | |
} | |
} | |
@media only screen and (min-width: 700px) { | |
.site { | |
display: grid; | |
grid-template-columns: 200px 40px auto 40px; | |
grid-template-rows: auto ; | |
grid-template-areas: | |
"menu menu menu" | |
"profile . timeline" | |
"profile . timeline"; | |
max-width: 700px; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment