2026-02-18 03:06:14 +01:00
|
|
|
<template>
|
|
|
|
|
<div class="bg-zinc-100 rounded-lg m-5 grid grid-cols-3 gap-10 divide-x divide-solid divide-black py-4 mb-10">
|
|
|
|
|
|
|
|
|
|
<div class="px-5">
|
|
|
|
|
<p class="text-lg">pieces</p>
|
|
|
|
|
|
|
|
|
|
<div class="py-2 ml-3" v-for="item in works">
|
2026-02-28 03:04:18 +01:00
|
|
|
<p class="text-sm font-semibold mt-4 text-[#7F7F7F]">{{ item.year }}</p>
|
2026-02-18 03:06:14 +01:00
|
|
|
<div class="leading-tight py-1 ml-3" v-for="work in item.works">
|
2026-02-28 03:04:18 +01:00
|
|
|
<div class="grid grid-cols-[65%,30%] gap-1 items-start">
|
|
|
|
|
<span v-html="work.title" class="italic text-sm"></span>
|
2026-02-19 18:05:59 +01:00
|
|
|
<div class="inline-flex mt-[-4px]">
|
2026-02-18 03:06:14 +01:00
|
|
|
|
|
|
|
|
<div>
|
2026-02-19 01:09:17 +01:00
|
|
|
<IconButton :visible="work.score" type="score" :work="work" :link="work.score" class="inline-flex p-1"></IconButton>
|
2026-02-18 03:06:14 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<IconButton :visible="work.soundcloud_trackid" type="audio" :work="work" class="inline-flex p-1"></IconButton>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<IconButton :visible="work.vimeo_trackid" type="video" :work="work" class="inline-flex p-1"></IconButton>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<IconButton :visible="work.gallery" type="image" :work="work" class="inline-flex p-1"></IconButton>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="px-5">
|
|
|
|
|
<p class="text-lg">writings</p>
|
|
|
|
|
|
|
|
|
|
<div class="leading-tight py-2 ml-3 text-sm" v-for="item in pubs">
|
2026-02-19 18:05:59 +01:00
|
|
|
<div class="grid grid-cols-[95%,5%] gap-1 items-start">
|
2026-02-18 03:06:14 +01:00
|
|
|
<div>
|
|
|
|
|
<span v-html="item.entryTags.title"></span>
|
|
|
|
|
<div class="ml-4 text-[#7F7F7F]">
|
|
|
|
|
{{ item.entryTags.author }}
|
|
|
|
|
<span v-if=item.entryTags.booktitle>{{ item.entryTags.booktitle}}. </span>
|
|
|
|
|
<span v-if=item.entryTags.journal>{{item.entryTags.journal}}. </span>
|
|
|
|
|
<span v-if=item.entryTags.editor>editors {{item.entryTags.editor}} </span>
|
|
|
|
|
<span v-if=item.entryTags.volume>volume {{item.entryTags.volume}}.</span>
|
|
|
|
|
<span v-if=item.entryTags.publisher>{{item.entryTags.publisher}}.</span>
|
|
|
|
|
{{ item.entryTags.year }}.
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
2026-02-27 09:15:37 +01:00
|
|
|
<IconButton :visible=item.entryTags.howpublished type="document" :link=item.entryTags.howpublished class="inline-flex p-1 mt-[-6px]"></IconButton>
|
2026-02-18 03:06:14 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="px-5">
|
|
|
|
|
<p class="text-lg">albums</p>
|
2026-02-19 17:08:08 +01:00
|
|
|
<div class="flex flex-col items-center leading-tight py-4 text-sm" v-for="item in releases">
|
|
|
|
|
<p class="leading-tight py-2">{{ item.title }}</p>
|
2026-02-18 03:06:14 +01:00
|
|
|
<button @click="modalStore.setModalProps('image', 'aspect-auto', true, 'album_art', [{image: item.album_art}], '')">
|
|
|
|
|
<nuxt-img :src="'/album_art/' + item.album_art"
|
|
|
|
|
quality="50"/>
|
|
|
|
|
</button>
|
|
|
|
|
<div class="flex place-content-center place-items-center">
|
2026-02-18 20:16:09 +01:00
|
|
|
<IconButton :visible="item.discogs_id" type="discogs" :link="'https://www.discogs.com/release/' + item.discogs_id" :newTab="true"></IconButton>
|
|
|
|
|
<IconButton :visible="item.buy_link" type="buy" :link="item.buy_link" :newTab="true"></IconButton>
|
2026-02-18 03:06:14 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
|
|
|
|
|
|
import { useModalStore } from "@/stores/ModalStore"
|
|
|
|
|
|
|
|
|
|
const modalStore = useModalStore()
|
|
|
|
|
|
|
|
|
|
const groupBy = (x,f)=>x.reduce((a,b,i)=>((a[f(b,i,x)]||=[]).push(b),a),{});
|
|
|
|
|
|
|
|
|
|
const isValidUrl = urlString => {
|
|
|
|
|
var pattern = /^((http|https|ftp):\/\/)/;
|
|
|
|
|
return pattern.test(urlString)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2026-02-27 09:15:37 +01:00
|
|
|
const { data: images } = await useFetch('/api/images', { key: 'images' })
|
2026-02-18 03:06:14 +01:00
|
|
|
|
|
|
|
|
const { data: works } = await useFetch('/api/works', {
|
2026-02-27 09:15:37 +01:00
|
|
|
key: 'works',
|
2026-02-18 03:06:14 +01:00
|
|
|
transform: (works) => {
|
2026-02-27 09:15:37 +01:00
|
|
|
const cloned = JSON.parse(JSON.stringify(works))
|
|
|
|
|
for (const work of cloned) {
|
2026-02-18 03:06:14 +01:00
|
|
|
if(work.score){
|
|
|
|
|
work.score = "/scores/" + work.score
|
|
|
|
|
}
|
|
|
|
|
if(work.images){
|
|
|
|
|
let gallery = [];
|
|
|
|
|
for (const image of work.images){
|
|
|
|
|
gallery.push({
|
|
|
|
|
image: image.filename,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
work.gallery = gallery
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-02-27 09:15:37 +01:00
|
|
|
let priorityGroups = groupBy(cloned, work => work.priority)
|
2026-02-18 03:06:14 +01:00
|
|
|
let groups = groupBy(priorityGroups["1"], work => new Date(work.date).getFullYear())
|
|
|
|
|
groups = Object.keys(groups).map((year) => {
|
|
|
|
|
return {
|
|
|
|
|
year,
|
|
|
|
|
works: groups[year].sort((a,b) => new Date(b.date) - new Date(a.date))
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
groups.sort((a,b) => b.year - a.year)
|
|
|
|
|
if (priorityGroups["2"]) {
|
|
|
|
|
groups.push({year: "miscellany", works: priorityGroups["2"].sort((a,b) => new Date(b.date) - new Date(a.date))})
|
|
|
|
|
}
|
|
|
|
|
return groups
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const { data: pubs } = await useFetch('/api/publications', {
|
2026-02-27 09:15:37 +01:00
|
|
|
key: 'publications',
|
2026-02-18 03:06:14 +01:00
|
|
|
transform: (pubs) => {
|
2026-02-27 09:15:37 +01:00
|
|
|
const cloned = JSON.parse(JSON.stringify(pubs))
|
|
|
|
|
for (const pub of cloned) {
|
2026-02-18 03:06:14 +01:00
|
|
|
if(pub.entryTags && pub.entryTags.howpublished && !(isValidUrl(pub.entryTags.howpublished))){
|
|
|
|
|
pub.entryTags.howpublished = "/pubs/" + pub.entryTags.howpublished
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-02-27 22:15:47 +01:00
|
|
|
return cloned.sort((a, b) => {
|
|
|
|
|
const getYear = (key) => parseInt(key.replace(/\D/g, '')) || 0
|
|
|
|
|
const getSuffix = (key) => key.replace(/^Winter\d+/, '') || ''
|
|
|
|
|
|
|
|
|
|
const yearA = getYear(a.citationKey)
|
|
|
|
|
const yearB = getYear(b.citationKey)
|
|
|
|
|
|
|
|
|
|
if (yearA !== yearB) return yearB - yearA
|
|
|
|
|
|
|
|
|
|
return getSuffix(b.citationKey).localeCompare(getSuffix(a.citationKey))
|
|
|
|
|
})
|
2026-02-18 03:06:14 +01:00
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const { data: releases } = await useFetch('/api/releases', {
|
2026-02-27 09:15:37 +01:00
|
|
|
key: 'releases',
|
2026-02-18 03:06:14 +01:00
|
|
|
transform: (releases) => {
|
2026-02-27 09:15:37 +01:00
|
|
|
const cloned = JSON.parse(JSON.stringify(releases))
|
|
|
|
|
return cloned.sort((a,b) => {
|
2026-02-18 03:06:14 +01:00
|
|
|
const dateA = parseInt(a.date) || 0
|
|
|
|
|
const dateB = parseInt(b.date) || 0
|
|
|
|
|
return dateB - dateA
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
useHead({
|
|
|
|
|
titleTemplate: 'Michael Winter - Home / Works - Pieces, Publications, and Albums'
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
</script>
|