feat(demo): logo

This commit is contained in:
luoxiao 2023-11-02 21:29:45 +08:00
parent 8d9182e45c
commit bde1af3b5c
5 changed files with 35 additions and 27 deletions

View file

@ -1,8 +1,8 @@
<p style="text-align: center" > <p align="center" >
<img src="https://raw.githubusercontent.com/luoxiaozero/melt-ui/main/logo.svg" alt="Melt Logo" style="width: 160px"/> <img src="https://raw.githubusercontent.com/luoxiaozero/melt-ui/main/logo.svg" alt="Melt Logo" width="160px"/>
</p> </p>
<h1 style="text-align: center">Melt UI</h1> <h1 align="center">Melt UI</h1>
<p style="text-align: center">An easy to use leptos component library</p> <p align="center">An easy to use leptos component library</p>
**The 0.0.x release does not consider API compatibility at this time** **The 0.0.x release does not consider API compatibility at this time**

View file

@ -1,14 +1,19 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Melt UI</title> <title>Melt UI</title>
<link
rel="shortcut icon"
href="/melt-ui/favicon.ico"
type="image/x-icon"
/>
<link data-trunk rel="css" href="./src/assets/css/index.css" /> <link data-trunk rel="css" href="./src/assets/css/index.css" />
<link data-trunk rel="copy-file" href="./src/assets/svg/grid_dot.svg"> <link data-trunk rel="copy-file" href="./src/assets/svg/grid_dot.svg" />
<link data-trunk rel="copy-file" href="./src/assets/favicon.ico" />
<link data-trunk rel="copy-file" href="../logo.svg" />
</head> </head>
<body> <body></body>
</body>
</html> </html>

BIN
demo/src/assets/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View file

@ -23,13 +23,15 @@ pub fn SiteHeader() -> impl IntoView {
}; };
let style = create_memo(move |_| { let style = create_memo(move |_| {
theme.with(|theme| { theme.with(|theme| {
format!("height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid {}", theme.common.border_color) format!("height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid {}", theme.common.border_color)
}) })
}); });
view! { view! {
<LayoutHeader style> <LayoutHeader style>
<span <Space>
style="cursor: pointer" <img src="/melt-ui/logo.svg" style="width: 36px"/>
<div
style="cursor: pointer; display: flex; align-items: center; height: 100%; font-weight: 600; font-size: 20px"
on:click=move |_| { on:click=move |_| {
let navigate = use_navigate(); let navigate = use_navigate();
navigate("/", Default::default()); navigate("/", Default::default());
@ -37,7 +39,8 @@ pub fn SiteHeader() -> impl IntoView {
> >
"Melt UI" "Melt UI"
</span> </div>
</Space>
<Space> <Space>
<Button <Button
variant=ButtonVariant::Text variant=ButtonVariant::Text

View file

@ -27,7 +27,7 @@ pub fn ComponentsPage() -> impl IntoView {
view! { view! {
<Layout position=LayoutPosition::Absolute> <Layout position=LayoutPosition::Absolute>
<SiteHeader/> <SiteHeader/>
<Layout has_sider=true position=LayoutPosition::Absolute style="top: 54px;"> <Layout has_sider=true position=LayoutPosition::Absolute style="top: 64px;">
<LayoutSider> <LayoutSider>
<Menu value=selected> <Menu value=selected>
{ {