refactor: ♻️ restructure character data files, move shared functionality into library
This commit is contained in:
parent
23c06bcd3a
commit
d7d00046b1
9 changed files with 239 additions and 312 deletions
|
@ -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';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue