Skip to content

Commit dc62eb2

Browse files
committed
feat: new theme and non working filters
1 parent 050e782 commit dc62eb2

3 files changed

Lines changed: 73 additions & 41 deletions

File tree

src/assets/basel.rs

Lines changed: 23 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,29 @@
11
pub const CSS: &str = r###":root:has(input.theme-controller[value=rust-ember]:checked),
22
[data-theme="rust-ember"] {
3-
color-scheme: dark;
4-
5-
--color-base-100: oklch(22% 0.02 30); /* dark charcoal background */
6-
--color-base-200: oklch(28% 0.025 35);
7-
--color-base-300: oklch(35% 0.03 40);
8-
--color-base-content: oklch(88% 0.03 20); /* light text on dark */
9-
10-
--color-primary: oklch(70% 0.22 35); /* warm glowing orange */
11-
--color-primary-content: oklch(15% 0.02 25); /* dark on orange */
12-
13-
--color-secondary: oklch(72% 0.25 10); /* deep hot pink */
14-
--color-secondary-content: oklch(15% 0.02 25); /* dark on pink */
15-
16-
--color-accent: oklch(68% 0.18 50); /* coral/pink-orange blend */
17-
--color-accent-content: oklch(15% 0.02 25);
18-
19-
--color-neutral: oklch(28% 0.01 40); /* slightly blue-ish dark gray */
20-
--color-neutral-content: oklch(85% 0.02 25);
21-
22-
--color-info: oklch(65% 0.12 280); /* violet-ish info pop */
23-
--color-info-content: oklch(15% 0.02 25);
24-
25-
--color-success: oklch(65% 0.15 150); /* soft green */
26-
--color-success-content: oklch(15% 0.02 25);
27-
28-
--color-warning: oklch(72% 0.24 70); /* warm yellow-orange */
29-
--color-warning-content: oklch(15% 0.02 25);
30-
31-
--color-error: oklch(70% 0.25 25); /* warm red-orange */
32-
--color-error-content: oklch(15% 0.02 25);
33-
34-
--radius-selector: 0.25rem;
3+
color-scheme: "dark";
4+
--color-base-100: oklch(0% 0 0);
5+
--color-base-200: oklch(0% 0 0);
6+
--color-base-300: oklch(29% 0.066 243.157);
7+
--color-base-content: oklch(68% 0.162 75.834);
8+
--color-primary: oklch(35% 0 0);
9+
--color-primary-content: oklch(100% 0 0);
10+
--color-secondary: oklch(35% 0 0);
11+
--color-secondary-content: oklch(100% 0 0);
12+
--color-accent: oklch(35% 0 0);
13+
--color-accent-content: oklch(100% 0 0);
14+
--color-neutral: oklch(35% 0 0);
15+
--color-neutral-content: oklch(100% 0 0);
16+
--color-info: oklch(45.201% 0.313 264.052);
17+
--color-info-content: oklch(89.04% 0.062 264.052);
18+
--color-success: oklch(51.975% 0.176 142.495);
19+
--color-success-content: oklch(90.395% 0.035 142.495);
20+
--color-warning: oklch(96.798% 0.211 109.769);
21+
--color-warning-content: oklch(19.359% 0.042 109.769);
22+
--color-error: oklch(62.795% 0.257 29.233);
23+
--color-error-content: oklch(12.559% 0.051 29.233);
24+
--radius-selector: 1rem;
3525
--radius-field: 0.25rem;
36-
--radius-box: 0.5rem;
26+
--radius-box: 0.25rem;
3727
--size-selector: 0.25rem;
3828
--size-field: 0.25rem;
3929
--border: 1px;

src/jobs/filter.rs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
use maud::{Markup, html};
2+
3+
pub fn single(value: impl Into<String>) -> Markup {
4+
html! {
5+
(single_color(value,"bg-base-300"))
6+
}
7+
}
8+
9+
pub fn single_color(value: impl Into<String>, color: impl Into<String>) -> Markup {
10+
let color = color.into();
11+
let value = value.into();
12+
let classes = format!("btn {}", color);
13+
html! {
14+
input class=(classes) type="radio" name="frameworks" aria-label=(value);
15+
}
16+
}
17+
18+
pub fn render(inputs: Vec<Markup>) -> Markup {
19+
html! {
20+
form class="filter" {
21+
input class="btn btn-square" type="reset" value="×";
22+
@for f in inputs{
23+
(f)
24+
}
25+
26+
}
27+
}
28+
}

src/jobs/mod.rs

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use maud::{Markup, html};
22

3+
mod filter;
34
mod root;
45

56
pub use root::router;
@@ -15,30 +16,43 @@ pub fn ui() -> Markup {
1516
meta charset="UTF-8";
1617
meta name="viewport" content="width=device-width, initial-scale=1.0";
1718
title {
18-
"Oxidation Jobs"
19+
"Oxidation"
1920
}
2021

2122

2223
}
2324
body {
2425
header class="mb-8 text-center" {
25-
h1 class="text-4xl font-bold text-primary mb-2" {
26-
"Rust Job Postings"
26+
h1 class="text-xl text-base mb-2" {
27+
"Oxidation"
2728
}
2829
p class="text-sm text-neutral-content" {
2930
"Hand-picked opportunities for Rustaceans \u{1f980}"
3031
}
3132
}
32-
main class="grid gap-6 md:grid-cols-2 lg:grid-cols-3" {
33+
main {
34+
35+
36+
div ."mx-3 mb-5" {
37+
(filter::render(
38+
vec![filter::single("Full Rust"), filter::single("Some Rust")]
39+
))
40+
(filter::render(
41+
vec![ filter::single_color("On-Site", "bg-primary")]
42+
))
43+
}
44+
45+
div class="grid gap-6 md:grid-cols-2 lg:grid-cols-3 mx-3" {
3346

3447
(job_card("Krypto Eng.", "Write the new app layers", vec![html!{
3548
div class="badge badge-accent" {
3649
"On-site"
3750
}
38-
}], "This job is great because lorem ipsum", html!{ button class="btn btn-primary btn-sm" {
51+
}], "This job is great because lorem ipsum", html!{
52+
button class="btn btn-secondary btn-sm bg-base" {
3953
"Apply"
4054
}}))
41-
55+
}
4256
}
4357
}
4458
}
@@ -56,9 +70,9 @@ fn job_card(
5670
let subtitle = subtitle.into();
5771
let description = description.into();
5872
html! {
59-
div class="card bg-base-100 shadow-md border border-neutral" {
73+
div class="card bg-base-100 shadow-md border border-base-300" {
6074
div class="card-body" {
61-
h2 class="card-title text-primary" {
75+
h2 class="card-title text-base" {
6276
(title)
6377
}
6478
p class="text-sm text-neutral-content" {

0 commit comments

Comments
 (0)