feat: credits page

This commit is contained in:
afn 2022-10-12 02:54:07 -04:00
parent 85dd6b8a0b
commit b0ab7c126b
8 changed files with 133 additions and 63 deletions

View File

@ -19,7 +19,7 @@ html{
body{ body{
margin: 0; margin: 0;
padding: 0; padding: 0;
line-height: 1.3; line-height: 1.4;
background-color: var(--bg-color); background-color: var(--bg-color);
} }
@ -36,7 +36,7 @@ html, body{
:root { :root {
--white: #fff; --white: #fff;
--red: #8bc3f4; --red: #8bc3f4;
--bg-color: #181C1E; --bg-color: #1A1C1E;
--grey-one: #252B31; --grey-one: #252B31;
--grey-two: #28313b; --grey-two: #28313b;
--grey-three: #3c4759c3; --grey-three: #3c4759c3;
@ -48,8 +48,7 @@ html, body{
} }
::selection{ ::selection{
color: var(--white); background: var(--grey-three);
background: var(--red);
} }
/*-----headings-----*/ /*-----headings-----*/
@ -58,6 +57,7 @@ h1{
color: var(--white); color: var(--white);
font-weight: 700; font-weight: 700;
line-height: 0.75em; line-height: 0.75em;
font-size: 1.75rem;
} }
h2{ h2{
@ -68,35 +68,42 @@ h2{
h3{ h3{
color: var(--white); color: var(--white);
font-weight: 600; font-weight: 500;
font-size: 1rem; font-size: 1rem;
} }
h4{ h4{
color:var(--grey-six); color:var(--white);
font-weight:500; font-weight:500;
font-size: 1rem; font-size: 1.25rem;
letter-spacing: 0.02rem;
} }
h5{ h5{
color:var(--white); color:var(--white);
font-weight: 300; font-weight: 300;
font-size: 1rem; font-size: 1rem;
letter-spacing: 0.02rem;
} }
/*-----scrollbar-----*/ h6{
::-webkit-scrollbar{ color:var(--grey-five);
width: 20px; font-weight: 300;
font-size: 1rem;
letter-spacing: 0.02rem;
}
::-webkit-scrollbar {
width: 11px;
background-color: transparent; background-color: transparent;
} }
::-webkit-scrollbar-thumb{ ::-webkit-scrollbar-thumb {
background-color: var(--grey-three); background-color: var(--grey-two);
border-radius: 20px;
border: 6px solid transparent;
background-clip: content-box; background-clip: content-box;
} }
::-webkit-scrollbar-thumb:hover{ ::-webkit-scrollbar-thumb:hover {
background-color: var(--grey-seven); background-color: var(--grey-three);
} }

View File

@ -1,13 +1,13 @@
<script lang="ts"> <script lang="ts">
export let username: String; export let username: string;
let href = `https://github.com/${username}` export let pfp: string;
let src = `https://github.com/${username}.png` export let url: string;
let alt = `${username}'s contributor profile picture` let alt = `${username}'s contributor profile picture`
</script> </script>
<a {href}> <a href={url} target="_blank">
<button> <button>
<img {src} {alt}><slot/> <img src={pfp} alt={alt}><slot/>
</button> </button>
<h2>{username}</h2> <h2>{username}</h2>
</a> </a>
@ -17,6 +17,9 @@
color: var(--white); color: var(--white);
text-decoration: none; text-decoration: none;
text-align: center; text-align: center;
padding: 0.5rem;
border-radius: 12px;
transition: all 0.3s var(--bezier-one);
} }
button { button {
@ -24,9 +27,8 @@
border-radius: 200px; border-radius: 200px;
overflow: hidden; overflow: hidden;
border: 0; border: 0;
/* padding: 5px 5px; */ width:45px;
width:86px; height:45px;
height:86px;
max-height: 86px; max-height: 86px;
max-width: 86px; max-width: 86px;
cursor: pointer; cursor: pointer;
@ -36,8 +38,12 @@
user-select: none; user-select: none;
} }
a:hover > button { a:hover {
transform: translateY(-5%); background-color: var(--grey-one);
}
h2 {
font-size: 1rem;
} }
img { img {

View File

@ -1,29 +1,57 @@
<script lang="ts"> <script lang="ts">
import ContributorsStore from "../../stores/ContributorsStore.js";
import ContributorButton from "../atoms/ContributorButton.svelte"; import ContributorButton from "../atoms/ContributorButton.svelte";
export let peoples: Array<String>; import { onMount } from "svelte";
import { fly } from 'svelte/transition';
import { quintOut } from 'svelte/easing';
let contribs;
export let repo: string;
import { onMount } from 'svelte'; onMount (() => {
ContributorsStore.subscribe(async (data) => {
onMount(async () => { contribs = await data;
const response = await fetch('https://releases.rvcd.win/contributors'); contribs = contribs[repo]
const json = await response.json(); });
console.log(json); });
});
let usersIwantToExplodeSoBadly = [
'semantic-release-bot',
]
</script> </script>
<div class="social-host"> {#if contribs}
{#each peoples as person} <div class="container" in:fly="{{ y: 10, easing: quintOut, duration: 700 }}">
<ContributorButton username={person}></ContributorButton> <h2>
{/each} ReVanced {repo === 'cli' ? 'CLI' : repo.charAt(0).toUpperCase() + repo.slice(1)}
</div> </h2>
<div class="contrib-host">
{#each contribs as contrib}
{#if !usersIwantToExplodeSoBadly.includes(contrib.login)}
<ContributorButton username={contrib.login} pfp={contrib.avatar_url} url={contrib.html_url} />
{/if}
{/each}
</div>
</div>
{/if}
<style> <style>
.social-host { h2 {
gap: 2rem; margin-bottom: 1rem;
width: 100; }
.contrib-host {
gap: 1.5rem;
display: grid; display: grid;
align-items: center; align-items: center;
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); grid-template-columns: repeat(auto-fill, minmax(80px, 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> </style>

View File

@ -0,0 +1,26 @@
import { readable } from "svelte/store";
const fetchContributors = async () => {
let cli,
patcher,
patches,
integrations,
manager;
const response = await fetch('https://releases.rvcd.win/contributors');
const json = await response.json();
({ 0: cli, 1: patcher, 2: patches, 3: integrations, 4: manager } = json.repositories);
cli = cli.contributors
patcher = patcher.contributors
patches = patches.contributors
integrations = integrations.contributors
manager = manager.contributors
return {cli, patcher, patches, integrations, manager};
};
const ContributorsStore = readable(fetchContributors());
export default ContributorsStore;

View File

@ -1,7 +1,5 @@
<script lang="ts"> <script lang="ts">
import NavHost from "$lib/components/molecules/NavHost.svelte"; import NavHost from "$lib/components/molecules/NavHost.svelte";
import Wave from '$lib/components/atoms/Wave.svelte';
import '../app.css'; import '../app.css';
</script> </script>
@ -20,4 +18,3 @@
<NavHost/> <NavHost/>
<slot /> <slot />
<Wave />

View File

@ -2,6 +2,7 @@
import HeroImage from '$lib/components/atoms/HeroImage.svelte'; import HeroImage from '$lib/components/atoms/HeroImage.svelte';
import Home from '$lib/components/organisms/Home.svelte'; import Home from '$lib/components/organisms/Home.svelte';
import SocialHost from '$lib/components/molecules/SocialHost.svelte'; import SocialHost from '$lib/components/molecules/SocialHost.svelte';
import Wave from '$lib/components/atoms/Wave.svelte';
</script> </script>
<div class="wrapper"> <div class="wrapper">
@ -11,6 +12,7 @@
</div> </div>
</div> </div>
<SocialHost /> <SocialHost />
<Wave />
<style> <style>
.wrappezoid { .wrappezoid {

View File

@ -1,13 +1,20 @@
<script> <script lang="ts">
import ContributorHost from '$lib/components/molecules/ContributorHost.svelte'; import ContributorHost from '$lib/components/molecules/ContributorHost.svelte';
let peoples = [
"Ushie",
"afnzmn",
"baiorett",
"PickleNik",
]
</script> </script>
<div class="wrapper"> <div class="wrapper contrib-grid">
<ContributorHost {peoples}></ContributorHost> <ContributorHost repo="cli"/>
</div> <ContributorHost repo="patcher"/>
<ContributorHost repo="patches"/>
<ContributorHost repo="integrations"/>
<ContributorHost repo="manager"/>
</div>
<style>
.contrib-grid {
display: flex;
flex-direction: column;
gap: 2rem;
}
</style>

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 13 KiB