Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed bun.lockb
Binary file not shown.
12 changes: 11 additions & 1 deletion input.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
}

.group:hover > span.badge-container {
@apply first:min-h-6 items-center justify-center transition-all transform duration-1000;
@apply items-center justify-center transition-all transform duration-1000;
}

.group:hover > span.badge-container:first-child {
@apply min-h-6;
}

.group:hover > span.badge-container > span.badge-content {
Expand Down Expand Up @@ -58,4 +62,10 @@

.nav-item:hover:after {
@apply scale-x-100;
}

.bg-chiwa {
background-image: url("https://pngimg.com/uploads/clown/clown_PNG1.png");
background-repeat: no-repeat;
background-size: cover;
}
11 changes: 0 additions & 11 deletions netlify.toml

This file was deleted.

1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 27 additions & 3 deletions src/components/cards/contributor_card.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::components::icons::{GithubIcon, LocationIcon, TwitterIcon};
use leptos::{component, prelude::*, view, IntoView};
use leptos::{component, leptos_dom::helpers::location as location_dom, prelude::*, view, IntoView};

#[component]
pub fn ContributorCard(
Expand All @@ -11,12 +11,36 @@ pub fn ContributorCard(
#[prop(into)] brand_src: String,
#[prop(into)] contributions: u64,
) -> impl IntoView {
let (easter_egg, set_easter_egg) = signal(false);

Effect::new(move |_| {
let location_dom = location_dom();
set_easter_egg.set(
location_dom
.search()
.map(|s| s.contains("easter_egg"))
.unwrap_or(false),
);
});

let name_for_class = name.clone();
let name_for_contrib = name.clone();
let contributions = Memo::new(move |_| {
if name_for_contrib == "gg0074x" && easter_egg.get() {
contributions + 300
} else {
contributions
}
});
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">
<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"
class=("bg-chiwa", move || name_for_class == "gg0074x" && easter_egg.get())
>
<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}
{move || contributions.get()}
</span>
</span>
<div class="flex flex-col gap-y-2">
Expand Down
Loading
Loading