VueTube/NUXT/layouts/default.vue

96 lines
2.5 KiB
Vue
Raw Normal View History

2022-01-24 22:56:57 +00:00
<template>
2022-02-25 00:33:03 +00:00
<v-app class="background">
<v-card class="topNav rounded-0" style="display: flex;" 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 00:33:03 +00:00
<v-btn text class="toolbarAction" color="white"><v-icon>mdi-magnify</v-icon></v-btn>
2022-02-25 00:33:03 +00:00
<v-menu offset-y content-class="mt-4">
<template v-slot:activator="{ on, attrs }">
<v-btn text class="toolbarAction" v-bind="attrs" v-on="on" color="white" style="padding-right: 0 !important;"><v-icon>mdi-dots-vertical</v-icon></v-btn>
</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>
2022-02-25 00:33:03 +00:00
<div class="background" style="min-height: 100%">
2022-01-24 22:56:57 +00:00
<nuxt />
2022-02-24 19:45:36 +00:00
</div>
2022-01-24 22:56:57 +00:00
2022-02-25 00:33:03 +00:00
<v-bottom-navigation v-model="tabSelection" shift class="bottomNav background rounded-0">
2022-02-24 19:45:36 +00:00
<v-btn v-for="(item, i) in tabs" :key="i" class="navButton" :to="item.link">
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: 1em;
}
.bottomNav {
position: absolute;
bottom: 0;
}
2022-01-25 02:19:18 +00:00
.navButton {
width: 20vw !important;
}
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>