mirror of
https://github.com/revanced/revanced-website.git
synced 2025-06-12 21:27:42 +02:00
feat: repo links, better contrib hover appearance
This commit is contained in:
@ -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 {
|
||||
|
@ -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',
|
||||
]
|
||||
|
||||
</script>
|
||||
|
||||
{#if contribs}
|
||||
<div class="container" in:fly="{{ y: 10, easing: quintOut, duration: 700 }}">
|
||||
<h2>
|
||||
ReVanced {repo === 'cli' ? 'CLI' : repo.charAt(0).toUpperCase() + repo.slice(1)}
|
||||
</h2>
|
||||
|
||||
<a href={repo_link} target="_blank">
|
||||
<h2>ReVanced {repo === 'cli' ? 'CLI' : repo.charAt(0).toUpperCase() + repo.slice(1)}</h2>
|
||||
</a>
|
||||
<div class="contrib-host">
|
||||
{#each contribs as contrib}
|
||||
{#if !usersIwantToExplodeSoBadly.includes(contrib.login)}
|
||||
<ContributorButton name={contrib.login} pfp={contrib.avatar_url} url={contrib.html_url} />
|
||||
<ContributorButton
|
||||
name={contrib.login}
|
||||
pfp={contrib.avatar_url}
|
||||
url={contrib.html_url}
|
||||
/>
|
||||
{/if}
|
||||
{/each}
|
||||
</div>
|
||||
@ -37,21 +43,39 @@
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
|
||||
h2 {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
a {
|
||||
transition: all 0.3s var(--bezier-one);
|
||||
display:block;
|
||||
text-decoration: none;
|
||||
width: max-content;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
a > h2 {
|
||||
transition: all 0.3s var(--bezier-one);
|
||||
width: max-content;
|
||||
padding: 0rem 0.4rem;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
a:hover > h2 {
|
||||
width: max-content;
|
||||
background-color: var(--grey-three);
|
||||
color: var(--red);
|
||||
}
|
||||
|
||||
.contrib-host {
|
||||
gap: 1.5rem;
|
||||
display: grid;
|
||||
align-items: center;
|
||||
justify-items: center;
|
||||
grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
|
||||
background-color: var(--grey-six);
|
||||
padding: 1.5rem;
|
||||
border-radius: 28px;
|
||||
}
|
||||
|
||||
/* temporary, put into main wrapper when homepage is more fleshed out */
|
||||
.container {
|
||||
margin-bottom: 3rem;
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user