diff --git a/portfolio-nuxt/components/IconButton.vue b/portfolio-nuxt/components/IconButton.vue index de1efd3..d61ea9e 100644 --- a/portfolio-nuxt/components/IconButton.vue +++ b/portfolio-nuxt/components/IconButton.vue @@ -2,7 +2,11 @@
- + + + + + diff --git a/portfolio-nuxt/layouts/default.vue b/portfolio-nuxt/layouts/default.vue index cc1a65d..505dc05 100644 --- a/portfolio-nuxt/layouts/default.vue +++ b/portfolio-nuxt/layouts/default.vue @@ -16,7 +16,7 @@
-
@@ -35,4 +35,20 @@ const audioPlayerStore = useAudioPlayerStore() const modalStore = useModalStore() + const route = useRoute() + + if(route.params.files == 'scores') { + const { data: work } = await useFetch('https://unboundedpress.org/api/works?filter={"score":"' + route.params.filename + '"}', { + transform: (work) => { + + if(work[0].soundcloud_trackid){ + audioPlayerStore.setSoundCloudTrackID(work[0].soundcloud_trackid) + } else { + audioPlayerStore.clearSoundCloudTrackID() + } + return work[0] + } + }) + } + diff --git a/portfolio-nuxt/pages/[files]/[filename].vue b/portfolio-nuxt/pages/[files]/[filename].vue index 998d115..e2e7e8d 100644 --- a/portfolio-nuxt/pages/[files]/[filename].vue +++ b/portfolio-nuxt/pages/[files]/[filename].vue @@ -1,19 +1,23 @@