Skip to content

Commit 4a8bb77

Browse files
committed
feat: update dependencies, remove unused SVG assets, and enhance layout styles for resources section
1 parent 1750cec commit 4a8bb77

File tree

10 files changed

+83
-112
lines changed

10 files changed

+83
-112
lines changed

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/new/background/card-resource-1.svg

Lines changed: 0 additions & 20 deletions
This file was deleted.

assets/new/background/card-resource-2.svg

Lines changed: 0 additions & 3 deletions
This file was deleted.

assets/new/background/card-resource.svg

Lines changed: 0 additions & 10 deletions
This file was deleted.

input.css

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010

1111
@theme static {
1212
/* ----- Breakpoints ----- */
13-
--breakpoint-desktop: 640px;
13+
--breakpoint-tablet: 40rem;
14+
--breakpoint-desktop: 80rem;
15+
--spacing-desktop: 80rem;
1416
}
1517

1618
.text-akira {
@@ -96,14 +98,3 @@
9698
aspect-ratio: 0.75;
9799
clip-path: shape(from 86.92% 2.32%,curve to 80.37% 0% with 85.31% 0.85%/82.91% 0%,hline to 8.48%,curve to 0% 6.36% with 3.8% 0%/0% 2.85%,vline to 93.64%,curve to 8.48% 100% with 0% 97.15%/3.8% 100%,hline to 91.52%,curve to 100% 93.64% with 96.2% 100%/100% 97.15%,vline to 16.52%,curve to 98.07% 12.47% with 100% 15.04%/99.32% 13.61%,line to 86.92% 2.32%,close);
98100
}
99-
100-
101-
102-
.rustlanges-card--resource > svg {
103-
filter: drop-shadow(0px 0px 0px #000000) drop-shadow(4px 4px 0px #000000) url(#inset-shadow);
104-
@apply w-full h-auto;
105-
}
106-
107-
.rustlanges-card--resource-body {
108-
@apply absolute inset-0 flex justify-center items-center p-10;
109-
}

package-lock.json

Lines changed: 12 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
},
1515
"homepage": "https://github.com/RustLangES/RustLangES.github.io",
1616
"dependencies": {
17-
"@rustlanges/styles": "^0.0.2"
17+
"@rustlanges/styles": "file:../design-system-components/styles"
1818
},
1919
"devDependencies": {
2020
"tailwindcss": "^4.1.14"

src/components/header.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ pub fn Header() -> impl IntoView {
3030
let logo = move || match theme.get() {
3131
Theme::Dark => view! { <NewLogoRustDarkPageIcon size=60 /> }.into_any(),
3232
Theme::Light => view! { <NewLogoRustLightPageIcon size=60 /> }.into_any(),
33-
Theme::System if is_dark_preferred_signal() => {
33+
Theme::System if (move || is_dark_preferred_signal())() => {
3434
view! { <NewLogoRustDarkPageIcon size=60 /> }.into_any()
3535
}
36-
Theme::System => view! { <NewLogoRustLightPageIcon size=60 /> }.into_any(),
36+
Theme::System => view! { <NewLogoRustDarkPageIcon size=60 /> }.into_any(),
3737
};
3838

3939
let theme_switcher_icon = move || match theme() {
@@ -89,7 +89,11 @@ pub fn Header() -> impl IntoView {
8989
label="¡Únete!"
9090
on_click=move |_| console_log("hola")
9191
/>
92-
<Button variant=Variant::Icon on_click=handler icon=theme_switcher_icon() />
92+
<Button
93+
variant=Variant::Icon
94+
on_click=handler
95+
icon=(move || theme_switcher_icon()).into_any()
96+
/>
9397
</div>
9498
</div>
9599
</header>

src/components/resources.rs

Lines changed: 54 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -17,68 +17,70 @@ pub fn Resources() -> impl IntoView {
1717
}]);
1818

1919
view! {
20-
<section class="bg-light dark:bg-dark p-20 w-full">
21-
<div class="container px-40 mx-auto">
20+
<section class="bg-light dark:bg-dark p-4 lg:p-20 w-full">
21+
<div class="container xl:max-w-7xl lg:px-36 mx-auto">
2222
<h2 class="text-h2 text-center mb-8 mt-16">"Recursos"</h2>
23-
<InputSearch on_change_filter=move |resource: ResourceAlias| () />
24-
<div class="gap-4 overflow-x-auto p-4 grid justify-items-center grid-cols-1 md:grid-cols-2 lg:grid-cols-3">
23+
<div class="flex flex-col justify-center mb-8 container mx-auto max-w-fit">
24+
<InputSearch on_change_filter=move |resource: ResourceAlias| () />
25+
<div class="gap-6 overflow-x-auto p-4 flex flex-row flex-wrap justify-center items-center">
2526

26-
<Card class="p-4" variant=CardVariant::Resource>
27-
<div class="flex flex-col gap-4 justify-between h-full">
28-
<div>
29-
<Chip label="Destacado" variant=ChipVariant::Featured />
30-
<h2 class="text-h3 mt-2 mb-2">"Título del recurso"</h2>
31-
<p class="text-paragraph-2 mb-4">"Descripción del recurso"</p>
32-
<p class="text-paragraph-3 mb-4">
33-
"Lorem ipsum dolor sit amet consectetur."
34-
</p>
35-
</div>
27+
<Card class="p-4" variant=CardVariant::Resource>
28+
<div class="flex flex-col gap-4 justify-between h-full overflow-hidden">
29+
<div>
30+
<Chip label="Destacado" variant=ChipVariant::Featured />
31+
<h2 class="text-h3 mt-2 mb-2">"Título del recurso"</h2>
32+
<p class="text-paragraph-2 mb-4">"Descripción del recurso"</p>
33+
<p class="text-paragraph-3 mb-4">
34+
"Lorem ipsum dolor sit amet consectetur."
35+
</p>
36+
</div>
3637

37-
<div class="flex gap-2 flex-wrap">
38-
<Tag label="#tag" />
39-
<Tag label="#tag" />
40-
<Tag label="#tag" />
38+
<div class="flex gap-2 flex-wrap">
39+
<Tag label="#tag" />
40+
<Tag label="#tag" />
41+
<Tag label="#tag" />
42+
</div>
4143
</div>
42-
</div>
43-
</Card>
44+
</Card>
4445

45-
<Card class="p-4" variant=CardVariant::Resource>
46-
<div class="flex flex-col gap-4 justify-between h-full">
47-
<div>
48-
<Chip label="Destacado" variant=ChipVariant::Featured />
49-
<h2 class="text-h3 mt-2 mb-2">"Título del recurso"</h2>
50-
<p class="text-paragraph-2 mb-4">"Descripción del recurso"</p>
51-
<p class="text-paragraph-3 mb-4">
52-
"Lorem ipsum dolor sit amet consectetur."
53-
</p>
54-
</div>
46+
<Card class="p-4" variant=CardVariant::Resource>
47+
<div class="flex flex-col gap-4 justify-between h-full">
48+
<div>
49+
<Chip label="Destacado" variant=ChipVariant::Featured />
50+
<h2 class="text-h3 mt-2 mb-2">"Título del recurso"</h2>
51+
<p class="text-paragraph-2 mb-4">"Descripción del recurso"</p>
52+
<p class="text-paragraph-3 mb-4">
53+
"Lorem ipsum dolor sit amet consectetur."
54+
</p>
55+
</div>
5556

56-
<div class="flex gap-2 flex-wrap">
57-
<Tag label="#tag" />
58-
<Tag label="#tag" />
59-
<Tag label="#tag" />
57+
<div class="flex gap-2 flex-wrap">
58+
<Tag label="#tag" />
59+
<Tag label="#tag" />
60+
<Tag label="#tag" />
61+
</div>
6062
</div>
61-
</div>
62-
</Card>
63+
</Card>
6364

64-
<Card class="p-4" variant=CardVariant::Resource>
65-
<div class="flex flex-col gap-4 justify-between h-full">
66-
<div>
67-
<Chip label="Destacado" variant=ChipVariant::Featured />
68-
<h2 class="text-h3 mt-2 mb-2">"Título del recurso"</h2>
69-
<p class="text-paragraph-2 mb-4">"Descripción del recurso"</p>
70-
<p class="text-paragraph-3 mb-4">
71-
"Lorem ipsum dolor sit amet consectetur."
72-
</p>
73-
</div>
65+
<Card class="p-4" variant=CardVariant::Resource>
66+
<div class="flex flex-col gap-4 justify-between h-full">
67+
<div>
68+
<Chip label="Destacado" variant=ChipVariant::Featured />
69+
<h2 class="text-h3 mt-2 mb-2">"Título del recurso"</h2>
70+
<p class="text-paragraph-2 mb-4">"Descripción del recurso"</p>
71+
<p class="text-paragraph-3 mb-4">
72+
"Lorem ipsum dolor sit amet consectetur."
73+
</p>
74+
</div>
7475

75-
<div class="flex gap-2 flex-wrap">
76-
<Tag label="#tag" />
77-
<Tag label="#tag" />
78-
<Tag label="#tag" />
76+
<div class="flex gap-2 flex-wrap">
77+
<Tag label="#tag" />
78+
<Tag label="#tag" />
79+
<Tag label="#tag" />
80+
</div>
7981
</div>
80-
</div>
81-
</Card>
82+
</Card>
83+
</div>
8284
</div>
8385
</div>
8486
</section>

src/pages/index.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ pub fn Index() -> impl IntoView {
1616
// xl:max-w-[110rem]
1717
view! {
1818
<div class="w-full h-[65dvh] rustlang-es-background dark:bg-[#F04906] text-akira flex items-center justify-center">
19-
<div class="w-full container flex flex-col md:flex-row items-center justify-center m-auto gap-8 lg:gap-0">
20-
<div class="flex flex-col justify-center gap-8 xl:min-w-lg">
19+
<div class="w-full container desktop:max-w-desktop flex flex-col md:flex-row items-center justify-center m-auto gap-8 lg:gap-0">
20+
<div class="flex flex-col justify-center gap-8 xl:min-w-lg mx-auto lg:mx-0 text-center lg:text-left">
2121
<div class="flex flex-col gap-2">
2222
<p class="uppercase font-body">Comunidad en español</p>
2323
<p class="uppercase heading">
@@ -26,7 +26,7 @@ pub fn Index() -> impl IntoView {
2626
Aprender Rust
2727
</p>
2828
</div>
29-
<div class="flex gap-4 flex-wrap max-w-full text-[14px] font-body">
29+
<div class="flex gap-4 flex-wrap max-w-full text-[14px] font-body justify-center lg:justify-start">
3030
<Button
3131
variant=ButtonVariant::Primary
3232
class="bg-light"

0 commit comments

Comments
 (0)