it-tools/layouts/default.vue

202 lines
4.1 KiB
Vue
Raw Normal View History

2020-12-21 22:06:13 +01:00
<template>
<v-app dark>
<v-navigation-drawer
v-model="drawer"
fixed
app
>
2021-02-13 19:55:45 +01:00
<div class="small-hero">
<HeroGradient />
<div class="small-hero-content">
<div class="small-hero-content-logo">
<LogoOutlined />
</div>
<div class="small-hero-content-title">
{{ title }}
</div>
</div>
2021-02-06 11:14:28 +01:00
</div>
2021-03-14 20:11:39 +01:00
<SearchBar class="hidden-sm-and-up" />
2020-12-21 22:06:13 +01:00
<v-list>
2021-02-13 19:55:45 +01:00
<div v-for="(items, section) in toolRoutesSections" :key="section">
<v-subheader class="mt-4 pl-4">
{{ section }}
</v-subheader>
<v-list-item
v-for="(item, i) in items"
:key="i"
2021-03-14 20:11:39 +01:00
:to="item.path"
2021-02-13 19:55:45 +01:00
router
exact
dense
>
<v-list-item-action>
2021-03-14 20:11:39 +01:00
<v-icon color="primary">
{{ item.config.icon }}
</v-icon>
2021-02-13 19:55:45 +01:00
</v-list-item-action>
<v-list-item-content>
<v-list-item-title v-text="item.config.title" />
</v-list-item-content>
</v-list-item>
</div>
2020-12-21 22:06:13 +01:00
</v-list>
</v-navigation-drawer>
2021-02-06 11:14:28 +01:00
<v-app-bar
app
flat
height="60px"
>
2021-02-13 19:55:45 +01:00
<v-app-bar-nav-icon @click.stop="drawer = !drawer" />
2021-03-14 20:11:39 +01:00
<v-toolbar-title>
<NuxtLink to="/" class="title">
{{ title }}
</NuxtLink>
</v-toolbar-title>
<v-spacer />
<SearchBar class="hidden-sm-and-down" />
2021-02-13 19:55:45 +01:00
<v-spacer />
2021-03-14 20:11:39 +01:00
<NuxtLink to="/how-to-report-bug-or-request">
Bug / Request
</NuxtLink>
<NuxtLink to="/about">
About
</NuxtLink>
<a href="https://github.com/CorentinTh/it-tools" target="_blank" class="github-link">
<v-icon>mdi-github</v-icon>
</a>
2020-12-21 22:06:13 +01:00
</v-app-bar>
2021-02-06 11:14:28 +01:00
2020-12-21 22:06:13 +01:00
<v-main>
<v-container>
2021-02-13 19:55:45 +01:00
<nuxt />
2020-12-21 22:06:13 +01:00
</v-container>
</v-main>
2021-03-14 20:11:39 +01:00
<!--<v-footer app>-->
<!-- <span>&copy; {{ new Date().getFullYear() }}</span>-->
<!--</v-footer>-->
2020-12-21 22:06:13 +01:00
</v-app>
</template>
2021-02-06 11:14:28 +01:00
<script lang="ts">
2021-02-13 19:55:45 +01:00
import {Component, mixins} from 'nuxt-property-decorator'
2021-03-14 20:11:39 +01:00
import {ToolRoutesMixin} from '~/mixins/tool-routes.mixin'
2021-02-13 19:55:45 +01:00
import LogoOutlined from '~/assets/logo-outlined.svg?inline'
import HeroGradient from '~/assets/small-hero-gradient.svg?inline'
2021-03-14 20:11:39 +01:00
import SearchBar from '~/components/SearchBar.vue'
2021-02-06 11:14:28 +01:00
2021-02-13 19:55:45 +01:00
@Component({
components: {
LogoOutlined,
2021-03-14 20:11:39 +01:00
HeroGradient,
SearchBar
2021-02-13 19:55:45 +01:00
}
})
2021-03-14 20:11:39 +01:00
export default class DefaultLayout extends mixins(ToolRoutesMixin) {
2021-02-06 11:14:28 +01:00
title = 'IT - Tools'
drawer = false
2021-02-13 19:55:45 +01:00
items = []
2020-12-21 22:06:13 +01:00
}
</script>
2021-02-06 11:14:28 +01:00
<style lang="less">
2021-03-14 20:11:39 +01:00
.v-toolbar__content {
a {
color: #ffffff;
text-decoration: none;
transition: all ease 0.2s;
margin: 0 10px;
opacity: 0.5;
font-size: 15px;
&.title{
opacity: 1;
}
&:hover {
opacity: 1;
color: var(--v-primary-base);
}
}
.github-link {
border-bottom: none;
margin-left: 10px;
transition: all ease 0.2s;
.v-icon {
font-size: 37px !important;
color: var(--v-primary-base);
transition: all ease 0.2s;
transition: all ease 0.2s;
}
}
}
2021-02-13 19:55:45 +01:00
.small-hero {
position: relative;
.small-hero-content {
padding-top: 30px;
position: absolute;
top: 0;
left: 0;
text-align: center;
width: 100%;
.small-hero-content-logo {
2021-03-14 20:11:39 +01:00
width: 25%;
2021-02-13 19:55:45 +01:00
margin: 0 auto;
}
.small-hero-content-title {
2021-03-14 20:11:39 +01:00
margin-top: 10px;
font-size: 25px;
2021-02-13 19:55:45 +01:00
font-weight: 600;
font-family: Ubuntu, Roboto, sans-serif;
}
}
}
2021-03-14 20:11:39 +01:00
.v-navigation-drawer__content{
.v-list-item--active{
color: var(--v-anchor-base);
border-left: 3px solid var(--v-primary-base);
}
}
2021-02-06 11:14:28 +01:00
.v-application {
background-color: var(--v-background-base, #121212) !important;
}
2021-02-13 19:55:45 +01:00
.v-snack {
background: none !important;
}
.v-snack__content {
font-weight: bold !important;
color: #fff !important;
}
2021-02-06 11:14:28 +01:00
.theme--dark {
.v-card,
.v-footer,
.v-navigation-drawer,
.v-app-bar.v-toolbar.v-sheet {
background-color: var(--v-foreground-base, #121212) !important;
}
.v-footer,
.v-app-bar.v-toolbar.v-sheet {
background-color: var(--v-toolbar-base, #121212) !important;
}
}
</style>