UX/UI improvements.
This commit is contained in:
parent
418d3cc402
commit
4e6f5d36b8
14 changed files with 1964 additions and 924 deletions
|
|
@ -3,13 +3,16 @@
|
|||
<!-- HERO (compact) -->
|
||||
<div class="hero">
|
||||
<h1>Events</h1>
|
||||
<p>Workshops, meetups, and gatherings for game developers practicing cooperative models.</p>
|
||||
<p>
|
||||
Workshops, meetups, and gatherings for game developers practicing
|
||||
cooperative models.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- FILTER BAR -->
|
||||
<FilterBar v-model="activeFilter" :filters="filterOptions">
|
||||
<label class="filter-toggle">
|
||||
<input type="checkbox" v-model="includePastEvents"> Show past events
|
||||
<input type="checkbox" v-model="includePastEvents" /> Show past events
|
||||
</label>
|
||||
</FilterBar>
|
||||
|
||||
|
|
@ -19,13 +22,31 @@
|
|||
v-for="event in filteredEvents"
|
||||
:key="event._id"
|
||||
class="event-row"
|
||||
:class="{ 'is-cancelled': event.isCancelled }"
|
||||
>
|
||||
<span class="event-date">{{ formatDate(event.startDate) }}</span>
|
||||
<div class="event-date-col">
|
||||
<span class="event-date">{{ formatDate(event.startDate) }}</span>
|
||||
<span class="event-time">{{ formatTime(event.startDate) }}</span>
|
||||
</div>
|
||||
<div class="event-info">
|
||||
<div class="event-title">
|
||||
<NuxtLink :to="`/events/${event._id}`">{{ event.title }}</NuxtLink>
|
||||
<NuxtLink :to="`/events/${event.slug || event._id}`">{{
|
||||
event.title
|
||||
}}</NuxtLink>
|
||||
<span v-if="event.isCancelled" class="cancelled-tag"
|
||||
>cancelled</span
|
||||
>
|
||||
</div>
|
||||
<div v-if="event.tagline" class="event-tagline">
|
||||
{{ event.tagline }}
|
||||
</div>
|
||||
<div class="event-sub">
|
||||
<span v-if="event.eventType" class="event-type-tag">{{
|
||||
event.eventType
|
||||
}}</span>
|
||||
<span v-if="event.eventType" class="sep">·</span>
|
||||
<span class="event-location">{{ formatLocation(event) }}</span>
|
||||
</div>
|
||||
<div v-if="event.eventType" class="event-type">{{ event.eventType }}</div>
|
||||
</div>
|
||||
<span class="event-capacity">
|
||||
<template v-if="event.maxAttendees">
|
||||
|
|
@ -35,8 +56,11 @@
|
|||
</template>
|
||||
<template v-else>Open</template>
|
||||
</span>
|
||||
<CircleBadge v-if="event.circle" :circle="event.circle" />
|
||||
<span v-else class="badge all">All</span>
|
||||
<div class="event-badges">
|
||||
<span v-if="event.membersOnly" class="members-badge">Members</span>
|
||||
<CircleBadge v-if="event.circle" :circle="event.circle" />
|
||||
<span v-else class="badge all">All</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!filteredEvents?.length" class="empty">No events found</div>
|
||||
</div>
|
||||
|
|
@ -54,68 +78,111 @@
|
|||
<h3>{{ series.title }}</h3>
|
||||
<p class="series-desc">{{ series.description }}</p>
|
||||
<div class="series-meta">
|
||||
<span>{{ series.eventCount || series.events?.length || 0 }} sessions</span>
|
||||
<span v-if="series.startDate">{{ formatDate(series.startDate) }} – {{ formatDate(series.endDate) }}</span>
|
||||
<span
|
||||
>{{
|
||||
series.eventCount || series.events?.length || 0
|
||||
}}
|
||||
sessions</span
|
||||
>
|
||||
<span v-if="series.startDate"
|
||||
>{{ formatDate(series.startDate) }} –
|
||||
{{ formatDate(series.endDate) }}</span
|
||||
>
|
||||
</div>
|
||||
</NuxtLink>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- PROPOSE AN EVENT -->
|
||||
<!-- TODO: Build /events/propose page + form for members to submit event ideas.
|
||||
Think through before building:
|
||||
- Who can propose? Members only, or any circle?
|
||||
- Required fields: title, description, proposed date/time, target circle,
|
||||
format (workshop/social/talk/etc.), estimated attendance
|
||||
- Approval workflow: does an admin review and publish, or does it auto-post
|
||||
as a draft?
|
||||
- Interest threshold mechanic: can other members +1 a proposal to signal
|
||||
demand before it gets formally scheduled?
|
||||
- Notifications: proposer gets notified when approved/declined
|
||||
See CLAUDE.md product spec for additional context. -->
|
||||
<div class="full-section">
|
||||
<div class="section-label">Have an idea?</div>
|
||||
<DashedBox>
|
||||
<h3>Propose an Event</h3>
|
||||
<p>Members can propose events for any circle. Workshops, social hangs, talks, or anything else that serves the community.</p>
|
||||
<NuxtLink to="/events" class="cta">Propose an event →</NuxtLink>
|
||||
<p>
|
||||
Members can propose events for any circle. Workshops, social hangs,
|
||||
talks, or anything else that serves the community.
|
||||
</p>
|
||||
<span class="cta cta-soon"
|
||||
>Propose an event → <em>coming soon</em></span
|
||||
>
|
||||
</DashedBox>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const activeFilter = ref('all')
|
||||
const includePastEvents = ref(false)
|
||||
const activeFilter = ref("all");
|
||||
const includePastEvents = ref(false);
|
||||
|
||||
const filterOptions = [
|
||||
{ label: 'All', value: 'all' },
|
||||
{ label: 'Workshops', value: 'workshop' },
|
||||
{ label: 'Community', value: 'community' },
|
||||
{ label: 'Social', value: 'social' },
|
||||
{ label: 'Showcase', value: 'showcase' },
|
||||
]
|
||||
{ label: "All", value: "all" },
|
||||
{ label: "Workshops", value: "workshop" },
|
||||
{ label: "Community", value: "community" },
|
||||
{ label: "Social", value: "social" },
|
||||
{ label: "Showcase", value: "showcase" },
|
||||
];
|
||||
|
||||
const { data: eventsData } = await useFetch('/api/events')
|
||||
const { data: seriesData } = await useFetch('/api/series')
|
||||
const { data: eventsData } = await useFetch("/api/events");
|
||||
const { data: seriesData } = await useFetch("/api/series");
|
||||
|
||||
const now = new Date()
|
||||
const now = new Date();
|
||||
|
||||
const filteredEvents = computed(() => {
|
||||
if (!eventsData.value) return []
|
||||
if (!eventsData.value) return [];
|
||||
return eventsData.value.filter((event) => {
|
||||
if (!includePastEvents.value && new Date(event.startDate) < now) return false
|
||||
if (activeFilter.value !== 'all' && event.eventType !== activeFilter.value) return false
|
||||
return true
|
||||
})
|
||||
})
|
||||
if (!includePastEvents.value && new Date(event.startDate) < now)
|
||||
return false;
|
||||
if (activeFilter.value !== "all" && event.eventType !== activeFilter.value)
|
||||
return false;
|
||||
return true;
|
||||
});
|
||||
});
|
||||
|
||||
const activeSeries = computed(() => {
|
||||
if (!seriesData.value) return []
|
||||
if (!seriesData.value) return [];
|
||||
return seriesData.value.filter(
|
||||
(s) => s.status === 'active' || s.isOngoing || s.isUpcoming,
|
||||
)
|
||||
})
|
||||
(s) => s.status === "active" || s.isOngoing || s.isUpcoming,
|
||||
);
|
||||
});
|
||||
|
||||
const formatDate = (dateStr) => {
|
||||
if (!dateStr) return ''
|
||||
const d = new Date(dateStr)
|
||||
return d.toLocaleDateString('en-US', { month: 'short', day: 'numeric' })
|
||||
}
|
||||
if (!dateStr) return "";
|
||||
const d = new Date(dateStr);
|
||||
const opts = { month: "short", day: "numeric" };
|
||||
if (d.getFullYear() !== new Date().getFullYear()) opts.year = "numeric";
|
||||
return d.toLocaleDateString("en-US", opts);
|
||||
};
|
||||
|
||||
const formatTime = (dateStr) => {
|
||||
if (!dateStr) return "";
|
||||
const d = new Date(dateStr);
|
||||
return d.toLocaleTimeString("en-US", { hour: "numeric", minute: "2-digit" });
|
||||
};
|
||||
|
||||
const formatLocation = (event) => {
|
||||
if (event.isOnline) return "Online";
|
||||
if (!event.location) return "";
|
||||
if (event.location.startsWith("#")) return event.location;
|
||||
// Treat any URL as an online link
|
||||
if (event.location.startsWith("http")) return "Online";
|
||||
return event.location;
|
||||
};
|
||||
|
||||
const isAlmostFull = (event) => {
|
||||
if (!event.maxAttendees) return false
|
||||
return (event.registeredCount || 0) / event.maxAttendees > 0.8
|
||||
}
|
||||
if (!event.maxAttendees) return false;
|
||||
return (event.registeredCount || 0) / event.maxAttendees > 0.8;
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
|
@ -124,7 +191,7 @@ const isAlmostFull = (event) => {
|
|||
border-bottom: 1px dashed var(--border);
|
||||
}
|
||||
.hero h1 {
|
||||
font-family: 'Brygada 1918', serif;
|
||||
font-family: "Brygada 1918", serif;
|
||||
font-size: 28px;
|
||||
font-weight: 600;
|
||||
color: var(--text-bright);
|
||||
|
|
@ -143,26 +210,131 @@ const isAlmostFull = (event) => {
|
|||
padding: 0 32px;
|
||||
border-bottom: 1px dashed var(--border);
|
||||
}
|
||||
|
||||
.event-row {
|
||||
display: grid;
|
||||
grid-template-columns: 80px 1fr auto auto;
|
||||
grid-template-columns: 90px 1fr auto auto;
|
||||
gap: 16px;
|
||||
align-items: baseline;
|
||||
padding: 12px 0;
|
||||
align-items: start;
|
||||
padding: 14px 0;
|
||||
border-bottom: 1px dashed var(--border);
|
||||
transition: padding-left 0.2s;
|
||||
}
|
||||
.event-row:first-child { padding-top: 16px; }
|
||||
.event-row:last-child { border-bottom: none; padding-bottom: 16px; }
|
||||
.event-row:hover { padding-left: 4px; }
|
||||
.event-date { color: var(--text-faint); font-size: 12px; white-space: nowrap; }
|
||||
.event-info { min-width: 0; }
|
||||
.event-title { color: var(--text); font-size: 13px; }
|
||||
.event-title a { color: var(--text); text-decoration: none; }
|
||||
.event-title a:hover { color: var(--candle); }
|
||||
.event-type { font-size: 10px; color: var(--text-faint); margin-top: 1px; }
|
||||
.event-capacity { font-size: 11px; color: var(--text-faint); white-space: nowrap; }
|
||||
.seats-warn { color: var(--ember); }
|
||||
.event-row:first-child {
|
||||
padding-top: 18px;
|
||||
}
|
||||
.event-row:last-child {
|
||||
border-bottom: none;
|
||||
padding-bottom: 18px;
|
||||
}
|
||||
.event-row:hover {
|
||||
padding-left: 4px;
|
||||
}
|
||||
.event-row.is-cancelled {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.event-date-col {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 3px;
|
||||
padding-top: 1px;
|
||||
}
|
||||
.event-date {
|
||||
color: var(--text-faint);
|
||||
font-size: 12px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.event-time {
|
||||
color: var(--text-faint);
|
||||
font-size: 11px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.event-info {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.event-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
font-size: 13px;
|
||||
color: var(--text);
|
||||
}
|
||||
.event-title a {
|
||||
color: var(--text);
|
||||
text-decoration: none;
|
||||
}
|
||||
.event-title a:hover {
|
||||
color: var(--candle);
|
||||
}
|
||||
|
||||
.cancelled-tag {
|
||||
font-size: 9px;
|
||||
letter-spacing: 0.07em;
|
||||
text-transform: uppercase;
|
||||
color: var(--ember);
|
||||
border: 1px solid currentColor;
|
||||
padding: 1px 5px;
|
||||
line-height: 1.5;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.event-tagline {
|
||||
font-size: 11px;
|
||||
color: var(--text-dim);
|
||||
line-height: 1.55;
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.event-sub {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
margin-top: 3px;
|
||||
}
|
||||
.event-type-tag {
|
||||
font-size: 10px;
|
||||
color: var(--text-faint);
|
||||
text-transform: capitalize;
|
||||
}
|
||||
.sep {
|
||||
font-size: 10px;
|
||||
color: var(--text-faint);
|
||||
}
|
||||
.event-location {
|
||||
font-size: 10px;
|
||||
color: var(--text-faint);
|
||||
}
|
||||
|
||||
.event-capacity {
|
||||
font-size: 11px;
|
||||
color: var(--text-faint);
|
||||
white-space: nowrap;
|
||||
padding-top: 2px;
|
||||
}
|
||||
.seats-warn {
|
||||
color: var(--ember);
|
||||
}
|
||||
|
||||
.event-badges {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
gap: 4px;
|
||||
}
|
||||
.members-badge {
|
||||
font-size: 9px;
|
||||
letter-spacing: 0.07em;
|
||||
text-transform: uppercase;
|
||||
color: var(--text-faint);
|
||||
border: 1px dashed var(--border);
|
||||
padding: 1px 5px;
|
||||
white-space: nowrap;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
/* ---- FULL SECTION ---- */
|
||||
.full-section {
|
||||
|
|
@ -183,10 +355,14 @@ const isAlmostFull = (event) => {
|
|||
text-decoration: none;
|
||||
transition: background 0.15s;
|
||||
}
|
||||
.series-box:last-child { border-right: none; }
|
||||
.series-box:hover { background: var(--surface-hover); }
|
||||
.series-box:last-child {
|
||||
border-right: none;
|
||||
}
|
||||
.series-box:hover {
|
||||
background: var(--surface-hover);
|
||||
}
|
||||
.series-box h3 {
|
||||
font-family: 'Brygada 1918', serif;
|
||||
font-family: "Brygada 1918", serif;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: var(--text-bright);
|
||||
|
|
@ -208,7 +384,7 @@ const isAlmostFull = (event) => {
|
|||
|
||||
/* ---- PROPOSE ---- */
|
||||
.full-section h3 {
|
||||
font-family: 'Brygada 1918', serif;
|
||||
font-family: "Brygada 1918", serif;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: var(--text-bright);
|
||||
|
|
@ -226,6 +402,15 @@ const isAlmostFull = (event) => {
|
|||
font-size: 12px;
|
||||
color: var(--candle);
|
||||
}
|
||||
.cta-soon {
|
||||
color: var(--text-faint);
|
||||
cursor: default;
|
||||
}
|
||||
.cta-soon em {
|
||||
font-style: normal;
|
||||
font-size: 10px;
|
||||
opacity: 0.65;
|
||||
}
|
||||
|
||||
.filter-toggle {
|
||||
display: flex;
|
||||
|
|
@ -248,12 +433,22 @@ const isAlmostFull = (event) => {
|
|||
|
||||
@media (max-width: 768px) {
|
||||
.event-row {
|
||||
grid-template-columns: 60px 1fr;
|
||||
grid-template-columns: 70px 1fr;
|
||||
gap: 8px;
|
||||
}
|
||||
.event-capacity { display: none; }
|
||||
.series-grid { grid-template-columns: 1fr; }
|
||||
.series-box { border-right: none; border-bottom: 1px dashed var(--border); }
|
||||
.series-box:last-child { border-bottom: none; }
|
||||
.event-capacity,
|
||||
.event-badges {
|
||||
display: none;
|
||||
}
|
||||
.series-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
.series-box {
|
||||
border-right: none;
|
||||
border-bottom: 1px dashed var(--border);
|
||||
}
|
||||
.series-box:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue