use crate::pages::{aes::AesPage, des::DesPage, footer::Footer, header::Header, home::Home}; use leptos::prelude::*; use leptos_meta::{MetaTags, Stylesheet, Title, provide_meta_context}; use leptos_router::{ StaticSegment, components::{Route, Router, Routes}, }; #[must_use] pub fn shell(options: LeptosOptions) -> impl IntoView { view! { } } #[component] // Provides context that manages stylesheets, titles, meta tags, etc. pub fn App() -> impl IntoView { provide_meta_context(); view! { // injects a stylesheet into the document // id=leptos means cargo-leptos will hot-reload this stylesheet // sets the document title // content for this welcome page <Router> <div class="app-containter"> <Header /> <main> <Routes fallback=|| "Page not found.".into_view()> <Route path=StaticSegment("/") view=Home /> <Route path=StaticSegment("/des") view=DesPage /> <Route path=StaticSegment("/aes") view=AesPage /> </Routes> </main> <Footer /> </div> </Router> } }