treewide: init svelte + tailwind rewrite

This commit is contained in:
notohh 2025-01-26 03:33:39 -05:00
parent 0ef36c0ab3
commit 391c76e433
Signed by: notohh
GPG key ID: BD47506D475EE86D
37 changed files with 368 additions and 203 deletions

30
.gitignore vendored
View file

@ -1,5 +1,25 @@
/public/
/resources/_gen/
/assets/jsconfig.json
hugo_stats.json
.hugo_build.lock
node_modules
# Output
.output
.vercel
.netlify
.wrangler
/.svelte-kit
/build
# OS
.DS_Store
Thumbs.db
# Env
.env
.env.*
!.env.example
!.env.test
# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
.pre-commit-config.yaml

1
.npmrc Normal file
View file

@ -0,0 +1 @@
engine-strict=true

View file

@ -1,5 +0,0 @@
+++
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
date = {{ .Date }}
draft = true
+++

BIN
bun.lockb Executable file

Binary file not shown.

View file

@ -1,9 +0,0 @@
# about
<a rel="me" href="https://fosstodon.org/@notohh"></a>
- 23 y/o
- twitch degen
- metalhead
- interested in devops, linux, rust, etc
- i use nixos btw

View file

@ -1,17 +0,0 @@
# projects
## :snowflake: snowflake
{{<image src="/snowflake.png" alt="screenshot of hyprland desktop">}}
_[snowflake](https://git.flake.sh/notohh/snowflake)_ is my multi-config nixos repo. its the heart of my servers, my desktop, my laptop, my everything
### :spiral_notepad: features
- multi-config repo, with configs for servers, laptop, and desktop
- multi-system home-manager setup
- secrets provisioning with [sops-nix](https://github.com/Mic92/sops-nix)
- multiple fully declarative self hosted services (and some containerized ones, with a docker backend)
- wayland config for hyprland
- custom packages not found in nixpkgs
- linted & styled with [alejandra](https://github.com/kamadorueda/alejandra), [deadnix](https://github.com/astro/deadnix), and [statix](https://github.com/nerdypepper/statix)

105
flake.lock generated
View file

@ -1,24 +1,111 @@
{
"nodes": {
"nixpkgs": {
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1728888510,
"narHash": "sha256-nsNdSldaAyu6PE3YUA+YQLqUDJh+gRbBooMMekZJwvI=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "a3c0b3b21515f74fd2665903d4ce6bc4dc81c77c",
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": ["pre-commit-hooks", "nixpkgs"]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1737717945,
"narHash": "sha256-ET91TMkab3PmOZnqiJQYOtSGvSTvGeHoegAv4zcTefM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ecd26a469ac56357fd333946a99086e992452b6a",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1730768919,
"narHash": "sha256-8AKquNnnSaJRXZxc5YmF/WfmxiHX6MMZZasRP6RRQkE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a04d33c0c3f1a59a2c1cb0c6e34cd24500e5a1dc",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"gitignore": "gitignore",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1737465171,
"narHash": "sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs",
"pre-commit-hooks": "pre-commit-hooks",
"systems": "systems"
}
},
"systems": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
}
},

View file

@ -1,22 +1,45 @@
{
description = "notohh.dev flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default-linux";
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
};
outputs = {nixpkgs, ...}: let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
};
outputs = {
self,
systems,
nixpkgs,
pre-commit-hooks,
}: let
eachSystem = nixpkgs.lib.genAttrs (import systems);
pkgsFor = eachSystem (system:
import nixpkgs {
localSystem.system = system;
});
in {
devShells.${system}.default = pkgs.mkShell {
name = "notohh.dev";
packages = with pkgs; [
nil
alejandra
hugo
];
};
checks = eachSystem (system: {
pre-commit-check = pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks = {
prettier.enable = true;
# nix
statix.enable = true;
alejandra.enable = true;
deadnix.enable = true;
};
};
});
devShells = eachSystem (system: {
default = pkgsFor.${system}.mkShell {
inherit (self.checks.${system}.pre-commit-check) shellHook;
packages = with pkgsFor.${system}; [
nil
alejandra
nodejs_23
bun
svelte-language-server
];
};
});
};
}

113
hugo.toml
View file

@ -1,113 +0,0 @@
baseURL = "https://notohh.dev"
title = "notohh"
languageCode = "en-us"
theme = "hello-friend-ng" # https://github.com/rhazdon/hugo-theme-hello-friend-ng
PygmentsCodeFences = false
PygmentsStyle = "monokai"
pagination.pagerSize = 10
archetypeDir = "archetypes"
contentDir = "content"
dataDir = "data"
layoutDir = "layouts"
publishDir = "public"
buildDrafts = false
buildFuture = false
buildExpired = false
canonifyURLs = true
enableRobotsTXT = true
enableGitInfo = false
enableEmoji = true
enableMissingTranslationPlaceholders = false
disableRSS = true
disableSitemap = true
disable404 = false
disableHugoGeneratorInject = false
description = "notohh.dev"
homeSubtitle = "notohh.dev"
disableReadOtherPosts = false
enableThemeToggle = false
enableSharingButtons = false
enableGlobalLanguageMenu = true
customCSS = []
customJS = []
justifyContent = false
[params.footer]
rss = false
copyright = false
author = false
bottomText = [
"powered by <a href=\"http://gohugo.io\">hugo</a>",
"site <a href=\"https://git.flake.sh/notohh/notohh.dev\">source</a>",
]
[params.favicon.color]
mask = "#1b1c1d"
msapplication = "#1b1c1d"
theme = "#1b1c1d"
[params.logo]
logoMark = ">"
logoText = "$ cd /home/"
logoHomeLink = "/"
# logoCursorDisabled = false
logoCursorColor = "#A9A9B3"
logoCursorAnimate = "1s"
logoCursorPathname = true
[[params.social]]
name = "mastodon"
url = "https://fosstodon.org/@notohh"
[[params.social]]
name = "bluesky"
url = "https://bsky.app/profile/flake.sh"
[[params.social]]
name = "gpg"
url = "https://keys.openpgp.org/search?q=+C3CB+3B31+AF3F+986C+39E0++BE5B+BD47+506D+475E+E86D"
[[params.social]]
name = "git"
url = "https://git.flake.sh/notohh"
[[params.social]]
name = "twitch"
url = "https://www.twitch.tv/notohh"
[[params.social]]
name = "lastfm"
url = "https://www.last.fm/user/notoh"
[languages]
[languages.en]
weight = 1
[menu]
[[menu.main]]
identifier = "about"
name = "about"
url = "about/"
[[menu.main]]
identifier = "projects"
name = "projects"
url = "projects/"
[[menu.main]]
identifier = "status"
name = "status"
url = "https://status.flake.sh/status/kumo"

26
package.json Normal file
View file

@ -0,0 +1,26 @@
{
"name": "notohh.dev",
"private": true,
"version": "0.0.1",
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"prepare": "svelte-kit sync || echo ''",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
},
"devDependencies": {
"@sveltejs/adapter-auto": "^4.0.0",
"@sveltejs/kit": "^2.16.0",
"@sveltejs/vite-plugin-svelte": "^5.0.0",
"@tailwindcss/vite": "^4.0.0",
"autoprefixer": "^10.4.20",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"tailwindcss": "^4.0.0",
"typescript": "^5.0.0",
"vite": "^6.0.0"
}
}

11
src/app.css Normal file
View file

@ -0,0 +1,11 @@
@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");
@import "tailwindcss";
@theme {
--font-display: "Inter", "sans-serif";
--color-floral-white: #fffcf2;
--color-timber-wolf: #ccc5b9;
--color-black-olive: #403d39;
--color-eerie-black: #252422;
--color-flame: #eb5e28;
}

13
src/app.d.ts vendored Normal file
View file

@ -0,0 +1,13 @@
// See https://svelte.dev/docs/kit/types#app.d.ts
// for information about these interface
declare global {
namespace App {
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface PageState {}
// interface Platform {}
}
}
export {};

12
src/app.html Normal file
View file

@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<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>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>

View file

@ -0,0 +1,13 @@
<script lang="ts">
export let className: string = "";
</script>
<svg
class={className}
role="img"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
><title>Bluesky</title><path
d="M12 10.8c-1.087-2.114-4.046-6.053-6.798-7.995C2.566.944 1.561 1.266.902 1.565.139 1.908 0 3.08 0 3.768c0 .69.378 5.65.624 6.479.815 2.736 3.713 3.66 6.383 3.364.136-.02.275-.039.415-.056-.138.022-.276.04-.415.056-3.912.58-7.387 2.005-2.83 7.078 5.013 5.19 6.87-1.113 7.823-4.308.953 3.195 2.05 9.271 7.733 4.308 4.267-4.308 1.172-6.498-2.74-7.078a8.741 8.741 0 0 1-.415-.056c.14.017.279.036.415.056 2.67.297 5.568-.628 6.383-3.364.246-.828.624-5.79.624-6.478 0-.69-.139-1.861-.902-2.206-.659-.298-1.664-.62-4.3 1.24C16.046 4.748 13.087 8.687 12 10.8Z"
/></svg
>

View file

@ -0,0 +1,13 @@
<script lang="ts">
export let className: string = "";
</script>
<svg
class={className}
role="img"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
><title>Forgejo</title><path
d="M16.7773 0c1.6018 0 2.9004 1.2986 2.9004 2.9005s-1.2986 2.9004-2.9004 2.9004c-1.0854 0-2.0315-.596-2.5288-1.4787H12.91c-2.3322 0-4.2272 1.8718-4.2649 4.195l-.0007 2.1175a7.0759 7.0759 0 0 1 4.148-1.4205l.1176-.001 1.3385.0002c.4973-.8827 1.4434-1.4788 2.5288-1.4788 1.6018 0 2.9004 1.2986 2.9004 2.9005s-1.2986 2.9004-2.9004 2.9004c-1.0854 0-2.0315-.596-2.5288-1.4787H12.91c-2.3322 0-4.2272 1.8718-4.2649 4.195l-.0007 2.319c.8827.4973 1.4788 1.4434 1.4788 2.5287 0 1.602-1.2986 2.9005-2.9005 2.9005-1.6018 0-2.9004-1.2986-2.9004-2.9005 0-1.0853.596-2.0314 1.4788-2.5287l-.0002-9.9831c0-3.887 3.1195-7.0453 6.9915-7.108l.1176-.001h1.3385C14.7458.5962 15.692 0 16.7773 0ZM7.2227 19.9052c-.6596 0-1.1943.5347-1.1943 1.1943s.5347 1.1943 1.1943 1.1943 1.1944-.5347 1.1944-1.1943-.5348-1.1943-1.1944-1.1943Zm9.5546-10.4644c-.6596 0-1.1944.5347-1.1944 1.1943s.5348 1.1943 1.1944 1.1943c.6596 0 1.1943-.5347 1.1943-1.1943s-.5347-1.1943-1.1943-1.1943Zm0-7.7346c-.6596 0-1.1944.5347-1.1944 1.1943s.5348 1.1943 1.1944 1.1943c.6596 0 1.1943-.5347 1.1943-1.1943s-.5347-1.1943-1.1943-1.1943Z"
/></svg
>

View file

@ -0,0 +1,13 @@
<script lang="ts">
export let className: string = "";
</script>
<svg
class={className}
role="img"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
><title>Last.fm</title><path
d="M10.584 17.21l-.88-2.392s-1.43 1.594-3.573 1.594c-1.897 0-3.244-1.649-3.244-4.288 0-3.382 1.704-4.591 3.381-4.591 2.42 0 3.189 1.567 3.849 3.574l.88 2.749c.88 2.666 2.529 4.81 7.285 4.81 3.409 0 5.718-1.044 5.718-3.793 0-2.227-1.265-3.381-3.63-3.931l-1.758-.385c-1.21-.275-1.567-.77-1.567-1.595 0-.934.742-1.484 1.952-1.484 1.32 0 2.034.495 2.144 1.677l2.749-.33c-.22-2.474-1.924-3.492-4.729-3.492-2.474 0-4.893.935-4.893 3.932 0 1.87.907 3.051 3.189 3.601l1.87.44c1.402.33 1.869.907 1.869 1.704 0 1.017-.99 1.43-2.86 1.43-2.776 0-3.93-1.457-4.59-3.464l-.907-2.75c-1.155-3.573-2.997-4.893-6.653-4.893C2.144 5.333 0 7.89 0 12.233c0 4.18 2.144 6.434 5.993 6.434 3.106 0 4.591-1.457 4.591-1.457z"
/></svg
>

View file

@ -0,0 +1,13 @@
<script lang="ts">
export let className: string = "";
</script>
<svg
class={className}
role="img"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
><title>Twitch</title><path
d="M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 0L1.714 4.286v15.428h5.143V24l4.286-4.286h3.428L22.286 12V0zm14.571 11.143l-3.428 3.428h-3.429l-3 3v-3H6.857V1.714h13.714Z"
/></svg
>

BIN
src/lib/images/pfp.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

0
src/lib/index.ts Normal file
View file

View file

@ -0,0 +1,5 @@
<script>
import "../app.css";
</script>
<slot />

36
src/routes/+page.svelte Normal file
View file

@ -0,0 +1,36 @@
<script lang="ts">
import Pfp from "$lib/images/pfp.jpg";
import Forgejo from "$lib/components/forgejo.svelte";
import Bluesky from "$lib/components/bluesky.svelte";
import Lastfm from "$lib/components/lastfm.svelte";
import Twitch from "$lib/components/twitch.svelte";
</script>
<div
class="font-display flex flex-col items-center justify-center h-screen bg-eerie-black"
>
<img src={Pfp} alt="" class="rounded-full w-32 h-32 mb-4" />
<h1 class="text-4xl font-bold text-center text-floral-white">notohh</h1>
<div class="flex space-x-4 mt-4">
<a href="https://www.last.fm/user/notoh" aria-label="Lastfm">
<Lastfm
className="w-8 h-8 fill-current text-floral-white hover:text-red-500"
/>
</a>
<a href="https://git.flake.sh/notohh" aria-label="Forgejo">
<Forgejo
className="w-8 h-8 fill-current text-floral-white hover:text-orange-400"
/>
</a>
<a href="https://bsky.app/profile/flake.sh" aria-label="Bluesky">
<Bluesky
className="w-8 h-8 fill-current text-floral-white hover:text-blue-400"
/>
</a>
<a href="https://www.twitch.tv/notohh" aria-label="Twitch">
<Twitch
className="w-8 h-8 fill-current text-floral-white hover:text-purple-500"
/>
</a>
</div>
</div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

BIN
static/bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 MiB

View file

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/mstile-150x150.png"/>
<TileColor>#da532c</TileColor>
</tile>
</msapplication>
</browserconfig>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

View file

@ -1,19 +0,0 @@
{
"name": "",
"short_name": "",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 MiB

3
statix.toml Normal file
View file

@ -0,0 +1,3 @@
disabled = []
nix_version = '2.4'
ignore = ['.direnv']

18
svelte.config.js Normal file
View file

@ -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://svelte.dev/docs/kit/integrations
// for more information about preprocessors
preprocess: vitePreprocess(),
kit: {
// adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
// See https://svelte.dev/docs/kit/adapters for more information about adapters.
adapter: adapter(),
},
};
export default config;

@ -1 +0,0 @@
Subproject commit b4559bffdbc2d7a682073ab77e5ea1670a929642

19
tsconfig.json Normal file
View file

@ -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://svelte.dev/docs/kit/configuration#alias
// except $lib which is handled by https://svelte.dev/docs/kit/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
}

12
vite.config.ts Normal file
View file

@ -0,0 +1,12 @@
import { sveltekit } from "@sveltejs/kit/vite";
import { defineConfig } from "vite";
import tailwindcss from "@tailwindcss/vite";
export default defineConfig({
plugins: [sveltekit(), tailwindcss()],
server: {
fs: {
allow: [".."],
},
},
});