VueTube/NUXT/layouts/default.vue

99 lines
2.8 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 />
<v-btn text class="toolbarAction mr-2 fill-height" color="white" style="padding-right: 0 !important;"><v-icon>mdi-magnify</v-icon></v-btn>
<v-menu offset-y content-class="mt-8">
2022-02-25 00:33:03 +00:00
<template v-slot:activator="{ on, attrs }">
<v-btn text class="toolbarAction fill-height" v-bind="attrs" v-on="on" color="white" style="padding-right: 0 !important;"><v-icon>mdi-dots-vertical</v-icon></v-btn>
2022-02-25 00:33:03 +00:00
</template>
<v-list>
<v-list-item v-for="(item, index) in dropdownMenu" :key="index">
<nuxt-link :to="item.link" style="text-decoration: none;" class="info--text">{{ item.title }}</nuxt-link>
</v-list-item>
</v-list>
</v-menu>
2022-01-24 23:16:53 +00:00
</v-card>
<div class="accent" style="height: 100%">
<div class="background" style="height: 100%; border-radius: 1rem 1rem 0 0;">
<nuxt />
</div>
2022-02-24 19:45:36 +00:00
</div>
2022-01-24 22:56:57 +00:00
<v-bottom-navigation v-model="tabSelection" shift class="bottomNav py-4 background" style="height: 5rem;">
<v-btn v-for="(item, i) in tabs" :key="i" rounded class="navButton mx-2" style="height: 3rem; border-radius: 2rem;" :to="item.link">
2022-02-24 19:45:36 +00:00
2022-01-24 22:56:57 +00:00
<span v-text="item.name" />
2022-02-24 19:45:36 +00:00
<v-icon v-text="item.icon" :color="tabSelection == i ? 'primary' : 'grey'" />
2022-01-24 22:56:57 +00:00
</v-btn>
</v-bottom-navigation>
</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: 50px !important;
}
2022-01-24 23:16:53 +00:00
.topNav {
padding: 1rem;
2022-01-24 23:16:53 +00:00
}
.bottomNav {
position: fixed;
2022-01-24 23:16:53 +00:00
bottom: 0;
}
2022-01-25 02:19:18 +00:00
.navButton {
width: 25vw !important;
font-size: .66rem !important;
2022-01-25 02:19:18 +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-01-25 03:10:51 +00:00
transform: translateY(-2.5%);
border-radius: 5px;
border-bottom-left-radius: 5px !important;
border-bottom-right-radius: 5px !important;
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: () => ({
2022-01-25 02:45:23 +00:00
tabSelection: 0,
2022-01-24 22:56:57 +00:00
tabs: [
2022-01-25 03:10:51 +00:00
{ name: "Home", icon: "mdi-home", link: "/" },
2022-02-24 19:45:36 +00:00
//{ name: "Shorts", icon: "mdi-lightning-bolt", link: "/shorts" },
//{ name: "Upload", icon: "mdi-plus", link: "/upload" },
2022-01-25 03:10:51 +00:00
{ name: "Subscriptions", icon: "mdi-youtube-subscription", link: "/subs" },
{ name: "Library", icon: "mdi-view-list", link: "/library" },
],
dropdownMenu: [
{ title: "Settings", link: "/settings" },
{ title: "About", link: "/about" }
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>