Skip to content

Commit

Permalink
feat(app): add title
Browse files Browse the repository at this point in the history
  • Loading branch information
nakasyou committed Aug 20, 2024
1 parent 7b80923 commit e0273cf
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/islands/ai-quiz/components/InitialScreen.qwik.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export const InitialScreen = component$(() => {
}
return
}
document.title = `${gotNote.name} - Quiz with Nanoha`
const textNotes = loaded.notes.filter(
(note): note is TextNoteData => note.type === 'text',
)
Expand Down
3 changes: 3 additions & 0 deletions src/islands/note/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ export default (props: Props) => {
}
}
})
createEffect(() => {
document.title = `${noteBookMetadata.noteName} - Nanoha`
})
onMount(() => {
const url = new URL(location.href)
if (url.searchParams.has('play')) {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/app/notes/[noteid].astro
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if (/^local\-.+$/.test(noteId)) {
}
}
---
<Base title="" description="nanohanote app" useViewTransitions={true} noIndex={true} bodyClass="bg-background text-on-background">
<Base title="Nanoha Note" description="nanohanote app" useViewTransitions={true} noIndex={true} bodyClass="bg-background text-on-background">
<NanohaNoteApp client:load noteLoadType={noteLoadType} />
</Base>
<style is:global>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/app/notes/[noteid]/quiz.astro
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if (/^local\-.+$/.test(noteId)) {
}
}
---
<Base title="" description="nanohanote app" useViewTransitions={true} noIndex={true} bodyClass="bg-background text-on-background">
<Base title="AI Quiz with Nanoha" description="AI によるクイズ" useViewTransitions={true} noIndex={true} bodyClass="bg-background text-on-background">
<QuizApp noteLoadType={noteLoadType} />
</Base>
<style is:global>
Expand Down

0 comments on commit e0273cf

Please sign in to comment.