feat: alle functionaliteiten van de user homepage zijn geïmplementeerd
This commit is contained in:
parent
54a2cf0800
commit
0d635fc6a1
6 changed files with 26 additions and 15 deletions
|
@ -4,7 +4,7 @@
|
|||
import { useI18n } from "vue-i18n";
|
||||
import {AGE_TO_THEMES, THEMESITEMS} from "@/utils/constants.ts";
|
||||
|
||||
// Receive the selectedTheme from the parent component
|
||||
// Receive the selectedTheme and selectedAge from the parent component
|
||||
const props = defineProps({
|
||||
selectedTheme: {
|
||||
type: String,
|
||||
|
@ -31,7 +31,6 @@
|
|||
// Update the cards value with the fetched themes
|
||||
allCards.value = await response.json();
|
||||
cards.value = allCards.value;
|
||||
//console.log(allCards.value);
|
||||
} catch (error) {
|
||||
console.error("Error fetching themes:", error);
|
||||
}
|
||||
|
|
|
@ -1,18 +1,23 @@
|
|||
<script setup lang="ts">
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
const { t } = useI18n();
|
||||
const { t } = useI18n();
|
||||
|
||||
defineProps<{
|
||||
path: string;
|
||||
title: string;
|
||||
description: string;
|
||||
image: string;
|
||||
}>();
|
||||
defineProps<{
|
||||
path: string;
|
||||
title: string;
|
||||
description: string;
|
||||
image: string;
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<v-card variant="outlined" class="theme-card d-flex flex-column">
|
||||
<v-card
|
||||
variant="outlined"
|
||||
class="theme-card d-flex flex-column"
|
||||
:to="`theme/${path}`"
|
||||
link
|
||||
>
|
||||
<v-card-title class="title-container">
|
||||
<v-img
|
||||
v-if="image"
|
||||
|
@ -39,6 +44,11 @@
|
|||
flex-direction: column;
|
||||
height: 100%;
|
||||
padding: 1rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.theme-card:hover {
|
||||
background-color: rgba(0, 0, 0, 0.03);
|
||||
}
|
||||
|
||||
.title-container {
|
||||
|
@ -57,5 +67,8 @@
|
|||
|
||||
.title {
|
||||
flex-grow: 1;
|
||||
white-space: normal;
|
||||
overflow-wrap: break-word;
|
||||
word-break: break-word;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue