feat(leptos): frontend crate scaffold with empty app
- frontend/ crate compiles to WASM via trunk - empty Leptos app mounted to body via wasm_bindgen(start) - dependencies: leptos 0.7 CSR, leptos-use, lucide-leptos, gloo-net, web-sys - workspace cargo check passes (first time the workspace compiles end-to-end) - trunk build produces 65KB WASM + 25KB JS glue Deviations from brief: - lucide-leptos: 0.5 (brief) -> 3 (only version published) - web-sys: removed invalid features ArrayBuffer/DataView (in js-sys/wasm-bindgen) - src/main.rs -> src/lib.rs with #[wasm_bindgen(start)] to avoid bin/lib duplicate artifact
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
use leptos::prelude::*;
|
||||
|
||||
#[component]
|
||||
pub fn App() -> impl IntoView {
|
||||
view! {
|
||||
<div style="display: flex; align-items: center; justify-content: center; height: 100vh; font-family: 'Poppins', sans-serif; font-size: 1.5rem; background: #0f172a; color: #e2e8f0;">
|
||||
"Hello from Leptos"
|
||||
</div>
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user