diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 1fecb68..0000000 --- a/.gitattributes +++ /dev/null @@ -1,5 +0,0 @@ -############################################################################### -# Set default behavior to automatically normalize line endings. -############################################################################### -* text=auto - diff --git a/.gitignore b/.gitignore index 993c08f..79518f7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,21 @@ -result -.obsidian -.trash \ No newline at end of file +node_modules + +# Output +.output +.vercel +/.svelte-kit +/build + +# OS +.DS_Store +Thumbs.db + +# Env +.env +.env.* +!.env.example +!.env.test + +# Vite +vite.config.js.timestamp-* +vite.config.ts.timestamp-* diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..b6f27f1 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +engine-strict=true diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..ab78a95 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,4 @@ +# Package Managers +package-lock.json +pnpm-lock.yaml +yarn.lock diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..9573023 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,8 @@ +{ + "useTabs": true, + "singleQuote": true, + "trailingComma": "none", + "printWidth": 100, + "plugins": ["prettier-plugin-svelte"], + "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..5ce6766 --- /dev/null +++ b/README.md @@ -0,0 +1,38 @@ +# create-svelte + +Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte). + +## Creating a project + +If you're seeing this, you've probably already done this step. Congrats! + +```bash +# create a new project in the current directory +npm create svelte@latest + +# create a new project in my-app +npm create svelte@latest my-app +``` + +## Developing + +Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: + +```bash +npm run dev + +# or start the server and open the app in a new browser tab +npm run dev -- --open +``` + +## Building + +To create a production version of your app: + +```bash +npm run build +``` + +You can preview the production build with `npm run preview`. + +> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. diff --git a/bun.lockb b/bun.lockb new file mode 100644 index 0000000..bae5a3c Binary files /dev/null and b/bun.lockb differ diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..a351fa9 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,33 @@ +import js from '@eslint/js'; +import ts from 'typescript-eslint'; +import svelte from 'eslint-plugin-svelte'; +import prettier from 'eslint-config-prettier'; +import globals from 'globals'; + +/** @type {import('eslint').Linter.FlatConfig[]} */ +export default [ + js.configs.recommended, + ...ts.configs.recommended, + ...svelte.configs['flat/recommended'], + prettier, + ...svelte.configs['flat/prettier'], + { + languageOptions: { + globals: { + ...globals.browser, + ...globals.node + } + } + }, + { + files: ['**/*.svelte'], + languageOptions: { + parserOptions: { + parser: ts.parser + } + } + }, + { + ignores: ['build/', '.svelte-kit/', 'dist/'] + } +]; diff --git a/flake.lock b/flake.lock deleted file mode 100644 index bab58ea..0000000 --- a/flake.lock +++ /dev/null @@ -1,90 +0,0 @@ -{ - "nodes": { - "html-nix": { - "inputs": { - "nixpkgs": "nixpkgs", - "parts": "parts" - }, - "locked": { - "lastModified": 1689376761, - "narHash": "sha256-T3UBWQAqmMmsIpgNySzxlbel9UjREGQJPJDyGY8BUWQ=", - "ref": "refs/heads/master", - "rev": "1f8450f6e4c42e2fd6204df95e513531001733b3", - "revCount": 71, - "type": "git", - "url": "https://git.gaze.systems/dusk/html.nix.git" - }, - "original": { - "type": "git", - "url": "https://git.gaze.systems/dusk/html.nix.git" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1680668850, - "narHash": "sha256-mQMg13yRsS0LXVzaeoSPwqgPO6yhkGzGewPgMSqXSv8=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "4a65e9f64e53fdca6eed31adba836717a11247d2", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-lib": { - "locked": { - "dir": "lib", - "lastModified": 1680213900, - "narHash": "sha256-cIDr5WZIj3EkKyCgj/6j3HBH4Jj1W296z7HTcWj1aMA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "e3652e0735fbec227f342712f180f4f21f0594f2", - "type": "github" - }, - "original": { - "dir": "lib", - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "parts": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1680392223, - "narHash": "sha256-n3g7QFr85lDODKt250rkZj2IFS3i4/8HBU2yKHO3tqw=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "dcc36e45d054d7bb554c9cdab69093debd91a0b5", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "root": { - "inputs": { - "html-nix": "html-nix", - "nixpkgs": [ - "html-nix", - "nixpkgs" - ], - "parts": [ - "html-nix", - "parts" - ] - } - } - }, - "root": "root", - "version": 7 -} diff --git a/flake.nix b/flake.nix deleted file mode 100644 index a3f7cce..0000000 --- a/flake.nix +++ /dev/null @@ -1,124 +0,0 @@ -{ - inputs = { - html-nix.url = "git+https://git.gaze.systems/dusk/html.nix.git"; - nixpkgs.follows = "html-nix/nixpkgs"; - parts.follows = "html-nix/parts"; - }; - - outputs = inputs @ {parts, ...}: - parts.lib.mkFlake {inherit inputs;} (topArgs: { - systems = ["x86_64-linux"]; - imports = [inputs.html-nix.flakeModule]; - perSystem = { - config, - lib, - ... - }: let - l = lib // builtins; - html-nix = config.html-nix.lib; - site = local: - html-nix.mkSiteFrom { - inherit local; - src = ./src; - config = { - baseurl = "https://gaze.systems"; - title = "dusk's place"; - iconPath = "resources/icon.png"; - siteLang = "en"; - descriptionsById = { - "404" = "Page not found."; - "index" = "Home page of dusk's place with information about the website."; - "posts" = "A listing of posts published on the website."; - "_exporting_ssh_key_from_gpg" = "Instructions explaining how to export SSH keys from GPG."; - }; - footerContent = '' -
- - ''; - }; - templater = ctx: - l.pipe ctx [ - topArgs.config.html-nix.lib.templaters.simple - (ctx: - l.recursiveUpdate ctx { - site."resources"."icon.png" = ./src/resources/icon.png; - site."resources"."wave.svg" = ./src/resources/wave.svg; - site."resources"."wavealt.svg" = ./src/resources/wave-alt.svg; - site."site.css" = '' - ${ctx.site."site.css"} - - .bg-svg, .bg-svg-fg { - position: absolute; - bottom: 0; - left: 0; - width: 100vw; - - background-size: cover; - background-repeat: repeat-x; - } - - .bg-svg { - z-index: -2; - height: 50vh; - - background-image: url(resources/wave.svg); - - animation: move-svg 200s linear infinite; - } - - .bg-svg-fg { - z-index: -1; - height: 40vh; - - background-image: url(resources/wavealt.svg); - - animation: move-svg 100s linear infinite reverse; - } - - @keyframes move-svg { - 0% { - background-position: 0 0; - } - - 50% { - background-position: 100vw 0; - } - - 100% { - background-position: 200vw 0; - } - } - - body { - background: #3d1f7a; - color: #fff; - } - - a { - color: #007fff; - } - - a.novisited:visited { - color: #007fff; - } - - a:visited { - color: #bf40bf; - } - - pre,code { - background: #333; - color: #fff; - } - ''; - } - ) - ]; - }; - dev = html-nix.mkServeFromSite (site true); - in { - packages.site = html-nix.mkSitePathFrom (site false); - apps.site.program = "${dev}/bin/serve"; - }; - }); -} diff --git a/package.json b/package.json new file mode 100644 index 0000000..dfac0a2 --- /dev/null +++ b/package.json @@ -0,0 +1,33 @@ +{ + "name": "website", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", + "lint": "prettier --check . && eslint .", + "format": "prettier --write ." + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "@types/eslint": "^8.56.7", + "eslint": "^9.0.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-svelte": "^2.36.0", + "globals": "^15.0.0", + "prettier": "^3.1.1", + "prettier-plugin-svelte": "^3.1.2", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "tslib": "^2.4.1", + "typescript": "^5.0.0", + "typescript-eslint": "^8.0.0-alpha.20", + "vite": "^5.0.3" + }, + "type": "module" +} diff --git a/src/app.d.ts b/src/app.d.ts new file mode 100644 index 0000000..743f07b --- /dev/null +++ b/src/app.d.ts @@ -0,0 +1,13 @@ +// See https://kit.svelte.dev/docs/types#app +// for information about these interfaces +declare global { + namespace App { + // interface Error {} + // interface Locals {} + // interface PageData {} + // interface PageState {} + // interface Platform {} + } +} + +export {}; diff --git a/src/app.html b/src/app.html new file mode 100644 index 0000000..77a5ff5 --- /dev/null +++ b/src/app.html @@ -0,0 +1,12 @@ + + + + + + + %sveltekit.head% + + +Visit kit.svelte.dev to read the documentation
diff --git a/static/favicon.png b/static/favicon.png new file mode 100644 index 0000000..825b9e6 Binary files /dev/null and b/static/favicon.png differ diff --git a/svelte.config.js b/svelte.config.js new file mode 100644 index 0000000..4a82086 --- /dev/null +++ b/svelte.config.js @@ -0,0 +1,18 @@ +import adapter from '@sveltejs/adapter-auto'; +import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; + +/** @type {import('@sveltejs/kit').Config} */ +const config = { + // Consult https://kit.svelte.dev/docs/integrations#preprocessors + // for more information about preprocessors + preprocess: vitePreprocess(), + + kit: { + // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. + // If your environment is not supported, or you settled on a specific environment, switch out the adapter. + // See https://kit.svelte.dev/docs/adapters for more information about adapters. + adapter: adapter() + } +}; + +export default config; diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..fc93cbd --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./.svelte-kit/tsconfig.json", + "compilerOptions": { + "allowJs": true, + "checkJs": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "sourceMap": true, + "strict": true, + "moduleResolution": "bundler" + } + // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias + // except $lib which is handled by https://kit.svelte.dev/docs/configuration#files + // + // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes + // from the referenced tsconfig.json - TypeScript does not merge them in +} diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 0000000..bbf8c7d --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,6 @@ +import { sveltekit } from '@sveltejs/kit/vite'; +import { defineConfig } from 'vite'; + +export default defineConfig({ + plugins: [sveltekit()] +});