feat: update title generation

This commit is contained in:
Sebin Nyshkim 2025-08-02 20:14:54 +02:00
parent 3d1a78f0a4
commit deceea3071
Signed by: SebinNyshkim
SSH key fingerprint: SHA256:LG1WHMySL/4iW/Yci+0eHgbf0te5beRiLlmyoY8E5D0

View file

@ -1,8 +1,7 @@
<script webc:setup>
const getTitle = (fullName) => {
if (fullName) {
return `${fullName} — Character Reference`;
}
const getTitle = (fullName, title) => {
if (fullName) return `${fullName} — Character Reference`;
if (title) return `The World of Sebin's Characters — ${title}`;
return "The World of Sebin's Characters";
};
@ -11,7 +10,7 @@
char ? `src/img/${char.toLowerCase()}/${type}.png` : `src/img/${type}.png`;
</script>
<title @text="getTitle($data.fullName)"></title>
<title @text="getTitle($data.fullName, $data.title)"></title>
<link
rel="shortcut icon"