Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
58a1578
fix(gitignore): Add the .env file to the .gitignore file
MarioYellowy May 14, 2026
d70800b
POC(CI): only in types ready for review and add the component rustfmt…
MarioYellowy May 14, 2026
6dd7a56
test: fmt
MarioYellowy May 14, 2026
29c8152
test: Change the toolchain
MarioYellowy May 14, 2026
20a71be
test: without action-rs/cargo
MarioYellowy May 14, 2026
0583e6f
typo in targets
MarioYellowy May 14, 2026
9d83941
test: override the toolchain
MarioYellowy May 14, 2026
c87e38b
test: formatting the code that don't make claude, thanks Claude for:
MarioYellowy May 14, 2026
8c9b291
fix: return to the 2021
MarioYellowy May 14, 2026
e419792
format again
MarioYellowy May 14, 2026
00f3311
test: check leptos 0.1.33
MarioYellowy May 14, 2026
6b4e12c
test: watch wich submodules area
MarioYellowy May 14, 2026
a6094d6
fix: move to the right place the submodules check
MarioYellowy May 14, 2026
eee43bd
test: update the toolchain for clippy stage
MarioYellowy May 14, 2026
dc976b1
Add clippy to the toolchain file
MarioYellowy May 14, 2026
f5fe61d
test: path of design-system-components
MarioYellowy May 14, 2026
94f6942
Upgrading yiyi
MarioYellowy May 14, 2026
10e15b0
test: change the overide version
MarioYellowy May 14, 2026
d6c0b65
chore: change design-system-components submodule url to ssh
MarioYellowy May 14, 2026
f162dff
test: only formatting in src
MarioYellowy May 15, 2026
02e0c15
test: exclude formatting in design system components
MarioYellowy May 15, 2026
88f33d3
test: remove flag all
MarioYellowy May 15, 2026
2ddc6e1
Remove if nested and change for &&, thanks clippy for:
MarioYellowy May 15, 2026
df0012d
clippy: refactor simplify expression in if
MarioYellowy May 15, 2026
9964069
clippy: lo di todo
MarioYellowy May 15, 2026
26d80e9
clippy: lo di todo x2
MarioYellowy May 15, 2026
6e48a8e
feat(clippy.yml): Only in ready for review
MarioYellowy May 15, 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
44 changes: 23 additions & 21 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: clippy
on:
workflow_dispatch:
pull_request:
types:
- ready_for_review

push:
branches:
- main
Expand All @@ -19,30 +22,32 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2024-02-12
target: wasm32-unknown-unknown
override: true
- uses: actions-rs/cargo@v1
submodules: "recursive"

- uses: dtolnay/rust-toolchain@nightly
with:
command: fmt
args: --all -- --check
toolchain: nightly-2025-07-12
targets: wasm32-unknown-unknown
components: rustfmt

- name: Set toolchain override
run: rustup override set nightly-2025-07-12

- name: Check formatting
run: cargo fmt -- --check

leptosfmt:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@nightly
with:
profile: minimal
toolchain: nightly
override: true
components: clippy
- name: Cache .cargo and target
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
~/.cargo
Expand All @@ -51,9 +56,9 @@ jobs:
${{ runner.os }}-cargo-leptos-${{ hashFiles('**/Cargo.lock') }}
${{ runner.os }}-cargo-leptos
- name: Install LeptosFmt
run: cargo install leptosfmt --version 0.1.13
run: cargo install leptosfmt --version 0.1.33
- name: Check LeptosFmt
run: leptosfmt --check .
run: leptosfmt --check src

clippy:
needs: [fmt, leptosfmt]
Expand All @@ -62,17 +67,14 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions-rs/toolchain@v1
submodules: "recursive"
- uses: dtolnay/rust-toolchain@nightly
with:
profile: minimal
toolchain: nightly
override: true
components: clippy

- uses: Swatinem/rust-cache@v2
- name: cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --features=ssr,hydrate -- -D warnings
- name: Run clippy
run: cargo clippy --features=ssr,hydrate -- -D warnings
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ settings.json
style/

public/sitemap.xml

.env
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "extras"]
path = extras
url = https://github.com/RustLangES/proyectos-comunitarios.git
[submodule "design-system-components"]
path = design-system-components
url = git@github.com:RustLangES/design-system-components.git
11 changes: 7 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
[package]
name = "rust-lang-es"
version = "0.1.0"
edition = "2021"
edition = "2024"

[workspace]
exclude = ["design-system-components"]

[lib]
crate-type = ["cdylib", "rlib"]
Expand All @@ -21,7 +24,7 @@ reqwest = { version = "0.12.23", features = [
"rustls-tls",
], default-features = false }
# rustlanges-components = { version = "0.1.0", features = ["leptos"] }
rustlanges-components = { path="../design-system-components", features = ["leptos"] }
rustlanges-components = { path="design-system-components", features = ["leptos"] }
leptos-use = { version = "0.16.3", features = [] }
console_error_panic_hook = { version = "0.1.7", optional = true }
# leptos_theme = "0.1.2"
Expand Down Expand Up @@ -55,12 +58,12 @@ toml = "0.9"
serde = { version = "1", features = ["derive"] }

[package.metadata.leptos]
# The name used by wasm-bindgen/cargo-leptos for the JS/WASM bundle. Defaults to the crate name
# The name used by wasm-bindgen/cargo-leptos for the JS/WASM bundle. Defaults to the crate name
output-name = "leptos_start"
# The site root folder is where cargo-leptos generate all output. WARNING: all content of this folder will be erased on a rebuild. Use it in your server setup.
site-root = "dist"
# The site-root relative folder where all compiled output (JS, WASM and CSS) is written
# Defaults to pkg
# Defaults to pkg
site-pkg-dir = "pkg"
# [Optional] The source CSS file. If it ends with .sass or .scss then it will be compiled by dart-sass into CSS. The CSS is optimized by Lightning CSS before being written to <site-root>/<site-pkg>/app.css
# style-file = "input.css"
Expand Down
48 changes: 30 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,41 @@
![image](https://github.com/RustLangES/RustLangES.github.io/assets/56278796/cc7009a2-a11b-4847-a561-fcc6807e1d98)

# ![image](https://github.com/RustLangES/RustLangES.github.io/assets/56278796/cc7009a2-a11b-4847-a561-fcc6807e1d98)

<!-- markdownlint-disable-next-line MD033 -->
<p align="center">
<img alt="GitHub Workflow Status (with event)" src="https://img.shields.io/github/actions/workflow/status/RustLangES/RustLangES.github.io/clippy.yml?label=ci" />
<img alt="GitHub Workflow Status (with event)" src="https://img.shields.io/github/actions/workflow/status/RustLangES/RustLangES.github.io/gh-pages.yml?label=deploy" />
<!-- markdownlint-disable-next-line MD033 -->
<img alt="GitHub Workflow Status (with event)"
src="https://img.shields.io/github/actions/workflow/status/RustLangES/
RustLangES.github.io/clippy.yml?label=ci" />
<!-- markdownlint-disable-next-line MD033 -->
<img alt="GitHub Workflow Status (with event)"
src="https://img.shields.io/github/actions/workflow/status/RustLangES/
RustLangES.github.io/gh-pages.yml?label=deploy" />
</p>

> [!CAUTION]
> Esta pagina no se publicará hasta que el nuevo diseño se encuentre listo
> https://www.figma.com/design/S9yCZSaZ9q54XSojWNhJft/Rust-Lang-ES?node-id=0-1&p=f&t=Cn6Q0QzGflLYCOgo-0
> <https://www.figma.com/design/S9yCZSaZ9q54XSojWNhJft/Rust-Lang-ES?node-id=0-1&p=f&t=Cn6Q0QzGflLYCOgo-0>

## Como ejecutar

### Requisitos Generales

### Requisitos Generales
Antes de empezar es necesario tener estos programas

- [Rust](https://rust-lang.org/tools/install)
- [NodeJs](https://nodejs.org)

### Requisitos Windows >= 10
### Requisitos Windows >= 10

-[BusyBox](https://busybox.net/)
- Usando scoop `scoop install busybox`
- Usando choco `choco install busybox`

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

### Desarrollo
> [!NOTE]
> necesitas fetch git submodules para clonar los assets externos para el desarrollo

> [!NOTE]
> necesitas fetch git submodules para clonar los assets externos para el desarrollo

Con estos comandos podrá empezar a desarrollar

Expand All @@ -51,32 +60,34 @@ cargo install cargo-make
cargo make serve
```


---


### Si usas nix

> [!NOTE]
> Asegúrate de tener los flakes activados.

Si usas nix es bastante sencillo, solo necesitas este comando:

```bash
nix develop
```

Ahora podemos iniciar el servidor con:

```bash
cargo make serve
```

Para hacer un commit:

```bash
cargo install rusty-hook
cargo install leptosfmt --version 0.1.13
```

## Configura tu VSCode

Agrega esto en tu `settings.json`

```json
Expand All @@ -101,11 +112,12 @@ Agrega esto en tu `settings.json`
}
```

## Resumen

Este proyecto utiliza una rama personalizada de Leptos para poder servir
directamente el directorio de salida como un sitio web estático.

# Resumen
Este proyecto utiliza una rama personalizada de Leptos para poder servir directamente el directorio de salida como un sitio web estático.

`cargo make serve` sirve el directorio div con watch mode y hot-reload.
`cargo make build` compila el proyecto en release. La salida estará en el directorio `dist` y el comando no lo servirá, sino que se cerrará.
`cargo make serve` sirve el directorio div con watch mode y hot-reload.
`cargo make build` compila el proyecto en release. La salida estará en el
directorio `dist` y el comando no lo servirá, sino que se cerrará.
`cargo make fmt` formatea con `rustfmt` y `leptosfmt`.
10 changes: 5 additions & 5 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ fn main() {
println!("cargo:rerun-if-changed=extras");

let folders = fs::read_dir("extras").unwrap();
if let Err(e) = fs::create_dir("src/extras") {
if e.kind() != std::io::ErrorKind::AlreadyExists {
println!("{e:?}");
}
if let Err(e) = fs::create_dir("src/extras")
&& e.kind() != std::io::ErrorKind::AlreadyExists
{
println!("{e:?}");
}

copy_dir_all("extras/proyectos/assets", "assets/gen_assets").unwrap();
Expand Down Expand Up @@ -145,7 +145,7 @@ fn generate_projects(path: &Path) {
}
let file_path = file.path();

if !file_path.extension().is_some_and(|e| e == "toml") {
if file_path.extension().is_none_or(|e| e != "toml") {
let file_name = file.file_name();
let file_name = file_name.to_str().unwrap();
// Copy images or other files
Expand Down
1 change: 1 addition & 0 deletions design-system-components
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "nightly-2025-07-12"
profile = "minimal"
components = ["rust-src","rust-analyzer"]
components = ["rust-src","rust-analyzer", "rustfmt", "clippy"]
targets = ["wasm32-unknown-unknown"]
6 changes: 3 additions & 3 deletions src/app.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
use crate::context::theme_provider::ThemeProvider;
use leptos::{leptos_dom::logging::console_log, prelude::*};
use leptos_meta::{provide_meta_context, MetaTags};
use leptos::prelude::*;
use leptos_meta::{MetaTags, provide_meta_context};
use leptos_router::{
components::{Route, Router, Routes},
path,
};

use crate::{
components::{HeadInformation, Header},
pages::{Aprende, Communities, Contributors, Index, Projects},
pages::{Aprende, Communities, Index},
};

pub fn shell(options: LeptosOptions) -> impl IntoView {
Expand Down
2 changes: 1 addition & 1 deletion src/components/became_sponsor.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use leptos::{prelude::*, *};
use leptos::prelude::*;
use rustlanges_components::button::{Button, Variant as ButtonVariant};

#[component]
Expand Down
3 changes: 2 additions & 1 deletion src/components/challenges.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use leptos::{component, prelude::*};
use leptos::prelude::*;
use rustlanges_components::button::{Button, Variant as ButtonVariant};

#[allow(non_snake_case)]
pub fn DailyChallenges() -> impl IntoView {
view! {
<section class="bg-primary-500 dark:bg-primary-600 p-4 lg:p-20 w-full">
Expand Down
1 change: 1 addition & 0 deletions src/components/channels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use rustlanges_components::{
icons::Youtube,
};

#[allow(non_snake_case)]
pub fn Channels() -> impl IntoView {
view! {
<section class="bg-light dark:bg-dark p-4 lg:p-20 w-full">
Expand Down
29 changes: 17 additions & 12 deletions src/components/community_project.rs
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
use leptos::{prelude::*, *};
use leptos::prelude::*;
use rustlanges_components::{
avatar::Avatar,
button::{Button, Variant},
card::Card,
icons::{Book, Github, Project, Roadmap, StarBold},
icons::{Github, StarBold},
};

use crate::{
components::{project_card::ProjectCard, GithubIcon},
models::GithubUser,
};
use crate::{components::project_card::ProjectCard, models::GithubUser};

#[component]
pub fn CommunityProjectSection(
#[prop(into, default = false)] many_projects: bool,
) -> impl IntoView {
let juanperas = GithubUser{ username: "juanperas", avatar: "https://avatars.githubusercontent.com/u/136520331?u=7353ba372f09091049692d6e95f5a8cd8a42565f&v=4" };
let apika = GithubUser { username: "ApikaLucas", avatar: "https://avatars.githubusercontent.com/u/70247585?u=513513290efb6dc162afc899646e8e0467cedfc2&v=4"};
let sergio = GithubUser { username: "Sergio", avatar: "https://avatars.githubusercontent.com/u/56278796?u=9e3dac947b4fd3ca2f1a05024e083c64e4c69cfe&v=4"};
let juanperas = GithubUser {
username: "juanperas",
avatar: "https://avatars.githubusercontent.com/u/136520331?u=7353ba372f09091049692d6e95f5a8cd8a42565f&v=4",
};
let apika = GithubUser {
username: "ApikaLucas",
avatar: "https://avatars.githubusercontent.com/u/70247585?u=513513290efb6dc162afc899646e8e0467cedfc2&v=4",
};
let sergio = GithubUser {
username: "Sergio",
avatar: "https://avatars.githubusercontent.com/u/56278796?u=9e3dac947b4fd3ca2f1a05024e083c64e4c69cfe&v=4",
};

let users = vec![juanperas, apika, sergio];

Expand Down Expand Up @@ -94,7 +98,8 @@ pub fn CommunityProjectSection(
}
.into_any()
} else {
view! { <></> }.into_any()
let _: () = view! { <></> };
().into_any()
}}
</div>

Expand Down
2 changes: 1 addition & 1 deletion src/components/footer.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use leptos::{prelude::*, *};
use leptos::prelude::*;
use rustlanges_components::{
button::{Button, Variant as ButtonVariant},
icons::{Discord, Github, Linkedin, Telegram},
Expand Down
2 changes: 1 addition & 1 deletion src/components/head_information.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use leptos::{component, prelude::*, view, IntoView};
use leptos::{IntoView, component, prelude::*, view};
use leptos_meta::{Link, Meta, Stylesheet, Title};
use leptos_router::hooks::use_location;

Expand Down
Loading