Trim the minimalist section to 4 and show the real tile count

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-23 14:17:30 +00:00
co-authored by Claude Opus 5.5
parent 461a39caa2
commit b9200e390f
144 changed files with 10 additions and 1207 deletions
+5 -2
View File
@@ -1,4 +1,4 @@
// fills <!--gallery--> in index.html from whatever is in public/
// fills <!--gallery--> in index.html from whatever is in public/, and every <!--count--> with how many tiles that is
// one tile per name: shows the .webp (or the .gif if that's all there is) and links every format
// tiles are split into sections by the gen/<section>/ folder they come from, with a divider between
// hand-made files that have no gen file go in the first section
@@ -23,4 +23,7 @@ const gallery=()=>{
return`<figure><a href="/${id}.${x}"><img src="/${id}.${x}?v=${v}" alt="${id.replace('/',' ')}" width="${w}" height="${h}" loading="lazy" decoding="async"></a><figcaption>${links}</figcaption></figure>`
}).join('\n')).filter(Boolean).join('\n<hr>\n')
}
export default{plugins:[{name:'gallery',transformIndexHtml:h=>h.replace('<!--gallery-->',gallery())}]}
export default{plugins:[{name:'gallery',transformIndexHtml:h=>{
const g=gallery()
return h.replace('<!--gallery-->',g).replaceAll('<!--count-->',g.split('<figure>').length-1)
}}]}