Skip to content

Commit b80d0cf

Browse files
committed
feat: Add OurCommunity and ProjectCard components
- Introduced OurCommunitySection component to showcase community resources. - Added ProjectCard component for displaying project details with GitHub user avatars. - Updated mod.rs to include new components. - Created models for GitHub users. - Enhanced index page to incorporate OurCommunitySection and CommunityProjectSection. - Cleaned up unused code in various pages. - Adjusted theme provider to improve theme handling.
1 parent 98325cf commit b80d0cf

31 files changed

+926
-484
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ edition = "2021"
77
crate-type = ["cdylib", "rlib"]
88

99
[dependencies]
10-
actix-files = { version = "0.6", optional = true }
11-
actix-web = { version = "4", features = ["macros"], optional = true }
12-
leptos = { version = "0.8", features = ["nightly", "islands"] }
13-
leptos_meta = "0.8"
14-
leptos_actix = { version = "0.8", optional = true }
15-
leptos_router = { version = "0.8", features = ["nightly"] }
16-
wasm-bindgen = "0.2"
17-
serde = { version = "1", features = ["derive"] }
18-
reqwest = { version = "0.12", features = [
10+
actix-files = { version = "0.6.6", optional = true }
11+
actix-web = { version = "4.11.0", features = ["macros"], optional = true }
12+
leptos = { version = "0.8.10", features = ["nightly", "islands", "islands-router"] }
13+
leptos_meta = "0.8.5"
14+
leptos_actix = { version = "0.8.5", features = ["islands-router"], optional = true }
15+
leptos_router = { version = "0.8.8", features = ["nightly"] }
16+
wasm-bindgen = "0.2.100"
17+
serde = { version = "1.0.219", features = ["derive"] }
18+
reqwest = { version = "0.12.23", features = [
1919
"json",
2020
"http2",
2121
"rustls-tls",

Makefile.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ dependencies = ["prebuild"]
6565
install_crate = { crate_name = "cargo-leptos", binary = "cargo", test_arg = [
6666
"leptos",
6767
"--version",
68-
], version = "0.2.42" }
68+
], version = "0.2.45" }
6969
command = "cargo"
7070
env = { LEPTOS_TAILWIND_VERSION="v4.1.14" }
7171
args = ["leptos", "watch", "--features", "development", "--features", "ssr", "--hot-reload"]

assets/new/background/ferris-dark-left.svg

Lines changed: 9 additions & 0 deletions
Loading

assets/new/background/ferris-dark-right.svg

Lines changed: 9 additions & 0 deletions
Loading

assets/new/background/ferris-light-left.svg

Lines changed: 9 additions & 0 deletions
Loading

assets/new/background/ferris-light-right.svg

Lines changed: 9 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading

input.css

Lines changed: 58 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,63 @@
1212
font-family: "Akira", sans-serif;
1313
}
1414

15-
.rustlang-es-background {
16-
background: url("/assets/new/background/hero-bg.svg") lightgray 50% / cover no-repeat;
15+
.bg-ferris-left {
16+
background-image: url("/assets/new/background/ferris-dark-left.svg");
17+
background-size: cover;
1718
}
1819

19-
@custom-variant dark (&:where([data-theme=dark], [data-theme=dark] *));
20+
.bg-ferris-right {
21+
background-image: url("/assets/new/background/ferris-dark-right.svg");
22+
background-size: cover;
23+
}
24+
25+
&:where([data-theme=light]) {
26+
.rustlang-es-background {
27+
background: url("/assets/new/background/hero-bg.svg") lightgray 50% / cover no-repeat;
28+
}
29+
.bg-ferris-left {
30+
background-image: url("/assets/new/background/ferris-light-left.svg");
31+
background-size: cover;
32+
}
33+
.bg-ferris-right {
34+
background-image: url("/assets/new/background/ferris-light-right.svg");
35+
background-size: cover;
36+
}
37+
}
38+
39+
.project-card-badge{
40+
inset: 4px;
41+
@apply bg-black relative;
42+
clip-path: polygon(90.5% 27.43%, 100% 100%, 0% 100%, 9.36% 27.43%, 12.31% 12.33%, 87.67% 12.33%);
43+
44+
}
45+
46+
.project-card-badge::before {
47+
content: "";
48+
@apply absolute;
49+
width: calc(100%);
50+
top: 0;
51+
left: 0;
52+
height: calc(100%);
53+
clip-path: polygon(90.5% 27.43%, 100% 100%, 0% 100%, 9.36% 27.43%, 12.31% 12.33%, 87.67% 12.33%);
54+
z-index: -1;
55+
}
56+
57+
58+
/* .project-card-badge {
59+
border-width: 0 25px 25px 25px;
60+
height: 0;
61+
width: 100px;
62+
box-sizing: content-box;
63+
position: relative;
64+
} */
65+
66+
67+
/*
68+
@custom-variant dark (
69+
:where([data-theme="dark"] *),
70+
:where(:not([data-theme="light"] *) @media (prefers-color-scheme: dark))
71+
);
72+
*/
73+
74+
@custom-variant dark (&:where([data-theme='dark'], [data-theme='dark'] *), &:where(&:not([data-theme='light'], @media (prefers-color-scheme: dark))));

src/app.rs

Lines changed: 39 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
1-
use leptos::leptos_dom::logging::console_log;
2-
use leptos::prelude::*;
3-
use leptos_meta::{provide_meta_context, MetaTags};
4-
use leptos_router::components::{Route, Router, Routes};
5-
use leptos_router::path;
61
use crate::context::theme_provider::ThemeProvider;
2+
use leptos::{leptos_dom::logging::console_log, prelude::*};
3+
use leptos_meta::{provide_meta_context, MetaTags};
4+
use leptos_router::{
5+
components::{Route, Router, Routes},
6+
path,
7+
};
78

8-
use crate::components::{HeadInformation, Header};
9-
use crate::pages::{Aprende, Communities, Contributors, Index, Projects};
9+
use crate::{
10+
components::{HeadInformation, Header},
11+
pages::{Aprende, Communities, Contributors, Index, Projects},
12+
};
1013

1114
pub fn shell(options: LeptosOptions) -> impl IntoView {
1215
view! {
1316
<!DOCTYPE html>
1417
<html lang="en">
1518
<head>
16-
<meta charset="utf-8"/>
17-
<meta name="viewport" content="width=device-width, initial-scale=1"/>
19+
<meta charset="utf-8" />
20+
<meta name="viewport" content="width=device-width, initial-scale=1" />
1821

19-
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#fed7aa"/>
20-
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#181811"/>
21-
<AutoReload options=options.clone()/>
22-
<HydrationScripts options islands=true/>
23-
<MetaTags/>
22+
// <meta name="theme-color" media="(prefers-color-scheme: light)" content="#fed7aa"/>
23+
// <meta name="theme-color" media="(prefers-color-scheme: dark)" content="#181811"/>
24+
<AutoReload options=options.clone() />
25+
<HydrationScripts options islands=true />
26+
<MetaTags />
2427

2528
<script type="text/javascript">
2629
(function(c,l,a,r,i,t,y){
@@ -32,7 +35,7 @@ pub fn shell(options: LeptosOptions) -> impl IntoView {
3235
</script>
3336
</head>
3437
<body>
35-
<App/>
38+
<App />
3639
</body>
3740
</html>
3841
}
@@ -47,34 +50,29 @@ pub fn App() -> impl IntoView {
4750
view! {
4851
<ThemeProvider>
4952
<Router>
50-
<HeadInformation/>
51-
<Body {..} class="bg-[#FAFAFA] dark:bg-[#222222] text-[#222222] dark:text-[#FAFAFA]".to_string() />
53+
<HeadInformation />
54+
<Body
55+
{..}
56+
class="bg-[#FAFAFA] dark:bg-[#222222] text-[#222222] dark:text-[#FAFAFA]"
57+
.to_string()
58+
/>
5259
<main>
53-
<Header />
54-
<Routes fallback=|| "Not found.">
55-
<Route
56-
path=path!("/")
57-
view=Index
58-
/>
59-
// <Route
60-
// path=path!("comunidades")
61-
// view=Communities
62-
// />
63-
// <Route
64-
// path=path!("colaboradores")
65-
// view=Contributors
66-
// />
67-
// <Route
68-
// path=path!("proyectos")
69-
// view=Projects
70-
// />
71-
// <Route
72-
// path=path!("aprende")
73-
// view=Aprende
74-
// />
60+
<Header />
61+
<Routes fallback=|| "Not found.">
62+
<Route path=path!("/") view=Index />
63+
<Route path=path!("comunidades") view=Communities />
64+
// <Route
65+
// path=path!("colaboradores")
66+
// view=Contributors
67+
// />
68+
// <Route
69+
// path=path!("proyectos")
70+
// view=Projects
71+
// />
72+
<Route path=path!("aprende") view=Aprende />
7573
</Routes>
76-
</main>
77-
// <Footer />
74+
</main>
75+
// <Footer />
7876
</Router>
7977
</ThemeProvider>
8078
}

0 commit comments

Comments
 (0)