diff --git a/crates/in-web/src/layout.rs b/crates/in-web/src/layout.rs index 8457719..a5350ed 100644 --- a/crates/in-web/src/layout.rs +++ b/crates/in-web/src/layout.rs @@ -1128,8 +1128,9 @@ const STYLE: Asset = asset!("assets/main.css"); pub(crate) async fn document_shell<'a>( cx: &'a Cx, slot: topcoat::view::Child<'a>, - title: &'a str, + title: impl Into, ) -> Result { + let title = title.into(); // The per-user chrome knobs, read off the request's own user: the theme // into `data-theme`, the interface into `data-ui`, the language into // ``. Signed-out (or unreadable) wears the provision defaults — @@ -1214,6 +1215,10 @@ fn title_key_of(path: &str) -> Option { #[layout("/")] async fn root_layout(cx: &Cx, slot: topcoat::view::Child<'_>) -> Result { let lang = crate::i18n::lang(cx).await; - let title = title_key_of(uri(cx).path()).map_or("in", |key| t(lang, key)); + let title = match title_key_of(uri(cx).path()) { + None => "in".to_string(), + Some(Key::WelcomeTitle) => t(lang, Key::WelcomeTitle).to_string(), + Some(key) => format!("{} · in", t(lang, key)), + }; document_shell(cx, slot, title).await } diff --git a/crates/in-web/src/share.rs b/crates/in-web/src/share.rs index 99b2478..20e4c62 100644 --- a/crates/in-web/src/share.rs +++ b/crates/in-web/src/share.rs @@ -685,6 +685,7 @@ async fn public_page( title: &str, page: impl View, ) -> Result { + let title = format!("{title} · in"); document_shell(cx, topcoat::view::Child::new(page), title) .await? .first()