Skip to content

Commit

Permalink
fix: issues with course images
Browse files Browse the repository at this point in the history
  • Loading branch information
Cryde committed Jan 1, 2024
1 parent b773ab2 commit 1deb090
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion assets/js/views/course/Course.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
v-for="category in courseCategories"
:key="category.order"
class="column has-text-centered mb-3 is-clickable has-text-dark">
<b-image :src="`/build/images/cours/${category.slug}.png`" responsive/>
<b-image :src="imagesByInstrument(category.slug)" responsive/>
<span class="is-block mt-3 is-uppercase">{{ category.title }}</span>
</router-link>
</div>
Expand All @@ -37,6 +37,13 @@ import {mapGetters} from 'vuex';
import Breadcrumb from "../../components/global/Breadcrumb.vue";
import AddVideoForm from "../user/Publication/add/video/AddVideoForm.vue";
import basse from '../../../images/cours/basse.png';
import batterie from '../../../images/cours/batterie.png';
import mao from '../../../images/cours/mao.png';
import divers from '../../../images/cours/divers.png';
import guitare from '../../../images/cours/guitare.png';
const instrumentsImages = {basse, batterie, mao, divers, guitare};
export default {
components: {AddVideoForm, Breadcrumb},
computed: {
Expand All @@ -52,6 +59,9 @@ export default {
this.$store.dispatch('publicationCategory/getCategories');
},
methods: {
imagesByInstrument(instrument) {
return instrumentsImages[instrument];
},
openAddVideoModal() {
this.$buefy.modal.open({
parent: this,
Expand Down

0 comments on commit 1deb090

Please sign in to comment.