owltide/components/EventCard.vue
Hornwitser 250ca9a1ac Port application from Next.js to Nuxt
Nuxt is based on Vue.js and I find their building blocks to be much
neater compared to the React based Next.js.
2025-03-05 15:36:50 +01:00

34 lines
640 B
Vue

<template>
<section class="event">
<h3>{{ event.name }}</h3>
<p>{{ event.description ?? "No description provided" }}</p>
<h4>Timeslots</h4>
<ul>
<li v-for="slot in event.slots" :key="slot.id">
{{ slot.start }} - {{ slot.end }}
</li>
</ul>
</section>
</template>
<script lang="ts" setup>
import type { ScheduleEvent } from '~/shared/types/schedule';
defineProps<{
event: ScheduleEvent
}>()
</script>
<style scoped>
.event {
background: color-mix(in oklab, var(--background), grey 20%);
padding: 0.5rem;
border-radius: 0.5rem;
}
.event h3 {
margin: 0;
}
.event + .event {
margin-block-start: 0.5rem;
}
</style>