Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
stritti committed Dec 13, 2023
2 parents ba020b4 + 58a6ef5 commit 1db5db7
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 4 deletions.
1 change: 1 addition & 0 deletions components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ declare module 'vue' {
BFormInput: typeof import('bootstrap-vue-next')['BFormInput']
BImg: typeof import('bootstrap-vue-next')['BImg']
BInputGroup: typeof import('bootstrap-vue-next')['BInputGroup']
BNav: typeof import('bootstrap-vue-next')['BNav']
BNavbar: typeof import('bootstrap-vue-next')['BNavbar']
BNavbarBrand: typeof import('bootstrap-vue-next')['BNavbarBrand']
BNavbarNav: typeof import('bootstrap-vue-next')['BNavbarNav']
Expand Down
17 changes: 15 additions & 2 deletions src/components/FilterSidebar.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
<template>
<BButton @click="click">Show OffCanvas</BButton>
<BOffcanvas v-model="show" />
<BButton @click="click">Kategorie</BButton>
<BOffcanvas v-model="show" >

<BNav vertical class="w-25">
<BNavItem to="/">Home</BNavItem>
<BNavItem to="/verleih">Verleihe</BNavItem>
<BNavItem to="/events">Events</BNavItem>
<BNavItem to="/about">Über uns</BNavItem>
</BNav>




</BOffcanvas>

</template>

<script setup lang="ts">
Expand Down
18 changes: 16 additions & 2 deletions src/components/bar/BarItem.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
<template>
<b-card img-src="https://picsum.photos/300/200" img-top>
<router-link :to="detailUrl">
<b-card :img-src="image" img-top>
<b-card-title>{{ bar.name }}</b-card-title>
</b-card>
</router-link>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { mapState } from "pinia";
import { useBarItemStore } from '@/stores/barItem'
export default defineComponent({
name: 'BarItem',
Expand All @@ -14,6 +17,17 @@ export default defineComponent({
type: Object,
required: true,
}
},
computed: {
...mapState(useBarItemStore, {
imageById: (state) => state.imageById
}),
image(): string {
return this.imageById(this.bar.id) as string;
},
detailUrl() {
return '/bar/' + this.bar.id
}
}
})
</script>

0 comments on commit 1db5db7

Please sign in to comment.