Skip to content

Commit e9b836b

Browse files
committed
feat: Add sponsor section and update theme handling
1 parent b80d0cf commit e9b836b

File tree

14 files changed

+152
-62
lines changed

14 files changed

+152
-62
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ reqwest = { version = "0.12.23", features = [
2020
"http2",
2121
"rustls-tls",
2222
], default-features = false }
23-
# rustlanges-components = { version = "0.1.0", features = ["leptos"] }
24-
rustlanges-components = { path="../design-system-components", features = ["leptos"] }
23+
rustlanges-components = { version = "0.1.0", features = ["leptos"] }
24+
# rustlanges-components = { path="../design-system-components", features = ["leptos"] }
2525
leptos-use = { version = "0.16.3", features = [] }
2626
console_error_panic_hook = { version = "0.1.7", optional = true }
2727
# leptos_theme = "0.1.2"
5.79 KB
Loading
3.48 KB
Loading
39.1 KB
Loading

input.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@
5454
z-index: -1;
5555
}
5656

57+
.shadow-frontendcafe{
58+
filter: drop-shadow(4px 4px 0px rgba(0,0,0,0.5));
59+
}
60+
5761

5862
/* .project-card-badge {
5963
border-width: 0 25px 25px 25px;

src/components/community_project.rs

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@ use rustlanges_components::{
33
avatar::Avatar,
44
button::{Button, Variant},
55
card::Card,
6-
icons::{Book, Project, Roadmap, StarBold, Github},
6+
icons::{Book, Github, Project, Roadmap, StarBold},
77
};
88

9-
use crate::{components::{project_card::ProjectCard, GithubIcon}, models::GithubUser};
9+
use crate::{
10+
components::{project_card::ProjectCard, GithubIcon},
11+
models::GithubUser,
12+
};
1013

1114
#[component]
1215
pub fn CommunityProjectSection() -> impl IntoView {
@@ -32,17 +35,33 @@ pub fn CommunityProjectSection() -> impl IntoView {
3235

3336
// <div>
3437
<div class="flex flex-row justify-center items-center gap-4">
35-
<ProjectCard label=view!{
36-
<StarBold size={16 as u32} />
37-
<p class="w-fit mr-2">Destacado</p>
38-
}.into_any() users={users.clone()} title="Rust para C#/.NET Developers" description="La guía esta hecha por la misma Microsoft y es para desarrolladores experimentados en C#/.NET que exploran Rust. Ofrece una breve comparación, enlaces a recursos y respuestas rápidas." />
39-
<ProjectCard label=view!{<p class="w-fit mr-2">Oficial</p>}.into_any() users={users.clone()} title="Cangrebot" description="Bot de la comunidad de Discord de RustLang en Español." badge_color="before:bg-secondary-400" />
40-
<ProjectCard label=view!{<p class="w-fit mr-2">$200</p> }.into_any() users={users} title="Memsos" description="Memsos is a tool written in rust with the objective to check your memory in a fast way, memsos works for both uefi and bios." badge_color="before:bg-primary-200" />
38+
<ProjectCard
39+
label=view! {
40+
<StarBold size=16 as u32 />
41+
<p class="w-fit mr-2">Destacado</p>
42+
}
43+
.into_any()
44+
users=users.clone()
45+
title="Rust para C#/.NET Developers"
46+
description="La guía esta hecha por la misma Microsoft y es para desarrolladores experimentados en C#/.NET que exploran Rust. Ofrece una breve comparación, enlaces a recursos y respuestas rápidas."
47+
/>
48+
<ProjectCard
49+
label=view! { <p class="w-fit mr-2">Oficial</p> }.into_any()
50+
users=users.clone()
51+
title="Cangrebot"
52+
description="Bot de la comunidad de Discord de RustLang en Español."
53+
badge_color="before:bg-secondary-400"
54+
/>
55+
<ProjectCard
56+
label=view! { <p class="w-fit mr-2">$200</p> }.into_any()
57+
users=users
58+
title="Memsos"
59+
description="Memsos is a tool written in rust with the objective to check your memory in a fast way, memsos works for both uefi and bios."
60+
badge_color="before:bg-primary-200"
61+
/>
4162
</div>
4263

43-
<Button variant=Variant::Secondary on_click=move |_| {} class="">
44-
Ver proyectos
45-
<Github />
64+
<Button variant=Variant::Secondary label="Ver proyectos" icon=view!{<Github />}.into_any() on_click=move |_| {}>
4665
</Button>
4766
</div>
4867
</section>

src/components/header.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,9 @@ pub fn Header() -> impl IntoView {
7878
<a href="https://blog.rustlang-es.org">Blog</a>
7979
</div>
8080
<div class="flex gap-[16px] items-center">
81-
<Button variant=Variant::Secondary on_click=|_| {}>
82-
El Libro
83-
</Button>
84-
<Button variant=Variant::Primary on_click=move |_| console_log("hola")>
85-
"¡Únete!"
86-
</Button>
87-
<Button variant=Variant::Icon on_click=handler>
88-
{theme_switcher_icon}
89-
</Button>
81+
<Button variant=Variant::Secondary label="El Libro" on_click=|_| {} />
82+
<Button variant=Variant::Primary label="¡Únete!" on_click=move |_| console_log("hola") />
83+
<Button variant=Variant::Icon on_click=handler icon=theme_switcher_icon() />
9084
</div>
9185
</div>
9286
</header>

src/components/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ pub use icons::{
1212
pub mod community_project;
1313
pub mod our_community;
1414
pub mod project_card;
15+
pub mod our_sponsors;
16+
pub mod sponsor_block;

src/components/our_community.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ pub fn OurCommunitySection() -> impl IntoView {
3939
</Card>
4040
</div>
4141

42-
<Button variant=Variant::Primary on_click=move |_| {}>
43-
Conócenos
44-
</Button>
42+
<Button variant=Variant::Primary on_click=move |_| {} label="Conócenos" />
4543
</div>
4644
</section>
4745
}

src/components/our_sponsors.rs

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
use leptos::*;
2+
use leptos::prelude::*;
3+
4+
use crate::components::sponsor_block::SponsorBlock;
5+
6+
7+
8+
#[component]
9+
pub fn OurSponsorsSection() -> impl IntoView {
10+
11+
view!{
12+
<section class="flex flex-col justify-center items-center w-full gap-8 py-20 dark:bg-neutral-900">
13+
<div class="container flex flex-col justify-center items-center gap-8">
14+
<h2 class="text-h2 mb-4">"Nuestros sponsors"</h2>
15+
<p class="text-center mb-8 max-w-lg">
16+
Todos nuestros eventos y actividades son <span class="font-bold">gratuitas</span> gracias a las organizaciones que apoyan nuestro trabajo.
17+
</p>
18+
19+
<div>
20+
<img src="/assets/new/logos/ferris-hero.png" alt="" width="300" />
21+
</div>
22+
23+
<div class="flex justify-center items-center relative z-[2] -mt-11">
24+
<SponsorBlock class="text-primary-500" />
25+
<SponsorBlock class="text-black">
26+
<img src="/assets/sponsors/sysarmy.webp" alt="SysArmy" class="max-h-[50px]" />
27+
</SponsorBlock>
28+
<SponsorBlock class="text-secondary-500" />
29+
<SponsorBlock class="text-white">
30+
<img src="/assets/new/sponsors/testing-bolivia.png" alt="Testing Bolivia" class="max-h-[50px] mix-blend-difference" />
31+
</SponsorBlock>
32+
<SponsorBlock class="text-primary-500" />
33+
</div>
34+
<div class="flex justify-center items-center relative z-[1] -mt-11">
35+
<SponsorBlock class="text-[#00c39d]">
36+
<img src="/assets/new/sponsors/frontendcafe.png" alt="FrontendCafe" class="max-h-[50px] shadow-frontendcafe" />
37+
</SponsorBlock>
38+
<SponsorBlock class="text-primary-200" />
39+
<SponsorBlock class="text-[#193270]">
40+
<img src="/assets/new/sponsors/universidad_nur.png" alt="Universidad Nur" class="max-h-[50px]" />
41+
</SponsorBlock>
42+
<SponsorBlock class="text-primary-200" />
43+
<SponsorBlock class="text-black">
44+
<img src="/assets/sponsors/shuttle.webp" alt="ShuttleRS" class="max-h-[50px] mix-blend-difference" />
45+
</SponsorBlock>
46+
<SponsorBlock class="text-primary-200" />
47+
</div>
48+
49+
// <SponsorBlock class="text-[#00c39d]">
50+
// <img src="/assets/sponsors/crabnebula.png" alt="Crabnebula" class="max-h-[50px]" />
51+
// </SponsorBlock>
52+
</div>
53+
</section>
54+
}
55+
}

0 commit comments

Comments
 (0)