events: add number

This commit is contained in:
tree🌴 2024-03-02 19:01:34 +01:00
parent cfff50e7d2
commit 09cb5365d1
2 changed files with 15 additions and 6 deletions

View file

@ -22,9 +22,13 @@ const status = eventStatus(item)
<div> <div>
<div class=""> <div class="">
<a href={`/event/${item.id}`} class="text-white text-lg hover:underline">{nameRenderer(item)}</a> <a href={`/event/${item.id}`} class="text-white text-lg hover:underline">{nameRenderer(item)}</a>
{item.issue &&
<a href={`https://github.com/web3privacy/events/issues/${item.issue}`} class="ml-0.5 text-white/30 hover:underline">#{item.issue}</a>
}
<div class="inline-block ml-2"> <div class="inline-block ml-2">
{item.type === "hackathon" && <span class="text-xs ml-2 text-black bg-white px-1 py-0.5">HACKATHON</span>} {item.type === "hackathon" && <span class="text-xs ml-2 text-black bg-white px-1 py-0.5">HACKATHON</span>}
{item.type === "summit" && <span class="text-xs ml-2 text-black bg-white px-1 py-0.5">SUMMIT</span>} {item.type === "summit" && <span class="text-xs ml-2 text-black bg-white px-1 py-0.5">SUMMIT</span>}
{item.type === "online-summit" && <span class="text-xs ml-2 text-black bg-white px-1 py-0.5">ONLINE</span>}
{item.type === "privacy-corner" && <span class="text-xs ml-2 text-black bg-gray-500 px-1 py-0.5">↴ PC</span>} {item.type === "privacy-corner" && <span class="text-xs ml-2 text-black bg-gray-500 px-1 py-0.5">↴ PC</span>}
{item.tags && item.tags.includes("sfe") && <span class="text-xs ml-2 text-black bg-gray-500 px-1 py-0.5" title="Sponsorship Free Edition (SFE)">SFE</span>} {item.tags && item.tags.includes("sfe") && <span class="text-xs ml-2 text-black bg-gray-500 px-1 py-0.5" title="Sponsorship Free Edition (SFE)">SFE</span>}
@ -42,7 +46,7 @@ const status = eventStatus(item)
} }
{item.type === 'online-summit' && {item.type === 'online-summit' &&
<img src="/flags/other/earth.svg" class="w-4" /> <img src="/flags/other/earth.svg" class="w-4" />
<div>Online</div> <div>Global</div>
} }
</div> </div>
</div> </div>
@ -84,18 +88,21 @@ const status = eventStatus(item)
<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> <div>
Venue: {item.place && <span class="text-white" set:html={marked.parseInline(item.place)}></span> || "TBD"} {item.type !== 'online-summit' &&
<div>Venue: {item.place && <span class="text-white" set:html={marked.parseInline(item.place)}></span> || "TBD"}</div>
}
{item.place && item['place-address'] && {item.place && item['place-address'] &&
<span> @ </span> <span> @ </span>
<span class="text-white">{item['place-address']}</span> <span class="text-white">{item['place-address']}</span>
} }
</div> </div>
<div>Status: <span class:list={[status.color]} class="mr-1.5 text-xs">●</span> {status.title}</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 flex flex-wrap gap-4">
<a href={`/event/${item.id}`} class="button inverted"><button>More details</button></a>
{item.links?.rsvp && {item.links?.rsvp &&
<a href={item.links.rsvp} class="button inverted"><button>More details & RSVP</button></a> <a href={item.links.rsvp} class="button inverted"><button>RSVP</button></a>
} }
{item.links?.web && {item.links?.web &&
<a href={item.links.web} class="button inverted"><button>Website</button></a> <a href={item.links.web} class="button inverted"><button>Website</button></a>

View file

@ -48,7 +48,9 @@ const ext = findExt(EventsExt, item)
<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> <div>
Venue: {item.place && <span class="text-white" set:html={marked.parseInline(item.place)}></span> || "TBD"} {item.type !== 'online-summit' &&
<div>Venue: {item.place && <span class="text-white" set:html={marked.parseInline(item.place)}></span> || "TBD"}</div>
}
{item.place && item['place-address'] && {item.place && item['place-address'] &&
<span> @ </span> <span> @ </span>
<span class="text-white">{item['place-address']}</span> <span class="text-white">{item['place-address']}</span>