2019-01-02 21:12:22 +00:00
|
|
|
<template>
|
2019-01-02 22:14:56 +00:00
|
|
|
<section :class="{ 'is-open': isOpen }"
|
|
|
|
class="menu-drawer menu-layout"
|
|
|
|
@click="$emit('toggleMenu')">
|
|
|
|
<div class="menu-content">
|
2019-01-04 12:09:44 +00:00
|
|
|
<nav class="menu-content__body">
|
|
|
|
<ul class="site-nav">
|
|
|
|
<li v-for="item in siteNav"
|
|
|
|
:key="item.to">
|
|
|
|
<nuxt-link :to="item.to">{{ item.text }}</nuxt-link>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
2019-01-02 22:14:56 +00:00
|
|
|
<footer class="menu-content__footer"></footer>
|
2019-01-02 21:12:22 +00:00
|
|
|
</div>
|
2019-01-02 22:14:56 +00:00
|
|
|
<div class="menu-header">
|
|
|
|
<div class="menu-header__inner">This is the Menu Header</div>
|
2019-01-02 21:12:22 +00:00
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
props: {
|
2019-01-02 22:14:56 +00:00
|
|
|
isOpen: {
|
|
|
|
type: Boolean,
|
|
|
|
required: true
|
|
|
|
}
|
2019-01-02 21:12:22 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
data () {
|
|
|
|
return {
|
2019-01-04 12:09:44 +00:00
|
|
|
siteNav: [
|
|
|
|
{ 'to': '/', 'text': 'Home'},
|
|
|
|
{ 'to': '/galleries', 'text': 'Galleries' }
|
|
|
|
]
|
2019-01-02 21:12:22 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2019-01-02 22:14:56 +00:00
|
|
|
.menu-drawer {
|
2019-01-02 21:12:22 +00:00
|
|
|
position: absolute;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
right: 0;
|
|
|
|
top: -100%;
|
|
|
|
|
|
|
|
transition: transform .5s;
|
|
|
|
transform: translate3d(0, $site-menu__header-width, 0);
|
|
|
|
|
|
|
|
background-color: $color__bg-menu;
|
|
|
|
opacity: .7;
|
|
|
|
|
|
|
|
&.is-open {
|
|
|
|
transform: translate3d(0, 100%, 0);
|
|
|
|
}
|
|
|
|
|
2019-01-03 14:06:28 +00:00
|
|
|
@media (min-width: $bp__layout) {
|
2019-01-03 18:32:11 +00:00
|
|
|
width: 50%;
|
2019-01-02 21:12:22 +00:00
|
|
|
max-width: 30em;
|
|
|
|
top: 0;
|
|
|
|
right: 100%;
|
|
|
|
transform: translate3d($site-menu__header-width, 0, 0);
|
|
|
|
|
|
|
|
&.is-open {
|
|
|
|
transform: translate3d(100%, 0, 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-01-02 22:14:56 +00:00
|
|
|
.menu-layout {
|
2019-01-02 21:12:22 +00:00
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
|
2019-01-03 14:06:28 +00:00
|
|
|
@media (min-width: $bp__layout) {
|
2019-01-02 21:12:22 +00:00
|
|
|
flex-direction: row;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-01-02 22:14:56 +00:00
|
|
|
.menu-content {
|
2019-01-02 21:12:22 +00:00
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
background-color: blue; // TEMP
|
|
|
|
}
|
|
|
|
|
2019-01-02 22:14:56 +00:00
|
|
|
.menu-header {
|
2019-01-02 21:41:34 +00:00
|
|
|
position: relative;
|
2019-01-02 21:12:22 +00:00
|
|
|
flex: 0 0 $site-menu__header-height;
|
|
|
|
|
2019-01-03 14:06:28 +00:00
|
|
|
@media (min-width: $bp__layout) {
|
2019-01-02 21:41:34 +00:00
|
|
|
max-width: $site-menu__header-width;
|
|
|
|
}
|
|
|
|
|
2019-01-02 21:12:22 +00:00
|
|
|
background-color: cyan; // TEMP
|
|
|
|
}
|
2019-01-02 21:41:34 +00:00
|
|
|
|
2019-01-02 22:14:56 +00:00
|
|
|
.menu-header__inner {
|
2019-01-02 21:41:34 +00:00
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
background-color: rgba(green, .5);
|
|
|
|
|
2019-01-03 14:06:28 +00:00
|
|
|
@media (min-width: $bp__layout) {
|
2019-01-02 21:41:34 +00:00
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
right: 100%;
|
|
|
|
width: 100vh;
|
|
|
|
height: $site-menu__header-width;
|
|
|
|
|
|
|
|
transform-origin: 100% 0;
|
|
|
|
transform: rotate(-90deg);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2019-01-02 21:12:22 +00:00
|
|
|
</style>
|