d51e7fe867
People can now RSVP without claiming a slot. OG tags show event title, date/time/location, and headcount in link previews. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
55 lines
1.7 KiB
HTML
55 lines
1.7 KiB
HTML
{{define "slots-inner"}}
|
|
<div class="section-label">What's needed</div>
|
|
<div class="slots-grid">
|
|
{{range .Slots}}
|
|
<div class="slot-card{{if .IsFull}} full{{end}}">
|
|
<div class="slot-info">
|
|
<div class="slot-name">{{.Slot.Emoji}} {{.Slot.Name}}</div>
|
|
<div class="slot-claims">
|
|
{{if .Claims}}
|
|
{{range .Claims}}
|
|
<span class="claim-chip">
|
|
{{.Name}}{{if .Note}} <small style="color:#888">({{.Note}})</small>{{end}}
|
|
<button hx-delete="/e/{{$.Event.Slug}}/claim/{{.ID}}"
|
|
hx-target="#slots-container"
|
|
hx-swap="innerHTML settle:0.1s"
|
|
hx-confirm="Remove {{.Name}}?"
|
|
title="Remove">×</button>
|
|
</span>
|
|
{{end}}
|
|
{{else}}
|
|
<span class="nobody">nobody yet</span>
|
|
{{end}}
|
|
</div>
|
|
<div class="progress-bar">
|
|
<div class="progress-fill{{if .IsFull}} full{{end}}" style="width:{{.Pct}}%"></div>
|
|
</div>
|
|
</div>
|
|
<div class="slot-right">
|
|
<span class="slot-count{{if .IsFull}} warn{{end}}">{{.ClaimCount}} / {{.Slot.MaxClaims}}{{if .IsFull}} ✓{{end}}</span>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
|
|
<div class="section-label">Going ({{len .Rsvps}})</div>
|
|
<div class="rsvp-list">
|
|
{{if .Rsvps}}
|
|
{{range .Rsvps}}
|
|
<span class="claim-chip">
|
|
{{.Name}}{{if .Note}} <small style="color:#888">({{.Note}})</small>{{end}}
|
|
<button hx-delete="/e/{{$.Event.Slug}}/rsvp/{{.ID}}"
|
|
hx-target="#slots-container"
|
|
hx-swap="innerHTML settle:0.1s"
|
|
hx-confirm="Remove {{.Name}}?"
|
|
title="Remove">×</button>
|
|
</span>
|
|
{{end}}
|
|
{{else}}
|
|
<span class="nobody">no one yet</span>
|
|
{{end}}
|
|
</div>
|
|
{{end}}
|
|
|
|
{{define "slots.html"}}{{template "slots-inner" .}}{{end}}
|