refactor: prettier'ed

This commit is contained in:
afn
2022-10-20 00:55:37 -04:00
parent 9b1ee92d15
commit f5a94c6cd7
16 changed files with 336 additions and 344 deletions

View File

@ -7,12 +7,9 @@
</script>
<a {href}>
<div
class={type}
style="width: {width ? '100%' : 'max-width'}"
>
<img src="icons/{icon}.svg" alt="{icon}"/>
<slot/>
<div class={type} style="width: {width ? '100%' : 'max-width'}">
<img src="icons/{icon}.svg" alt={icon} />
<slot />
</div>
</a>
@ -22,7 +19,8 @@
border-radius: 16px;
}
div, .button-secondary {
div,
.button-secondary {
font-size: 1.1rem;
height: 60px;
color: var(--white);
@ -40,20 +38,20 @@
.button-primary {
background-color: var(--accent-color);
box-shadow: 0px 0px 32px 1px var(--accent-color-glow);
color: var(--grey-four)
color: var(--grey-four);
}
div:hover {
transform: translateY(-4%);
filter: brightness(90%)
filter: brightness(90%);
}
div,
div,
.button-secondary {
display: flex;
justify-content: center;
align-items: center;
gap: 0.5rem
gap: 0.5rem;
}
img {

View File

@ -2,12 +2,12 @@
export let name: string;
export let pfp: string;
export let url: string;
let alt = `${name}'s profile picture`
let alt = `${name}'s profile picture`;
</script>
<a href={url} target="_blank">
<button tabindex="-1">
<img src={pfp} {alt}>
<img src={pfp} {alt} />
</button>
<h2>{name}</h2>
</a>
@ -19,19 +19,19 @@
text-align: center;
padding: 0.5rem 0.1rem;
border-radius: 12px;
width:100px;
width: 100px;
transition: all 0.3s var(--bezier-one);
}
}
button {
color: var(--white);
border-radius: 50%;
overflow: hidden;
border: 0;
width:45px;
height:45px;
max-height: 86px;
max-width: 86px;
border: 0;
width: 45px;
height: 45px;
max-height: 86px;
max-width: 86px;
cursor: pointer;
background-color: transparent;
transition: transform 0.4s var(--bezier-one);
@ -39,7 +39,7 @@
user-select: none;
}
a:hover {
a:hover {
background-color: var(--grey-three);
}
@ -50,8 +50,8 @@
h2 {
font-size: 1rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
overflow: hidden;
text-overflow: ellipsis;
}
img {

View File

@ -2,10 +2,7 @@
</script>
<div class="hero-img">
<img
src="/manager.png"
alt="Screenshot of ReVanced Manager"
/>
<img src="/manager.png" alt="Screenshot of ReVanced Manager" />
</div>
<style>

View File

@ -3,11 +3,10 @@
</h1>
<style>
span {
color: var(--accent-color);
}
h1 {
color: var(--white);
font-weight: 700;

View File

@ -1,12 +1,12 @@
<script>
import { page } from '$app/stores';
export let href = '/';
$: current = (href === $page.url.pathname);
$: current = href === $page.url.pathname;
</script>
<a {href}>
<li class:selected="{current === true}">
<slot/>
<li class:selected={current === true}>
<slot />
</li>
</a>
@ -40,8 +40,8 @@
background-color: var(--grey-one);
}
li.selected {
li.selected {
background-color: var(--grey-three);
color: var(--accent-color)
color: var(--accent-color);
}
</style>

View File

@ -1,85 +1,79 @@
<script lang="ts">
import { onMount } from "svelte";
import { fly } from 'svelte/transition';
import { quintOut } from 'svelte/easing';
import { onMount } from 'svelte';
import { fly } from 'svelte/transition';
import { quintOut } from 'svelte/easing';
export let name: string;
export let desc: string;
export let ver: string;
// export let pkgName: string;
export let hasPatchOptions: boolean;
export let name: string;
export let desc: string;
export let ver: string;
// export let pkgName: string;
export let hasPatchOptions: boolean;
function handleClick() {
const el = document.getElementById('arrow');
if (!el) return;
el!.style.transform = "rotate(180deg)"
}
function handleClick() {
const el = document.getElementById('arrow');
if (!el) return;
el!.style.transform = 'rotate(180deg)';
}
</script>
<div
class="patch-container {hasPatchOptions ? 'expanded' : ''}"
on:click={hasPatchOptions ? handleClick : ''}
<div
class="patch-container {hasPatchOptions ? 'expanded' : ''}"
on:click={hasPatchOptions ? handleClick : null}
>
<div class="things">
<div class="title">
<h1>{name}</h1>
<h3>{ver}</h3>
</div>
<div class="things">
<div class="title">
<h1>{name}</h1>
<h3>{ver}</h3>
</div>
{#if hasPatchOptions}
<img id="arrow" src="/icons/arrow.svg" alt="dropdown">
{/if}
</div>
<!-- <h3>{pkgName}</h3> -->
<h4>{desc}</h4>
{#if hasPatchOptions}
<img id="arrow" src="/icons/arrow.svg" alt="dropdown" />
{/if}
</div>
<!-- <h3>{pkgName}</h3> -->
<h4>{desc}</h4>
</div>
<style>
h1 {
font-weight: 600;
margin-bottom: 0.5rem;
margin-right: 0.5rem;
font-size: 1.25rem;
}
h1 {
font-weight: 600;
margin-bottom: 0.5rem;
margin-right: 0.5rem;
font-size: 1.25rem;
}
h3 {
color: var(--grey-five);
font-size: 0.8rem;
margin-bottom: 0.1rem;
}
h3 {
color: var(--grey-five);
font-size: 0.8rem;
margin-bottom: 0.1rem;
}
h4 {
color: var(--grey-five);
font-size: 0.8rem;
font-weight: 400;
h4 {
color: var(--grey-five);
font-size: 0.8rem;
font-weight: 400;
}
}
.patch-container {
background-color: var(--grey-six);
padding: 1.5rem;
border-radius: 8px;
}
.patch-container {
background-color: var(--grey-six);
padding: 1.5rem;
border-radius: 8px;
}
.title {
display: flex;
align-items: center;
}
.title {
display: flex;
align-items: center;
.things {
display: flex;
justify-content: space-between;
}
}
.things {
display: flex;
justify-content: space-between;
}
img {
height: 1.5rem;
}
.expanded {
}
img {
height: 1.5rem;
}
.expanded {
}
</style>

View File

@ -5,7 +5,7 @@
<a {href}>
<div>
<img src='socials/{src}.svg' alt={src} />
<img src="socials/{src}.svg" alt={src} />
</div>
</a>

View File

@ -1,53 +1,53 @@
<svg
viewBox="0 0 1440 500"
xmlns="http://www.w3.org/2000/svg"
preserveAspectRatio="none"
{...$$props}
viewBox="0 0 1440 500"
xmlns="http://www.w3.org/2000/svg"
preserveAspectRatio="none"
{...$$props}
>
<path class="wave" />
<path class="wave" />
</svg>
<style>
svg {
position: fixed;
z-index: -2;
bottom: 0;
height: 35vh;
width: 100%;
}
svg {
position: fixed;
z-index: -2;
bottom: 0;
height: 35vh;
width: 100%;
}
.wave {
animation: wave-anim 40s;
animation-timing-function: linear;
animation-iteration-count: infinite;
fill: var(--accent-color);
}
.wave {
animation: wave-anim 40s;
animation-timing-function: linear;
animation-iteration-count: infinite;
fill: var(--accent-color);
}
@keyframes wave-anim {
0% {
d: path(
"M 0,500 C 0,500 0,250 0,250 C 176.53333333333336,300.1333333333333 353.0666666666667,350.2666666666667 496,325 C 638.9333333333333,299.7333333333333 748.2666666666667,199.06666666666666 900,174 C 1051.7333333333333,148.93333333333334 1245.8666666666668,199.46666666666667 1440,250 C 1440,250 1440,500 1440,500 Z"
);
}
25% {
d: path(
"M 0,500 C 0,500 0,250 0,250 C 154.13333333333333,219.20000000000002 308.26666666666665,188.40000000000003 449,209 C 589.7333333333333,229.59999999999997 717.0666666666668,301.59999999999997 880,317 C 1042.9333333333332,332.40000000000003 1241.4666666666667,291.20000000000005 1440,250 C 1440,250 1440,500 1440,500 Z"
);
}
50% {
d: path(
"M 0,500 C 0,500 0,250 0,250 C 132.8,242.93333333333334 265.6,235.86666666666667 414,246 C 562.4,256.1333333333333 726.3999999999999,283.46666666666664 900,287 C 1073.6000000000001,290.53333333333336 1256.8000000000002,270.26666666666665 1440,250 C 1440,250 1440,500 1440,500 Z"
);
}
75% {
d: path(
"M 0,500 C 0,500 0,250 0,250 C 151.33333333333331,206.66666666666669 302.66666666666663,163.33333333333334 472,176 C 641.3333333333334,188.66666666666666 828.6666666666667,257.3333333333333 993,279 C 1157.3333333333333,300.6666666666667 1298.6666666666665,275.33333333333337 1440,250 C 1440,250 1440,500 1440,500 Z"
);
}
100% {
d: path(
"M 0,500 C 0,500 0,250 0,250 C 176.53333333333336,300.1333333333333 353.0666666666667,350.2666666666667 496,325 C 638.9333333333333,299.7333333333333 748.2666666666667,199.06666666666666 900,174 C 1051.7333333333333,148.93333333333334 1245.8666666666668,199.46666666666667 1440,250 C 1440,250 1440,500 1440,500 Z"
);
}
}
</style>
@keyframes wave-anim {
0% {
d: path(
'M 0,500 C 0,500 0,250 0,250 C 176.53333333333336,300.1333333333333 353.0666666666667,350.2666666666667 496,325 C 638.9333333333333,299.7333333333333 748.2666666666667,199.06666666666666 900,174 C 1051.7333333333333,148.93333333333334 1245.8666666666668,199.46666666666667 1440,250 C 1440,250 1440,500 1440,500 Z'
);
}
25% {
d: path(
'M 0,500 C 0,500 0,250 0,250 C 154.13333333333333,219.20000000000002 308.26666666666665,188.40000000000003 449,209 C 589.7333333333333,229.59999999999997 717.0666666666668,301.59999999999997 880,317 C 1042.9333333333332,332.40000000000003 1241.4666666666667,291.20000000000005 1440,250 C 1440,250 1440,500 1440,500 Z'
);
}
50% {
d: path(
'M 0,500 C 0,500 0,250 0,250 C 132.8,242.93333333333334 265.6,235.86666666666667 414,246 C 562.4,256.1333333333333 726.3999999999999,283.46666666666664 900,287 C 1073.6000000000001,290.53333333333336 1256.8000000000002,270.26666666666665 1440,250 C 1440,250 1440,500 1440,500 Z'
);
}
75% {
d: path(
'M 0,500 C 0,500 0,250 0,250 C 151.33333333333331,206.66666666666669 302.66666666666663,163.33333333333334 472,176 C 641.3333333333334,188.66666666666666 828.6666666666667,257.3333333333333 993,279 C 1157.3333333333333,300.6666666666667 1298.6666666666665,275.33333333333337 1440,250 C 1440,250 1440,500 1440,500 Z'
);
}
100% {
d: path(
'M 0,500 C 0,500 0,250 0,250 C 176.53333333333336,300.1333333333333 353.0666666666667,350.2666666666667 496,325 C 638.9333333333333,299.7333333333333 748.2666666666667,199.06666666666666 900,174 C 1051.7333333333333,148.93333333333334 1245.8666666666668,199.46666666666667 1440,250 C 1440,250 1440,500 1440,500 Z'
);
}
}
</style>

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -1,80 +1,72 @@
<script lang="ts">
import ContributorButton from "../atoms/ContributorPerson.svelte";
import { fly } from 'svelte/transition';
import { quintOut } from 'svelte/easing';
export let contribs;
export let repo: string;
let repo_name = repo.replace(/-/g, ' ')
.replace(/revanced\/revanced/g, 'ReVanced')
.replace(/cli/g, 'CLI')
.replace(/api/g, 'API')
.replace(/(?:^|\s)\S/g, x => x.toUpperCase())
import ContributorButton from '../atoms/ContributorPerson.svelte';
let usersIwantToExplodeSoBadly = [
'semantic-release-bot',
]
export let contribs;
export let repo: string;
let repo_name = repo
.replace(/-/g, ' ')
.replace(/revanced\/revanced/g, 'ReVanced')
.replace(/cli/g, 'CLI')
.replace(/api/g, 'API')
.replace(/(?:^|\s)\S/g, (x) => x.toUpperCase());
let usersIwantToExplodeSoBadly = ['semantic-release-bot'];
</script>
{#if contribs}
<div
class="container"
in:fly="{{ y: 10, easing: quintOut, duration: 700 }}"
>
<a href='https://github.com/{repo}' target="_blank">
<h2>{repo_name}</h2>
</a>
<div class="container">
<a href="https://github.com/{repo}" target="_blank">
<h2>{repo_name}</h2>
</a>
<div class="contrib-host">
{#each contribs as contrib}
{#if !usersIwantToExplodeSoBadly.includes(contrib.login)}
<ContributorButton
<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>
</div>
{/if}
{/each}
</div>
</div>
{/if}
<style>
h2 {
margin-bottom: 1rem;
}
h2 {
margin-bottom: 1rem;
}
a {
transition: all 0.3s var(--bezier-one);
display:block;
text-decoration: none;
width: max-content;
border-radius: 8px;
}
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 > 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(--accent-color);
}
a:hover > h2 {
width: max-content;
background-color: var(--grey-three);
color: var(--accent-color);
}
.contrib-host {
gap: 1.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;
}
</style>
.contrib-host {
gap: 1.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;
}
</style>

View File

@ -1,10 +1,8 @@
<script lang="ts">
import Navigation from '../atoms/NavButton.svelte';
import { fly } from 'svelte/transition';
import {quintOut} from 'svelte/easing';
import { onMount } from 'svelte';
import { page } from '$app/stores';
let menuBtn: HTMLElement;
let menuOpen = false;
onMount(() => {
@ -25,7 +23,7 @@
<div class="logo">
<img src="/logo.svg" class="logo-image" alt="ReVanced Logo" />
{#if $page.url.pathname !== '/'}
<h1 ><span>Re</span>Vanced</h1>
<h1><span>Re</span>Vanced</h1>
{/if}
</div>
</a>
@ -42,9 +40,8 @@
</nav>
<style>
nav {
padding: 0% 1rem 0% 2rem;
padding: 0 1rem 0 2rem;
top: 0;
position: fixed;
display: flex;
@ -55,16 +52,15 @@
z-index: 999;
background-color: var(--grey-six);
backdrop-filter: blur(15px);
-webkit-backdrop-filter: blur(15px);
-webkit-backdrop-filter: blur(15px);
}
ul {
display: flex;
gap:0.75rem;
gap: 0.75rem;
align-items: center;
}
a {
text-decoration: none;
}
@ -76,7 +72,7 @@
}
.logo {
display:flex;
display: flex;
align-items: center;
}

View File

@ -12,14 +12,14 @@
<style>
.social-host {
width: min(87%, 100rem);
/* same as margin-inline: auto on .wrapper */
padding: 0 max(6.5%, calc(50vw - 50rem));
/* same as margin-inline: auto on .wrapper */
padding: 0 max(6.5%, calc(50vw - 50rem));
align-items: center;
user-select: none;
position: absolute;
display: flex;
bottom: 2rem;
gap: 1rem;
gap: 1rem;
left: 0;
}
@ -27,7 +27,7 @@
.social-host {
left: 0;
width: 100%;
display: flex;
display: flex;
justify-content: center;
}
}

View File

@ -13,7 +13,7 @@
<div class="hero-buttons">
<Button icon="download" kind="primary" href="download" width="100%">Download</Button>
<Button icon="docs" href="docs" width='true' >Read The Docs</Button>
<Button icon="docs" href="docs" width="true">Read The Docs</Button>
</div>
</div>
</section>
@ -27,8 +27,8 @@
.hero {
padding-bottom: 10rem;
}
.hero-text {
.hero-text {
align-items: center;
}
@ -51,11 +51,9 @@
br {
content: ' ';
}
.hero-buttons {
flex-direction: column;
}
}
</style>