portfolio_leptos/src/app/mod.rs

30 lines
No EOL
709 B
Rust

mod components;
use leptos::*;
use leptos_meta::*;
use leptos_router::*;
#[component]
pub fn App() -> impl IntoView {
provide_meta_context();
view! {
<Stylesheet id="leptos" href="/pkg/portfolio.css"/>
<Link rel="shortcut icon" type_="image/ico" href="/favicon.ico"/>
<Router>
<Routes>
<Route path="" view= move || view! { <Home/> }/>
</Routes>
</Router>
}
}
#[component]
fn Home() -> impl IntoView {
view! {
<main class="m-0 p-0 bg-surface dark:bg-dark_surface text-on_surface dark:text-dark_on_surface">
<components::TopComponent/>
<components::MonParcours/>
</main>
}
}