feat(frontend): link naar leerpad-zoekpagina aan homepagina toegevoegd
This commit is contained in:
parent
95a3d7b0d9
commit
5b9b939c0b
6 changed files with 44 additions and 10 deletions
|
@ -11,7 +11,7 @@
|
|||
selectedAge: { type: String, required: true },
|
||||
});
|
||||
|
||||
const { locale } = useI18n();
|
||||
const { t, locale } = useI18n();
|
||||
const language = computed(() => locale.value);
|
||||
|
||||
const { data: allThemes, isLoading, error } = useThemeQuery(language);
|
||||
|
@ -74,6 +74,22 @@
|
|||
class="fill-height"
|
||||
/>
|
||||
</v-col>
|
||||
<v-col
|
||||
cols="12"
|
||||
sm="6"
|
||||
md="4"
|
||||
lg="4"
|
||||
class="d-flex"
|
||||
>
|
||||
<ThemeCard
|
||||
path="/learningPath/search"
|
||||
:is-absolute-path="true"
|
||||
:title="t('searchAllLearningPathsTitle')"
|
||||
:description="t('searchAllLearningPathsDescription')"
|
||||
icon="mdi-magnify"
|
||||
class="fill-height"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</template>
|
||||
|
|
|
@ -1,21 +1,26 @@
|
|||
<script setup lang="ts">
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { computed } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
defineProps<{
|
||||
const props = defineProps<{
|
||||
path: string;
|
||||
isAbsolutePath?: boolean;
|
||||
title: string;
|
||||
description: string;
|
||||
image: string;
|
||||
image?: string;
|
||||
icon?: string;
|
||||
}>();
|
||||
|
||||
const routerLink = computed(() => props.isAbsolutePath ? props.path : `/theme/${props.path}`);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<v-card
|
||||
variant="outlined"
|
||||
class="theme-card d-flex flex-column"
|
||||
:to="`theme/${path}`"
|
||||
:to="routerLink"
|
||||
link
|
||||
>
|
||||
<v-card-title class="title-container">
|
||||
|
@ -27,12 +32,17 @@
|
|||
contain
|
||||
class="title-image"
|
||||
></v-img>
|
||||
<v-icon
|
||||
v-if="icon"
|
||||
class="title-image"
|
||||
>{{ icon }}</v-icon>
|
||||
|
||||
<span class="title">{{ title }}</span>
|
||||
</v-card-title>
|
||||
<v-card-text class="description flex-grow-1">{{ description }}</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-btn
|
||||
:to="`theme/${path}`"
|
||||
:to="routerLink"
|
||||
variant="text"
|
||||
>
|
||||
{{ t("read-more") }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue