Skip to content

Commit 8f095ef

Browse files
committed
fix: format
1 parent f57031c commit 8f095ef

13 files changed

+39
-48
lines changed

src/app.rs

-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,3 @@ pub fn App() -> impl IntoView {
1616
</Router>
1717
}
1818
}
19-

src/components/button_link.rs

+3-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use std::collections::HashMap;
21
use leptos::*;
2+
use std::collections::HashMap;
33

44
#[component]
55
pub fn ButtonLink(
@@ -10,17 +10,12 @@ pub fn ButtonLink(
1010
) -> impl IntoView {
1111
let colors = HashMap::from([
1212
("primary", "bg-orange-300 hover:bg-black hover:text-white"),
13-
("white", "bg-orange-100")
14-
]);
15-
let sizes = HashMap::from([
16-
("tiny", "min-h-7"),
17-
("normal", "h-9"),
18-
("big", "h-12")
13+
("white", "bg-orange-100"),
1914
]);
15+
let sizes = HashMap::from([("tiny", "min-h-7"), ("normal", "h-9"), ("big", "h-12")]);
2016
let current_color = colors.get(&color).unwrap().to_string();
2117
let current_size = sizes.get(&size).unwrap().to_string();
2218

23-
2419
view! {
2520
<a
2621
href=href

src/components/cards/card_title.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
use leptos::*;
22

33
#[component]
4-
pub fn CardTitle(
5-
#[prop(into)] texts: Vec<&'static str>
6-
) -> impl IntoView {
4+
pub fn CardTitle(#[prop(into)] texts: Vec<&'static str>) -> impl IntoView {
75
view! {
86
<h5 class="text-xl">
97
{texts.into_iter()

src/components/cards/community_card.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
use leptos::*;
22

3-
use crate::components::dummy_component::DummyComponent;
4-
use crate::components::icons::discord_icon::DiscordIcon;
5-
use crate::components::icons::github_icon::GithubIcon;
6-
use crate::components::icons::telegram_icon::TelegramIcon;
7-
use crate::components::cards::card_title::CardTitle;
3+
use crate::components::{
4+
cards::card_title::CardTitle,
5+
dummy_component::DummyComponent,
6+
icons::{discord_icon::DiscordIcon, github_icon::GithubIcon, telegram_icon::TelegramIcon},
7+
};
88

99
#[component]
1010
pub fn CommunityCard(

src/components/cards/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1+
pub mod card_title;
12
pub mod community_card;
23
pub mod project_card;
3-
pub mod card_title;

src/components/cards/project_card.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
use std::collections::HashMap;
21
use leptos::*;
2+
use std::collections::HashMap;
33

4-
use crate::components::cards::card_title::CardTitle;
5-
use crate::components::button_link::ButtonLink;
6-
use crate::components::icons::github_icon::GithubIcon;
4+
use crate::components::{
5+
button_link::ButtonLink, cards::card_title::CardTitle, icons::github_icon::GithubIcon,
6+
};
77

88
#[component]
99
pub fn ProjectCard(

src/components/icons/discord_icon.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pub fn DiscordIcon(
55
#[prop(default = 40)] size: u32,
66
#[prop(default = "fill-black")] class: &'static str,
77
) -> impl IntoView {
8-
view!{
8+
view! {
99
<svg
1010
width=size
1111
height=size

src/components/icons/github_icon.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use leptos::*;
22

33
#[component]
4-
pub fn GithubIcon (
4+
pub fn GithubIcon(
55
#[prop(default = 40)] size: u32,
66
#[prop(default = "fill-black")] class: &'static str,
77
) -> impl IntoView {
@@ -18,4 +18,4 @@ pub fn GithubIcon (
1818
/>
1919
</svg>
2020
}
21-
}
21+
}

src/components/mod.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
pub mod icons;
2-
pub mod hero;
3-
pub mod header;
4-
pub mod footer;
51
pub mod button_link;
6-
pub mod our_communities;
7-
pub mod other_communities;
8-
pub mod community_projects;
92
pub mod cards;
3+
pub mod community_projects;
104
pub mod dummy_component;
5+
pub mod footer;
6+
pub mod header;
7+
pub mod hero;
8+
pub mod icons;
9+
pub mod other_communities;
10+
pub mod our_communities;

src/components/other_communities.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,39 +20,39 @@ pub fn OtherCommunities() -> impl IntoView {
2020
link: "https://discord.gg/DeZKCCyMcq",
2121
icon: "discord",
2222
brand_src: "./RustBCN.webp",
23-
brand_alt: "Logo de Rust Barcelona"
23+
brand_alt: "Logo de Rust Barcelona",
2424
},
2525
CommunityItem {
2626
name: vec!["Whizzles"],
2727
description: "Comunidad de Open Source con fuertes raices en Rust.",
2828
link: "https://discord.gg/b9EbVnSkuw",
2929
icon: "discord",
3030
brand_src: "./Whizzles.webp",
31-
brand_alt: "Logo de Whizzles"
31+
brand_alt: "Logo de Whizzles",
3232
},
3333
CommunityItem {
3434
name: vec!["Rust", "MX"],
3535
description: "Comunidad de Rust en Mexico",
3636
link: "https://t.me/RustMX",
3737
icon: "telegram",
3838
brand_src: "./RustMX-min.png",
39-
brand_alt: "Logo de RustMX"
39+
brand_alt: "Logo de RustMX",
4040
},
4141
CommunityItem {
4242
name: vec!["Aprende ", "Rust"],
4343
description: "Comunidad de Rust en Mexico",
4444
link: "https://t.me/aprenderrust",
4545
icon: "telegram",
4646
brand_src: "./aprender-rust-min.jpg",
47-
brand_alt: "Logo de Aprende Rust"
47+
brand_alt: "Logo de Aprende Rust",
4848
},
4949
CommunityItem {
5050
name: vec!["Rust ", "Español"],
5151
description: "Anteriormente Rust Argentina, hoy una comunidad internacional.",
5252
link: "https://t.me/rust_lang_es",
5353
icon: "telegram",
5454
brand_src: "./RustGeneral.jpg",
55-
brand_alt: "Logo de Rust Español"
55+
brand_alt: "Logo de Rust Español",
5656
},
5757
];
5858

src/components/our_communities.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
use leptos::*;
22

3-
use crate::components::icons::discord_icon::DiscordIcon;
4-
use crate::components::icons::github_icon::GithubIcon;
5-
use crate::components::icons::telegram_icon::TelegramIcon;
6-
use crate::components::button_link::ButtonLink;
3+
use crate::components::{
4+
button_link::ButtonLink,
5+
icons::{discord_icon::DiscordIcon, github_icon::GithubIcon, telegram_icon::TelegramIcon},
6+
};
77

88
#[component]
99
pub fn OurCommunities() -> impl IntoView {

src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
mod app;
2-
mod pages;
32
mod components;
3+
mod pages;
44

55
use app::*;
66
use leptos::*;

src/pages/index.rs

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
use leptos::*;
22

3-
use crate::components::hero::Hero;
4-
use crate::components::footer::Footer;
5-
use crate::components::our_communities::OurCommunities;
6-
use crate::components::other_communities::OtherCommunities;
7-
use crate::components::community_projects::CommunityProjects;
3+
use crate::components::{
4+
community_projects::CommunityProjects, footer::Footer, hero::Hero,
5+
other_communities::OtherCommunities, our_communities::OurCommunities,
6+
};
87

98
#[component]
109
pub fn Index() -> impl IntoView {
11-
view!{
10+
view! {
1211
<div>
1312
<Hero />
1413
<main>

0 commit comments

Comments
 (0)