From 122c0c76dea11ee5586feb56ca9d54d755c4abe2 Mon Sep 17 00:00:00 2001 From: afn <47723802+afnzmn@users.noreply.github.com> Date: Wed, 12 Oct 2022 23:37:26 -0400 Subject: [PATCH] feat: repo links, better contrib hover appearance --- .../components/atoms/ContributorButton.svelte | 10 ++-- .../molecules/ContributorHost.svelte | 52 ++++++++++++++----- src/routes/credits/+page.svelte | 34 +----------- 3 files changed, 47 insertions(+), 49 deletions(-) diff --git a/src/lib/components/atoms/ContributorButton.svelte b/src/lib/components/atoms/ContributorButton.svelte index 17e64c3..58b3239 100644 --- a/src/lib/components/atoms/ContributorButton.svelte +++ b/src/lib/components/atoms/ContributorButton.svelte @@ -25,7 +25,7 @@ button { color: var(--white); - border-radius: 200px; + border-radius: 50%; overflow: hidden; border: 0; width:45px; @@ -33,14 +33,18 @@ max-height: 86px; max-width: 86px; cursor: pointer; - background-color: var(--grey-four); + background-color: transparent; transition: transform 0.4s var(--bezier-one); margin-bottom: 1rem; user-select: none; } a:hover { - background-color: var(--grey-one); + background-color: var(--grey-three); + } + + a:hover > h2 { + color: var(--red); } h2 { diff --git a/src/lib/components/molecules/ContributorHost.svelte b/src/lib/components/molecules/ContributorHost.svelte index 5097e03..3d6f6f1 100644 --- a/src/lib/components/molecules/ContributorHost.svelte +++ b/src/lib/components/molecules/ContributorHost.svelte @@ -5,31 +5,37 @@ import { fly } from 'svelte/transition'; import { quintOut } from 'svelte/easing'; - let contribs; + let contribs: Object; + let repo_link: string; export let repo: string; onMount (() => { - ContributorsStore.subscribe(async (data) => { - contribs = await data; - contribs = contribs[repo].contributors + ContributorsStore.subscribe(async (e) => { + let data = await e; + repo_link = 'https://github.com/' + data[repo].name; + contribs = data[repo].contributors }); }); let usersIwantToExplodeSoBadly = [ 'semantic-release-bot', ] + {#if contribs}