CV: sort lectures by date, Events: show month/year for lectures

This commit is contained in:
Michael Winter 2026-02-28 02:37:12 +01:00
parent 95b3f4ab59
commit a2bccf7871
2 changed files with 8 additions and 6 deletions

View file

@ -29,11 +29,13 @@ const talksByYear = computed(() => {
byLocation[key].push(talk) byLocation[key].push(talk)
} }
const groups = Object.values(byLocation).map(group => ({ const groups = Object.values(byLocation)
location: group[0].location, .sort((a, b) => new Date(b[0].date) - new Date(a[0].date))
date: group[0].date, .map(group => ({
titles: group.map(t => t.title) location: group[0].location,
})) date: group[0].date,
titles: group.map(t => t.title)
}))
return { year, groups } return { year, groups }
}) })

View file

@ -71,7 +71,7 @@
for (const event of events) { for (const event of events) {
let date = new Date(event.date) let date = new Date(event.date)
event.date = date event.date = date
event.formatted_date = ("0" + (date.getMonth() + 1)).slice(-2) + "." + ("0" + date.getDate()).slice(-2) + "." + date.getFullYear() event.formatted_date = ("0" + (date.getMonth() + 1)).slice(-2) + "." + date.getFullYear()
if(typeof event.title === 'string' || event.title instanceof String) {event.talks = [{'title': event.title}] if(typeof event.title === 'string' || event.title instanceof String) {event.talks = [{'title': event.title}]
} else { } else {
let talks = [] let talks = []