Skip to content

Instantly share code, notes, and snippets.

@raelga
Created July 29, 2017 09:27
Show Gist options
  • Save raelga/b0896cb165a5204081c2da650001f9cc to your computer and use it in GitHub Desktop.
Save raelga/b0896cb165a5204081c2da650001f9cc to your computer and use it in GitHub Desktop.
jLWPEY
<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>
new Vue({
el: '#app',
data: {
tweets: [
{ text: '1fgsdgsdfgsedgf' },
{ text: 'sdgsdgdgs2' },
{ text: '3sdgfsdgfsdgfsdfggdf' }
]
}
});
.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