use leptos::{
hydration::{AutoReload, HydrationScripts},
prelude::{ElementChild, GlobalAttributes, IntoView, LeptosOptions},
view,
};
use leptos_meta::{provide_meta_context, MetaTags, Stylesheet, Title};
use crate::{App, ChildrenFn};
pub fn Shell(app_name: String, options: LeptosOptions, app_home: ChildrenFn) -> impl IntoView {
provide_meta_context();
view! {
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<AutoReload options=options.clone() />
<HydrationScripts options />
<MetaTags />
<Title text=format!("{app_name} • peace")/>
<Stylesheet id="leptos" href=format!("/pkg/{app_name}.css") />
</head>
<body>
<App app_home />
</body>
</html>
}
}