mirror of
https://github.com/ReVanced/revanced-website.git
synced 2026-01-30 06:11:04 +00:00
feat: credits page redesign
This commit is contained in:
@@ -15,28 +15,42 @@
|
||||
let usersIwantToExplodeSoBadly = ['semantic-release-bot'];
|
||||
</script>
|
||||
|
||||
<div class="container">
|
||||
<div class="title">
|
||||
<a href="https://github.com/{repo}" rel="noreferrer" target="_blank">
|
||||
<h2>{repo_name}</h2>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<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} />
|
||||
{/if}
|
||||
{/each}
|
||||
</div>
|
||||
<hr/>
|
||||
|
||||
<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} />
|
||||
{/if}
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-radius: 4px;
|
||||
transform: translateX(-6px);
|
||||
}
|
||||
h2 {
|
||||
margin-bottom: 1rem;
|
||||
text-align: center;
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
hr {
|
||||
margin-top: 0.5rem;
|
||||
margin-bottom: 1rem;
|
||||
border-top: 1px solid var(--grey-two);
|
||||
}
|
||||
a {
|
||||
transition: all 0.3s var(--bezier-one);
|
||||
display: block;
|
||||
display: flex;
|
||||
text-decoration: none;
|
||||
width: max-content;
|
||||
border-radius: 8px;
|
||||
@@ -46,7 +60,7 @@
|
||||
transition: all 0.3s var(--bezier-one);
|
||||
width: max-content;
|
||||
padding: 0rem 0.4rem;
|
||||
border-radius: 8px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
a:hover > h2 {
|
||||
@@ -56,12 +70,9 @@
|
||||
}
|
||||
|
||||
.contrib-host {
|
||||
gap: 1.5rem;
|
||||
gap: 0.5rem;
|
||||
display: grid;
|
||||
justify-items: center;
|
||||
grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
|
||||
background-color: var(--grey-six);
|
||||
padding: 1.5rem;
|
||||
border-radius: 16px;
|
||||
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import type { Contributor } from 'src/data/types';
|
||||
import type { Contributor, Repository } from 'src/data/types';
|
||||
|
||||
export let repositories: Contributor[];
|
||||
export let repositories: Repository[];
|
||||
</script>
|
||||
|
||||
<hr />
|
||||
@@ -57,6 +57,8 @@
|
||||
</footer>
|
||||
|
||||
<style>
|
||||
|
||||
|
||||
footer {
|
||||
margin: 4rem 0 5rem 0;
|
||||
margin-inline: auto;
|
||||
@@ -87,6 +89,10 @@
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.links-container {
|
||||
display: flex;
|
||||
gap: 5rem;
|
||||
@@ -97,12 +103,4 @@
|
||||
gap: 0.5rem;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
hr {
|
||||
display: block;
|
||||
height: 1px;
|
||||
border: 0;
|
||||
border-top: 1px solid var(--grey-three);
|
||||
margin-top: 1rem;
|
||||
}
|
||||
</style>
|
||||
|
||||
165
src/lib/components/molecules/PatchCell.svelte
Normal file
165
src/lib/components/molecules/PatchCell.svelte
Normal file
@@ -0,0 +1,165 @@
|
||||
<script lang="ts">
|
||||
import { slide, fade } from 'svelte/transition';
|
||||
import { quintOut } from 'svelte/easing';
|
||||
import type { CompatiblePackage, Patch } from 'src/data/types';
|
||||
|
||||
export let patch: Patch;
|
||||
export let current: boolean;
|
||||
const hasPatchOptions = !!patch.options.length;
|
||||
let expanded: boolean = false;
|
||||
</script>
|
||||
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<div
|
||||
class="patch-container"
|
||||
class:expanded={hasPatchOptions}
|
||||
class:rotate={expanded}
|
||||
on:click={() => (expanded = !expanded)}
|
||||
>
|
||||
<div class="things">
|
||||
<div class="title">
|
||||
<h1>
|
||||
{patch.name
|
||||
// im sorry
|
||||
.replace(/-/g, ' ')
|
||||
.replace(/(?:^|\s)\S/g, (x) => x.toUpperCase())
|
||||
.replace(/Microg/g, 'MicroG')
|
||||
.replace(/Hdr/g, 'HDR')
|
||||
.replace(/Sponsorblock/g, 'SponsorBlock')
|
||||
.replace(/Tiktok/g, 'TikTok')}
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
{#if hasPatchOptions}
|
||||
<img id="arrow" src="/icons/arrow.svg" alt="dropdown" />
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div class="info-container">
|
||||
{#each patch.compatiblePackages as pkg, i}
|
||||
{#if current === false}
|
||||
<h2>📦 {pkg.name}</h2>
|
||||
{/if}
|
||||
<!-- gets only the lastest supported version (cant get 'any' to work without duplicates help) -->
|
||||
{#if i < pkg.versions.length - 1}
|
||||
<h2>
|
||||
🎯 {pkg.versions.slice(-1)[0] || 'Any'}
|
||||
</h2>
|
||||
{/if}
|
||||
{/each}
|
||||
|
||||
<h2>🧩 {patch.version}</h2>
|
||||
|
||||
{#if hasPatchOptions}
|
||||
<h2>⚙️ Patch Options</h2>
|
||||
{/if}
|
||||
</div>
|
||||
<h4>{patch.description}</h4>
|
||||
|
||||
{#if expanded && hasPatchOptions}
|
||||
<span transition:fade|local={{ easing: quintOut, duration: 1000 }}>
|
||||
<div class="options" transition:slide|local={{ easing: quintOut, duration: 500 }}>
|
||||
{#each patch.options as option}
|
||||
<div class="option">
|
||||
<h3>{option.title}</h3>
|
||||
<h4>{option.description}</h4>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<style>
|
||||
h1 {
|
||||
font-weight: 600;
|
||||
margin-right: 0.5rem;
|
||||
font-size: 1.25rem;
|
||||
color: var(--accent-color-two);
|
||||
}
|
||||
|
||||
h2 {
|
||||
color: var(--accent-color);
|
||||
font-size: 0.8rem;
|
||||
font-weight: 500;
|
||||
border-radius: 8px;
|
||||
background-color: var(--grey-two);
|
||||
padding: 0.2rem 0.4rem;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.info-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.25rem;
|
||||
margin-bottom: 0.5rem;
|
||||
margin-left: -0.2rem;
|
||||
margin-top: 0.5rem;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
h3 {
|
||||
color: var(--accent-color);
|
||||
font-size: 0.9rem;
|
||||
margin-bottom: 0.1rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
h4 {
|
||||
color: var(--grey-five);
|
||||
font-size: 0.9rem;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.patch-container {
|
||||
transition: all 2s var(--bezier-one);
|
||||
background-color: var(--grey-six);
|
||||
padding: 1.5rem;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.patch-container:active {
|
||||
background-color: var(--grey-three);
|
||||
}
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.things {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
#arrow {
|
||||
height: 1.5rem;
|
||||
transition: all 0.2s var(--bezier-one);
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.rotate #arrow {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
.expanded {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.option {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.option + .option {
|
||||
border-top: 1px solid var(--grey-three);
|
||||
}
|
||||
|
||||
.options {
|
||||
border: 1px solid var(--grey-three);
|
||||
overflow: hidden;
|
||||
border-radius: 8px;
|
||||
margin-top: 1rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
</style>
|
||||
@@ -27,11 +27,7 @@
|
||||
}
|
||||
|
||||
hr {
|
||||
margin-top: 0.75rem;
|
||||
display: block;
|
||||
height: 1px;
|
||||
border: 0;
|
||||
border-top: 1px solid var(--grey-three);
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
.package-list {
|
||||
|
||||
Reference in New Issue
Block a user