refactor: ♻️ restructure character data files, move shared functionality into library

This commit is contained in:
Sebin Nyshkim 2025-06-26 19:47:46 +02:00
parent 23c06bcd3a
commit d7d00046b1
9 changed files with 239 additions and 312 deletions

View file

@ -1,7 +1,7 @@
<script webc:setup>
const characters = Object.keys($data.collections).filter((coll) => coll !== 'all');
const getCharacterName = (name) => $data.collections[name][0].data.getFullName();
const getCharacterName = (name) => $data.collections[name][0].data.fullName;
const getDescription = (name) => $data.collections[name][0].data.description;
const getAvatar = (name) => `src/img/${name}/avatar.png`;
const getAltText = (name) => name.charAt(0).toUpperCase() + name.slice(1) + ' Avatar';