44 lines
1.1 KiB
Rust
44 lines
1.1 KiB
Rust
use crate::components::tool_list::ToolList;
|
|
use leptos::prelude::*;
|
|
use leptos_meta::{provide_meta_context, MetaTags, Stylesheet, Title};
|
|
use leptos_router::{
|
|
components::{Route, Router, Routes},
|
|
StaticSegment,
|
|
};
|
|
|
|
pub fn shell(options: LeptosOptions) -> impl IntoView {
|
|
view! {
|
|
<!DOCTYPE html>
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="utf-8"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<AutoReload options=options.clone() />
|
|
<HydrationScripts options/>
|
|
<MetaTags/>
|
|
</head>
|
|
<body>
|
|
<App/>
|
|
</body>
|
|
</html>
|
|
}
|
|
}
|
|
|
|
#[component]
|
|
pub fn App() -> impl IntoView {
|
|
provide_meta_context();
|
|
|
|
view! {
|
|
<Stylesheet id="leptos" href="/pkg/toollist.css"/>
|
|
<Title text="Werkzeugliste"/>
|
|
|
|
<Router>
|
|
<main>
|
|
<Routes fallback=|| "Seite nicht gefunden.".into_view()>
|
|
<Route path=StaticSegment("") view=ToolList/>
|
|
</Routes>
|
|
</main>
|
|
</Router>
|
|
}
|
|
}
|