Index: style updates, Events: European dates, CV/works_list: grey year headers

This commit is contained in:
Michael Winter 2026-02-28 03:04:18 +01:00
parent a2bccf7871
commit 7bb9cf6dea
4 changed files with 37 additions and 16 deletions

View file

@ -381,8 +381,8 @@ useHead({
.year-header { .year-header {
font-size: 12px; font-size: 12px;
font-weight: 600; font-weight: 300;
color: #333; color: #7F7F7F;
margin-bottom: 6px; margin-bottom: 6px;
} }

View file

@ -40,12 +40,15 @@
<div class="px-5"> <div class="px-5">
<p class="text-lg">lectures</p> <p class="text-lg">lectures</p>
<div class="leading-tight py-2 ml-3 text-sm" v-for="item in lectures"> <div v-for="yearGroup in lecturesByYear" :key="yearGroup.year">
<div class="gap-1"> <p class="text-sm font-semibold mt-4 text-[#7F7F7F]">{{ yearGroup.year }}</p>
<div> <div class="leading-tight py-2 ml-3 text-sm" v-for="item in yearGroup.talks">
{{ item.formatted_date }}: {{item.location}} <div class="gap-1">
<div v-for="talk in item.talks" class="ml-4 text-[#7F7F7F]"> <div>
{{ talk.title }} {{item.location}}
<div v-for="talk in item.talks" class="ml-4 text-[#7F7F7F]">
{{ talk.title }}
</div>
</div> </div>
</div> </div>
</div> </div>
@ -60,13 +63,13 @@
transform: (events) => { transform: (events) => {
for (const event of events) { for (const event of events) {
let date = new Date(event.start_date) let date = new Date(event.start_date)
event.formatted_date = ("0" + (date.getMonth() + 1)).slice(-2) + "." + ("0" + date.getDate()).slice(-2) + "." + date.getFullYear() event.formatted_date = ("0" + date.getDate()).slice(-2) + "." + ("0" + (date.getMonth() + 1)).slice(-2) + "." + date.getFullYear()
} }
return events.sort((a,b) => new Date(b.start_date) - new Date(a.start_date)) return events.sort((a,b) => new Date(b.start_date) - new Date(a.start_date))
} }
}) })
const { data: lectures } = await useFetch('/api/talks', { const { data: talksData } = await useFetch('/api/talks', {
transform: (events) => { transform: (events) => {
for (const event of events) { for (const event of events) {
let date = new Date(event.date) let date = new Date(event.date)
@ -85,6 +88,24 @@
} }
}) })
const lecturesByYear = computed(() => {
if (!talksData.value) return []
const byYear = {}
for (const talk of talksData.value) {
const year = talk.date ? talk.date.getFullYear() : 'Unknown'
if (!byYear[year]) byYear[year] = []
byYear[year].push(talk)
}
return Object.keys(byYear)
.sort((a, b) => b - a)
.map(year => {
const talks = byYear[year].sort((a, b) => new Date(b.date) - new Date(a.date))
return { year, talks }
})
})
useHead({ useHead({
titleTemplate: 'Michael Winter - Events - Performances and Lectures' titleTemplate: 'Michael Winter - Events - Performances and Lectures'
}) })

View file

@ -5,10 +5,10 @@
<p class="text-lg">pieces</p> <p class="text-lg">pieces</p>
<div class="py-2 ml-3" v-for="item in works"> <div class="py-2 ml-3" v-for="item in works">
<p class="font-thin">{{ item.year }}</p> <p class="text-sm font-semibold mt-4 text-[#7F7F7F]">{{ item.year }}</p>
<div class="leading-tight py-1 ml-3" v-for="work in item.works"> <div class="leading-tight py-1 ml-3" v-for="work in item.works">
<div class="grid grid-cols-[65%,30%] gap-1 font-thin items-start"> <div class="grid grid-cols-[65%,30%] gap-1 items-start">
<div class="italic text-sm">{{ work.title }}</div> <span v-html="work.title" class="italic text-sm"></span>
<div class="inline-flex mt-[-4px]"> <div class="inline-flex mt-[-4px]">
<div> <div>

View file

@ -42,7 +42,7 @@ function formatDate(dateStr) {
if (!dateStr) return '' if (!dateStr) return ''
const date = new Date(dateStr) const date = new Date(dateStr)
if (isNaN(date)) return dateStr if (isNaN(date)) return dateStr
return date.toLocaleDateString('en-US', { month: 'short', day: 'numeric' }) return ("0" + date.getDate()).slice(-2) + "." + ("0" + (date.getMonth() + 1)).slice(-2) + "." + date.getFullYear()
} }
useHead({ useHead({
@ -134,13 +134,13 @@ useHead({
.cv-section h4 { .cv-section h4 {
font-size: 13px; font-size: 13px;
font-weight: 600; font-weight: 300;
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 0.8px; letter-spacing: 0.8px;
margin: 0 0 10px 0; margin: 0 0 10px 0;
padding-bottom: 4px; padding-bottom: 4px;
border-bottom: 1px solid #ccc; border-bottom: 1px solid #ccc;
color: #222; color: #7F7F7F;
} }
.intro { .intro {