portfolio_leptos/src/app/components/nav.rs

19 lines
No EOL
613 B
Rust

use leptos::*;
use leptos_router::*;
#[component]
pub fn Nav() -> impl IntoView {
let (mobile_menu, set_mobile_menu) = create_signal(false);
view! {
<nav>
<A href="/" class="nav-home">Florian RICHER</A>
<span class="nav-mobile" on:click=move |_| set_mobile_menu(!mobile_menu())><leptos_icons::Icon icon=icondata::FiMenu/></span>
<div class="nav-links" class:open=move || mobile_menu()>
<A href="/experience" class="nav-link">Mon parcours</A>
<A href="/posts" class="nav-link">Blog</A>
</div>
</nav>
}
}