Add some comments

This commit is contained in:
itsfinniii
2026-04-27 17:11:11 +02:00
parent 7116aa2348
commit 79e343dbdc

View File

@@ -97,8 +97,11 @@ export async function getPage(settings: GlobalSettings, route: string): Promise<
const allCategories = await getAllCategories(settings); const allCategories = await getAllCategories(settings);
const lastCategory = allCategories[0]; const lastCategory = allCategories[0];
// Changing the thumbnail here is okay, as it gets everything again in the CategoryIndex.astro file.
// Might have to make it prettier down the line?
// TODO: See comment above.
const resizedThumbnail = getImageSize(lastCategory.thumbnail.width, lastCategory.thumbnail.height, 0.756); const resizedThumbnail = getImageSize(lastCategory.thumbnail.width, lastCategory.thumbnail.height, 0.756);
const thumbnail = await getImage({ const thumbnail = await getImage({
src: lastCategory.thumbnail.url, src: lastCategory.thumbnail.url,
width: resizedThumbnail.width, width: resizedThumbnail.width,
@@ -136,6 +139,9 @@ export async function getPage(settings: GlobalSettings, route: string): Promise<
const category = await getPhotoCategory(`/${params["C"]}`); const category = await getPhotoCategory(`/${params["C"]}`);
// Changing the thumbnail here is okay, as it gets everything again in the CategoryIndex.astro file.
// Might have to make it prettier down the line?
// TODO: See comment above.
const resizedThumbnail = getImageSize(category.thumbnail.width, category.thumbnail.height, 0.756); const resizedThumbnail = getImageSize(category.thumbnail.width, category.thumbnail.height, 0.756);
const thumbnail = await getImage({ const thumbnail = await getImage({