Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
42 changes: 22 additions & 20 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: clippy
on:
workflow_dispatch:
pull_request:

push:
branches:
- main
Expand All @@ -19,30 +20,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 --all -- --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,7 +54,7 @@ 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 .

Expand All @@ -62,17 +65,16 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions-rs/toolchain@v1
submodules: "recursive"
- name: Verify submodules
run: git submodule status
- 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
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "rust-lang-es"
version = "0.1.0"
edition = "2021"
edition = "2024"

[lib]
crate-type = ["cdylib", "rlib"]
Expand All @@ -21,7 +21,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 +55,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`.
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"]
2 changes: 1 addition & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::context::theme_provider::ThemeProvider;
use leptos::{leptos_dom::logging::console_log, prelude::*};
use leptos_meta::{provide_meta_context, MetaTags};
use leptos_meta::{MetaTags, provide_meta_context};
use leptos_router::{
components::{Route, Router, Routes},
path,
Expand Down
17 changes: 13 additions & 4 deletions src/components/community_project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,26 @@ use rustlanges_components::{
};

use crate::{
components::{project_card::ProjectCard, GithubIcon},
components::{GithubIcon, 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
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
2 changes: 1 addition & 1 deletion src/components/header.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{
components::icons::{NewLogoRustDarkPageIcon, NewLogoRustLightPageIcon},
context::theme_provider::{use_theme, Theme},
context::theme_provider::{Theme, use_theme},
};
use leptos::{leptos_dom::logging::console_log, prelude::*};
use leptos_router::{components::A, hooks::use_url};
Expand Down
4 changes: 3 additions & 1 deletion src/components/project_card.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ pub fn ProjectCard(
})
.collect_view();

let badge_classes = format!("flex w-fit project-card-badge ml-6 px-5 pb-1 pt-2 items-center justify-center gap-2 text-black border-2 border-b-0 border-black before:bg-orange-400 {badge_color}");
let badge_classes = format!(
"flex w-fit project-card-badge ml-6 px-5 pb-1 pt-2 items-center justify-center gap-2 text-black border-2 border-b-0 border-black before:bg-orange-400 {badge_color}"
);

view! {
<div class="min-w-[15rem] max-w-xs">
Expand Down
6 changes: 3 additions & 3 deletions src/context/theme_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ use leptos::{
children::Children,
leptos_dom::logging::console_log,
logging::log,
prelude::{use_context, RwSignal, *},
prelude::{RwSignal, use_context, *},
server::codee::string::JsonSerdeCodec,
*,
};
use leptos_use::{
storage::use_local_storage, use_media_query, use_preferred_dark, watch_with_options,
WatchOptions,
WatchOptions, storage::use_local_storage, use_media_query, use_preferred_dark,
watch_with_options,
};
use serde::{Deserialize, Serialize};
/// Defines an enumeration for UI themes.
Expand Down
15 changes: 12 additions & 3 deletions src/pages/communities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,18 @@ use crate::{

#[component]
pub fn Communities() -> 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.clone(),
Expand Down
Loading