diff options
author | Alan Pearce | 2024-05-03 00:15:35 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-03 00:15:35 +0200 |
commit | 177c2de3f7c2b1cee8dbea4acaa896a334ba3162 (patch) | |
tree | 3fa9e29574a43893a69ea3ff544a95f30881a2a1 | |
parent | 8411fb4a3acebe46acaf7a2ff6c4e58018737d65 (diff) | |
download | searchix-177c2de3f7c2b1cee8dbea4acaa896a334ba3162.tar.lz searchix-177c2de3f7c2b1cee8dbea4acaa896a334ba3162.tar.zst searchix-177c2de3f7c2b1cee8dbea4acaa896a334ba3162.zip |
feat: add css
-rw-r--r-- | default.nix | 7 | ||||
-rw-r--r-- | frontend/templates/index.tmpl | 1 | ||||
-rw-r--r-- | justfile | 5 | ||||
-rw-r--r-- | nix/sources.json | 13 | ||||
-rw-r--r-- | shell.nix | 1 |
5 files changed, 25 insertions, 2 deletions
diff --git a/default.nix b/default.nix index 0697abc..bcd04db 100644 --- a/default.nix +++ b/default.nix @@ -8,7 +8,12 @@ in ]; } ) -}: { +}: +{ + css = pkgs.fetchurl { + inherit (sources.simple-css) url sha256; + }; + searchix = pkgs.buildGoApplication { pname = "searchix"; version = "0.1"; diff --git a/frontend/templates/index.tmpl b/frontend/templates/index.tmpl index fd9cc8f..4b545cb 100644 --- a/frontend/templates/index.tmpl +++ b/frontend/templates/index.tmpl @@ -3,6 +3,7 @@ <head> <meta charset="UTF-8" /> <title>Searchix</title> + <link href="/static/style.css" rel="stylesheet"/> </head> <body> <h1>Searchix</h1> diff --git a/justfile b/justfile index 45a5f11..a24dc88 100644 --- a/justfile +++ b/justfile @@ -1,6 +1,9 @@ default: @just --list --justfile {{ justfile() }} --unsorted +prepare: + ln -sf $(nix-build --no-out-link -A css) frontend/static/style.css + checkformat: gofmt -d . goimports -d . @@ -15,5 +18,5 @@ fix: precommit: nix-build -A pre-commit-check -dev: +dev: prepare wgo run ./serve/ --live diff --git a/nix/sources.json b/nix/sources.json index 1f2d396..1534db4 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -34,5 +34,18 @@ "type": "tarball", "url": "https://github.com/NixOS/nixpkgs/archive/58a1abdbae3217ca6b702f03d3b35125d88a2994.tar.gz", "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" + }, + "simple-css": { + "branch": "main", + "description": "Mostly-reasonable HTML Styles.", + "homepage": "", + "owner": "kevquirk", + "repo": "simple.css", + "rev": "89787585fc44e6023f2b5e6f78a3e3ca8c60b10a", + "sha256": "1q35vvq932x3r02zycr2plfkzd8x5plzlwk71cl6gxpwvq26jhbx", + "type": "file", + "url": "https://raw.githubusercontent.com/kevquirk/simple.css/v2.3.0/simple.css", + "url_template": "https://raw.githubusercontent.com/<owner>/<repo>/v<version>/simple.css", + "version": "2.3.0" } } diff --git a/shell.nix b/shell.nix index 2c635ad..28fc5ba 100644 --- a/shell.nix +++ b/shell.nix @@ -29,6 +29,7 @@ pkgs.mkShell { ]; shellHook = '' ${searchix.pre-commit-check.shellHook} + css=${searchix.css}/ ''; buildInputs = searchix.pre-commit-check.enabledPackages; } |