Skip to content

Commit 169ebc2

Browse files
committed
chore: update riir branch
1 parent 886a44b commit 169ebc2

File tree

14 files changed

+37
-460
lines changed

14 files changed

+37
-460
lines changed

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ env = "DEV"
8282
#
8383
# Optional. Can be over-ridden with the command line parameter --bin-features
8484
bin-features = ["ssr"]
85+
# The tailwind input file.
86+
#
87+
# Optional, Activates the tailwind build
88+
tailwind-input-file = "input.css"
8589

8690
# If the --no-default-features flag should be used when compiling the bin target
8791
#

flake.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
rustToolchain
2323

2424
# WASM tools
25+
tailwindcss_4
2526
wasm-bindgen-cli
2627

2728
# Leptos specific tools

input.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;
4+
5+
@import "@rustlanges/styles";

package-lock.json

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

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
},
1515
"homepage": "https://github.com/RustLangES/RustLangES.github.io",
1616
"dependencies": {
17-
"@rustlanges/styles": "^0.0.1"
17+
"@rustlanges/styles": "^0.0.1",
18+
"tailwindcss": "^4.1.12"
1819
}
1920
}

src/app.rs

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
11
use leptos::prelude::*;
2-
use leptos_meta::{provide_meta_context, Link, Meta, MetaTags, Stylesheet, Title};
3-
use leptos_router::components::{ParentRoute, Route, Router, Routes};
4-
use leptos_router::hooks::use_location;
2+
use leptos_meta::{provide_meta_context, MetaTags};
3+
use leptos_router::components::{Route, Router, Routes};
54
use leptos_router::path;
65

7-
use crate::components::HeadInformation;
6+
use crate::components::{HeadInformation, Header};
87
use crate::pages::{Aprende, Communities, Contributors, Index, Projects};
98

10-
#[cfg(debug_assertions)]
11-
const ASSETS_FOLDER: &str = "./assets";
12-
13-
#[cfg(not(debug_assertions))]
14-
const ASSTES_FOLDERS: &str = ".";
15-
169
pub fn shell(options: LeptosOptions) -> impl IntoView {
1710
view! {
1811
<!DOCTYPE html>
@@ -55,7 +48,7 @@ pub fn App() -> impl IntoView {
5548
// "bg-orange-200 dark:bg-[#131313]/90 bg-center bg-fixed {} dark:bri dark:bg-cover dark:bg-blend-darken dark:backdrop-blur-xl overflow-x-hidden dark:text-[#e2cea9]",
5649
// bg_in_dark_mode,
5750
// )/>
58-
// <Header/>
51+
<Header />
5952
<main>
6053
<Routes fallback=|| "Not found.">
6154
<Route

src/components/community_projects.rs

Lines changed: 0 additions & 66 deletions
This file was deleted.

src/components/head_information.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use leptos::prelude::*;
22
use leptos::{component, view, IntoView};
3-
use leptos_meta::{Html, Link, Meta, Stylesheet, Title};
3+
use leptos_meta::{Link, Meta, Stylesheet, Title};
44
use leptos_router::hooks::use_location;
55

66
#[cfg(debug_assertions)]

src/components/header.rs

Lines changed: 14 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,24 @@
1-
use leptos::{create_signal, island, view, IntoView, SignalUpdate};
2-
3-
use crate::components::ButtonLink;
4-
51
use crate::components::icons::LogoRustPageIcon;
2+
use leptos::prelude::*;
3+
use leptos_router::components::A;
64

75
#[island]
86
pub fn Header() -> impl IntoView {
9-
let (is_open, set_is_open) = create_signal(false);
7+
let cb_theme = || {};
108

119
view! {
12-
<header class="border-b border-b-black/20">
13-
<div class="container mx-auto px-4 flex items-center justify-between flex-col lg:flex-row">
14-
<div class="flex justify-between w-full lg:w-auto">
15-
<a href="/" exact=true class="flex items-center gap-x-4">
16-
<LogoRustPageIcon size=80/>
17-
</a>
18-
<button
19-
class="lg:hidden"
20-
on:click=move |_| { set_is_open.update(|n| *n = !*n) }
21-
aria-label="Menu de opciones"
22-
>
23-
<span class="w-6 h-1 bg-black dark:bg-white block my-4 relative after:absolute after:block after:bg-black dark:after:bg-white after:w-6 after:h-1 after:bottom-2 before:absolute before:block before:bg-black dark:before:bg-white before:w-6 before:h-1 before:-bottom-2"></span>
24-
</button>
10+
<header class="w-full py-[8px] px-[24px] flex flex-column items-center space-between">
11+
<LogoRustPageIcon />
12+
<div class="flex flex-column gap-[24px]">
13+
<div class="flex gap-[16px]">
14+
<A href="/">Inicio</A>
15+
<A href="/aprende">Aprende Rust</A>
16+
<A href="/comunidad">Comunidad</A>
17+
<A href="/eventos">Eventos</A>
18+
<A href="https://blog.rustlang-es.org">Blog</A>
19+
</div>
20+
<div class="flex gap-[16px]">
2521
</div>
26-
<nav class=move || {
27-
format!(
28-
"w-full lg:w-auto pb-10 pt-5 lg:p-0 {}",
29-
if is_open() { "block" } else { "hidden lg:block" },
30-
)
31-
}>
32-
<ul class="flex items-center gap-6 flex-col lg:flex-row lg:items-center">
33-
<li class="nav-item">
34-
<a href="https://book.rustlang-es.org" target="_blank">
35-
"El Libro"
36-
</a>
37-
</li>
38-
<li class="nav-item">
39-
<a href="/aprende">"Aprende"</a>
40-
</li>
41-
<li class="nav-item">
42-
<a href="/comunidades">"Comunidades"</a>
43-
</li>
44-
45-
<li class="nav-item">
46-
<a href="/colaboradores">"Colaboradores"</a>
47-
</li>
48-
<li class="nav-item">
49-
<a href="https://blog.rustlang-es.org/" target="_self">
50-
"Blog"
51-
</a>
52-
</li>
53-
<li>
54-
<ul class="lg:ml-4 flex items-center gap-x-6">
55-
<li>
56-
<ButtonLink href="https://github.com/RustLangES">
57-
"Github"
58-
</ButtonLink>
59-
</li>
60-
<li>
61-
<ButtonLink href="https://discord.gg/4ng5HgmaMg">
62-
"Discord"
63-
</ButtonLink>
64-
</li>
65-
</ul>
66-
</li>
67-
</ul>
68-
</nav>
6922
</div>
7023
</header>
7124
}

src/components/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
mod head_information;
2+
mod header;
23
mod icons;
34

45
pub use head_information::HeadInformation;
6+
pub use header::Header;
57
pub use icons::{
68
CloudflareIcon, DiscordIcon, GithubIcon, LinkedinIcon, LocationIcon, NextIcon, TelegramIcon,
79
TwitterIcon,

0 commit comments

Comments
 (0)