Skip to content

Commit

Permalink
Merge pull request #31 from netwerk-digitaal-erfgoed/feature/GH-29
Browse files Browse the repository at this point in the history
Feat: GH-29
  • Loading branch information
aabelmann authored Nov 25, 2024
2 parents e22bda4 + d3d46dc commit cc6b4a2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion nuxt/components/Atoms/Image.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,17 @@ const props = withDefaults(
const imageUrl = computed<string>(() => {
const { identifier, region, size, rotation, quality, format } = props;
if (!supportIIIF.value || useIsIIIF(identifier)) {
if (!supportIIIF.value) {
return identifier;
}
if (useIsIIIF(identifier)) {
const parts = identifier.split('/');
parts[parts.length - 4] = region;
parts[parts.length - 3] = size;
parts[parts.length - 2] = rotation;
return parts.join('/');
}
return `/api/images/${btoa(identifier)}/${region}/${size}/${rotation}/${quality}.${format}`;
});
</script>
2 changes: 1 addition & 1 deletion nuxt/components/Atoms/Navigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const props = withDefaults(
);
const route = computed(() => {
const flixName = currentFlix.value?.uri.split('/').pop();
const flixName = currentFlix.value?.uri?.split('/').pop();
if (!flixName) {
return { href: '' };
}
Expand Down

0 comments on commit cc6b4a2

Please sign in to comment.