diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 3ccf435..eaf19f5 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,20 +1,20 @@ module.exports = { - root: true, - parser: '@typescript-eslint/parser', - extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'], - plugins: ['svelte3', '@typescript-eslint'], - ignorePatterns: ['*.cjs'], - overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }], - settings: { - 'svelte3/typescript': () => require('typescript') - }, - parserOptions: { - sourceType: 'module', - ecmaVersion: 2020 - }, - env: { - browser: true, - es2017: true, - node: true - } + root: true, + parser: '@typescript-eslint/parser', + extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'], + plugins: ['svelte3', '@typescript-eslint'], + ignorePatterns: ['*.cjs'], + overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }], + settings: { + 'svelte3/typescript': () => require('typescript') + }, + parserOptions: { + sourceType: 'module', + ecmaVersion: 2020 + }, + env: { + browser: true, + es2017: true, + node: true + } }; diff --git a/.prettierrc b/.prettierrc index 70d87a1..5f4511a 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,6 +1,6 @@ { - "useTabs": false, - "singleQuote": true, - "trailingComma": "none", - "printWidth": 100 -} \ No newline at end of file + "useTabs": false, + "singleQuote": true, + "trailingComma": "none", + "printWidth": 100 +} diff --git a/.vscode/settings.json b/.vscode/settings.json index b73523c..fbad5ce 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,3 @@ { - "cSpell.words": [ - "kickstarter", - "msrp" - ] -} \ No newline at end of file + "cSpell.words": ["kickstarter", "msrp"] +} diff --git a/package.json b/package.json index 37e517f..db1d619 100644 --- a/package.json +++ b/package.json @@ -3,15 +3,15 @@ "version": "0.0.1", "scripts": { "dev": "vite dev --host", - "build": "vite build", - "package": "svelte-kit package", - "preview": "vite preview", - "prepare": "svelte-kit sync", - "test": "playwright test", - "check": "svelte-check --tsconfig ./tsconfig.json", - "check:watch": "svelte-check --tsconfig ./tsconfig.json --watch", - "lint": "prettier --check --plugin-search-dir=. . && eslint .", - "format": "prettier --write --plugin-search-dir=. ." + "build": "vite build", + "package": "svelte-kit package", + "preview": "vite preview", + "prepare": "svelte-kit sync", + "test": "playwright test", + "check": "svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-check --tsconfig ./tsconfig.json --watch", + "lint": "prettier --check --plugin-search-dir=. . && eslint .", + "format": "prettier --write --plugin-search-dir=. ." }, "devDependencies": { "@playwright/test": "^1.23.2", diff --git a/playwright.config.ts b/playwright.config.ts index 87c293e..393283e 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -1,10 +1,10 @@ import type { PlaywrightTestConfig } from '@playwright/test'; const config: PlaywrightTestConfig = { - webServer: { - command: 'npm run build && npm run preview', - port: 3000 - } + webServer: { + command: 'npm run build && npm run preview', + port: 3000 + } }; export default config; diff --git a/src/app.css b/src/app.css index aa434bd..fc55fb0 100644 --- a/src/app.css +++ b/src/app.css @@ -1,103 +1,107 @@ @import '@fontsource/fira-mono'; :root { - font-family: Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, - Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; - --font-mono: 'Fira Mono', monospace; - --pure-white: #ffffff; - --primary-color: #b9c6d2; - --secondary-color: #d0dde9; - --tertiary-color: #edf0f8; - --accent-color: #ff3e00; - --heading-color: rgba(0, 0, 0, 0.7); - --text-color: #444444; - --background-without-opacity: rgba(255, 255, 255, 0.7); - --column-width: 42rem; - --column-margin-top: 4rem; + font-family: Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, + Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; + --font-mono: 'Fira Mono', monospace; + --pure-white: #ffffff; + --primary-color: #b9c6d2; + --secondary-color: #d0dde9; + --tertiary-color: #edf0f8; + --accent-color: #ff3e00; + --heading-color: rgba(0, 0, 0, 0.7); + --text-color: #444444; + --background-without-opacity: rgba(255, 255, 255, 0.7); + --column-width: 42rem; + --column-margin-top: 4rem; } body { - min-height: 100vh; - margin: 0; - background-color: var(--primary-color); - background: linear-gradient(180deg, - var(--primary-color) 0%, - var(--secondary-color) 10.45%, - var(--tertiary-color) 41.35%); + min-height: 100vh; + margin: 0; + background-color: var(--primary-color); + background: linear-gradient( + 180deg, + var(--primary-color) 0%, + var(--secondary-color) 10.45%, + var(--tertiary-color) 41.35% + ); } body::before { - content: ''; - width: 80vw; - height: 100vh; - position: absolute; - top: 0; - left: 10vw; - z-index: -1; - background: radial-gradient(50% 50% at 50% 50%, - var(--pure-white) 0%, - rgba(255, 255, 255, 0) 100%); - opacity: 0.05; + content: ''; + width: 80vw; + height: 100vh; + position: absolute; + top: 0; + left: 10vw; + z-index: -1; + background: radial-gradient( + 50% 50% at 50% 50%, + var(--pure-white) 0%, + rgba(255, 255, 255, 0) 100% + ); + opacity: 0.05; } #svelte { - min-height: 100vh; - display: flex; - flex-direction: column; + min-height: 100vh; + display: flex; + flex-direction: column; } h1, h2, p { - font-weight: 400; - color: var(--heading-color); + font-weight: 400; + color: var(--heading-color); } p { - line-height: 1.5; + line-height: 1.5; } a { - color: var(--accent-color); - text-decoration: none; + color: var(--accent-color); + text-decoration: none; } a:hover { - text-decoration: underline; + text-decoration: underline; } h1 { - font-size: 2rem; - text-align: center; + font-size: 2rem; + text-align: center; } h2 { - font-size: 1rem; + font-size: 1rem; } pre { - font-size: 16px; - font-family: var(--font-mono); - background-color: rgba(255, 255, 255, 0.45); - border-radius: 3px; - box-shadow: 2px 2px 6px rgb(255 255 255 / 25%); - padding: 0.5em; - overflow-x: auto; - color: var(--text-color); + font-size: 16px; + font-family: var(--font-mono); + background-color: rgba(255, 255, 255, 0.45); + border-radius: 3px; + box-shadow: 2px 2px 6px rgb(255 255 255 / 25%); + padding: 0.5em; + overflow-x: auto; + color: var(--text-color); } input, button { - font-size: inherit; - font-family: inherit; + font-size: inherit; + font-family: inherit; } button:focus:not(:focus-visible) { - outline: none; + outline: none; } @media (min-width: 720px) { - h1 { - font-size: 2.4rem; - } -} \ No newline at end of file + h1 { + font-size: 2.4rem; + } +} diff --git a/src/app.d.ts b/src/app.d.ts index b28d840..f201c93 100644 --- a/src/app.d.ts +++ b/src/app.d.ts @@ -4,8 +4,8 @@ // for information about these interfaces // and what to do when importing types declare namespace App { - // interface Locals {} - // interface Platform {} - // interface Session {} - // interface Stuff {} + // interface Locals {} + // interface Platform {} + // interface Session {} + // interface Stuff {} } diff --git a/src/app.html b/src/app.html index 1f9b35c..c238913 100644 --- a/src/app.html +++ b/src/app.html @@ -1,43 +1,41 @@ +
+ + + + + + %sveltekit.head% + - // if nothing is set default to dark mode - if (!userTheme && !prefersDarkMode && !prefersLightMode) { - htmlElement.dataset.theme = '🌛 Night' - localStorage.theme = '🌛 Night' - } - - %sveltekit.head% - - - -