frontend: added logo to navbar and sidebar

This commit is contained in:
wea_ondara
2023-11-25 18:42:05 +01:00
parent ab29804572
commit 33de453301
3 changed files with 30 additions and 2 deletions

View 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>

View File

@@ -4,6 +4,7 @@ import BootstrapThemeSwitch from '@/components/bootstrapThemeSwitch/BootstrapThe
import AniListUserSearch from '@/components/navbar/AniListUserSearch.vue';
import MangaUpdatesUpdater from '@/components/navbar/MangaUpdatesUpdater.vue';
import LocaleSelector from '@/components/locale/LocaleSelector.vue';
import Logo from '@/components/Logo.vue';
@Options({
name: 'NavBar',
@@ -11,6 +12,7 @@ import LocaleSelector from '@/components/locale/LocaleSelector.vue';
AniListUserSearch,
BootstrapThemeSwitch,
LocaleSelector,
Logo,
MangaUpdatesUpdater,
},
emits: {
@@ -30,6 +32,7 @@ export default class NavBar extends Vue {
<i class="fa fa-bars me-2" @click="$emit('toggleSidebar')"/>
</div>
<div class="navbar-nav flex-row">
<Logo class="navbar-logo"/>
<div class="nav-item">
<RouterLink class="nav-link active" aria-current="page" to="/">List</RouterLink>
</div>
@@ -58,6 +61,7 @@ export default class NavBar extends Vue {
@import 'bootstrap/scss/variables';
@import 'bootstrap/scss/mixins/breakpoints';
nav.navbar .navbar-logo,
nav.navbar .nav-item {
margin-inline-end: 1rem;
}

View File

@@ -1,9 +1,10 @@
<script lang="ts">
import {Options, Vue} from 'vue-class-component';
import Logo from '@/components/Logo.vue';
@Options({
name: 'SideBar',
components: {},
components: {Logo},
emits: {
'close': undefined,
},
@@ -14,11 +15,12 @@ export default class SideBar extends Vue {
<template>
<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')"/>
<!-- '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;"/>
<Logo/>
</div>
</nav>
</template>