fix(web): restored navigation links

This commit is contained in:
əlemi 2024-04-18 03:34:56 +02:00
parent 60cf700b95
commit 646e415ce3
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -7,30 +7,10 @@ use crate::prelude::*;
pub fn Navigator() -> impl IntoView { pub fn Navigator() -> impl IntoView {
let auth = use_context::<Auth>().expect("missing auth context"); let auth = use_context::<Auth>().expect("missing auth context");
view! { view! {
<a href="/web/home" > <a href="/web/home"><input class="w-100" type="submit" class:hidden=move || !auth.present() value="home timeline" /></a>
<input class="w-100" <a href="/web/server"><input class="w-100" type="submit" value="server timeline" /></a>
type="submit" <a href="/web/about"><input class="w-100" type="submit" value="about" /></a>
class:hidden=move || !auth.present() <a href="/web/config"><input class="w-100" type="submit" value="config" class:hidden=move|| !auth.present() /></a>
// class:active=move || use_location().pathname.get().ends_with("/home")
value="home timeline"
/>
</a>
<a href="/web/server" >
<input
class="w-100"
// class:active=move || use_location().pathname.get().ends_with("/server")
type="submit"
value="server timeline"
/>
</a>
<a href="/web/about" >
<input
class="w-100"
// class:active=move || use_location().pathname.get().ends_with("/server")
type="submit"
value="about"
/>
</a>
} }
} }
@ -104,7 +84,7 @@ pub fn Breadcrumb(
children: Children, children: Children,
) -> impl IntoView { ) -> impl IntoView {
view! { view! {
<div class="tl-header w-100 center mb-s" > <div class="tl-header w-100 center" >
{if back { Some(view! { {if back { Some(view! {
<a class="breadcrumb mr-1" href="javascript:history.back()" ><b>"<<"</b></a> <a class="breadcrumb mr-1" href="javascript:history.back()" ><b>"<<"</b></a>
})} else { None }} })} else { None }}