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

View File

@ -2,12 +2,12 @@
export let name: string; export let name: string;
export let pfp: string; export let pfp: string;
export let url: string; export let url: string;
let alt = `${name}'s profile picture` let alt = `${name}'s profile picture`;
</script> </script>
<a href={url} target="_blank"> <a href={url} target="_blank">
<button tabindex="-1"> <button tabindex="-1">
<img src={pfp} {alt}> <img src={pfp} {alt} />
</button> </button>
<h2>{name}</h2> <h2>{name}</h2>
</a> </a>
@ -19,7 +19,7 @@
text-align: center; text-align: center;
padding: 0.5rem 0.1rem; padding: 0.5rem 0.1rem;
border-radius: 12px; border-radius: 12px;
width:100px; width: 100px;
transition: all 0.3s var(--bezier-one); transition: all 0.3s var(--bezier-one);
} }
@ -28,8 +28,8 @@
border-radius: 50%; border-radius: 50%;
overflow: hidden; overflow: hidden;
border: 0; border: 0;
width:45px; width: 45px;
height:45px; height: 45px;
max-height: 86px; max-height: 86px;
max-width: 86px; max-width: 86px;
cursor: pointer; cursor: pointer;

View File

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

View File

@ -3,7 +3,6 @@
</h1> </h1>
<style> <style>
span { span {
color: var(--accent-color); color: var(--accent-color);
} }

View File

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

View File

@ -1,5 +1,5 @@
<script lang="ts"> <script lang="ts">
import { onMount } from "svelte"; import { onMount } from 'svelte';
import { fly } from 'svelte/transition'; import { fly } from 'svelte/transition';
import { quintOut } from 'svelte/easing'; import { quintOut } from 'svelte/easing';
@ -12,14 +12,13 @@
function handleClick() { function handleClick() {
const el = document.getElementById('arrow'); const el = document.getElementById('arrow');
if (!el) return; if (!el) return;
el!.style.transform = "rotate(180deg)" el!.style.transform = 'rotate(180deg)';
} }
</script> </script>
<div <div
class="patch-container {hasPatchOptions ? 'expanded' : ''}" class="patch-container {hasPatchOptions ? 'expanded' : ''}"
on:click={hasPatchOptions ? handleClick : ''} on:click={hasPatchOptions ? handleClick : null}
> >
<div class="things"> <div class="things">
<div class="title"> <div class="title">
@ -28,7 +27,7 @@
</div> </div>
{#if hasPatchOptions} {#if hasPatchOptions}
<img id="arrow" src="/icons/arrow.svg" alt="dropdown"> <img id="arrow" src="/icons/arrow.svg" alt="dropdown" />
{/if} {/if}
</div> </div>
<!-- <h3>{pkgName}</h3> --> <!-- <h3>{pkgName}</h3> -->
@ -53,7 +52,6 @@
color: var(--grey-five); color: var(--grey-five);
font-size: 0.8rem; font-size: 0.8rem;
font-weight: 400; font-weight: 400;
} }
.patch-container { .patch-container {
@ -65,7 +63,6 @@
.title { .title {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.things { .things {
@ -78,8 +75,5 @@
} }
.expanded { .expanded {
} }
</style> </style>

View File

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

View File

@ -26,27 +26,27 @@
@keyframes wave-anim { @keyframes wave-anim {
0% { 0% {
d: path( 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" '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% { 25% {
d: path( 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" '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% { 50% {
d: path( 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" '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% { 75% {
d: path( 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" '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% { 100% {
d: path( 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" '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'
); );
} }
} }

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -1,29 +1,22 @@
<script lang="ts"> <script lang="ts">
import ContributorButton from "../atoms/ContributorPerson.svelte"; import ContributorButton from '../atoms/ContributorPerson.svelte';
import { fly } from 'svelte/transition';
import { quintOut } from 'svelte/easing';
export let contribs; export let contribs;
export let repo: string; export let repo: string;
let repo_name = repo.replace(/-/g, ' ') let repo_name = repo
.replace(/-/g, ' ')
.replace(/revanced\/revanced/g, 'ReVanced') .replace(/revanced\/revanced/g, 'ReVanced')
.replace(/cli/g, 'CLI') .replace(/cli/g, 'CLI')
.replace(/api/g, 'API') .replace(/api/g, 'API')
.replace(/(?:^|\s)\S/g, x => x.toUpperCase()) .replace(/(?:^|\s)\S/g, (x) => x.toUpperCase());
let usersIwantToExplodeSoBadly = [
'semantic-release-bot',
]
let usersIwantToExplodeSoBadly = ['semantic-release-bot'];
</script> </script>
{#if contribs} {#if contribs}
<div <div class="container">
class="container" <a href="https://github.com/{repo}" target="_blank">
in:fly="{{ y: 10, easing: quintOut, duration: 700 }}"
>
<a href='https://github.com/{repo}' target="_blank">
<h2>{repo_name}</h2> <h2>{repo_name}</h2>
</a> </a>
@ -38,7 +31,6 @@
{/if} {/if}
{/each} {/each}
</div> </div>
</div> </div>
{/if} {/if}
@ -49,7 +41,7 @@
a { a {
transition: all 0.3s var(--bezier-one); transition: all 0.3s var(--bezier-one);
display:block; display: block;
text-decoration: none; text-decoration: none;
width: max-content; width: max-content;
border-radius: 8px; border-radius: 8px;

View File

@ -1,7 +1,5 @@
<script lang="ts"> <script lang="ts">
import Navigation from '../atoms/NavButton.svelte'; import Navigation from '../atoms/NavButton.svelte';
import { fly } from 'svelte/transition';
import {quintOut} from 'svelte/easing';
import { onMount } from 'svelte'; import { onMount } from 'svelte';
import { page } from '$app/stores'; import { page } from '$app/stores';
@ -25,7 +23,7 @@
<div class="logo"> <div class="logo">
<img src="/logo.svg" class="logo-image" alt="ReVanced Logo" /> <img src="/logo.svg" class="logo-image" alt="ReVanced Logo" />
{#if $page.url.pathname !== '/'} {#if $page.url.pathname !== '/'}
<h1 ><span>Re</span>Vanced</h1> <h1><span>Re</span>Vanced</h1>
{/if} {/if}
</div> </div>
</a> </a>
@ -42,9 +40,8 @@
</nav> </nav>
<style> <style>
nav { nav {
padding: 0% 1rem 0% 2rem; padding: 0 1rem 0 2rem;
top: 0; top: 0;
position: fixed; position: fixed;
display: flex; display: flex;
@ -60,11 +57,10 @@
ul { ul {
display: flex; display: flex;
gap:0.75rem; gap: 0.75rem;
align-items: center; align-items: center;
} }
a { a {
text-decoration: none; text-decoration: none;
} }
@ -76,7 +72,7 @@
} }
.logo { .logo {
display:flex; display: flex;
align-items: center; align-items: center;
} }

View File

@ -13,7 +13,7 @@
<div class="hero-buttons"> <div class="hero-buttons">
<Button icon="download" kind="primary" href="download" width="100%">Download</Button> <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>
</div> </div>
</section> </section>
@ -55,7 +55,5 @@
.hero-buttons { .hero-buttons {
flex-direction: column; flex-direction: column;
} }
} }
</style> </style>

View File

@ -30,7 +30,7 @@
} }
@media (max-width: 1700px) { @media (max-width: 1700px) {
.wrappezoid { .wrappezoid {
justify-content: space-between;; justify-content: space-between;
} }
} }
@media (max-width: 1052px) { @media (max-width: 1052px) {

View File

@ -1,11 +1,13 @@
<script lang="ts"> <script lang="ts">
import ContributorHost from '$lib/components/molecules/ContributorHost.svelte'; import ContributorHost from '$lib/components/molecules/ContributorHost.svelte';
import ContributorsStore from '../../lib/stores/ContributorsStore.js'; import ContributorsStore from '../../lib/stores/ContributorsStore.js';
import { onMount } from "svelte"; import { onMount } from 'svelte';
import { fly } from 'svelte/transition';
import { quintOut } from 'svelte/easing';
let data; let data;
onMount (() => { onMount(() => {
ContributorsStore.subscribe(async (e) => { ContributorsStore.subscribe(async (e) => {
data = await e; data = await e;
}); });
@ -15,7 +17,9 @@
<div class="wrapper contrib-grid"> <div class="wrapper contrib-grid">
{#if data} {#if data}
{#each data.repositories as { contributors, name }} {#each data.repositories as { contributors, name }}
<ContributorHost contribs={contributors} repo={name}/> <div in:fly={{ y: 10, easing: quintOut, duration: 750 }}>
<ContributorHost contribs={contributors} repo={name} />
</div>
{/each} {/each}
{/if} {/if}
</div> </div>

View File

@ -1,10 +1,10 @@
<script> <script>
import Button from "$lib/components/atoms/Button.svelte"; import Button from '$lib/components/atoms/Button.svelte';
import { fly } from 'svelte/transition'; import { fly } from 'svelte/transition';
import { quintOut } from 'svelte/easing'; import { quintOut } from 'svelte/easing';
</script> </script>
<section in:fly="{{ y: 10, easing: quintOut, duration: 700 }}"> <section in:fly={{ y: 10, easing: quintOut, duration: 700 }}>
<div class="menu"> <div class="menu">
<div class="doc-section-selected"> <div class="doc-section-selected">
<h3>Prerequisites</h3> <h3>Prerequisites</h3>
@ -15,7 +15,7 @@
</div> </div>
<div class="content"> <div class="content">
<h6>docs/prerequisites</h6> <h6>docs/prerequisites</h6>
<br/> <br />
<h4>Requirements</h4> <h4>Requirements</h4>
<h5> <h5>
<ul> <ul>
@ -23,23 +23,39 @@
<li>x86/x86_64 host architecture</li> <li>x86/x86_64 host architecture</li>
<li>Zulu JDK 17</li> <li>Zulu JDK 17</li>
<li>Latest Android SDK if you plan to build the integrations from the source</li> <li>Latest Android SDK if you plan to build the integrations from the source</li>
<li>The APK file you want to patch (e.g. YouTube v17.36.37 or YouTube Music v5.23.50). If you want to mount patched applications as root, make sure the same version is installed on your device.</li> <li>
<li>You can continue by either building everything from source or downloading the prebuilt packages.</li> The APK file you want to patch (e.g. YouTube v17.36.37 or YouTube Music v5.23.50). If you
want to mount patched applications as root, make sure the same version is installed on
your device.
</li>
<li>
You can continue by either building everything from source or downloading the prebuilt
packages.
</li>
</ul> </ul>
<br/> <br />
You can continue by either <a href="https://github.com/revanced/revanced-documentation/wiki/Building-from-source">building everything from source</a> or <a href="https://github.com/revanced/revanced-documentation/wiki/Downloading-prebuilt-packages">downloading the prebuilt packages</a>. You can continue by either
<a href="https://github.com/revanced/revanced-documentation/wiki/Building-from-source"
>building everything from source</a
>
or
<a
href="https://github.com/revanced/revanced-documentation/wiki/Downloading-prebuilt-packages"
>downloading the prebuilt packages</a
>.
</h5> </h5>
<br/> <br />
<br/> <br />
<div class="button-wrapper"> <div class="button-wrapper">
<Button kind="secondary" fontsize="1rem">Using ReVanced CLI and installing ReVanced -></Button> <Button kind="secondary">Using ReVanced CLI and installing ReVanced -></Button
>
</div> </div>
</div> </div>
</section> </section>
<style> <style>
section { section {
display:grid; display: grid;
grid-template-columns: 300px 3fr; grid-template-columns: 300px 3fr;
} }
@ -54,12 +70,13 @@
a:hover { a:hover {
background-color: var(--accent-color); background-color: var(--accent-color);
border-radius: 6px; border-radius: 6px;
color: var(--grey-four) color: var(--grey-four);
} }
.menu, .content { .menu,
.content {
height: 100vh; height: 100vh;
width:100%; width: 100%;
} }
.menu { .menu {
@ -90,7 +107,7 @@
} }
.button-wrapper { .button-wrapper {
width:30rem; width: 30rem;
} }
ul { ul {

View File

@ -25,12 +25,8 @@
}); });
}; };
}) })
}); });
</script> </script>
<section> <section>
@ -53,6 +49,7 @@
</div> </div>
{/if} {/if}
</div> </div>
{#if patches} {#if patches}
<div class="patches-list patches-container"> <div class="patches-list patches-container">
{#each patches as patch, i} {#each patches as patch, i}