CV: sort lectures by date, Events: show month/year for lectures
This commit is contained in:
parent
95b3f4ab59
commit
a2bccf7871
|
|
@ -29,7 +29,9 @@ const talksByYear = computed(() => {
|
||||||
byLocation[key].push(talk)
|
byLocation[key].push(talk)
|
||||||
}
|
}
|
||||||
|
|
||||||
const groups = Object.values(byLocation).map(group => ({
|
const groups = Object.values(byLocation)
|
||||||
|
.sort((a, b) => new Date(b[0].date) - new Date(a[0].date))
|
||||||
|
.map(group => ({
|
||||||
location: group[0].location,
|
location: group[0].location,
|
||||||
date: group[0].date,
|
date: group[0].date,
|
||||||
titles: group.map(t => t.title)
|
titles: group.map(t => t.title)
|
||||||
|
|
|
||||||
|
|
@ -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 = []
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue