Fix mobile

This commit is contained in:
André Weller
2019-05-12 01:35:18 +02:00
parent c1e4609c65
commit 0ab7d5c877
10 changed files with 68 additions and 33 deletions

View File

@@ -4,7 +4,7 @@
p {{title}} p {{title}}
.card--body .card--body
p {{desc}} p {{desc}}
a(:href="url") {{url}} a(:href="url" target='_blank') {{url}}
</template> </template>
<script> <script>

View File

@@ -48,7 +48,7 @@ a {
.layout { .layout {
display: grid; display: grid;
grid-template-columns: 4vw 4vw 92vw; grid-template-columns: 100px 100px auto;
grid-gap: 1rem; grid-gap: 1rem;
margin-top: 1rem; margin-top: 1rem;
grid-template-areas: grid-template-areas:
@@ -71,5 +71,31 @@ a {
.content { .content {
grid-area: content; grid-area: content;
width: 90%;
}
.cards {
display:grid;
grid-template-columns: repeat(4, 20%);
grid-gap: 3rem;
}
@media only screen
and (min-device-width: 375px)
and (max-device-width: 812px)
{
.cards {
display:grid;
grid-template-columns: 1fr;
grid-gap: 3rem;
}
.layout {
grid-template-columns: 50px 50px auto;
grid-template-areas:
'logo logo search'
'. . .'
'sidebar sidebar content';
}
} }
</style> </style>

View File

@@ -31,9 +31,4 @@ export default {
h1 { h1 {
margin-bottom: 2rem; margin-bottom: 2rem;
} }
.cards {
display:grid;
grid-template-columns: repeat(4, 20%);
grid-gap: 3rem;
}
</style> </style>

View File

@@ -36,9 +36,4 @@ export default {
h1 { h1 {
margin-bottom: 2rem; margin-bottom: 2rem;
} }
.cards {
display:grid;
grid-template-columns: repeat(4, 20%);
grid-gap: 3rem;
}
</style> </style>

View File

@@ -41,9 +41,4 @@ export default {
h1 { h1 {
margin-bottom: 2rem; margin-bottom: 2rem;
} }
.cards {
display:grid;
grid-template-columns: repeat(4, 20%);
grid-gap: 3rem;
}
</style> </style>

34
pages/frontend/index.vue Normal file
View File

@@ -0,0 +1,34 @@
<template lang="pug">
div
h1 Frontend
.cards
template(v-for='resource in resources')
Card(:title='resource.title' :desc='resource.desc' :url='resource.url')
</template>
<script>
import Card from '../../components/Card'
export default {
data() {
return {
resources: [
{
title: 'Frontend Handbook 2019',
desc: 'A lovely guide made by frontendmasters.',
url: 'https://frontendmasters.com/books/front-end-handbook/2019/'
},
]
}
},
components: {
Card
}
}
</script>
<style lang="scss" scoped>
h1 {
margin-bottom: 2rem;
}
</style>

View File

@@ -31,9 +31,4 @@ export default {
h1 { h1 {
margin-bottom: 2rem; margin-bottom: 2rem;
} }
.cards {
display:grid;
grid-template-columns: repeat(4, 20%);
grid-gap: 3rem;
}
</style> </style>

View File

@@ -18,7 +18,6 @@ export default {}
<style lang="scss" scoped> <style lang="scss" scoped>
main { main {
width: 100%;
height: 100vh; height: 100vh;
} }
</style> </style>

View File

@@ -18,6 +18,11 @@ export default {
desc: 'Free video courses about javascript. Made by WesBos', desc: 'Free video courses about javascript. Made by WesBos',
url: 'https://javascript30.com' url: 'https://javascript30.com'
}, },
{
title: 'Learn vanilla js',
desc: 'A vanilla JS roadmap, along with learning resources and project ideas to help you get started.',
url: 'https://learnvanillajs.com/'
},
] ]
} }
}, },
@@ -31,9 +36,5 @@ export default {
h1 { h1 {
margin-bottom: 2rem; margin-bottom: 2rem;
} }
.cards {
display:grid;
grid-template-columns: repeat(4, 20%);
grid-gap: 3rem;
}
</style> </style>

View File

@@ -42,9 +42,4 @@ export default {
h1 { h1 {
margin-bottom: 2rem; margin-bottom: 2rem;
} }
.cards {
display:grid;
grid-template-columns: repeat(4, 20%);
grid-gap: 3rem;
}
</style> </style>