feat: highlight six best battles and compact the archive table

This commit is contained in:
Meghdad committed 2026-10-20 16:07:38 +03:30
1 parent 29963fa09d
commit 8dd0c87535
7 files changed
+31 -19

No files matched your search

+4
View File
@@ -46,6 +46,10 @@ test('static output includes indexable bilingual content, metadata, and domain f
assert.match(html,/og:image/);assert.match(html,/twitter:image/);
assert.equal((html.match(/<h1 /g)||[]).length,1);
assert.match(html,/id="rewards"/);
const archive=html.match(/<section id="battles"[\s\S]*?<\/section>/)[0];
assert.equal((archive.match(/<article /g)||[]).length,Math.min(6,site.battles.length));
assert.equal((archive.match(/<tr>/g)||[]).length,site.battles.length+1);
assert.ok(!archive.includes('battle-more'));
assert.ok(!html.includes('undefined'));assert.ok(!html.includes('javascript:'));
const ids=[...html.matchAll(/\bid="([^"]+)"/g)].map(m=>m[1]);
assert.equal(ids.length,new Set(ids).size);