Skip to content

Commit

Permalink
feat: add Sysarmy and Nerdearla as sponsors
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernando Pastorelli committed Aug 22, 2024
1 parent 42b6d02 commit 9c64c2d
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 48 deletions.
15 changes: 15 additions & 0 deletions assets/sponsors/nerdearla.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sponsors/sysarmy.webp
Binary file not shown.
46 changes: 19 additions & 27 deletions src/components/cards/contributor_card.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ pub fn ContributorCard(
) -> impl IntoView {
view! {
<article class="hover:z-10 flex flex-col h-full gap-y-6 border border-black p-4 hover:bg-orange-500 bg-orange-100 dark:hover:bg-zinc-900/40 dark:bg-black/40 drop-shadow-[0_0_0_rgba(0,0,0)] hover:drop-shadow-[-4px_-4px_0_rgba(0,0,0)] transition justify-between">
<a
href=link.clone()
target="_blank"
class="group flex flex-col justify-between"
>
<a href=link.clone() target="_blank" class="group flex flex-col justify-between">
<span class="absolute top-0 end-0 inline-flex items-center size-3.5 group-hover:min-w-16 rounded-full border-2 border-white text-xs font-medium transition-all transform -translate-y-1/2 translate-x-1/2 bg-teal-500 dark:border-slate-900 badge-container">
<span class="sr-only text-black badge-content transition-all transform">
{contributions}
Expand All @@ -27,34 +23,30 @@ pub fn ContributorCard(
<div class="flex flex-col gap-y-2">
<img src=brand_src width="60" class="rounded-full mb-4" alt=name.clone()/>
<h2 class="font-work-sans text-black dark:text-white text-xl">{name}</h2>
{location.map(|location| {
view! {
<div class="flex gap-2 items-center bg-slate-200/20 dark:bg-neutral-500/40 rounded-md p-1">
<LocationIcon size=16/>
<p class="font-work-sans text-black dark:text-white text-sm">
{location}
</p>
</div>
}
},)}
{location
.map(|location| {
view! {
<div class="flex gap-2 items-center bg-slate-200/20 dark:bg-neutral-500/40 rounded-md p-1">
<LocationIcon size=16/>
<p class="font-work-sans text-black dark:text-white text-sm">
{location}
</p>
</div>
}
})}

<p class="font-work-sans text-black dark:text-white">{description}</p>
</div>
</a>
<div class="ml-auto flex flex-row gap-2">
{twitter
.map(
|twitter| {
view! {
<a
href=format!("https://twitter.com/{}", twitter)
target="_blank"
>
<TwitterIcon size=30/>
</a>
}
},
)}
.map(|twitter| {
view! {
<a href=format!("https://twitter.com/{}", twitter) target="_blank">
<TwitterIcon size=30/>
</a>
}
})}
<a href=link target="_blank">
<GithubIcon size=30/>
</a>
Expand Down
29 changes: 26 additions & 3 deletions src/components/sponsors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ pub fn Sponsors() -> impl IntoView {
<SponsorCard
name="Heavy Duty Builders"
link="https://heavyduty.builders"
image_padding="p-2"
image=format!("{assets_folder}/sponsors/heavydutybuilders.png")
description="Queremos unir fuerzas con más constructores como nosotros en el ecosistema Blockchain, llámalo DAO si quieres, pero queremos decir mucho más."
/>
Expand All @@ -55,6 +56,7 @@ pub fn Sponsors() -> impl IntoView {
<SponsorCard
name="Tauri"
link="https://tauri.app"
image_padding="p-2"
image=format!("{assets_folder}/sponsors/tauri.png")
description="Cree una aplicación optimizada, segura e independiente del frontend para su implantación multiplataforma."
/>
Expand All @@ -65,6 +67,22 @@ pub fn Sponsors() -> impl IntoView {
description="Somos una comunidad de personas interesadas en tecnología y ciencias informáticas, lenguajes de programación, diseño web, infraestructura y muchas ganas de aprender entre todos."
/>
</div>
<div class="w-full flex flex-col md:flex-row items-center justify-center gap-x-8 gap-y-8">
<SponsorCard
name="Sysarmy"
link="https://x.com/sysarmy"
image=format!("{assets_folder}/sponsors/sysarmy.webp")
image_padding="p-4"
image_rounded=false
description="La comunidad de sistemas que nuclea a profesionales del área para favorecer el contacto y el intercambio de conocimiento de manera informal."
/>
<SponsorCard
name="Nerdearla"
link="https://nerdear.la"
image=format!("{assets_folder}/sponsors/nerdearla.svg")
description="Evento de tecnología, cinco días con más de 150 charlas y talleres de tecnología, divulgación científica y una gran variedad de temas."
/>
</div>
</div>
</section>
</div>
Expand All @@ -79,29 +97,34 @@ pub fn SponsorCard(
#[prop(into, optional, default=None)] image: Option<String>,
#[prop(into, default=None)] component: Option<View>,
#[prop(into, default = "black")] image_bg_color: &'static str,
#[prop(into, default = true)] image_rounded: bool,
#[prop(into, default = "")] image_padding: &'static str,
) -> impl IntoView {
let colors = HashMap::from([
("white", "bg-white dark:bg-white text-black dark:text-black"),
("black", "bg-black text-white dark:text-black"),
]);
let current_color = (*colors.get(&image_bg_color).unwrap()).to_string();

let image_rounded = if image_rounded { " rounded-full " } else { "" };

view! {
<div class="group flex flex-col gap-y-6 p-6 justify-between items-center max-w-screen-sm w-full">
<div class="mx-auto text-center">
{image
.map(|image| {
view! {
<div class=format!(
"mx-auto rounded-full h-[120px] w-[120px] {} mb-4",
"mx-auto rounded-full h-[120px] w-[120px] flex items-center justify-center {} mb-4 {}",
current_color,
image_padding,
)>
<Anchor link=link>
<img
alt=name
width="120"
height="120"
class="mb-4 rounded-full max-w-full max-h-full"
class=format!("{image_rounded} max-w-full max-h-full")
loading="lazy"
src=image
/>
Expand All @@ -122,7 +145,7 @@ pub fn SponsorCard(
})}
<h3 class="text-xl font-bold font-work-sans text-black dark:text-white mb-2">
<Anchor link=link>{name}</Anchor>
</h3> <p class="text-balance">{description}</p>
</h3> <p class="text-balance lg:max-w-lg">{description}</p>
</div>
</div>
}
Expand Down
52 changes: 34 additions & 18 deletions src/pages/contributors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,25 +155,41 @@ pub fn Contributors() -> impl IntoView {
<span class="font-work-sans font-light">"Nuestros "</span>
<span class="font-alfa-slab text-orange-500">"Colaboradores"</span>
</h2>
<p class="md:max-w-[800px] mb-2">Gracias al esfuerzo y dedicación de estos extraordinarios colaboradores open source, los servicios y páginas de nuestra comunidad se mantienen activos y en constante evolución. Su pasión por el código abierto y el desarrollo de Rust es el corazón que impulsa nuestro crecimiento.</p>
<p class="md:max-w-[800px] mb-2">Te invitamos a unirte a esta vibrante comunidad, explorar nuestros repositorios en <a href="https://github.com/RustLangES" class="underline" target="_blank">GitHub</a> y contribuir con tu talento.</p>
<p class="md:max-w-[800px]"><strong>Juntos</strong>, podemos seguir construyendo un ecosistema Rust más fuerte y accesible para todos.</p>
<p class="md:max-w-[800px] mb-2">
Gracias al esfuerzo y dedicación de estos extraordinarios colaboradores open source, los servicios y páginas de nuestra comunidad se mantienen activos y en constante evolución. Su pasión por el código abierto y el desarrollo de Rust es el corazón que impulsa nuestro crecimiento.
</p>
<p class="md:max-w-[800px] mb-2">
Te invitamos a unirte a esta vibrante comunidad, explorar nuestros repositorios en
<a href="https://github.com/RustLangES" class="underline" target="_blank">
GitHub
</a> y contribuir con tu talento.
</p>
<p class="md:max-w-[800px]">
<strong>Juntos</strong>
, podemos seguir construyendo un ecosistema Rust más fuerte y accesible para todos.
</p>
<div class="mt-6 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 2xl:grid-cols-5 gap-6">
<Await
future=|| fetch_contributors()
let:contributors
>
{contributors.iter().map(|item| view! {
<ContributorCard
name=item.login.clone()
description=item.bio.clone()
link=item.url.clone()
brand_src=item.avatar_url.clone()
twitter=item.twitter_username.clone()
location=item.location.clone()
contributions=item.contributions_collection.as_ref().map(|c| c.total).unwrap_or(1)
/>
}).collect::<Vec<_>>()}
<Await future=|| fetch_contributors() let:contributors>
{contributors
.iter()
.map(|item| {
view! {
<ContributorCard
name=item.login.clone()
description=item.bio.clone()
link=item.url.clone()
brand_src=item.avatar_url.clone()
twitter=item.twitter_username.clone()
location=item.location.clone()
contributions=item
.contributions_collection
.as_ref()
.map(|c| c.total)
.unwrap_or(1)
/>
}
})
.collect::<Vec<_>>()}
</Await>
</div>
</div>
Expand Down

0 comments on commit 9c64c2d

Please sign in to comment.