Skip to content

Commit

Permalink
サイドバーがヘッダーを覆うように修正
Browse files Browse the repository at this point in the history
  • Loading branch information
ErrorSyntax1 committed Dec 3, 2024
1 parent 9653926 commit d5cb159
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ watch([() => route.fullPath, isMobile], () => {
/>
<navigation-bar
v-if="isOpenNavigationBar"
v-model="isOpenNavigationBar"
:class="$style.navigationBar"
/>
<div :class="$style.content">
Expand Down Expand Up @@ -72,7 +73,6 @@ watch([() => route.fullPath, isMobile], () => {
.navigationBarCover {
position: absolute;
z-index: $z-index-navigationBarCover;
top: 5rem;
left: 0;
height: 100%;
width: 100%;
Expand All @@ -82,7 +82,6 @@ watch([() => route.fullPath, isMobile], () => {
.navigationBar {
position: absolute;
z-index: $z-index-navigationBar;
top: 5rem;
left: 0;
height: 100%;
width: 260px;
Expand Down
24 changes: 23 additions & 1 deletion src/components/NavigationBar/NavigationBar.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
<script lang="ts" setup>
import {defineModel} from 'vue'
import NavigationLinks from './NavigationLinks.vue'
import NavigationBarFooter from './NavigationBarFooter.vue'
import Icon from '../UI/Icon.vue';
const a = defineModel<boolean>({required: true})
</script>

<template>
<nav :class="$style.container">
<button
style="width: fit-content;"
@click="a=false"
>
<div :class="$style.closeContainer">
<icon name="mdi:chevron-left" />
<p>閉じる</p>
</div>
</button>
<navigation-links />
<navigation-bar-footer />
</nav>
Expand All @@ -14,8 +27,17 @@ import NavigationBarFooter from './NavigationBarFooter.vue'
.container {
display: flex;
flex-direction: column;
justify-content: space-between;
// justify-content: space-between;
background-color: $color-background-dim;
padding: 1rem 0;
gap: 1rem;
}
.closeContainer{
display: flex;
align-items: center;
justify-content: center;
font-size: 1.25rem;
gap: 16px;
color: $color-secondary;
}
</style>
1 change: 1 addition & 0 deletions src/components/NavigationBar/NavigationLinks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { routes } from '/@/lib/routeInfo'
<style lang="scss" module>
.list {
list-style: none;
flex-grow: 1;
li {
margin: 0.5rem 0;
Expand Down

0 comments on commit d5cb159

Please sign in to comment.