mirror of
https://github.com/ReVanced/revanced-website.git
synced 2026-01-22 18:43:57 +00:00
refactor: Bump & run prettier (#210)
This commit is contained in:
5
src/app.d.ts
vendored
5
src/app.d.ts
vendored
@@ -10,8 +10,7 @@ declare namespace App {
|
||||
// interface Stuff {}
|
||||
}
|
||||
|
||||
|
||||
declare module "*&picture" {
|
||||
declare module '*&picture' {
|
||||
/**
|
||||
* actual types
|
||||
* taken from https://github.com/JonasKruckenberg/imagetools/issues/160#issuecomment-1009292026
|
||||
@@ -20,4 +19,4 @@ declare module "*&picture" {
|
||||
*/
|
||||
const out;
|
||||
export default out;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
|
||||
@@ -2,40 +2,40 @@ import { navigating, page } from '$app/stores';
|
||||
import { derived, type Readable } from 'svelte/store';
|
||||
|
||||
export interface RouterEvent {
|
||||
// URL of the current page or the page we are navigating to.
|
||||
target_url: URL;
|
||||
// Are we navigating?
|
||||
navigating: boolean;
|
||||
// URL of the current page or the page we are navigating to.
|
||||
target_url: URL;
|
||||
// Are we navigating?
|
||||
navigating: boolean;
|
||||
}
|
||||
|
||||
function makeStore(): Readable<RouterEvent> {
|
||||
// This stuff will run both client side and server side.
|
||||
// This stuff will run both client side and server side.
|
||||
|
||||
if (typeof location === 'undefined') {
|
||||
// `location` does not exist on the server.
|
||||
// Return a derived store based on `page` for SSR.
|
||||
// Server will never navigate so this is fine.
|
||||
return derived(page, $page => {
|
||||
return { navigating: false, target_url: $page.url };
|
||||
});
|
||||
} else {
|
||||
// On client.
|
||||
let current = new URL(location.href);
|
||||
if (typeof location === 'undefined') {
|
||||
// `location` does not exist on the server.
|
||||
// Return a derived store based on `page` for SSR.
|
||||
// Server will never navigate so this is fine.
|
||||
return derived(page, ($page) => {
|
||||
return { navigating: false, target_url: $page.url };
|
||||
});
|
||||
} else {
|
||||
// On client.
|
||||
let current = new URL(location.href);
|
||||
|
||||
// Return store that responds to navigation events.
|
||||
// The `navigating` store immediately "pushes" `null`.
|
||||
// This in turn causes this derived store to immediately "push" the current URL.
|
||||
return derived(navigating, $nav => {
|
||||
let navigating = false;
|
||||
// $nav is null when navigation finishes.
|
||||
if ($nav != null && $nav.to != null) {
|
||||
current = $nav.to.url;
|
||||
navigating = true;
|
||||
}
|
||||
// Return store that responds to navigation events.
|
||||
// The `navigating` store immediately "pushes" `null`.
|
||||
// This in turn causes this derived store to immediately "push" the current URL.
|
||||
return derived(navigating, ($nav) => {
|
||||
let navigating = false;
|
||||
// $nav is null when navigation finishes.
|
||||
if ($nav != null && $nav.to != null) {
|
||||
current = $nav.to.url;
|
||||
navigating = true;
|
||||
}
|
||||
|
||||
return { navigating, target_url: current };
|
||||
});
|
||||
}
|
||||
return { navigating, target_url: current };
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Do not subscribe to it outside of components!
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
|
||||
<li class:selected={href === '/' + $RouterEvents.target_url.pathname.split('/')[1]}>
|
||||
<a data-sveltekit-preload-data on:mouseenter={prefetch} {href} aria-label={label}>
|
||||
<!-- Check if href is equal to the first path -->
|
||||
<!-- Check if href is equal to the first path -->
|
||||
<span><slot /></span>
|
||||
</a>
|
||||
</li>
|
||||
</li>
|
||||
|
||||
<style>
|
||||
li {
|
||||
@@ -78,7 +78,7 @@
|
||||
li {
|
||||
border-radius: 100px;
|
||||
}
|
||||
a{
|
||||
a {
|
||||
padding: 0.75rem 1.25rem;
|
||||
justify-content: left;
|
||||
}
|
||||
|
||||
@@ -74,8 +74,12 @@
|
||||
<Navigation href="/" label="Home">Home</Navigation>
|
||||
<Navigation queryKey="manager" href="/download" label="Download">Download</Navigation>
|
||||
<Navigation queryKey="patches" href="/patches" label="Patches">Patches</Navigation>
|
||||
<Navigation queryKey="repositories" href="/contributors" label="Contributors">Contributors</Navigation>
|
||||
<Navigation queryKey={["donate", "team"]} href="/donate" label="Donate">Donate</Navigation>
|
||||
<Navigation queryKey="repositories" href="/contributors" label="Contributors">
|
||||
Contributors
|
||||
</Navigation>
|
||||
<Navigation queryKey={['donate', 'team']} href="/donate" label="Donate">
|
||||
Donate
|
||||
</Navigation>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="secondary-navigation">
|
||||
|
||||
@@ -46,7 +46,9 @@
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
cursor: pointer;
|
||||
transition: transform 0.4s var(--bezier-one), filter 0.4s var(--bezier-one);
|
||||
transition:
|
||||
transform 0.4s var(--bezier-one),
|
||||
filter 0.4s var(--bezier-one);
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
|
||||
@@ -129,7 +129,9 @@
|
||||
gap: 2px;
|
||||
z-index: 1001;
|
||||
padding: 32px;
|
||||
box-shadow: 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12),
|
||||
box-shadow:
|
||||
0px 4px 5px 0px rgba(0, 0, 0, 0.14),
|
||||
0px 1px 10px 0px rgba(0, 0, 0, 0.12),
|
||||
0px 2px 4px -1px rgba(0, 0, 0, 0.2);
|
||||
scrollbar-width: none;
|
||||
-ms-overflow-style: none;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<script lang="ts">
|
||||
// See: https://github.com/JonasKruckenberg/imagetools/blob/main/docs/directives.md#picture
|
||||
import type { Picture } from 'vite-imagetools';
|
||||
export let data: Picture;
|
||||
export let alt: string;
|
||||
// See: https://github.com/JonasKruckenberg/imagetools/blob/main/docs/directives.md#picture
|
||||
import type { Picture } from 'vite-imagetools';
|
||||
export let data: Picture;
|
||||
export let alt: string;
|
||||
</script>
|
||||
|
||||
<picture>
|
||||
{#each Object.entries(data.sources) as [format, images]}
|
||||
<source srcset={images.map(img => `${img.src} ${img.w}w`).join(", ")} type="image/{format}">
|
||||
{/each}
|
||||
<img {alt} src={data.fallback.src} />
|
||||
{#each Object.entries(data.sources) as [format, images]}
|
||||
<source srcset={images.map((img) => `${img.src} ${img.w}w`).join(', ')} type="image/{format}" />
|
||||
{/each}
|
||||
<img {alt} src={data.fallback.src} />
|
||||
</picture>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
function clear() {
|
||||
searchTerm = '';
|
||||
searchTermFiltered = '';
|
||||
|
||||
|
||||
const url = new URL($page.url);
|
||||
url.searchParams.delete('s');
|
||||
goto(url.pathname + url.search);
|
||||
|
||||
@@ -50,12 +50,12 @@
|
||||
bottom: 2rem;
|
||||
background-color: var(--white);
|
||||
transition: all 0.4s var(--bezier-one);
|
||||
box-shadow: var(--drop-shadow-one);
|
||||
box-shadow: var(--drop-shadow-one);
|
||||
}
|
||||
|
||||
.text {
|
||||
color: var(--grey-two);
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -31,4 +31,4 @@
|
||||
border-top-color: var(--accent-color);
|
||||
animation: spinner 0.6s linear infinite;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
<svg
|
||||
viewBox="0 0 1440 500"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
preserveAspectRatio="none"
|
||||
>
|
||||
<svg viewBox="0 0 1440 500" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none">
|
||||
<path class="wave" />
|
||||
</svg>
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -261,7 +261,9 @@
|
||||
text-align: left;
|
||||
border: none;
|
||||
overflow: hidden;
|
||||
transition: 0.3s border-radius var(--bezier-one), 0.3s background-color var(--bezier-one);
|
||||
transition:
|
||||
0.3s border-radius var(--bezier-one),
|
||||
0.3s background-color var(--bezier-one);
|
||||
|
||||
&:hover {
|
||||
background-color: var(--accent-low-opacity);
|
||||
|
||||
@@ -17,7 +17,9 @@
|
||||
user-select: none;
|
||||
cursor: pointer;
|
||||
|
||||
transition: transform 0.4s ease, filter 0.2s ease;
|
||||
transition:
|
||||
transform 0.4s ease,
|
||||
filter 0.2s ease;
|
||||
&:hover {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
@@ -67,7 +69,9 @@
|
||||
|
||||
img {
|
||||
height: 50%;
|
||||
animation: double-pulse-size 1.2s infinite, pulse-glow 1.2s infinite;
|
||||
animation:
|
||||
double-pulse-size 1.2s infinite,
|
||||
pulse-glow 1.2s infinite;
|
||||
will-change: transform, box-shadow;
|
||||
|
||||
@keyframes double-pulse-size {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<canvas id="qrcode"/>
|
||||
<canvas id="qrcode" />
|
||||
|
||||
<style>
|
||||
canvas {
|
||||
|
||||
@@ -125,6 +125,7 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.patch-info {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export function supportsWebP() {
|
||||
return document.createElement('canvas').toDataURL('image/webp').indexOf('data:image/webp') === 0;
|
||||
}
|
||||
return document.createElement('canvas').toDataURL('image/webp').indexOf('data:image/webp') === 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user