mirror of
https://github.com/web3privacy/web
synced 2024-10-15 18:26:27 +02:00
update
This commit is contained in:
parent
ba84d9ac5b
commit
ceee85926a
2 changed files with 29 additions and 5 deletions
|
@ -43,6 +43,23 @@ function dateEnd(str, days) {
|
||||||
return format(addDays(new Date(str), days), 'yyyy-MM-dd');
|
return format(addDays(new Date(str), days), 'yyyy-MM-dd');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const statuses = {
|
||||||
|
preregistration: {
|
||||||
|
title: 'Pre-registration',
|
||||||
|
color: 'text-orange-500',
|
||||||
|
},
|
||||||
|
unconfirmed: {
|
||||||
|
title: 'Planned',
|
||||||
|
color: ''
|
||||||
|
},
|
||||||
|
confirmed: {
|
||||||
|
title: 'Confirmed',
|
||||||
|
color: 'text-green-500',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const status = item.confirmed ? statuses.confirmed : (item.links?.rsvp ? statuses.preregistration : statuses.unconfirmed)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<div class="w3pn-event-item">
|
<div class="w3pn-event-item">
|
||||||
|
@ -66,11 +83,13 @@ function dateEnd(str, days) {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="py-1 grow text-right items-center flex gap-4">
|
||||||
|
<div class="grow"></div>
|
||||||
|
{/*<div class="text-sm"></div>*/}
|
||||||
{item.links?.rsvp &&
|
{item.links?.rsvp &&
|
||||||
<div class="py-1 grow text-right">
|
|
||||||
<a href={item.links?.rsvp} class="button inverted"><button>Join</button></a>
|
<a href={item.links?.rsvp} class="button inverted"><button>Join</button></a>
|
||||||
</div>
|
|
||||||
}
|
}
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -79,6 +98,7 @@ function dateEnd(str, days) {
|
||||||
<div class="w-0 sm:w-28"></div>
|
<div class="w-0 sm:w-28"></div>
|
||||||
<div>
|
<div>
|
||||||
<div>Date: <span class="text-white">{dateFormat(item.date)} {item.days ? ' - ' + dateFormat(dateEnd(item.date, item.days)) + ` (${item.days} days)` : ''}</span></div>
|
<div>Date: <span class="text-white">{dateFormat(item.date)} {item.days ? ' - ' + dateFormat(dateEnd(item.date, item.days)) + ` (${item.days} days)` : ''}</span></div>
|
||||||
|
<div>Status: <span class:list={[status.color]} class="mr-1.5 text-xs">●</span> {status.title}</div>
|
||||||
<div>Lead: <span class="text-white">{item.lead || 'n/a'}</span></div>
|
<div>Lead: <span class="text-white">{item.lead || 'n/a'}</span></div>
|
||||||
|
|
||||||
<div class="mt-4 mb-2">
|
<div class="mt-4 mb-2">
|
||||||
|
|
|
@ -57,6 +57,10 @@ for (const year of pastYears.reverse()) {
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<a href="https://github.com/web3privacy/events" class="hover:underline">Source repository</a>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
Loading…
Reference in a new issue