Skip to content

Commit c393c44

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 2a4e414 + 8435f1f commit c393c44

File tree

4 files changed

+60
-63
lines changed

4 files changed

+60
-63
lines changed

src/app.rs

+15-5
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,28 @@ use leptos::*;
22
use leptos_meta::*;
33
use leptos_router::*;
44

5-
use crate::pages::{contributors::Contributors, index::Index};
5+
use crate::{
6+
components::{footer::Footer, header::Header},
7+
pages::{contributors::Contributors, index::Index},
8+
};
69

710
#[component]
811
pub fn App() -> impl IntoView {
912
provide_meta_context();
1013

1114
view! {
1215
<Router>
13-
<Routes>
14-
<Route path="/" view=|| view! { <Index/> }/>
15-
<Route path="/colaboradores" view=|| view! { <Contributors/> }/>
16-
</Routes>
16+
<section class="w-full flex flex-col">
17+
<Header/>
18+
<main>
19+
<Routes>
20+
<Route path="/" view=|| view! { <Index/> }/>
21+
<Route path="/colaboradores" view=|| view! { <Contributors/> }/>
22+
</Routes>
23+
<Outlet/>
24+
</main>
25+
<Footer/>
26+
</section>
1727
</Router>
1828
}
1929
}

src/components/hero.rs

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

3-
use crate::components::header::Header;
43
use rand::seq::SliceRandom;
54

65
#[component]
@@ -27,39 +26,36 @@ pub fn Hero() -> impl IntoView {
2726
};
2827

2928
view! {
30-
<section class="w-full flex flex-col">
31-
<Header/>
32-
<div class="flex items-center justify-center py-14 lg:py-32 px-4">
33-
<div class="grid items-center gap-x-20 gap-y-10 lg:grid-cols-2 w-full">
34-
<figure class="w-80 mx-auto lg:w-full">
35-
<img src="./rhq3ezvso9611-min.png" width="500" class="ml-auto"/>
36-
</figure>
37-
<div class="">
38-
<h1 class="flex flex-col mb-4 gap-y-2">
39-
<span class="font-work-sans text-4xl font-light text-center lg:text-left">
40-
"Bienvenidos a"
41-
</span>
42-
<span class="font-alfa-slab text-orange-500 text-6xl sm:text-7xl lg:text-8xl text-center lg:text-left">
43-
"Rust Lang"
44-
</span>
45-
<span class="font-work-sans text-5xl font-semibold text-center lg:text-left">
46-
"En Español"
47-
</span>
48-
</h1>
49-
<div class="flex items-center justify-center lg:justify-start group">
50-
<button
51-
class="bg-orange-300 border-4 border-orange-400 group-hover:border-orange-500 flex justify-center items-center rounded-full w-12 h-12 flex items-center justify-center text-xl relative z-10"
52-
on:click=click_handler
53-
>
54-
<span class="motion-safe:animate-spin">"🎲"</span>
55-
</button>
56-
<p class="font-work-sans font-light lg:text-left bg-orange-400 h-12 pr-4 pl-10 flex items-center -ml-6 flex-1 rounded-r-full group-hover:bg-orange-500 max-w-lg">
57-
{slogan}
58-
</p>
59-
</div>
29+
<div class="flex items-center justify-center py-14 lg:py-32 px-4">
30+
<div class="grid items-center gap-x-20 gap-y-10 lg:grid-cols-2 w-full">
31+
<figure class="w-80 mx-auto lg:w-full">
32+
<img src="./rhq3ezvso9611-min.png" width="500" class="ml-auto"/>
33+
</figure>
34+
<div class="">
35+
<h1 class="flex flex-col mb-4 gap-y-2">
36+
<span class="font-work-sans text-4xl font-light text-center lg:text-left">
37+
"Bienvenidos a"
38+
</span>
39+
<span class="font-alfa-slab text-orange-500 text-6xl sm:text-7xl lg:text-8xl text-center lg:text-left">
40+
"Rust Lang"
41+
</span>
42+
<span class="font-work-sans text-5xl font-semibold text-center lg:text-left">
43+
"En Español"
44+
</span>
45+
</h1>
46+
<div class="flex items-center justify-center lg:justify-start group">
47+
<button
48+
class="bg-orange-300 border-4 border-orange-400 group-hover:border-orange-500 flex justify-center items-center rounded-full w-12 h-12 flex items-center justify-center text-xl relative z-10"
49+
on:click=click_handler
50+
>
51+
<span class="motion-safe:animate-spin">"🎲"</span>
52+
</button>
53+
<p class="font-work-sans font-light lg:text-left bg-orange-400 h-12 pr-4 pl-10 flex items-center -ml-6 flex-1 rounded-r-full group-hover:bg-orange-500 max-w-lg">
54+
{slogan}
55+
</p>
6056
</div>
6157
</div>
6258
</div>
63-
</section>
59+
</div>
6460
}
6561
}

src/pages/contributors.rs

+12-18
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use leptos::{error::Result, *};
22
use serde::{Deserialize, Serialize};
33

4-
use crate::components::{cards::contributor_card::ContributorCard, footer::Footer, header::Header};
4+
use crate::components::cards::contributor_card::ContributorCard;
55

66
#[derive(Clone, PartialEq, Eq, Serialize, Deserialize)]
77
pub struct Contributor {
@@ -45,22 +45,16 @@ pub fn Contributors() -> impl IntoView {
4545
};
4646

4747
view! {
48-
<div>
49-
<Header/>
50-
<main>
51-
<section class="bg-orange-300/30 py-16">
52-
<div class="flex flex-col gap-y-6 container mx-auto px-4">
53-
<h2 class="text-3xl text-left mb-6">
54-
<span class="font-work-sans font-light">"Nuestros "</span>
55-
<span class="font-alfa-slab text-orange-500">"Colaboradores"</span>
56-
</h2>
57-
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 2xl:grid-cols-5 gap-6">
58-
{contributors_view}
59-
</div>
60-
</div>
61-
</section>
62-
</main>
63-
<Footer/>
64-
</div>
48+
<section class="bg-orange-300/30 py-16">
49+
<div class="flex flex-col gap-y-6 container mx-auto px-4">
50+
<h2 class="text-3xl text-left mb-6">
51+
<span class="font-work-sans font-light">"Nuestros "</span>
52+
<span class="font-alfa-slab text-orange-500">"Colaboradores"</span>
53+
</h2>
54+
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 2xl:grid-cols-5 gap-6">
55+
{contributors_view}
56+
</div>
57+
</div>
58+
</section>
6559
}
6660
}

src/pages/index.rs

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

33
use crate::components::{
4-
community_projects::CommunityProjects, footer::Footer, hero::Hero,
5-
other_communities::OtherCommunities, our_communities::OurCommunities,
4+
community_projects::CommunityProjects, hero::Hero, other_communities::OtherCommunities,
5+
our_communities::OurCommunities,
66
};
77

88
#[component]
99
pub fn Index() -> impl IntoView {
1010
view! {
1111
<div>
1212
<Hero/>
13-
<main>
14-
<OurCommunities/>
15-
<OtherCommunities/>
16-
<CommunityProjects/>
17-
</main>
18-
<Footer/>
13+
<OurCommunities/>
14+
<OtherCommunities/>
15+
<CommunityProjects/>
1916
</div>
2017
}
2118
}

0 commit comments

Comments
 (0)