add thumb support and let art appear on multiple character sites
This commit is contained in:
parent
4973c66e77
commit
38cbf3fb63
2 changed files with 2 additions and 4 deletions
|
@ -23,8 +23,6 @@ const config = {
|
|||
title: import.meta.env.PUBLIC_TITLE,
|
||||
description: import.meta.env.PUBLIC_DESCRIPTION,
|
||||
};
|
||||
|
||||
console.log(config);
|
||||
---
|
||||
|
||||
<!doctype html>
|
||||
|
|
|
@ -6,14 +6,14 @@ import pb from "../../lib/pb";
|
|||
const { slug } = Astro.params;
|
||||
const imageCollection = await pb.collection("images").getFullList({
|
||||
sort: "-created",
|
||||
filter: `(character.slug~"${slug}")`,
|
||||
filter: `(character.slug?~"${slug}")`,
|
||||
});
|
||||
const characterDetails = await pb
|
||||
.collection("characters")
|
||||
.getFirstListItem(`(slug~"${slug}")`);
|
||||
// console.log(characterDetails);
|
||||
const images = imageCollection.map((record) => {
|
||||
const url = pb.files.getUrl(record, record.file);
|
||||
const url = pb.files.getUrl(record, record.file, {thumb: record.thumb});
|
||||
return {
|
||||
url: url,
|
||||
desc: record.description,
|
||||
|
|
Loading…
Add table
Reference in a new issue