frontend: added logo to navbar and sidebar
This commit is contained in:
22
frontend/src/components/Logo.vue
Normal file
22
frontend/src/components/Logo.vue
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<template>
|
||||||
|
<div class="logo">
|
||||||
|
<img src="/favicon.ico" alt="logo" height="24" width="24" class="me-1">
|
||||||
|
<b>MangaStatus</b>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.logo {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import {Options, Vue} from 'vue-property-decorator';
|
||||||
|
|
||||||
|
@Options({name: 'Logo'})
|
||||||
|
export default class Logo extends Vue {
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -4,6 +4,7 @@ import BootstrapThemeSwitch from '@/components/bootstrapThemeSwitch/BootstrapThe
|
|||||||
import AniListUserSearch from '@/components/navbar/AniListUserSearch.vue';
|
import AniListUserSearch from '@/components/navbar/AniListUserSearch.vue';
|
||||||
import MangaUpdatesUpdater from '@/components/navbar/MangaUpdatesUpdater.vue';
|
import MangaUpdatesUpdater from '@/components/navbar/MangaUpdatesUpdater.vue';
|
||||||
import LocaleSelector from '@/components/locale/LocaleSelector.vue';
|
import LocaleSelector from '@/components/locale/LocaleSelector.vue';
|
||||||
|
import Logo from '@/components/Logo.vue';
|
||||||
|
|
||||||
@Options({
|
@Options({
|
||||||
name: 'NavBar',
|
name: 'NavBar',
|
||||||
@@ -11,6 +12,7 @@ import LocaleSelector from '@/components/locale/LocaleSelector.vue';
|
|||||||
AniListUserSearch,
|
AniListUserSearch,
|
||||||
BootstrapThemeSwitch,
|
BootstrapThemeSwitch,
|
||||||
LocaleSelector,
|
LocaleSelector,
|
||||||
|
Logo,
|
||||||
MangaUpdatesUpdater,
|
MangaUpdatesUpdater,
|
||||||
},
|
},
|
||||||
emits: {
|
emits: {
|
||||||
@@ -30,6 +32,7 @@ export default class NavBar extends Vue {
|
|||||||
<i class="fa fa-bars me-2" @click="$emit('toggleSidebar')"/>
|
<i class="fa fa-bars me-2" @click="$emit('toggleSidebar')"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="navbar-nav flex-row">
|
<div class="navbar-nav flex-row">
|
||||||
|
<Logo class="navbar-logo"/>
|
||||||
<div class="nav-item">
|
<div class="nav-item">
|
||||||
<RouterLink class="nav-link active" aria-current="page" to="/">List</RouterLink>
|
<RouterLink class="nav-link active" aria-current="page" to="/">List</RouterLink>
|
||||||
</div>
|
</div>
|
||||||
@@ -58,6 +61,7 @@ export default class NavBar extends Vue {
|
|||||||
@import 'bootstrap/scss/variables';
|
@import 'bootstrap/scss/variables';
|
||||||
@import 'bootstrap/scss/mixins/breakpoints';
|
@import 'bootstrap/scss/mixins/breakpoints';
|
||||||
|
|
||||||
|
nav.navbar .navbar-logo,
|
||||||
nav.navbar .nav-item {
|
nav.navbar .nav-item {
|
||||||
margin-inline-end: 1rem;
|
margin-inline-end: 1rem;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {Options, Vue} from 'vue-class-component';
|
import {Options, Vue} from 'vue-class-component';
|
||||||
|
import Logo from '@/components/Logo.vue';
|
||||||
|
|
||||||
@Options({
|
@Options({
|
||||||
name: 'SideBar',
|
name: 'SideBar',
|
||||||
components: {},
|
components: {Logo},
|
||||||
emits: {
|
emits: {
|
||||||
'close': undefined,
|
'close': undefined,
|
||||||
},
|
},
|
||||||
@@ -14,11 +15,12 @@ export default class SideBar extends Vue {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<nav class="navbar border-bottom shadow flex-nowrap">
|
<nav class="navbar border-bottom shadow flex-nowrap">
|
||||||
<div class="sidebar-closer mx-1 c-pointer">
|
<div class="sidebar-closer mx-1 c-pointer d-flex flex-row align-items-center">
|
||||||
<i class="fa fa-arrow-left me-2" @click="$emit('close')"/>
|
<i class="fa fa-arrow-left me-2" @click="$emit('close')"/>
|
||||||
|
|
||||||
<!-- 'hack' to ensure this nav is the same height as the navbar -->
|
<!-- 'hack' to ensure this nav is the same height as the navbar -->
|
||||||
<input class="form-control d-inline mx-0 px-0" style="visibility: hidden; width: 0;"/>
|
<input class="form-control d-inline mx-0 px-0" style="visibility: hidden; width: 0;"/>
|
||||||
|
<Logo/>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user