portfolio/components/IconButton.vue
Michael Winter 711b5b93c2 Clean up data files and fix icon/PDF links
- Clean all JSON data files: convert MongoDB format to clean JSON
  - works.json, images.json, publications.json, pubs.json, talks.json
  - releases.json, album_art.json, scores.json, my_image_gallery.json
  - events.json (with legacy program → program transformation)
  - resume.json (simplified structure)
- Simplify all API routes (remove cleanData functions)
- Fix PDF links to open in new tab (scores, writings, albums)
- Upgrade to Nuxt 4.3.1 and fix carousel (nuxt-swiper)
- Replace nuxt-icon with @nuxt/icon
- Fix IconButton component for new tab links
- Update cv.vue for resume data structure changes
- Add icon collections (@iconify-json packages)
2026-02-18 20:16:09 +01:00

63 lines
2.6 KiB
Vue

<template>
<div class="inline-flex p-1 min-w-[25px]">
<div v-show="visible" class="bg-black rounded-full text-xs inline-flex" >
<NuxtLink v-if="type === 'score' && !newTab" :to="link" class="inline-flex p-1">
<Icon name="ion:book-sharp" style="color: white" />
</NuxtLink>
<a v-else-if="type === 'score' && newTab" :href="link" class="inline-flex p-1" target="_blank" rel="noopener noreferrer">
<Icon name="ion:book-sharp" style="color: white" />
</a>
<NuxtLink v-else-if="type === 'document' && !newTab" class="inline-flex p-1" :to="link">
<Icon name="ion:book-sharp" style="color: white" />
</NuxtLink>
<a v-else-if="type === 'document' && newTab" :href="link" class="inline-flex p-1" target="_blank" rel="noopener noreferrer">
<Icon name="ion:book-sharp" style="color: white" />
</a>
<NuxtLink v-else-if="type === 'buy'" class="inline-flex p-1" :to="link">
<Icon name="bxs:purchase-tag" style="color: white" />
</NuxtLink>
<NuxtLink v-else-if="type === 'email'" class="inline-flex p-1" :to="link">
<Icon name="ic:baseline-email" style="color: white" />
</NuxtLink>
<NuxtLink v-else-if="type === 'discogs'" class="inline-flex p-1" :to="link">
<Icon name="simple-icons:discogs" style="color: white" />
</NuxtLink>
<button @click="audioPlayerStore.setSoundCloudTrackID(work.soundcloud_trackid)" v-else-if="type === 'audio'" class="inline-flex p-1">
<Icon name="wpf:speaker" style="color: white" />
</button>
<button @click="modalStore.setModalProps('video', 'aspect-video', true, '', '', work.vimeo_trackid)" v-else-if="type === 'video'" class="inline-flex p-1">
<Icon name="fluent:video-48-filled" style="color: white" />
</button>
<button @click="modalStore.setModalProps('image', 'aspect-auto', true, 'images', work.gallery, '')" v-else="type === 'image'" class="inline-flex p-1">
<Icon name="mdi:camera" style="color: white" />
</button>
</div>
</div>
</template>
<script setup>
import { useAudioPlayerStore } from "@/stores/AudioPlayerStore"
import { useModalStore } from "@/stores/ModalStore"
const audioPlayerStore = useAudioPlayerStore()
const modalStore = useModalStore()
</script>
<script>
export default {
props: ['type', 'work', 'visible', 'link', 'newTab']
}
</script>