-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
151 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
[toolchain] | ||
channel = "nightly-2024-02-12" | ||
profile = "default" | ||
profile = "minimal" | ||
targets = ["wasm32-unknown-unknown"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
use leptos::{component, view, Children, IntoView}; | ||
use std::collections::HashMap; | ||
|
||
#[component] | ||
pub fn ButtonLargeLink( | ||
#[prop(into)] href: String, | ||
#[prop(default = "primary")] color: &'static str, | ||
#[prop(default = "normal")] size: &'static str, | ||
#[prop(default = "drop")] shadow: &'static str, | ||
#[prop(into, optional)] class: String, | ||
children: Children, | ||
) -> impl IntoView { | ||
let colors = HashMap::from([ | ||
( | ||
"primary", | ||
"bg-orange-200 dark:bg-transparent hover:bg-black hover:text-white", | ||
), | ||
("white", "bg-orange-100 dark:bg-transparent hover:bg-black hover:text-white"), | ||
]); | ||
let shadows = HashMap::from([ | ||
("drop", "drop-shadow-[4px_4px_0_rgba(0,0,0)] hover:drop-shadow-[0_0_0_rgba(0,0,0)]"), | ||
("box", "drop-shadow-[4px_4px_0_rgba(0,0,0)] hover:drop-shadow-[0_0_0_rgba(0,0,0)] dark:drop-shadow-none shadow-sm hover:drop-shadow-none dark:hover:shadow-lg shadow-black"), | ||
]); | ||
let sizes = HashMap::from([("tiny", "min-h-7"), ("normal", "h-9"), ("big", "h-12")]); | ||
let current_color = (*colors.get(&color).unwrap()).to_string(); | ||
let current_size = (*sizes.get(&size).unwrap()).to_string(); | ||
let shadow = (*shadows.get(&shadow).unwrap()).to_string(); | ||
|
||
view! { | ||
<a | ||
href=href | ||
target="_blank" | ||
class=format!( | ||
"tracking-wider text-center font-work-sans border border-black dark:border-white flex items-center px-4 transition w-full max-w-full sm:max-w-[20rem] gap-x-4 {} {} {} {} whitespace-nowrap", | ||
current_color, | ||
current_size, | ||
class, | ||
shadow, | ||
) | ||
> | ||
|
||
{children()} | ||
</a> | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
use leptos::{component, view, IntoView}; | ||
|
||
use crate::components::{ | ||
button_link::ButtonLink, | ||
button_large_link::ButtonLargeLink, | ||
icons::{DiscordIcon, CalendarIcon, GithubIcon}, | ||
}; | ||
|
||
#[component] | ||
pub fn Hacktoberfest() -> impl IntoView { | ||
view! { | ||
<section class="bg-orange-200/30 dark:bg-transparent"> | ||
<div class="container mx-auto px-4"> | ||
<div class="flex flex-col items-center py-20 gap-y-6"> | ||
<h2 class="text-4xl text-center mb-4"> | ||
<span class="font-work-sans font-light"> | ||
"🚀 ¡Únete a la celebración del" | ||
<span class="font-alfa-slab text-orange-500">" Hacktoberfest "</span> | ||
"con nosotros! 🚀" | ||
</span> | ||
</h2> | ||
<p class="text-center text-xl"> | ||
"Este" <span class="text-orange-500 font-alfa-slab">" 28 de septiembre"</span>" | ||
, nuestro comunidad se une a este emocionante evento de programación. | ||
Aprovecha esta excelente oportunidad para contribuir a proyectos open-source, aprender nuevas habilidades | ||
y conectar con otros amantes del open-source." | ||
</p> | ||
<div class="flex items-center gap-x-12 gap-y-6 flex-col *:w-full sm:flex-row"> | ||
<ButtonLink | ||
href="https://discord.gg/4ng5HgmaMg" | ||
shadow="box" | ||
color="white" | ||
size="big" | ||
> | ||
<DiscordIcon size=30/> | ||
"Participa" | ||
</ButtonLink> | ||
<ButtonLargeLink | ||
href="https://calendar.google.com/calendar/event?action=TEMPLATE&tmeid=M2ZiMjhzbGNqbTZoMjNrZ2ZpbW4zYzk1ZGUgZGFmYzYyODQwMzRkOWJlZjNlMzFkZTNiZDE1OTI2OGQ5OGU4YzlhOGY2MjU3Mzk4NGI3MGE1OWQ2NjU3ZjVhZkBn&tmsrc=dafc6284034d9bef3e31de3bd159268d98e8c9a8f62573984b70a59d6657f5af%40group.calendar.google.com" | ||
shadow="box" | ||
color="white" | ||
size="big" | ||
> | ||
<CalendarIcon size=30/> | ||
"Añade a tu calendario" | ||
</ButtonLargeLink> | ||
<ButtonLargeLink | ||
href="https://github.com/RustLangES" | ||
shadow="box" | ||
color="white" | ||
size="big" | ||
> | ||
<GithubIcon size=30/> | ||
"Postula tu proyecto" | ||
</ButtonLargeLink> | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
use leptos::{component, view, IntoView}; | ||
|
||
#[component] | ||
pub fn CalendarIcon( | ||
#[prop(default = 40)] size: u32, | ||
#[prop(default = "fill-current dark:fill-[#bf8821]")] class: &'static str, | ||
) -> impl IntoView { | ||
view! { | ||
<svg | ||
width=size | ||
height=size | ||
viewBox="0 0 18 21" | ||
class=class | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path d="M13 0.5C13.2449 0.500032 13.4813 0.589956 13.6644 0.752715C13.8474 0.915475 13.9643 1.13975 13.993 1.383L14 1.5V2.5H15C15.7652 2.49996 16.5015 2.79233 17.0583 3.31728C17.615 3.84224 17.9501 4.56011 17.995 5.324L18 5.5V17.5C18 18.2652 17.7077 19.0015 17.1827 19.5583C16.6578 20.115 15.9399 20.4501 15.176 20.495L15 20.5H3C2.23479 20.5 1.49849 20.2077 0.941739 19.6827C0.384993 19.1578 0.0498925 18.4399 0.00500012 17.676L4.66045e-09 17.5V5.5C-4.26217e-05 4.73479 0.292325 3.99849 0.817284 3.44174C1.34224 2.88499 2.06011 2.54989 2.824 2.505L3 2.5H4V1.5C4.00028 1.24512 4.09788 0.999968 4.27285 0.814632C4.44782 0.629296 4.68695 0.517765 4.94139 0.502828C5.19584 0.487891 5.44638 0.570675 5.64183 0.734265C5.83729 0.897855 5.9629 1.1299 5.993 1.383L6 1.5V2.5H12V1.5C12 1.23478 12.1054 0.98043 12.2929 0.792893C12.4804 0.605357 12.7348 0.5 13 0.5ZM16 7.5H2V17.125C2 17.83 2.386 18.411 2.883 18.491L3 18.5H15C15.513 18.5 15.936 17.97 15.993 17.285L16 17.125V7.5Z" fill="current-color"/> | ||
<path d="M9 10.5C9.24493 10.5 9.48134 10.59 9.66437 10.7527C9.84741 10.9155 9.96434 11.1397 9.993 11.383L10 11.5V14.5C9.99972 14.7549 9.90212 15 9.72715 15.1854C9.55218 15.3707 9.31305 15.4822 9.0586 15.4972C8.80416 15.5121 8.55362 15.4293 8.35817 15.2657C8.16271 15.1021 8.0371 14.8701 8.007 14.617L8 14.5V12.5C7.74512 12.4997 7.49997 12.4021 7.31463 12.2272C7.12929 12.0522 7.01776 11.813 7.00283 11.5586C6.98789 11.3042 7.07067 11.0536 7.23426 10.8582C7.39785 10.6627 7.6299 10.5371 7.883 10.507L8 10.5H9Z" fill="current-color"/> | ||
</svg> | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters