Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demo/refactor 240103 #67

Merged
merged 5 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: CI
on:
pull_request:
paths: ["demo/**", "thaw/**"]
paths: ["demo/**", "demo_markdown/**", "thaw/**"]
branches:
- main

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/demo.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Deploy demo
on:
push:
paths: ["demo/**", "thaw/**"]
paths: ["demo/**", "demo_markdown/**", "thaw/**"]
branches:
- main

Expand Down
1 change: 0 additions & 1 deletion demo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ icondata = { version = "0.1.0", features = [
"AiUserOutlined",
"AiSearchOutlined",
] }
prisms = { git = "https://github.com/luoxiaozero/prisms", rev = "16d4d34b93fc20578ebf03137d54ecc7eafa4d4b" }
demo_markdown = { path = "../demo_markdown" }

[features]
Expand Down
36 changes: 18 additions & 18 deletions demo/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,29 +36,29 @@ fn TheRouter(is_routing: RwSignal<bool>) -> impl IntoView {
<Routes base="/thaw".to_string()>
<Route path="/" view=Home/>
<Route path="/guide" view=GuidePage>
<Route path="/installation" view=InstallationPage/>
<Route path="/usage" view=UsagePage/>
<Route path="/server-sider-rendering" view=ServerSiderRenderingPage/>
<Route path="/installation" view=InstallationMdPage/>
<Route path="/usage" view=UsageMdPage/>
<Route path="/server-sider-rendering" view=ServerSiderRenderingMdPage/>
</Route>
<Route path="/components" view=ComponentsPage>
<Route path="/tabbar" view=TabbarPage/>
<Route path="/nav-bar" view=NavBarPage/>
<Route path="/image" view=ImagePage/>
<Route path="/button" view=ButtonPage/>
<Route path="/checkbox" view=CheckboxPage/>
<Route path="/toast" view=ToastPage/>
<Route path="/color-picker" view=ColorPickerPage/>
<Route path="/alert" view=AlertPage/>
<Route path="/grid" view=GridPage/>
<Route path="/auto-complete" view=AutoCompletePage/>
<Route path="/avatar" view=AvatarPage/>
<Route path="/badge" view=BadgePage/>
<Route path="/card" view=CardPage/>
<Route path="/divider" view=DividerPage/>
<Route path="/icon" view=IconPage/>
<Route path="/breadcrumb" view=BreadcrumbPage/>
<Route path="/calendar" view=CalendarPage/>
<Route path="/date-picker" view=DatePickerPage/>
<Route path="/alert" view=AlertMdPage/>
<Route path="/auto-complete" view=AutoCompleteMdPage/>
<Route path="/avatar" view=AvatarMdPage/>
<Route path="/badge" view=BadgeMdPage/>
<Route path="/breadcrumb" view=BreadcrumbMdPage/>
<Route path="/button" view=ButtonMdPage/>
<Route path="/calendar" view=CalendarMdPage/>
<Route path="/card" view=CardMdPage/>
<Route path="/checkbox" view=CheckboxMdPage/>
<Route path="/color-picker" view=ColorPickerMdPage/>
<Route path="/date-picker" view=DatePickerMdPage/>
<Route path="/divider" view=DividerMdPage/>
<Route path="/grid" view=GridMdPage/>
<Route path="/icon" view=IconMdPage/>
<Route path="/image" view=ImageMdPage/>
<Route path="/input" view=InputMdPage/>
<Route path="/input-number" view=InputNumberMdPage/>
<Route path="/layout" view=LayoutMdPage/>
Expand Down
6 changes: 0 additions & 6 deletions demo/src/components/demo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,9 @@ pub fn Demo(demo_code: DemoCode, children: Children) -> impl IntoView {
}

view! {
<Style id="leptos-thaw-prism-css">{prisms::prism_css!()}</Style>
<Style id="leptos-thaw-syntect-css">
{include_str!("./syntect-css.css")}
</Style>
<Style id="leptos-thaw-prism-css-fix">
".token.operator {
background: hsla(0, 0%, 100%, 0) !important;
}"
</Style>
<div style=move || style.get()>{children()}</div>
<div style=move || code_style.get() class=move || content_class.get()>
<Code>
Expand Down
25 changes: 15 additions & 10 deletions demo/src/components/syntect-css.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,23 @@

/** light */

.color-scheme--light .syntect-support.syntect-function,
.color-scheme--light .syntect-entity.syntect-name.syntect-function,
.color-scheme--light .syntect-variable.syntect-annotation,
.color-scheme--light .syntect-macro {
color: hsl(221, 87%, 60%);
}

.color-scheme--light .syntect-keyword,
.color-scheme--light .syntect-storage {
color: hsl(301, 63%, 40%);
}

.color-scheme--light .syntect-punctuation.syntect-accessor,
.color-scheme--light .syntect-keyword.syntect-operator {
color: hsl(335, 95%, 62%);
}

.color-scheme--light .syntect-function,
.color-scheme--light .syntect-macro {
color: hsl(221, 87%, 60%);
}

.color-scheme--light .syntect-support.syntect-type {
color: hsl(198, 99%, 37%);
}
Expand All @@ -35,21 +38,23 @@
}

/** dark */
.color-scheme--dark .syntect-support.syntect-function,
.color-scheme--dark .syntect-entity.syntect-name.syntect-function,
.color-scheme--dark .syntect-variable.syntect-annotation,
.color-scheme--dark .syntect-macro {
color: hsl(207, 82%, 66%);
}

.color-scheme--dark .syntect-keyword,
.color-scheme--dark .syntect-storage {
color: hsl(286, 60%, 67%);
}

.color-scheme--dark .syntect-punctuation.syntect-accessor,
.color-scheme--dark .syntect-keyword.syntect-operator {
color: hsl(335, 95%, 62%);
}

.color-scheme--dark .syntect-function,
.color-scheme--dark .syntect-macro {
color: hsl(207, 82%, 66%);
}

.color-scheme--dark .syntect-support.syntect-type {
color: hsl(187, 47%, 55%);
}
Expand Down
75 changes: 0 additions & 75 deletions demo/src/pages/alert/mod.rs

This file was deleted.

Loading
Loading