Fix Galerie

This commit is contained in:
2026-05-05 12:29:21 +02:00
parent 75b50fb9ef
commit 8f8decf263
12 changed files with 187 additions and 278 deletions

View File

@@ -1,38 +1,37 @@
<script lang="ts" setup>
import RitzenbergenLib from "../../ritzenbergenlib.ts";
import {ref} from "vue";
async function loadImage(path: string) {
try{
const response = await fetch(RitzenbergenLib.RitzenbergenLib.api(path), {
headers: {
"Accept":"image/png"
}
});
if(!response.ok) return false;
const blob = await response.blob();
return URL.createObjectURL(blob);
// async function loadImage(path: string) {
// try{
// const response = await fetch(RitzenbergenLib.RitzenbergenLib.api(path), {
// headers: {
// "Accept":"image/png"
// }
// });
// if(!response.ok) return false;
// const blob = await response.blob();
// return URL.createObjectURL(blob);
}
catch(e){
console.warn(e);
}
}
// }
// catch(e){
// console.warn(e);
// }
// }
loadImage("randomimage.php?path=/doppelkopf&recursive=1&tn=1&color=white&text=Doppelkopf&size=3").then((url)=>{
images.value[0]=url;
});
loadImage("randomimage.php?path=/erntefest&recursive=1&tn=1&color=white&text=Erntefest&size=3").then((url)=>{
images.value[1]=url;
});
loadImage("randomimage.php?path=/fussball&recursive=1&tn=1&color=white&text=Fußballturnier&size=3").then((url)=>{
images.value[2]=url;
});
loadImage("randomimage.php?path=/osterfeuer&recursive=1&tn=1&color=white&text=Osterfeuer&size=3").then((url)=>{
images.value[3]=url;
});
// loadImage("randomimage.php?path=/doppelkopf&recursive=1&tn=1&color=white&text=Doppelkopf&size=3").then((url)=>{
// images.value[0]=url;
// });
// loadImage("randomimage.php?path=/erntefest&recursive=1&tn=1&color=white&text=Erntefest&size=3").then((url)=>{
// images.value[1]=url;
// });
// loadImage("randomimage.php?path=/fussball&recursive=1&tn=1&color=white&text=Fußballturnier&size=3").then((url)=>{
// images.value[2]=url;
// });
// loadImage("randomimage.php?path=/osterfeuer&recursive=1&tn=1&color=white&text=Osterfeuer&size=3").then((url)=>{
// images.value[3]=url;
// });
const images=ref([]);
const images=ref(["bild1","bild2","bild3","bild4"]);
</script>
<template>
<section
@@ -64,9 +63,9 @@ const images=ref([]);
>
<div class="item-wrapper">
<div class="item-img">
<RouterLink to="/galerie/doppelkopf"
<NuxtLink to="/galerie/#doppelkopf"
><img :src="images[0]"
/></RouterLink>
/></NuxtLink>
</div>
</div>
</div>
@@ -75,9 +74,9 @@ const images=ref([]);
>
<div class="item-wrapper">
<div class="item-img">
<RouterLink to="/galerie/erntefest"
<NuxtLink to="/galerie/#erntefest"
><img :src="images[1]"
/></RouterLink>
/></NuxtLink>
</div>
</div>
</div>
@@ -86,9 +85,9 @@ const images=ref([]);
>
<div class="item-wrapper">
<div class="item-img">
<RouterLink to="/galerie/fussball"
<NuxtLink to="/galerie/#fussball"
><img :src="images[2]"
/></RouterLink>
/></NuxtLink>
</div>
</div>
</div>
@@ -97,9 +96,9 @@ const images=ref([]);
>
<div class="item-wrapper">
<div class="item-img">
<RouterLink to="/galerie/osterfeuer"
<NuxtLink to="/galerie/#osterfeuer"
><img :src="images[3]"
/></RouterLink>
/></NuxtLink>
</div>
</div>
</div>