Skip to content

Commit 46ec0db

Browse files
committed
Merge branch 'riir' into shared-components
2 parents baf5426 + e9fe4b6 commit 46ec0db

16 files changed

Lines changed: 587 additions & 236 deletions

‎.github/workflows/clippy.yml‎

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ name: clippy
22
on:
33
workflow_dispatch:
44
pull_request:
5+
branches: [main, riir]
56
types:
67
- ready_for_review
78

89
push:
9-
branches:
10-
- main
10+
branches: [main, riir]
1111
paths-ignore:
1212
- "extras"
1313
- ".rusty-hook.toml"
@@ -46,17 +46,9 @@ jobs:
4646
toolchain: nightly
4747
override: true
4848
components: clippy
49-
- name: Cache .cargo and target
50-
uses: actions/cache@v4
51-
with:
52-
path: |
53-
~/.cargo
54-
key: ${{ runner.os }}-cargo-leptos-${{ hashFiles('**/Cargo.lock') }}
55-
restore-keys: |
56-
${{ runner.os }}-cargo-leptos-${{ hashFiles('**/Cargo.lock') }}
57-
${{ runner.os }}-cargo-leptos
49+
- uses: cargo-bins/cargo-binstall@main
5850
- name: Install LeptosFmt
59-
run: cargo install leptosfmt --version 0.1.33
51+
run: cargo binstall --disable-telemetry --no-confirm leptosfmt --version 0.1.33
6052
- name: Check LeptosFmt
6153
run: leptosfmt --check src
6254

‎Cargo.lock‎

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

‎Cargo.toml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ reqwest = { version = "0.13.4", features = [
2727
rustlanges-components = { path="design-system-components", features = ["leptos"] }
2828
leptos-use = { version = "0.19.0", features = [] }
2929
console_error_panic_hook = { version = "0.1.7", optional = true }
30+
rand = "0.10.3"
31+
getrandom = { version = "0.4.3", features = ["wasm_js"] }
3032
# leptos_theme = "0.1.2"
3133

3234
[features]

‎Makefile.toml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,22 @@ args = ["fmt", "--all"]
2424

2525
[tasks.fmt-all]
2626
script = '''
27-
leptosfmt .
27+
leptosfmt src
2828
cargo fmt --all
29-
cargo clippy --fix -- -D warnings
29+
cargo clippy --fix --features ssr -- -D warnings
3030
'''
3131

3232
[tasks.check]
3333
script = '''
34-
leptosfmt --check .
34+
leptosfmt --check src
3535
cargo fmt --all --check
36-
cargo clippy -- -D warnings
36+
cargo clippy --features ssr -- -D warnings
3737
'''
3838

3939
[tasks.leptos-format]
4040
install_crate = "leptosfmt"
4141
command = "leptosfmt"
42-
args = ["."]
42+
args = ["src"]
4343

4444
[tasks.format]
4545
dependencies = ["cargo-format", "leptos-format"]

‎extras‎

‎flake.nix‎

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,27 @@
66
rust-overlay.url = "github:oxalica/rust-overlay";
77
};
88

9-
outputs =
10-
{
11-
nixpkgs,
12-
flake-utils,
13-
rust-overlay,
14-
...
15-
}:
9+
outputs = {
10+
nixpkgs,
11+
flake-utils,
12+
rust-overlay,
13+
...
14+
}:
1615
flake-utils.lib.eachDefaultSystem (
17-
system:
18-
let
19-
overlays = [ (import rust-overlay) ];
16+
system: let
17+
overlays = [(import rust-overlay)];
2018
pkgs = import nixpkgs {
2119
inherit system overlays;
2220
};
2321
rustToolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
24-
in
25-
{
22+
in {
2623
devShells.default = pkgs.mkShell {
2724
buildInputs = with pkgs; [
2825
# Rust toolchain with wasm target
2926
rustToolchain
3027

3128
# WASM tools
29+
nodejs
3230
tailwindcss_4
3331
wasm-bindgen-cli_0_2_126
3432

@@ -40,6 +38,7 @@
4038
pkg-config
4139
openssl
4240
pnpm
41+
cargo-make
4342
];
4443
};
4544
}

‎src/components/community_project.rs‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ pub fn CommunityProjectSection(
4040
</div>
4141

4242
// <div>
43-
<div class="flex flex-row justify-center items-center gap-4 max-w-full w-full">
43+
<div class="flex flex-row justify-center items-center gap-4 max-w-full m-auto">
4444
<div
45-
class="inline-flex flex-row items-center gap-8 overflow-x-auto p-4"
45+
// class="inline-flex flex-row items-center gap-8 overflow-x-auto p-4 grid grid-cols-3"
46+
class="items-center gap-8 overflow-x-auto p-4 grid grid-cols-3"
4647
class:md:flex-wrap=many_projects
4748
>
4849
<ProjectCard

‎src/components/contributors.rs‎

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
use leptos::prelude::*;
2+
use rustlanges_components::{
3+
avatar::Avatar,
4+
button::{Button, Variant as ButtonVariant},
5+
card::Card,
6+
chip::{Chip, Variant as ChipVariant},
7+
icons::{Github, Twitter},
8+
};
9+
10+
struct Contributor {
11+
avatar: String,
12+
name: String,
13+
location: String,
14+
}
15+
16+
#[allow(non_snake_case)]
17+
pub fn Contributors() -> impl IntoView {
18+
let sergio = Contributor { name: "Sergio Ribera".to_string(), avatar: "https://avatars.githubusercontent.com/u/56278796?u=9e3dac947b4fd3ca2f1a05024e083c64e4c69cfe&v=4".to_string(), location: "Ubicación".to_string() };
19+
let juanperias = Contributor { name: "Juanperias".to_string(), avatar: "https://avatars.githubusercontent.com/u/136520331?u=7353ba372f09091049692d6e95f5a8cd8a42565f&v=4".to_string(), location: "Ubicación".to_string() };
20+
let phosphorus = Contributor {
21+
name: "Phosphorus-M".to_string(),
22+
avatar: "https://avatars.githubusercontent.com/u/19656993?s=400&v=4".to_string(),
23+
location: "Ubicación".to_string(),
24+
};
25+
26+
let contributors = vec![sergio, juanperias, phosphorus];
27+
28+
let contributors_list = contributors
29+
.into_iter()
30+
.map(|c| {
31+
view! {
32+
<div class="min-w-87.5 max-w-md h-full mt-5">
33+
<Card class="min-w-87.5 max-w-md h-full">
34+
<div class="flex flex-col gap-4 justify-between h-full">
35+
<div class="flex flex-row items-center gap-4 h-full justify-stretch">
36+
<Avatar url=c.avatar.clone() size=52 class="min-w-13" />
37+
<div class="w-full">
38+
<h2 class="text-heading-3 mt-2 mb-2">{{ c.name.clone() }}</h2>
39+
<Chip label=c.location.clone() variant=ChipVariant::Location />
40+
</div>
41+
<div class="flex gap-3 items-center justify-center">
42+
<Button
43+
variant=ButtonVariant::Icon
44+
icon=view! { <Twitter /> }.into_any()
45+
on_click=move |_| {}
46+
/>
47+
<Button
48+
variant=ButtonVariant::Icon
49+
icon=view! { <Github /> }.into_any()
50+
on_click=move |_| {}
51+
/>
52+
</div>
53+
</div>
54+
</div>
55+
</Card>
56+
</div>
57+
}
58+
})
59+
.collect_view();
60+
61+
view! {
62+
<section class="bg-light dark:bg-dark p-4 lg:p-20 w-full">
63+
<div class="flex flex-col justify-center items-center w-full container xl:max-w-7xl lg:px-36 lg:pb-20 mx-auto">
64+
<h2 class="text-h2 text-center mb-4">"Colaboradores"</h2>
65+
<div>
66+
<p class="text-center max-w-lg">
67+
"Gracias a su esfuerzo, los servicios de nuestra comunidad"
68+
</p>
69+
<p class="text-center max-w-lg">
70+
"se mantienen activos y en constante evolución."
71+
</p>
72+
</div>
73+
</div>
74+
75+
<div class="flex flex-row justify-center items-center gap-4 max-w-full m-auto">
76+
<div class="items-center gap-8 overflow-x-auto p-4 xl:grid xl:grid-cols-3">
77+
{contributors_list}
78+
</div>
79+
</div>
80+
<div class="flex flex-row justify-center items-center m-auto w-full mt-10">
81+
<Button
82+
variant=ButtonVariant::Secondary
83+
label="Conócelos a todos"
84+
on_click=move |_| {}
85+
/>
86+
</div>
87+
</section>
88+
}
89+
}

‎src/components/icons/mod.rs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ mod linkedin_icon;
55
mod location_icon;
66
mod logo_rust_page;
77
mod next;
8+
mod sponsor_block;
89
mod telegram_icon;
910
mod twitter_icon;
1011
mod web_icon;
@@ -17,6 +18,7 @@ pub use github_icon::*;
1718
pub use linkedin_icon::*;
1819
pub use location_icon::*;
1920
pub use next::*;
21+
pub use sponsor_block::*;
2022
pub use telegram_icon::*;
2123
pub use twitter_icon::*;
2224

0 commit comments

Comments
 (0)