Responsive home page

This commit is contained in:
Chocobozzz 2019-09-23 14:19:51 +02:00
parent 6a7b11cb7f
commit 584be02a8c
No known key found for this signature in database
GPG key ID: 583A612D890159BE
6 changed files with 134 additions and 17 deletions

View file

@ -6,11 +6,19 @@
</div> </div>
</template> </template>
<style scoped> <style lang="scss" scoped>
@import './scss/_variables.scss';
.container { .container {
padding-top: 0; padding-top: 0;
margin-top: 0; margin-top: 0;
width: 1024px; width: 1024px;
@media screen and (max-width: $responsive-screen) {
width: 100%;
max-width: unset;
padding: 0;
}
} }
</style> </style>

View file

@ -50,6 +50,17 @@
.root { .root {
display: flex; display: flex;
@media screen and (max-width: $small-screen) {
flex-direction: column;
.left {
align-items: center !important;
display: flex !important;
flex-direction: column !important;
margin-bottom: 20px !important;
}
}
} }
.left { .left {
@ -107,6 +118,16 @@
.tags { .tags {
display: flex; display: flex;
flex-wrap: wrap;
@media screen and (max-width: $responsive-screen) {
justify-content: center;
}
.tag {
margin-top: 10px;
}
} }
} }
</style> </style>

View file

@ -1,3 +1,5 @@
@import './_variables';
@mixin disable-default-a-behaviour { @mixin disable-default-a-behaviour {
&:hover, &:focus, &:active { &:hover, &:focus, &:active {
text-decoration: none !important; text-decoration: none !important;
@ -5,3 +7,28 @@
color: inherit !important; color: inherit !important;
} }
} }
@mixin one-column {
width: 600px;
margin: auto;
display: flex;
flex-direction: column;
align-items: center;
img {
margin: 30px 0;
& + .citation {
margin-top: 0 !important;
}
}
@media screen and (max-width: $small-screen) {
width: 100%;
img {
max-width: 100% !important;
margin: 30px auto !important;
}
}
}

View file

@ -2,3 +2,6 @@ $font-semibold: 600;
$orange: #f67e08; $orange: #f67e08;
$grey: #5e5e5e; $grey: #5e5e5e;
$responsive-screen: 992px;
$small-screen: 700px;

View file

@ -59,6 +59,14 @@ main {
background-color: #fff; background-color: #fff;
box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.35); box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.35);
border: solid 1px #d9d9d9; border: solid 1px #d9d9d9;
@media screen and (max-width: $responsive-screen) {
padding: 0 15px;
}
@media screen and (max-width: $small-screen) {
padding: 0 10px;
}
} }
.caret::after { .caret::after {
@ -89,10 +97,26 @@ main {
width: 18px; width: 18px;
height: 18px; height: 18px;
} }
@media screen and (max-width: $responsive-screen) {
width: auto;
font-size: 14px;
flex-direction: column;
text-align: center;
}
@media screen and (max-width: $small-screen) {
min-width: auto !important;
padding: 0 5px !important;
}
} }
.jpt-big-button-icon svg { .jpt-big-button-icon svg {
margin-right: 30px; margin-right: 30px;
@media screen and (max-width: $responsive-screen) {
margin-right: 0;
}
} }
.jpt-button-medium { .jpt-button-medium {
@ -120,6 +144,10 @@ main {
height: 40px; height: 40px;
vertical-align: sub; vertical-align: sub;
} }
@media screen and (max-width: $small-screen) {
margin: 50px 0 30px 0;
}
} }
.subtitle { .subtitle {
@ -128,22 +156,14 @@ main {
font-weight: $font-semibold; font-weight: $font-semibold;
margin-top: 100px; margin-top: 100px;
white-space: nowrap; white-space: nowrap;
@media screen and (max-width: $responsive-screen) {
white-space: normal;
}
} }
.one-column { .one-column {
width: 600px; @include one-column;
margin: auto;
display: flex;
flex-direction: column;
align-items: center;
img {
margin: 30px 0;
& + .citation {
margin-top: 0 !important;
}
}
} }
.bottom-link-wrapper { .bottom-link-wrapper {

View file

@ -250,12 +250,12 @@
<img :src="buildImgUrl('peertube-federation-multiplicity.png')" alt="PeerTube you play illustration"/> <img :src="buildImgUrl('peertube-federation-multiplicity.png')" alt="PeerTube you play illustration"/>
</div> </div>
<div class="buttons-row"> <div class="buttons-row explore-create-account">
<router-link to="/content-selections" class="jpt-button"> <router-link to="/content-selections" class="jpt-button">
<span v-translate>Explorer les contenus</span> <span v-translate>Explorer les contenus</span>
</router-link> </router-link>
<div> <div class="create-account-block">
<router-link to="/instances" class="jpt-button"> <router-link to="/instances" class="jpt-button">
<span v-translate>Créer un compte</span> <span v-translate>Créer un compte</span>
</router-link> </router-link>
@ -307,6 +307,9 @@
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss">
@import '../scss/_variables.scss';
@import '../scss/_mixins.scss';
.buttons-row { .buttons-row {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -314,7 +317,23 @@
.jpt-button { .jpt-button {
width: 330px; width: 330px;
height: 50px; min-height: 50px;
}
@media screen and (max-width: $responsive-screen) {
padding: 0;
.jpt-button {
margin: 0 3px 0 0;
}
&.explore-create-account {
flex-direction: column;
.create-account-block {
margin-top: 50px;
}
}
} }
} }
@ -345,6 +364,19 @@
font-size: 24px; font-size: 24px;
font-weight: 600; font-weight: 600;
} }
@media screen and (max-width: $small-screen) {
padding: 15px 0;
.brand {
height: 25px !important
}
.description {
font-size: 20px;
margin-left: 20px;
}
}
} }
.marketing { .marketing {
@ -358,6 +390,10 @@
.ambition { .ambition {
display: flex; display: flex;
@media screen and (max-width: $responsive-screen) {
@include one-column;
}
& > img, & > img,
& > div { & > div {
flex-basis: 100%; flex-basis: 100%;
@ -365,6 +401,8 @@
img { img {
margin-right: 30px; margin-right: 30px;
height: 231px;
width: 416px;
} }
} }
} }