-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from SlovakNationalGallery/NSNG-638-idle-screens
Nsng 638 idle screens
- Loading branch information
Showing
18 changed files
with
2,477 additions
and
1,864 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<template> | ||
<div> | ||
<NuxtPage /> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<template> | ||
<ClientOnly> | ||
<div class="absolute z-10 top-20 bottom-0 inset-x-0 pointer-events-none bg-black/80"> | ||
<div | ||
class="absolute bottom-4 left-4 right-[350px] top-0 z-50 mt-4 overflow-hidden rounded-xl bg-neutral-700 pointer-events-auto" | ||
> | ||
<ZoomViewer | ||
v-if="deepZoomSrc" | ||
:tile-sources="`${baseURL}${deepZoomSrc}`" | ||
@close="$emit('close')" | ||
/> | ||
<img | ||
v-else | ||
class="h-full w-full object-contain" | ||
:src="`${baseURL}${thumbnailSrc}`" | ||
/> | ||
<button | ||
@click="$emit('close')" | ||
class="absolute right-4 top-4 z-50 rounded-xl border-2 border-black bg-white p-0.5" | ||
> | ||
<X class="h-8 w-8" /> | ||
</button> | ||
</div> | ||
</div> | ||
</ClientOnly> | ||
</template> | ||
<script setup> | ||
import ZoomViewer from "~/components/ZoomViewer.vue"; | ||
import X from "~/assets/img/x-mark.svg?component"; | ||
const config = useRuntimeConfig() | ||
const { baseURL } = config.app | ||
const props = defineProps(["item"]); | ||
const { thumbnailSrc, deepZoomSrc } = props.item; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<template> | ||
<div> | ||
<div class="h-2 w-full overflow-hidden rounded-full bg-white/20" /> | ||
<!-- Progress Bar Overlay --> | ||
<div | ||
class="pointer-events-none absolute left-0 top-0 h-2 rounded-full bg-white" | ||
:style="{ | ||
width: `calc(${((props.currentTime - (min - 2)) / (max + 2 - min)) * 100}%)`, | ||
}" | ||
/> | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
const props = defineProps({ | ||
currentTime: { type: Number, default: 0 }, | ||
min: { type: Number, default: 0 }, | ||
max: { type: Number, default: 100 }, | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<template> | ||
<div> | ||
<span | ||
class="mx-auto bg-black/80 p-1 text-2xl" | ||
v-if="renderedText[0] && renderedText[0].text" | ||
>{{ renderedText[0].text }}</span | ||
> | ||
</div> | ||
</template> | ||
<script setup> | ||
import moment from "moment"; | ||
const props = defineProps(["audioTime", "subtitleSrc"]); | ||
const config = useRuntimeConfig() | ||
const { baseURL } = config.app | ||
const { data: subtitlesData } = await useFetch(`${baseURL}${props.subtitleSrc}`); | ||
const renderedText = computed(() => | ||
subtitlesData.value.filter((subtitle) => { | ||
const formattedAudioTime = moment.duration( | ||
parseFloat(props.audioTime), | ||
"seconds", | ||
); | ||
const formattedSubtitleStart = moment.duration( | ||
subtitle.start.replace(",", "."), | ||
"hh:mm:ss.SSS", | ||
); | ||
const formattedSubtitleEnd = moment.duration( | ||
subtitle.end.replace(",", "."), | ||
"hh:mm:ss.SSS", | ||
); | ||
if (formattedAudioTime < formattedSubtitleStart) { | ||
return false; | ||
} | ||
if (formattedAudioTime > formattedSubtitleEnd) { | ||
return false; | ||
} | ||
return true; | ||
}), | ||
); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<template> | ||
<div id="viewer" class="h-full w-full bg-neutral-700" /> | ||
</template> | ||
|
||
<script setup> | ||
import OpenSeaDragon from "openseadragon"; | ||
import { onMounted, onBeforeUnmount, ref } from "vue"; | ||
const props = defineProps(["tileSources"]); | ||
const viewer = ref(null); | ||
onMounted(() => { | ||
viewer.value = OpenSeaDragon({ | ||
id: "viewer", | ||
tileSources: props.tileSources, | ||
showNavigationControl: false, | ||
showNavigator: false, | ||
}); | ||
}); | ||
onBeforeUnmount(() => { | ||
if (viewer.value) { | ||
viewer.value.destroy(); | ||
} | ||
}); | ||
</script> |
Oops, something went wrong.