Add style for photos
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
<script>
|
||||
import { str, strf } from '$lib/data/language.js';
|
||||
import { strf } from '$lib/data/language.js';
|
||||
|
||||
import Header from '$lib/components/Header.svelte';
|
||||
import Gallery from '$lib/components/Gallery.svelte';
|
||||
@ -17,4 +17,6 @@
|
||||
<b>Sorting Date:</b> {data.album.date}<br />
|
||||
<b>License:</b> {data.album.license}<br />
|
||||
</p>
|
||||
<Gallery items={data.album.items} base={`${data.base}/i/`} />
|
||||
<main>
|
||||
<Gallery album={data.album} base={`${data.base}/i/`} />
|
||||
</main>
|
||||
|
||||
@ -20,12 +20,12 @@ export async function GET({ params }) {
|
||||
} else if (params.width === 'l') {
|
||||
width = 1200;
|
||||
} else if (!Number.isNaN(Number(params.width))) {
|
||||
width = Number(width);
|
||||
width = Number(params.width);
|
||||
}
|
||||
}
|
||||
thumbnail = thumbnail || await sharp(content).resize(width).webp({ quality: 90 }).toBuffer();
|
||||
} catch (err) {
|
||||
console.error(`${err.stack}`.replaceAll('/home/sveltekit', '.'));
|
||||
console.error(`${/** @type {Error} */(err).stack}`.replaceAll('/home/sveltekit', '.'));
|
||||
throw error(500, 'Error getting thumbnail');
|
||||
}
|
||||
return new Response(thumbnail, {
|
||||
|
||||
Reference in New Issue
Block a user