feat(demo): update Home

This commit is contained in:
luoxiao 2024-08-26 00:14:02 +08:00
parent f408899eda
commit 7893d35239

View file

@ -1,3 +1,4 @@
use crate::components::SiteHeader;
use leptos::prelude::*; use leptos::prelude::*;
use leptos_router::hooks::{use_navigate, use_query_map}; use leptos_router::hooks::{use_navigate, use_query_map};
use thaw::*; use thaw::*;
@ -12,12 +13,16 @@ pub fn Home() -> impl IntoView {
navigate(&path, Default::default()); navigate(&path, Default::default());
} }
view! { view! {
<Layout position=LayoutPosition::Absolute>
<SiteHeader/>
<Layout <Layout
position=LayoutPosition::Absolute position=LayoutPosition::Absolute
content_style="display: flex; align-items: center; justify-content: center; flex-direction: column;" attr:style="top: 64px"
> >
<h1 style="font-size: 80px; line-height: 1;margin: 0 0 18px;">"Thaw UI"</h1> <div style="width: 1100px; margin: calc(50vh - 200px) auto 0; display: flex">
<p>"An easy to use leptos component library"</p> <div style="width: 50%">
<h2 style="line-height: 64px; font-size: 56px; margin: 0 0 18px">"Thaw UI"</h2>
<p style="line-height: 36px; font-size: 24px">"An easy to use leptos component library"</p>
<Space> <Space>
<Button <Button
appearance=ButtonAppearance::Primary appearance=ButtonAppearance::Primary
@ -37,6 +42,12 @@ pub fn Home() -> impl IntoView {
"Github" "Github"
</Button> </Button>
</Space> </Space>
</div>
<div style="width: 50%; text-align: center">
<img src="/logo.svg" style="width: 200px"/>
</div>
</div>
</Layout>
</Layout> </Layout>
} }
} }