diff --git a/flake.lock b/flake.lock index 88666682..cbb0f65c 100644 --- a/flake.lock +++ b/flake.lock @@ -32,6 +32,22 @@ "url": "https://unpkg.com/htmx.org@2.0.4/dist/htmx.min.js" } }, + "ia-fonts-src": { + "flake": false, + "locked": { + "lastModified": 1686932517, + "narHash": "sha256-2T165nFfCzO65/PIHauJA//S+zug5nUwPcg8NUEydfc=", + "owner": "iaolo", + "repo": "iA-Fonts", + "rev": "f32c04c3058a75d7ce28919ce70fe8800817491b", + "type": "github" + }, + "original": { + "owner": "iaolo", + "repo": "iA-Fonts", + "type": "github" + } + }, "indigo": { "flake": false, "locked": { @@ -79,6 +95,7 @@ "inputs": { "gitignore": "gitignore", "htmx-src": "htmx-src", + "ia-fonts-src": "ia-fonts-src", "indigo": "indigo", "lucide-src": "lucide-src", "nixpkgs": "nixpkgs" diff --git a/flake.nix b/flake.nix index a8958289..624212c8 100644 --- a/flake.nix +++ b/flake.nix @@ -15,6 +15,10 @@ url = "https://unpkg.com/lucide@latest"; flake = false; }; + ia-fonts-src = { + url = "github:iaolo/iA-Fonts"; + flake = false; + }; gitignore = { url = "github:hercules-ci/gitignore.nix"; inputs.nixpkgs.follows = "nixpkgs"; @@ -28,6 +32,7 @@ htmx-src, lucide-src, gitignore, + ia-fonts-src, }: let supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"]; forAllSystems = nixpkgs.lib.genAttrs supportedSystems; @@ -63,7 +68,7 @@ ''; doCheck = false; subPackages = ["cmd/appview"]; - vendorHash = "sha256-u9LwvapAwyVOIOAag0IRrk+ot6B0PaqyEnt0EeJciGQ="; + vendorHash = "sha256-ywhhGrv8KNqy9tCMCnA1PU/RQ/+0Xyitej1L48TcFvI="; env.CGO_ENABLED = 1; stdenv = pkgsStatic.stdenv; }; @@ -73,7 +78,7 @@ version = "0.1.0"; src = gitignoreSource ./.; subPackages = ["cmd/knotserver"]; - vendorHash = "sha256-t7lWrCyFWCI7zjUcC6XNWzCrUPSCFnFu9gTmRTsYrz0="; + vendorHash = "sha256-ywhhGrv8KNqy9tCMCnA1PU/RQ/+0Xyitej1L48TcFvI="; env.CGO_ENABLED = 1; }; repoguard = with final; @@ -82,7 +87,7 @@ version = "0.1.0"; src = gitignoreSource ./.; subPackages = ["cmd/repoguard"]; - vendorHash = "sha256-t7lWrCyFWCI7zjUcC6XNWzCrUPSCFnFu9gTmRTsYrz0="; + vendorHash = "sha256-ywhhGrv8KNqy9tCMCnA1PU/RQ/+0Xyitej1L48TcFvI="; env.CGO_ENABLED = 0; }; keyfetch = with final; @@ -91,7 +96,7 @@ version = "0.1.0"; src = gitignoreSource ./.; subPackages = ["cmd/keyfetch"]; - vendorHash = "sha256-t7lWrCyFWCI7zjUcC6XNWzCrUPSCFnFu9gTmRTsYrz0="; + vendorHash = "sha256-ywhhGrv8KNqy9tCMCnA1PU/RQ/+0Xyitej1L48TcFvI="; env.CGO_ENABLED = 0; }; }; @@ -117,6 +122,12 @@ pkgs.websocat pkgs.tailwindcss ]; + shellHook = '' + cp -f ${htmx-src} appview/pages/static/htmx.min.js + cp -f ${lucide-src} appview/pages/static/lucide.min.js + cp -f ${ia-fonts-src}/"iA Writer Quattro"/Static/*.ttf appview/pages/static/fonts/ + cp -f ${ia-fonts-src}/"iA Writer Mono"/Static/*.ttf appview/pages/static/fonts/ + ''; }; }); apps = forAllSystems (system: let diff --git a/go.mod b/go.mod index 8b69bbcd..4e1525ce 100644 --- a/go.mod +++ b/go.mod @@ -6,6 +6,7 @@ toolchain go1.23.4 require ( github.com/Blank-Xu/sql-adapter v1.1.1 + github.com/alecthomas/chroma/v2 v2.15.0 github.com/bluekeyes/go-gitdiff v0.8.0 github.com/bluesky-social/indigo v0.0.0-20250123072624-9e3b84fdbb20 github.com/bluesky-social/jetstream v0.0.0-20241210005130-ea96859b93d1 @@ -30,7 +31,6 @@ require ( github.com/Microsoft/go-winio v0.6.2 // indirect github.com/ProtonMail/go-crypto v1.0.0 // indirect github.com/acomagu/bufpipe v1.0.4 // indirect - github.com/alecthomas/chroma/v2 v2.15.0 // indirect github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be // indirect github.com/aymerick/douceur v0.2.0 // indirect github.com/beorn7/perks v1.0.1 // indirect diff --git a/go.sum b/go.sum index cbeae33f..32fdd9b3 100644 --- a/go.sum +++ b/go.sum @@ -9,8 +9,12 @@ github.com/ProtonMail/go-crypto v1.0.0 h1:LRuvITjQWX+WIfr930YHG2HNfjR1uOfyf5vE0k github.com/ProtonMail/go-crypto v1.0.0/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ= github.com/acomagu/bufpipe v1.0.4/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= +github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0= +github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= github.com/alecthomas/chroma/v2 v2.15.0 h1:LxXTQHFoYrstG2nnV9y2X5O94sOBzf0CIUpSTbpxvMc= github.com/alecthomas/chroma/v2 v2.15.0/go.mod h1:gUhVLrPDXPtp/f+L1jo9xepo9gL4eLwRuGAunSZMkio= +github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc= +github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= @@ -119,6 +123,8 @@ github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iP github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= diff --git a/input.css b/input.css index 12529b55..02f664bb 100644 --- a/input.css +++ b/input.css @@ -2,6 +2,65 @@ @tailwind components; @tailwind utilities; @layer base { + @font-face { + font-family: 'iA Writer Quattro S'; + src: url('/static/fonts/iAWriterQuattroS-Regular.ttf') format('truetype'); + font-weight: normal; + font-style: normal; + font-display: swap; + font-feature-settings: "calt" 1, "kern" 1; + } + @font-face { + font-family: 'iA Writer Quattro S'; + src: url('/static/fonts/iAWriterQuattroS-Bold.ttf') format('truetype'); + font-weight: bold; + font-style: normal; + font-display: swap; + } + @font-face { + font-family: 'iA Writer Quattro S'; + src: url('/static/fonts/iAWriterQuattroS-Italic.ttf') format('truetype'); + font-weight: normal; + font-style: italic; + font-display: swap; + } + @font-face { + font-family: 'iA Writer Quattro S'; + src: url('/static/fonts/iAWriterQuattroS-BoldItalic.ttf') format('truetype'); + font-weight: bold; + font-style: italic; + font-display: swap; + } + + @font-face { + font-family: 'iA Writer Mono S'; + src: url('/static/fonts/iAWriterMonoS-Regular.ttf') format('truetype'); + font-weight: normal; + font-style: normal; + font-display: swap; + } + @font-face { + font-family: 'iA Writer Mono S'; + src: url('/static/fonts/iAWriterMonoS-Bold.ttf') format('truetype'); + font-weight: bold; + font-style: normal; + font-display: swap; + } + @font-face { + font-family: 'iA Writer Mono S'; + src: url('/static/fonts/iAWriterMonoS-Italic.ttf') format('truetype'); + font-weight: normal; + font-style: italic; + font-display: swap; + } + @font-face { + font-family: 'iA Writer Mono S'; + src: url('/static/fonts/iAWriterMonoS-BoldItalic.ttf') format('truetype'); + font-weight: bold; + font-style: italic; + font-display: swap; + } + @font-face { font-family: "Inter"; font-style: normal; @@ -20,6 +79,12 @@ @apply text-black; @apply bg-opacity-30; } + + html { + letter-spacing: -0.01em; + word-spacing: -0.07em; + } + a { @apply underline text-black hover:text-gray-800; } diff --git a/tailwind.config.js b/tailwind.config.js index be342c5d..fd733cdd 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -15,7 +15,8 @@ module.exports = { }, extend: { fontFamily: { - sans: ["Inter", "system-ui", "sans-serif", "ui-sans-serif"], + sans: ["iA Writer Quattro S", "Inter", "system-ui", "sans-serif", "ui-sans-serif"], + mono: ["iA Writer Mono S", "ui-monospace", "SFMono-Regular", "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", "monospace"], }, }, },