Update mobile navigation styling

This commit is contained in:
Ramon Wenger 2020-02-27 15:44:19 +01:00
parent 9d45d5d360
commit ba1f518816
6 changed files with 39 additions and 33 deletions

View File

@ -1,24 +1,31 @@
<template> <template>
<div class="mobile-header"> <div class="mobile-header">
<router-link to="/" data-cy="mobile-home-link">
<logo></logo>
</router-link>
<a @click="showMobileNavigation"> <a @click="showMobileNavigation">
<hamburger class="mobile-header__hamburger"></hamburger> <hamburger class="mobile-header__hamburger"></hamburger>
</a> </a>
<router-link to="/" data-cy="mobile-home-link">
<logo></logo>
</router-link>
<user-widget v-bind="me"></user-widget>
</div> </div>
</template> </template>
<script> <script>
import Logo from '@/components/icons/Logo'; import Logo from '@/components/icons/Logo';
import Hamburger from '@/components/icons/Hamburger'; import Hamburger from '@/components/icons/Hamburger';
import UserWidget from '@/components/UserWidget';
import me from '@/mixins/me';
export default { export default {
mixins: [me],
components: { components: {
Logo, Logo,
Hamburger Hamburger,
UserWidget
}, },
methods: { methods: {

View File

@ -42,30 +42,3 @@
} }
} }
</script> </script>
<style lang="scss">
@import "@/styles/_variables.scss";
@import "@/styles/_mixins.scss";
.book-subnavigation {
&__item {
@include small-text;
margin-bottom: $small-spacing;
cursor: pointer;
color: $color-silver-dark;
&--mobile {
color: $color-white;
}
&:last-of-type {
margin-bottom: 0;
}
&--active {
color: $color-brand;
}
}
}
</style>

View File

@ -84,11 +84,15 @@
right: 0; right: 0;
top: 0; top: 0;
bottom: 0; bottom: 0;
width: 333px;
background-color: $color-white; background-color: $color-white;
z-index: 10; z-index: 10;
box-shadow: 0 3px 9px 0 rgba(0, 0, 0, 0.12); box-shadow: 0 3px 9px 0 rgba(0, 0, 0, 0.12);
width: 100%;
@include desktop {
width: 333px;
}
display: flex; display: flex;
flex-direction: column; flex-direction: column;

View File

@ -0,0 +1,21 @@
.book-subnavigation {
&__item {
@include small-text;
margin-bottom: $small-spacing;
cursor: pointer;
color: $color-silver-dark;
&--mobile {
color: $color-white;
}
&:last-of-type {
margin-bottom: 0;
}
&--active {
color: $color-brand;
}
}
}

View File

@ -22,3 +22,4 @@
@import "public-page"; @import "public-page";
@import "student-submission"; @import "student-submission";
@import "module-activity"; @import "module-activity";
@import "book-subnavigation";