chore: format

This commit is contained in:
Tomáš Mládek 2025-09-26 22:19:02 +02:00
parent e6009c619c
commit 9a46fd53c6
15 changed files with 244 additions and 230 deletions

View file

@ -9,7 +9,7 @@ steps:
- /var/run/docker.sock:/var/run/docker.sock
environment:
FORCE_COLOR: 1
EARTHLY_EXEC_CMD: "/bin/sh"
EARTHLY_EXEC_CMD: '/bin/sh'
EARTHLY_CONFIGURATION:
from_secret: EARTHLY_CONFIGURATION
SSH_CONFIG:
@ -25,4 +25,4 @@ steps:
- earthly bootstrap
- earthly --secret SSH_CONFIG --secret SSH_UPLOAD_KEY --secret SSH_KNOWN_HOSTS --secret SSH_TARGET --push +deploy
when:
branch: ["main"]
branch: ['main']

View file

@ -1,3 +1,4 @@
html, body {
html,
body {
margin: 0;
}

View file

@ -1,7 +1,7 @@
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
export default {
// Consult https://svelte.dev/docs#compile-time-svelte-preprocess
// for more information about preprocessors
preprocess: vitePreprocess(),
}
preprocess: vitePreprocess()
};

View file

@ -1,7 +1,7 @@
import { defineConfig } from 'vite'
import { svelte } from '@sveltejs/vite-plugin-svelte'
import { defineConfig } from 'vite';
import { svelte } from '@sveltejs/vite-plugin-svelte';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [svelte()],
})
plugins: [svelte()]
});

View file

@ -1,4 +1,5 @@
body, html {
body,
html {
height: 100%;
margin: 0;
display: flex;
@ -8,7 +9,8 @@ body, html {
color: white;
background-color: black;
font-family: 'Atkinson Hyperlegible', 'B612', 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
font-family:
'Atkinson Hyperlegible', 'B612', 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
font-size: 20px;
}
@ -20,12 +22,15 @@ a {
color: white;
}
h1, h2, h3, h4 {
h1,
h2,
h3,
h4 {
margin-top: 0;
}
button, .button {
button,
.button {
display: inline-flex;
align-items: center;
gap: 0.25em;
@ -44,14 +49,15 @@ button, .button {
}
}
input[type="number"], input[type="search"], input[type="text"] {
input[type='number'],
input[type='search'],
input[type='text'] {
background: transparent;
color: white;
border: 1px solid white;
border-radius: 4px;
padding: 0.2em;
&:focus {
outline: solid rgba(255, 255, 255, 0.66);
}

View file

@ -115,9 +115,9 @@
</div>
<div class="grid">
{#each [...Array(verticalCount).keys()] as x}
<div class="row" data-idx="{x}">
<div class="row" data-idx={x}>
{#each [...Array(horizontalCount).keys()] as y}
<div class="block" data-idx="{y}"></div>
<div class="block" data-idx={y}></div>
{/each}
</div>
{/each}

View file

@ -28,7 +28,7 @@
.separator {
position: relative;
bottom: .15em;
margin: 0 .05em;
bottom: 0.15em;
margin: 0 0.05em;
}
</style>

View file

@ -5,7 +5,7 @@
let screenResolution = $state('... x ...');
let windowResolution = $state('');
let dpr = $state("1");
let dpr = $state('1');
function updateResolution() {
const realWidth = Math.round(screen.width) * window.devicePixelRatio;
@ -35,8 +35,8 @@
<div class="value">{windowResolution}</div>
</div>
{/if}
{#if dpr !== "1"}
<div class="dpr">{$i18n.t("Device Pixel Ratio")}: {dpr}</div>
{#if dpr !== '1'}
<div class="dpr">{$i18n.t('Device Pixel Ratio')}: {dpr}</div>
{/if}
</div>
</div>
@ -51,7 +51,8 @@
font-weight: bold;
}
.window, .dpr {
.window,
.dpr {
margin-top: calc(1em / 0.8);
font-size: 0.8em;
}

View file

@ -35,7 +35,6 @@
"sensors": {
"label": "Sensors",
"description": "See the output of your device's sensors, e.g. GPS, accelerometer, gyroscope, compass, etc."
},
"internet": {
"label": "Internet speed",

View file

@ -4,7 +4,7 @@
import { version } from '../../../package.json';
import { i18n } from '$lib/i18n';
import type { Snapshot } from '@sveltejs/kit';
const buildDate = import.meta.env.VITE_BUILD_DATE || "???";
const buildDate = import.meta.env.VITE_BUILD_DATE || '???';
let search = $state('');
@ -155,13 +155,15 @@
}
}
let nonEmptyCategories = $derived(categories.filter((category) => {
let nonEmptyCategories = $derived(
categories.filter((category) => {
const categoryTests = filteredTests.filter((test) => test.categories.includes(category.id));
return categoryTests.some(
(test) =>
!filteredCategories.length || filteredCategories.every((f) => test.categories.includes(f))
);
}));
})
);
export const snapshot: Snapshot<string> = {
capture: () => JSON.stringify({ filtered: filteredCategories, search }),
@ -224,7 +226,12 @@
{/each}
</div>
</nav>
<footer><a href="https://git.thm.place/thm/test-card">testcard v{version} {#if version.startsWith("0")}({buildDate}){/if}</a></footer>
<footer>
<a href="https://git.thm.place/thm/test-card"
>testcard v{version}
{#if version.startsWith('0')}({buildDate}){/if}</a
>
</footer>
<style>
nav {

View file

@ -3,5 +3,5 @@ import type { PageLoad } from './$types';
export const load: PageLoad = () => {
return {
root: true
}
}
};
};