File tree 2 files changed +15
-1
lines changed
2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ gloo-net = { version = "0.2", features = ["http"] }
14
14
wasm-bindgen = { version = " 0.2" }
15
15
console_log = { version = " 1" }
16
16
console_error_panic_hook = { version = " 0.1" }
17
+ rand = " 0.8.5"
17
18
18
19
[profile .release ]
19
20
opt-level = " z" # Optimize for size.
Original file line number Diff line number Diff line change 1
1
use leptos:: * ;
2
2
3
3
use crate :: components:: header:: Header ;
4
+ use rand:: seq:: SliceRandom ;
4
5
5
6
#[ component]
6
7
pub fn Hero ( ) -> impl IntoView {
8
+ let slogans = vec ! [
9
+ "Una comunidad de gente mal intencionada y tonta." ,
10
+ "9 de cada 10 Go dev's lo recomiendan" ,
11
+ "Acá le pegamos a la rústica bien recio" ,
12
+ "⚡ Blazingly fast ⚡ 🚀🚀🚀 Super fast 🔥🔥🔥🔥 pero ahora en español!!" ,
13
+ "Si te falla va ser de forma segura 😉" ,
14
+ "Furrificando..."
15
+ ] ;
16
+
17
+ let sloganToShow = slogans. choose ( & mut rand:: thread_rng ( ) ) . unwrap ( ) ;
18
+
19
+
7
20
view ! {
8
21
<section class="w-full flex flex-col" >
9
22
<Header />
@@ -25,7 +38,7 @@ pub fn Hero() -> impl IntoView {
25
38
</span>
26
39
</h1>
27
40
<p class="font-work-sans font-light text-center lg:text-left" >
28
- "Una comunidad de gente mal intencionada y tonta."
41
+ { sloganToShow . to_string ( ) }
29
42
</p>
30
43
</div>
31
44
</div>
You can’t perform that action at this time.
0 commit comments