|
1 | 1 | use leptos::*;
|
2 | 2 |
|
3 |
| -use crate::components::cards::project_card::ProjectCard; |
4 |
| - |
5 |
| -struct ProjectItem { |
6 |
| - name: Vec<&'static str>, |
7 |
| - description: &'static str, |
8 |
| - link: &'static str, |
9 |
| - brand_src: &'static str, |
10 |
| - button_link: &'static str, |
11 |
| - button_text: &'static str, |
12 |
| - brand_as_letter: bool, |
13 |
| - button_bg_color: &'static str, |
14 |
| -} |
| 3 | +use crate::{components::cards::project_card::ProjectCard, extras::COMUNITY_PROJECTS}; |
15 | 4 |
|
16 | 5 | #[component]
|
17 | 6 | pub fn CommunityProjects() -> impl IntoView {
|
18 |
| - let items: Vec<ProjectItem> = vec![ |
19 |
| - ProjectItem { |
20 |
| - name: vec!["Rust ", "Lang en Español"], |
21 |
| - description: "Pagina de la comunidad de Rust en Español", |
22 |
| - link: "https://github.com/RustLangES/rust-book-es", |
23 |
| - brand_src: "https://www.rust-lang.org/static/images/rust-logo-blk.svg", |
24 |
| - button_link: "https://github.com/RustLangES", |
25 |
| - button_text: "", |
26 |
| - brand_as_letter: false, |
27 |
| - button_bg_color: "white", |
28 |
| - }, |
29 |
| - ProjectItem { |
30 |
| - name: vec!["The ", "Rust", " Programming Language [Spanish Ed.]"], |
31 |
| - description: "Traducción del libro oficial de Rust al español", |
32 |
| - link: "https://github.com/RustLangES/rust-book-es", |
33 |
| - brand_src: "./RustLogo-min.png", |
34 |
| - button_link: "https://github.com/RustLangES", |
35 |
| - button_text: "Rust Lang en Español", |
36 |
| - brand_as_letter: false, |
37 |
| - button_bg_color: "white", |
38 |
| - }, |
39 |
| - ProjectItem { |
40 |
| - name: vec!["Hereditary"], |
41 |
| - description: "Una libreria para emular herencia en Rust", |
42 |
| - link: "https://github.com/datapture/hereditary", |
43 |
| - brand_src: "H", |
44 |
| - button_link: "https://github.com/superoptimo", |
45 |
| - button_text: "Francisco Leon", |
46 |
| - brand_as_letter: true, |
47 |
| - button_bg_color: "black", |
48 |
| - }, |
49 |
| - ProjectItem { |
50 |
| - name: vec!["gabble"], |
51 |
| - description: "Un sistema de chats en tiempo real", |
52 |
| - link: "https://github.com/whizzes/gabble", |
53 |
| - brand_src: "🎎", |
54 |
| - button_link: "https://github.com/EstebanBorai", |
55 |
| - button_text: "Esteban Borai", |
56 |
| - brand_as_letter: true, |
57 |
| - button_bg_color: "white", |
58 |
| - }, |
59 |
| - ProjectItem { |
60 |
| - name: vec!["Graphul"], |
61 |
| - description: "Un framework web basado en Axum", |
62 |
| - link: "https://graphul-rs.github.io", |
63 |
| - brand_src: "./graphul.webp", |
64 |
| - button_link: "https://github.com/SamuelBonilla", |
65 |
| - button_text: "Samuel Bonilla", |
66 |
| - brand_as_letter: false, |
67 |
| - button_bg_color: "black", |
68 |
| - }, |
69 |
| - ProjectItem { |
70 |
| - name: vec!["http-server"], |
71 |
| - description: "Un command line HTTP server simple y configurable", |
72 |
| - link: "https://github.com/http-server-rs/http-server", |
73 |
| - brand_src: "https://github.com/http-server-rs/http-server/raw/main/assets/logo.svg", |
74 |
| - button_link: "https://github.com/EstebanBorai", |
75 |
| - button_text: "Esteban Borai", |
76 |
| - brand_as_letter: false, |
77 |
| - button_bg_color: "white", |
78 |
| - }, |
79 |
| - ProjectItem { |
80 |
| - name: vec!["Freya"], |
81 |
| - description: "Una libreria para hacer GUI nativas utilizando Dioxus y Skia", |
82 |
| - link: "https://github.com/marc2332/freya", |
83 |
| - brand_src: "https://github.com/marc2332/freya/raw/main/logo.svg", |
84 |
| - button_link: "https://github.com/marc2332", |
85 |
| - button_text: "Marc Espín", |
86 |
| - brand_as_letter: false, |
87 |
| - button_bg_color: "white", |
88 |
| - }, |
89 |
| - ]; |
90 |
| - |
91 | 7 | view! {
|
92 | 8 | <section class="bg-orange-200 py-20">
|
93 | 9 | <div class="container mx-auto px-4">
|
94 | 10 | <h2 class="text-3xl text-left mb-6">
|
95 | 11 | <span class="font-work-sans font-light">"Proyectos de la "</span>
|
96 | 12 | <span class="font-alfa-slab text-orange-500">"Comunidad"</span>
|
97 | 13 | </h2>
|
98 |
| - <div class="w-full grid sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 sm:gap-x-8 gap-y-8"> |
99 |
| - {items |
| 14 | + <div class="w-full grid sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 sm:gap-x-8 gap-y-4"> |
| 15 | + {COMUNITY_PROJECTS |
100 | 16 | .into_iter()
|
101 | 17 | .map(|item| {
|
102 | 18 | view! {
|
|
0 commit comments