Prettier install & format

This commit is contained in:
2025-01-24 14:17:23 +00:00
parent ecff0a202c
commit 683151d591
27 changed files with 616 additions and 613 deletions

View File

@@ -11,6 +11,7 @@ This project uses `devenv.nix` to manage the development environment, which will
### Installation
1. Clone the repository:
```bash
git clone https://github.com/Cian-H/am-d-model.eu.git
cd am-d-model.eu
@@ -54,4 +55,3 @@ implemented in future but for now, simplicity is a virtue.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

BIN
bun.lockb

Binary file not shown.

View File

@@ -39,6 +39,5 @@ networks:
am-d-model-network:
name: am-d-model-network
volumes:
caddy_data:

View File

@@ -16,6 +16,7 @@
"autoprefixer": "^10.4.20",
"globals": "^15.14.0",
"publint": "^0.2.12",
"prettier": "^3.4.2",
"sass": "^1.83.1",
"svelte": "^5.17.3",
"svelte-preprocess": "^5.1.4",

View File

@@ -1,6 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {}
}
autoprefixer: {},
},
};

8
prettier.config.js Normal file
View File

@@ -0,0 +1,8 @@
const config = {
singleQuote: false,
tabWidth: 4,
trailingComma: "all",
printWidth: 100,
};
export default config;

View File

@@ -1,6 +1,6 @@
<h1>This is a placeholder page</h1>
<h2>Please wait patiently while I set up the data repository</h2>
<p>
The data repository will be deployed as soon as possible, we just
need to figure out some details first before deployment happens.
The data repository will be deployed as soon as possible, we just need to figure out some
details first before deployment happens.
</p>

View File

@@ -1,3 +1,3 @@
@import 'tailwindcss/base';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities'
@import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities";

View File

@@ -1,15 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
</head>
</head>
<body data-sveltekit-preload-data="hover">
<body data-sveltekit-preload-data="hover">
<div>%sveltekit.body%</div>
</body>
</body>
</html>

View File

@@ -1,10 +1,12 @@
import { goto } from "$app/navigation";
import { error } from '@sveltejs/kit';
import { error } from "@sveltejs/kit";
export const navigation = {
toHome: () => goto("/"),
toAbout: () => goto("/about"),
toContact: () => goto("/contact"),
toRepository: () => goto("/repo"),
to404: () => { throw error(404, 'Page not found') },
to404: () => {
throw error(404, "Page not found");
},
};

View File

@@ -1,8 +1,9 @@
.form-container {
input,
textarea {
transition: border-color 0.2s ease, box-shadow 0.2s ease;
transition:
border-color 0.2s ease,
box-shadow 0.2s ease;
&:focus {
outline: none;

View File

@@ -43,8 +43,7 @@
justify-content: center;
flex-shrink: 0;
position: relative;
box-shadow: var(--button-shadow-box-shadow,
0px 1px 2px 0px rgba(0, 0, 0, 0.05));
box-shadow: var(--button-shadow-box-shadow, 0px 1px 2px 0px rgba(0, 0, 0, 0.05));
}
.navigation-header-button-text {

View File

@@ -45,5 +45,4 @@
--contact-corner-round: 28px;
/* Effects */
}

View File

@@ -29,7 +29,7 @@
.btmcall-buttons {
max-width: 100%;
padding-top: 32px
padding-top: 32px;
}
}

View File

@@ -20,15 +20,13 @@
// Blend out the background image into the plain bg color
&::after {
content: '';
content: "";
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 128px;
background: linear-gradient(to bottom,
#00000000 0%,
var(--background) 100%);
background: linear-gradient(to bottom, #00000000 0%, var(--background) 100%);
z-index: 1;
}
}

View File

@@ -36,8 +36,7 @@
justify-content: center;
flex-shrink: 0;
position: relative;
box-shadow: var(--button-shadow-box-shadow,
0px 1px 2px 0px rgba(0, 0, 0, 0.05));
box-shadow: var(--button-shadow-box-shadow, 0px 1px 2px 0px rgba(0, 0, 0, 0.05));
}
.navigation-header-button-text {

View File

@@ -72,7 +72,6 @@
}
}
@media (max-width: 380px) {
.splash-title {
font-size: var(--splash-title-font-size-tiny);

View File

@@ -1,3 +1,3 @@
export function GET() {
return new Response('OK', { status: 200 });
return new Response("OK", { status: 200 });
}

View File

@@ -1,5 +1,5 @@
import preprocess from "svelte-preprocess";
import adapter from '@sveltejs/adapter-node';
import adapter from "@sveltejs/adapter-node";
/** @type {import('@sveltejs/kit').Config} */
const config = {
@@ -8,28 +8,28 @@ const config = {
}),
kit: {
paths: {
base: '',
base: "",
},
adapter: adapter({
out: 'build',
out: "build",
precompress: true, // Pre-compresses files
polyfill: true
polyfill: true,
}),
csrf: { checkOrigin: false },
prerender: {
entries: ['*'],
handleMissingId: 'warn'
entries: ["*"],
handleMissingId: "warn",
},
csp: {
mode: 'auto',
mode: "auto",
directives: {
'script-src': ['self']
}
"script-src": ["self"],
},
},
version: {
name: Date.now().toString()
}
}
name: Date.now().toString(),
},
},
};
export default config;

View File

@@ -1,11 +1,11 @@
import forms from '@tailwindcss/forms';
import forms from "@tailwindcss/forms";
/** @type {import('tailwindcss').Config} */
export default {
content: ['./src/**/*.{html,js,svelte,ts}'],
content: ["./src/**/*.{html,js,svelte,ts}"],
theme: {
extend: {}
extend: {},
},
plugins: [forms],

View File

@@ -1,36 +1,36 @@
import { defineConfig } from 'vite';
import { sveltekit } from '@sveltejs/kit/vite'
import viteCompression from 'vite-plugin-compression'
import { defineConfig } from "vite";
import { sveltekit } from "@sveltejs/kit/vite";
import viteCompression from "vite-plugin-compression";
export default defineConfig({
plugins: [
sveltekit(),
viteCompression({
algorithm: 'brotli',
algorithm: "brotli",
threshold: 1024,
compressionOptions: { level: 11 },
exclude: [/\.(br|gz)$/, /\.(jpe?g|png|gif|webp|zip)$/i],
filter: /\.(js|css|html|svg)$/i
filter: /\.(js|css|html|svg)$/i,
}),
viteCompression({
algorithm: 'gzip',
algorithm: "gzip",
threshold: 1024,
compressionOptions: { level: 9 },
exclude: [/\.(br|gz)$/, /\.(jpe?g|png|gif|webp|zip)$/i],
filter: /\.(js|css|html|svg)$/i
})
filter: /\.(js|css|html|svg)$/i,
}),
],
build: {
minify: 'terser',
minify: "terser",
terserOptions: {
compress: {
drop_console: true,
drop_debugger: true
}
drop_debugger: true,
},
},
reportCompressedSize: true,
cssMinify: true,
cssCodeSplit: true
cssCodeSplit: true,
},
server: {
host: "0.0.0.0",