feat: ✨ update title generation
This commit is contained in:
parent
3d1a78f0a4
commit
deceea3071
1 changed files with 4 additions and 5 deletions
|
@ -1,8 +1,7 @@
|
||||||
<script webc:setup>
|
<script webc:setup>
|
||||||
const getTitle = (fullName) => {
|
const getTitle = (fullName, title) => {
|
||||||
if (fullName) {
|
if (fullName) return `${fullName} — Character Reference`;
|
||||||
return `${fullName} — Character Reference`;
|
if (title) return `The World of Sebin's Characters — ${title}`;
|
||||||
}
|
|
||||||
|
|
||||||
return "The World of Sebin's Characters";
|
return "The World of Sebin's Characters";
|
||||||
};
|
};
|
||||||
|
@ -11,7 +10,7 @@
|
||||||
char ? `src/img/${char.toLowerCase()}/${type}.png` : `src/img/${type}.png`;
|
char ? `src/img/${char.toLowerCase()}/${type}.png` : `src/img/${type}.png`;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<title @text="getTitle($data.fullName)"></title>
|
<title @text="getTitle($data.fullName, $data.title)"></title>
|
||||||
|
|
||||||
<link
|
<link
|
||||||
rel="shortcut icon"
|
rel="shortcut icon"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue