Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
577e143
feat(header): Add link to the book
MarioYellowy Aug 19, 2026
bbe2e6e
fix(theme_provider): Remove the allow clippy warning by implementing …
MarioYellowy Aug 19, 2026
5f97f6b
fix(gitignore): Add Cargo.lock
MarioYellowy Aug 19, 2026
335c309
poc(cargo.toml): exclude the design system components
MarioYellowy Aug 19, 2026
9a7cc0d
feat(header): Implement the book path into constant and format
MarioYellowy Aug 19, 2026
5a080bf
fix(them_provider): Change strategy for cookie
MarioYellowy Aug 19, 2026
47d577b
feat(routes): Add templates routes without real implementation in the…
MarioYellowy Aug 19, 2026
e812ca2
feat(logo): Make clickeable to redirect home
MarioYellowy Aug 19, 2026
4fef642
The same that the last
MarioYellowy Aug 19, 2026
ad99970
feat(pages): Make bold
MarioYellowy Aug 19, 2026
ba2f006
fix(poc/workspace): Not work
MarioYellowy Aug 20, 2026
9a728d3
feat(readme): Add zed settings config gg
MarioYellowy Aug 20, 2026
2baf604
feat(responsive): Integrate responsive design according to figma and …
MarioYellowy Aug 20, 2026
7b2631f
chore(designSystemComponents): Actualizar to the last commit
MarioYellowy Aug 20, 2026
3a0c660
Apply feedback
MarioYellowy Aug 24, 2026
745114b
Merge pull request #103 from MarioYellowy/header
Phosphorus-M Aug 25, 2026
c1b66f8
Add external routes to social media
MarioYellowy Sep 15, 2026
212de7d
remove constants
MarioYellowy Sep 15, 2026
482d701
Implement the footer component with external links
MarioYellowy Sep 15, 2026
baf5426
Merge pull request #109 from MarioYellowy/footer
Phosphorus-M Sep 18, 2026
46ec0db
Merge branch 'riir' into shared-components
MarioYellowy Sep 24, 2026
f3666bc
Update README with Linux/Mac setup instructions
MarioYellowy Sep 24, 2026
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: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ bundled.css
/assets/gen_assets/
/src/extras/

Cargo.lock

# NixOs output folder
/result

Expand Down
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ ssr = [
"leptos/ssr",
"leptos_meta/ssr",
"leptos_router/ssr",
"leptos-use/ssr"
"leptos-use/ssr",
"leptos-use/actix"
]
development = []

Expand Down
39 changes: 32 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

## Como ejecutar

La configuración está pensada para funcionar en entornos Linux y Mac, si tienes alguna configuración extra en tu `.cargo/config.toml` puede que el proceso de buildeo falle.

### Requisitos Generales

Antes de empezar es necesario tener estos programas
Expand Down Expand Up @@ -49,13 +51,6 @@ Si usas NixOS
direnv allow
```

### Requisitos Windows >= 10

[BusyBox](https://busybox.net/)

- Usando scoop `scoop install busybox`
- Usando choco `choco install busybox`

### Desarrollo

> [!NOTE]
Expand Down Expand Up @@ -121,6 +116,36 @@ Agrega esto en tu `settings.json`
}
```

## Configura tu Zed

Agrega esto en tu `settings.json`

```json
{
"lsp": {
"rust-analyzer": {
"binary": {
"path": "rust-analyzer"
},
"initialization_options": {
"cargo": {
"features": [
"ssr"
]
},
"check": {
"command": "check",
"extraArgs": [
"--features",
"ssr"
]
}
}
}
}
}
```

## Resumen

Este proyecto utiliza una rama personalizada de Leptos para poder servir
Expand Down
14 changes: 4 additions & 10 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use leptos_router::{

use crate::{
components::{HeadInformation, Header},
pages::{Aprende, Communities, Index},
pages::{Aprende, Blog, Communities, Events, Index},
};

pub fn shell(options: LeptosOptions) -> impl IntoView {
Expand Down Expand Up @@ -60,16 +60,10 @@ pub fn App() -> impl IntoView {
<Header />
<Routes fallback=|| "Not found.">
<Route path=path!("/") view=Index />
<Route path=path!("comunidad") view=Communities />
// <Route
// path=path!("colaboradores")
// view=Contributors
// />
// <Route
// path=path!("proyectos")
// view=Projects
// />
<Route path=path!("aprende") view=Aprende />
<Route path=path!("comunidad") view=Communities />
<Route path=path!("eventos") view=Events />
<Route path=path!("blog") view=Blog />
</Routes>
</main>
// <Footer />
Expand Down
22 changes: 16 additions & 6 deletions src/components/footer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,45 @@ use rustlanges_components::{
icons::{Discord, Github, Linkedin, Telegram},
};

use crate::components::{GITHUB_PATH, JOIN_PATH, LINKEDIN_PATH, TELEGRAM_PATH};

#[component]
pub fn Footer() -> impl IntoView {
view! {
<section class="flex flex-col justify-center items-center w-full gap-8 py-10 bg-primary-500 dark:bg-primary-600">
<div class="container flex flex-col justify-center items-center gap-3">
<p class="text-center max-w-xl">"Comunidad - Rust Lang en Español"</p>
<div class="flex gap-4 justify-center items-center w-full">
<footer class="w-full flex flex-col items-center justify-between bg-primary-500 dark:bg-primary-600 py-10">
<section>
<p class="py-3 font-semibold">"Comunidad - Rust Lang en Español"</p>
</section>
<div class="flex gap-4 justify-center items-center w-full">
<a href=JOIN_PATH target="_blank" rel="noopener noreferrer">
<Button
variant=ButtonVariant::Icon
on_click=|_| {}
icon=view! { <Discord /> }.into_any()
/>
</a>
<a href=GITHUB_PATH target="_blank" rel="noopener noreferrer">
<Button
variant=ButtonVariant::Icon
on_click=|_| {}
icon=view! { <Github /> }.into_any()
/>
</a>
<a href=LINKEDIN_PATH target="_blank" rel="noopener noreferrer">
<Button
variant=ButtonVariant::Icon
on_click=|_| {}
icon=view! { <Linkedin /> }.into_any()
/>
</a>
<a href=TELEGRAM_PATH target="_blank" rel="noopener noreferrer">
<Button
variant=ButtonVariant::Icon
on_click=|_| {}
icon=view! { <Telegram /> }.into_any()
/>
</div>
</a>
</div>
</section>
</footer>
}
}
154 changes: 130 additions & 24 deletions src/components/header.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
use crate::{
components::icons::{NewLogoRustDarkPageIcon, NewLogoRustLightPageIcon},
components::{
BOOK_PATH, JOIN_PATH,
icons::{NewLogoRustDarkPageIcon, NewLogoRustLightPageIcon},
},
context::theme_provider::{Theme, use_theme},
};
use leptos::{leptos_dom::logging::console_log, prelude::*};
use leptos::prelude::*;
use leptos_use::{use_media_query, use_window};
use rustlanges_components::{
button::{Button, Variant},
icons::{Moon, SunLine, SunMoon},
icons::{Close, Menu, Moon, SunLine, SunMoon},
};

#[island]
pub fn Header() -> impl IntoView {
let this = use_window();
let path = RwSignal::new("/".to_string());
let menu_open = RwSignal::new(false);

Effect::new(move |_| {
let result = format!(
Expand All @@ -35,6 +39,18 @@ pub fn Header() -> impl IntoView {
Theme::System => view! { <NewLogoRustDarkPageIcon size=60 /> }.into_any(),
};

let menu_handler = move |_| {
menu_open.update(|open| *open = !*open);
};

let menu_icon = move || {
if menu_open() {
view! { <Close size=20 class="z-50 block" /> }.into_any()
} else {
view! { <Menu size=20 class="block" /> }.into_any()
}
};

let theme_switcher_icon = move || match theme() {
Theme::Dark => view! { <Moon /> }.into_any(),
Theme::Light => view! { <SunLine /> }.into_any(),
Expand All @@ -43,25 +59,35 @@ pub fn Header() -> impl IntoView {

let active_link_class = move |link: &str| {
if path() == format!("{link:?}") {
"text-red-500 dark:text-orange-300"
"font-bold text-red-500 dark:text-orange-300"
} else {
""
}
};

let handler = move |_| {
let theme_handler = move |_| {
let current_theme = theme.get();
match current_theme {
Theme::System => theme.set(Theme::Dark),
Theme::Dark => theme.set(Theme::Light),
Theme::Light => theme.set(Theme::System),
Theme::Light => theme.set(Theme::Dark),
Theme::Dark | Theme::System => theme.set(Theme::Light),
}
};

view! {
<header class="w-full py-[8px] px-[24px] flex flex-column items-center justify-between">
{move || logo()} <div class="flex flex-column gap-[24px] items-center">
<div class="gap-[16px] hidden md:flex">
<header class="w-full py-[8px] px-[0px] flex flex-column items-center justify-between md:px-[24px] relative">
<div class="flex justify-between items-center">
<Button
variant=Variant::Text
class="px-[10px] md:hidden flex items-center justify-center"
on_click=menu_handler
icon=(move || menu_icon()).into_any()
/>
<div class=move || {
format!(
"md:hidden absolute top-full left-0 w-full bg-white dark:bg-dark flex flex-col gap-[32px] p-[16px] z-50 {}",
if menu_open() { "flex" } else { "hidden" },
)
}>
<a href="/" class=move || active_link_class("/")>
Inicio
</a>
Expand All @@ -74,23 +100,103 @@ pub fn Header() -> impl IntoView {
<a href="/eventos" class=move || active_link_class("/eventos")>
Eventos
</a>
<a href="https://blog.rustlang-es.org">Blog</a>
</div>
<div class="flex gap-[16px] items-center flex-wrap">
<Button
variant=Variant::Secondary
label="El Libro"
on_click=|_| {}
class="hidden md:block"
/>
<a href="/blog" class=move || active_link_class("/blog")>
Blog
</a>

<Button
variant=Variant::Primary
label="¡Únete!"
on_click=move |_| console_log("hola")
variant=Variant::Icon
on_click=theme_handler
icon=(move || theme_switcher_icon()).into_any()
/>

<div class="grid grid-cols-2 gap-[8px] w-full">
<a href=BOOK_PATH target="_blank" rel="noopener noreferrer">
<Button
class="w-full"
variant=Variant::Secondary
label="El Libro"
on_click=|_| {}
/>
</a>
<a href=JOIN_PATH target="_blank" rel="noopener noreferrer">
<Button
class="w-full"
variant=Variant::Primary
label="¡Únete!"
on_click=move |_| {}
/>
</a>
</div>
<hr />
<p class="text-center opacity-50">Comunidad - Rust Lang en Español</p>
</div>
<div
class=move || {
format!(
"fixed inset-0 bg-black/50 z-40 md:hidden {}",
if menu_open() { "block" } else { "hidden" },
)
}
on:click=move |_| menu_open.set(false)
></div>
<a href="/" class=move || active_link_class("/")>
{move || logo()}
</a>
</div>
<div class="flex flex-column gap-[24px] items-center">
<nav class="gap-[16px] hidden md:flex">
<a href="/" class=move || format!("font-semibold {}", active_link_class("/"))>
Inicio
</a>
<a
href="/aprende"
class=move || format!("font-semibold {}", active_link_class("/aprende"))
>
Aprende Rust
</a>
<a
href="/comunidad"
class=move || format!("font-semibold {}", active_link_class("/comunidad"))
>
Comunidad
</a>
<a
href="/eventos"
class=move || format!("font-semibold {}", active_link_class("/eventos"))
>
Eventos
</a>
<a
href="/blog"
class=move || format!("font-semibold {}", active_link_class("/blog"))
>
Blog
</a>
</nav>
<div class="flex gap-[16px] items-center flex-wrap">
<a
href=BOOK_PATH
class="hidden md:flex"
target="_blank"
rel="noopener noreferrer"
>
<Button variant=Variant::Secondary label="El Libro" on_click=|_| {} />
</a>

<a
href=JOIN_PATH
class="px-[10px] md:px-[0px]"
target="_blank"
rel="noopener noreferrer"
>
<Button variant=Variant::Primary label="¡Únete!" on_click=move |_| {} />
</a>

<Button
variant=Variant::Icon
on_click=handler
class="hidden md:flex"
on_click=theme_handler
icon=(move || theme_switcher_icon()).into_any()
/>
</div>
Expand Down
6 changes: 6 additions & 0 deletions src/components/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,9 @@ pub mod project_card;
pub mod resources;
pub mod sponsor_block;
pub mod why_rust;

const BOOK_PATH: &str = "https://book.rustlang-es.org/";
const JOIN_PATH: &str = "https://discord.rustlang-es.org/";
const GITHUB_PATH: &str = "https://github.com/RustLangES";
const LINKEDIN_PATH: &str = "https://www.linkedin.com/company/rustlanges";
const TELEGRAM_PATH: &str = "https://t.me/rust_es";
Loading