refactor: Bump & run prettier (#210)

This commit is contained in:
Kendell R
2023-12-31 12:22:11 -08:00
committed by GitHub
parent ab4d785f3b
commit 05ff2c1fc3
23 changed files with 114 additions and 6023 deletions

5
src/app.d.ts vendored
View File

@@ -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;
}
}

View File

@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />

View File

@@ -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!

View File

@@ -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;
}

View File

@@ -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">

View File

@@ -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;
}

View File

@@ -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;

View File

@@ -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>

View File

@@ -11,7 +11,7 @@
function clear() {
searchTerm = '';
searchTermFiltered = '';
const url = new URL($page.url);
url.searchParams.delete('s');
goto(url.pathname + url.search);

View File

@@ -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>

View File

@@ -31,4 +31,4 @@
border-top-color: var(--accent-color);
animation: spinner 0.6s linear infinite;
}
</style>
</style>

View File

@@ -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

View File

@@ -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);

View File

@@ -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 {

View File

@@ -14,7 +14,7 @@
});
</script>
<canvas id="qrcode"/>
<canvas id="qrcode" />
<style>
canvas {

View File

@@ -125,6 +125,7 @@
display: flex;
align-items: center;
}
.patch-info {
display: flex;
justify-content: center;

View File

@@ -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;
}