diff --git a/components/IconButton.vue b/components/IconButton.vue index 45de733..2cb1fa5 100644 --- a/components/IconButton.vue +++ b/components/IconButton.vue @@ -2,7 +2,10 @@
- @@ -55,6 +58,19 @@ const workSlug = computed(() => slugify(props.work?.title)) + const isMobile = computed(() => { + if (typeof window === 'undefined') return false + return window.innerWidth < 768 + }) + + const scoreLink = computed(() => { + if (!props.work?.score) return null + if (props.work.score.startsWith('/scores/')) { + return props.work.score + } + return '/scores/' + props.work.score + }) + const isExternalLink = computed(() => { return props.link && !props.link.endsWith('.pdf') && !props.link.startsWith('/') }) diff --git a/pages/works/[slug].vue b/pages/works/[slug].vue index 9aa18e2..6c363a9 100644 --- a/pages/works/[slug].vue +++ b/pages/works/[slug].vue @@ -8,7 +8,7 @@
@@ -22,7 +22,7 @@ -
+
@@ -77,6 +77,11 @@ const itemCount = computed(() => { return count }) +const isMobile = computed(() => { + if (typeof window === 'undefined') return false + return window.innerWidth < 768 +}) + onMounted(() => { if (work.value?.soundcloud_trackid) { audioPlayerStore.setSoundCloudTrackID(work.value.soundcloud_trackid)