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.
This commit is contained in:
parent
8c8b561f1a
commit
250ca9a1ac
45 changed files with 662 additions and 1358 deletions
34
components/EventCard.vue
Normal file
34
components/EventCard.vue
Normal file
|
@ -0,0 +1,34 @@
|
|||
<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>
|
Loading…
Add table
Add a link
Reference in a new issue