1
1
<script setup lang="ts">
2
- import type { PropType } from ' vue'
3
- import type { DirectusEvent } from ' @/utils/types'
4
- import { isDateInFuture } from ' @/utils/helpers'
2
+ import type { PropType } from " vue" ;
3
+ import type { DirectusEvent } from " @/utils/types" ;
4
+ import { isDateInFuture } from " @/utils/helpers" ;
5
5
6
6
const props = defineProps ({
7
7
event: {
8
8
type: Object as PropType <DirectusEvent >,
9
9
default : () => ({}),
10
10
},
11
- })
11
+ });
12
12
</script >
13
13
14
14
<template >
@@ -17,43 +17,55 @@ const props = defineProps({
17
17
>
18
18
<div v-if =" event.Date" class =" " >
19
19
<span
20
- class =" inline-flex rounded-lg p-3 ring-4 ring-white dark:ring-white/5" :class =" isDateInFuture(new Date(event.Date))
21
- ? 'bg-verse-50 text-verse-600 dark:text-verse-400 font-bold dark:bg-verse-900/10'
22
- : 'bg-gray-50 text-gray-700'
20
+ class =" inline-flex rounded-lg p-3 ring-4 ring-white dark:ring-white/5"
21
+ :class ="
22
+ isDateInFuture(new Date(event.Date))
23
+ ? 'bg-verse-50 text-verse-600 dark:text-verse-400 font-bold dark:bg-verse-900/10'
24
+ : 'bg-gray-50 text-gray-700'
23
25
"
24
26
>
25
- <div class =" mr-2 h-6 w-6" >
27
+ <div class =" mr-2 h-6 w-6 flex items-center " >
26
28
<Icon name =" carbon:calendar" />
27
29
</div >
28
30
<span >{{ new Date(event.Date).toDateString() }}</span >
29
31
</span >
30
32
</div >
31
33
<div class =" flex flex-col gap-4 md:gap-0" >
32
- <h3 class =" leading-2 text-xl md:text-2xl font-medium py-2 text-verse-500 dark:text-white" >
33
- <NuxtLink :href =" `meetup/${event.id}`" class =" w-[300px] md:w-96 focus:outline-none" >
34
+ <h3
35
+ class =" leading-2 text-xl md:text-2xl font-medium py-2 text-verse-500 dark:text-white"
36
+ >
37
+ <NuxtLink
38
+ :href =" `meetup/${event.id}`"
39
+ class =" w-[300px] md:w-96 focus:outline-none"
40
+ >
34
41
<span class =" absolute inset-0" aria-hidden =" true" />
35
42
{{ event?.title }}
36
43
</NuxtLink >
37
44
</h3 >
38
45
<div class =" flex gap-4 border-gray-100" >
39
- <div class =" flex gap-1 md:gap-0 items-center justify-start text-base font-medium text-gray-500" >
46
+ <div
47
+ class =" flex gap-1 md:gap-0 items-center justify-start text-base font-medium text-gray-500"
48
+ >
40
49
<Icon
41
- name =" carbon:group" class =" mr-1.5 h-[15px] w-[15px] flex-shrink-0 truncate text-gray-500"
50
+ name =" carbon:group"
51
+ class =" mr-1.5 h-[15px] w-[15px] flex-shrink-0 truncate text-gray-500"
42
52
aria-hidden =" true"
43
53
/>
44
- <div v-if =" event?.Attendees !== 0" class =" line-clamp-1 md:line-clamp-0" >
54
+ <div
55
+ v-if =" event?.Attendees !== 0"
56
+ class =" line-clamp-1 md:line-clamp-0"
57
+ >
45
58
Attendees {{ event?.Attendees }}
46
59
</div >
47
- <div v-else >
48
- Seats: {{ event?.Attendees }}
49
- </div >
60
+ <div v-else >Seats: {{ event?.Attendees }}</div >
50
61
</div >
51
62
<div
52
63
v-if =" event.Venue"
53
64
class =" flex gap-1 md:gap-0 items-center justify-start text-base font-medium text-gray-500"
54
65
>
55
66
<Icon
56
- name =" carbon:location" class =" ml-[-1px] mr-1.5 h-4 w-4 flex-shrink-0 truncate text-gray-500"
67
+ name =" carbon:location"
68
+ class =" ml-[-1px] mr-1.5 h-4 w-4 flex-shrink-0 truncate text-gray-500"
57
69
aria-hidden =" true"
58
70
/>
59
71
<div class =" line-clamp-1 md:line-clamp-0" >
0 commit comments