VueTube/NUXT/layouts/default.vue

88 lines
2.1 KiB
Vue
Raw Normal View History

2022-01-24 22:56:57 +00:00
<template>
<v-app>
<v-card class="topNav rounded-0" style="display: flex; box-shadow: none !important;" color="accent white--text">
2022-02-24 19:55:29 +00:00
<h2 v-text="page" />
2022-01-25 02:45:23 +00:00
<v-spacer />
2022-02-25 13:06:13 +00:00
<v-btn text class="toolbarAction mr-2 fill-height" color="white" @click="search = !search"><v-icon>mdi-magnify</v-icon></v-btn>
2022-02-25 18:57:58 +00:00
<v-menu offset-y content-class="mt-8">
2022-02-25 00:33:03 +00:00
<template v-slot:activator="{ on, attrs }">
2022-02-25 19:05:13 +00:00
<v-btn text class="toolbarAction fill-height" v-bind="attrs" v-on="on" color="white"><v-icon>mdi-dots-vertical</v-icon></v-btn>
2022-02-25 13:06:13 +00:00
2022-02-25 00:33:03 +00:00
</template>
2022-02-25 19:08:26 +00:00
<v-list style="min-width: 180px;">
2022-02-25 00:33:03 +00:00
<v-list-item v-for="(item, index) in dropdownMenu" :key="index">
2022-02-25 19:08:26 +00:00
<v-btn text :to="item.link" style="text-decoration: none; width: 100%;" class="info--text">{{ item.title }}</v-btn>
2022-02-25 00:33:03 +00:00
</v-list-item>
</v-list>
</v-menu>
2022-03-02 17:53:04 +00:00
2022-01-24 23:16:53 +00:00
</v-card>
<div class="accent" style="height: 100%">
2022-03-02 17:53:04 +00:00
<div class="background">
2022-03-02 13:14:52 +00:00
<searchOverlay v-if="search" />
2022-03-02 19:11:16 +00:00
<nuxt v-show="!search" />
</div>
2022-02-24 19:45:36 +00:00
</div>
2022-01-24 22:56:57 +00:00
2022-03-02 13:14:52 +00:00
<bottomNavigation v-if="!search" />
2022-01-24 22:56:57 +00:00
</v-app>
</template>
2022-02-24 19:45:36 +00:00
<style>
* {
font-family: Arial, Helvetica, sans-serif !important;
}
</style>
2022-01-24 23:16:53 +00:00
<style scoped>
.toolbarAction {
min-width: 40px !important;
}
2022-01-24 23:16:53 +00:00
.topNav {
padding: 1rem;
2022-03-02 17:53:04 +00:00
position: sticky;
top: 0;
z-index: 999;
2022-03-02 18:44:15 +00:00
/*border-radius: 0 0 1em 1em !important;*/
2022-01-24 23:16:53 +00:00
}
2022-01-25 02:45:23 +00:00
.topNavSearch {
2022-01-25 03:10:51 +00:00
margin-bottom: -10em;
2022-01-25 02:45:23 +00:00
margin-left: 2em;
2022-03-02 17:53:04 +00:00
/*transform: translateY(-2.5%);*/
}
.background {
height: 100%;
/*border-radius: 1rem 1rem 0 0;*/ /* Causes really weird display issues */
2022-01-25 02:45:23 +00:00
}
2022-01-24 23:16:53 +00:00
</style>
2022-01-24 22:56:57 +00:00
<script>
export default {
data: () => ({
search: false,
dropdownMenu: [
{ title: "Settings", link: "/settings" },
2022-02-28 15:24:06 +00:00
{ title: "About", link: "/about" },
{ title: "Logs", link: "/logs" }
2022-01-24 22:56:57 +00:00
]
}),
2022-02-24 19:55:29 +00:00
mounted() {
},
computed: {
page: function () {
let pageName = this.$route.path.split("/")[1];
pageName = pageName.charAt(0).toUpperCase() + pageName.slice(1);
return pageName || "Home";
}
2022-02-24 19:55:29 +00:00
}
2022-01-24 22:56:57 +00:00
}
</script>