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>
|
||||
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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue