aula-virtual page

This commit is contained in:
María
2025-08-01 15:07:58 +02:00
committed by María
parent 838e6a3bdb
commit e293c58f76
10 changed files with 213 additions and 25 deletions

41
components/CardCourse.vue Normal file
View File

@@ -0,0 +1,41 @@
<template>
<div
class="flex flex-col rounded-3xl border-4 border-white min-h-64 w-full"
:class="{
'bg-consumo-extra-light': color === 'consumo',
'bg-iguales-extra-light': color === 'iguales',
'bg-aula-extra-light': color === 'aula',
'bg-certifica-extra-light': color === 'certifica',
'bg-foro-extra-light': color === 'foro',
'bg-ods-extra-light': color === 'ods',
}">
<div class="flex flex-col gap-2 bg-white px-6 py-8 rounded-b-2xl mt-auto min-h-44">
<h4 class="text-5.5 font-semibold uppercase">{{ title }}</h4>
<p class="text-base" v-html="description"></p>
</div>
</div>
</template>
<script>
export default {
props: {
color: {
type: String,
default: "consumo",
},
title: {
type: String,
default: ''
},
description: {
type: String,
default: ''
}
},
computed: {
langcode() {
return this.$store.getters.langcode;
},
},
}
</script>

View File

@@ -22,20 +22,15 @@
/>
<!-- <img v-else src="" alt="imagen-error"> -->
<!-- TODO: Add a fallback image -->
<p
v-if="index"
class="w-full h-full rounded-full text-2xl font-bold"
>{{ index }}</p>
</div>
<div class="flex flex-col gap-4 items-center">
<p class="text-5.5 font-semibold uppercase">{{ title }}</p>
<p class="text-center text-base" v-html="description"></p>
</div>
</NuxtLink>
<div v-if="!link" class="flex flex-col gap-4 p-8 items-center">
<div class="h-25 w-25">
<div v-if="!link" class="flex flex-col gap-4 p-8 items-center w-full">
<div v-if="image" class="h-25 w-25">
<img
v-if="image"
:src="`/img/${image.src}`"
:alt="image.alt"
class="w-full h-full object-cover"
@@ -43,6 +38,10 @@
<!-- <img v-else src="" alt="imagen-error"> -->
<!-- TODO: Add a fallback image -->
</div>
<div v-if="number" class="h-15 w-15">
<h3 class="w-full h-full rounded-full border font-bold flex items-center justify-center">
{{ number }}</h3>
</div>
<div class="flex flex-col gap-4 items-center text-center">
<p class="text-5.5 font-semibold uppercase">{{ title }}</p>
<p class="text-center text-base" v-html="description"></p>
@@ -68,12 +67,9 @@ export default {
},
image: {
type: Object,
default: () => ({
src: "",
alt: "",
}),
default: null,
},
index: {
number: {
type: String,
default: null
},

View File

@@ -29,18 +29,26 @@
'col-span-12 lg:col-span-4': display === 'col-3-transparent',
'col-span-12 md:col-span-6 lg:col-span-3': display === 'col-4',
}">
<CardTool
<CardTool
v-if="cardsType === 'colored' || cardsType === 'number' || cardsType === 'transparent'"
:color="item.color"
:title="item.title"
:description="item.description"
:image="item.image"
:link="item.link"
:number="item.number"
class=""
/>
<CardCourse
v-if="cardsType === 'course'"
:color="item.color"
:title="item.title"
:description="item.description"
/>
</li>
</ul>
<div v-if="hasButton && buttonSection" class="flex flex-col justify-center items-center mt-8">
<h4 class="font-semibold uppercase">{{ buttonSection.title }}</h4>
<h4 v-if="buttonSection.title" class="font-semibold uppercase">{{ buttonSection.title }}</h4>
<NuxtLink v-if="buttonSection?.button" :to="buttonSection?.button?.link">
<ButtonCTA :color="buttonSection?.button?.color" class="uppercase mt-6">
{{ buttonSection?.button?.label }}
@@ -77,6 +85,10 @@ export default {
type: String,
default: "",
},
cardsType: {
type: String,
default: "transparent", // 'colored', 'number', 'transparent'
},
cards: {
type: Array,
default: () => [],