portfolio_leptos/src/app/mod.rs

29 lines
670 B
Rust
Raw Normal View History

2023-10-08 21:36:00 +02:00
mod components;
2023-10-08 20:26:40 +02:00
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! {
2023-10-08 22:26:04 +02:00
<main class="m-0 p-0 bg-surface dark:bg-dark_surface text-on_surface dark:text-dark_on_surface">
<components::TopComponent/>
2023-10-08 20:26:40 +02:00
</main>
}
}