diff --git a/ema-template/static/tailwind.css b/ema-template/static/tailwind.css index 1e7bda1..f942e65 100644 --- a/ema-template/static/tailwind.css +++ b/ema-template/static/tailwind.css @@ -554,201 +554,6 @@ video { display: none; } -[type='text'],input:where(:not([type])),[type='email'],[type='url'],[type='password'],[type='number'],[type='date'],[type='datetime-local'],[type='month'],[type='search'],[type='tel'],[type='time'],[type='week'],[multiple],textarea,select { - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - background-color: #fff; - border-color: #6b7280; - border-width: 1px; - border-radius: 0px; - padding-top: 0.5rem; - padding-right: 0.75rem; - padding-bottom: 0.5rem; - padding-left: 0.75rem; - font-size: 1rem; - line-height: 1.5rem; - --tw-shadow: 0 0 #0000; -} - -[type='text']:focus, input:where(:not([type])):focus, [type='email']:focus, [type='url']:focus, [type='password']:focus, [type='number']:focus, [type='date']:focus, [type='datetime-local']:focus, [type='month']:focus, [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='week']:focus, [multiple]:focus, textarea:focus, select:focus { - outline: 2px solid transparent; - outline-offset: 2px; - --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/); - --tw-ring-offset-width: 0px; - --tw-ring-offset-color: #fff; - --tw-ring-color: #2563eb; - --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); - --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color); - box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); - border-color: #2563eb; -} - -input::-moz-placeholder, textarea::-moz-placeholder { - color: #6b7280; - opacity: 1; -} - -input::placeholder,textarea::placeholder { - color: #6b7280; - opacity: 1; -} - -::-webkit-datetime-edit-fields-wrapper { - padding: 0; -} - -::-webkit-date-and-time-value { - min-height: 1.5em; - text-align: inherit; -} - -::-webkit-datetime-edit { - display: inline-flex; -} - -::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field { - padding-top: 0; - padding-bottom: 0; -} - -select { - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e"); - background-position: right 0.5rem center; - background-repeat: no-repeat; - background-size: 1.5em 1.5em; - padding-right: 2.5rem; - -webkit-print-color-adjust: exact; - print-color-adjust: exact; -} - -[multiple],[size]:where(select:not([size="1"])) { - background-image: initial; - background-position: initial; - background-repeat: unset; - background-size: initial; - padding-right: 0.75rem; - -webkit-print-color-adjust: unset; - print-color-adjust: unset; -} - -[type='checkbox'],[type='radio'] { - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - padding: 0; - -webkit-print-color-adjust: exact; - print-color-adjust: exact; - display: inline-block; - vertical-align: middle; - background-origin: border-box; - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; - flex-shrink: 0; - height: 1rem; - width: 1rem; - color: #2563eb; - background-color: #fff; - border-color: #6b7280; - border-width: 1px; - --tw-shadow: 0 0 #0000; -} - -[type='checkbox'] { - border-radius: 0px; -} - -[type='radio'] { - border-radius: 100%; -} - -[type='checkbox']:focus,[type='radio']:focus { - outline: 2px solid transparent; - outline-offset: 2px; - --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/); - --tw-ring-offset-width: 2px; - --tw-ring-offset-color: #fff; - --tw-ring-color: #2563eb; - --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); - --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); - box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); -} - -[type='checkbox']:checked,[type='radio']:checked { - border-color: transparent; - background-color: currentColor; - background-size: 100% 100%; - background-position: center; - background-repeat: no-repeat; -} - -[type='checkbox']:checked { - background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e"); -} - -@media (forced-colors: active) { - [type='checkbox']:checked { - -webkit-appearance: auto; - -moz-appearance: auto; - appearance: auto; - } -} - -[type='radio']:checked { - background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e"); -} - -@media (forced-colors: active) { - [type='radio']:checked { - -webkit-appearance: auto; - -moz-appearance: auto; - appearance: auto; - } -} - -[type='checkbox']:checked:hover,[type='checkbox']:checked:focus,[type='radio']:checked:hover,[type='radio']:checked:focus { - border-color: transparent; - background-color: currentColor; -} - -[type='checkbox']:indeterminate { - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e"); - border-color: transparent; - background-color: currentColor; - background-size: 100% 100%; - background-position: center; - background-repeat: no-repeat; -} - -@media (forced-colors: active) { - [type='checkbox']:indeterminate { - -webkit-appearance: auto; - -moz-appearance: auto; - appearance: auto; - } -} - -[type='checkbox']:indeterminate:hover,[type='checkbox']:indeterminate:focus { - border-color: transparent; - background-color: currentColor; -} - -[type='file'] { - background: unset; - border-color: inherit; - border-width: 0; - border-radius: 0; - padding: 0; - font-size: unset; - line-height: inherit; -} - -[type='file']:focus { - outline: 1px solid ButtonText; - outline: 1px auto -webkit-focus-ring-color; -} - .container { width: 100%; } diff --git a/flake.lock b/flake.lock index a52ed3e..2a596b5 100644 --- a/flake.lock +++ b/flake.lock @@ -3,15 +3,16 @@ "commonmark-simple": { "flake": false, "locked": { - "lastModified": 1742576519, - "narHash": "sha256-/Vauu9JiLcJOElH/brswcF1XbEXq8yA2q/8rcXzj+kE=", + "lastModified": 1755566927, + "narHash": "sha256-2WE5SjwgwjKdsHxDRfQIb2WRrVYoNPiCIyG4HZd8Znk=", "owner": "srid", "repo": "commonmark-simple", - "rev": "1d69703c7f625905a84cfb79983ca2a5817743bc", + "rev": "81dc7a66b2490a701bfc87e6e892307665e6336e", "type": "github" }, "original": { "owner": "srid", + "ref": "0.2.0.0", "repo": "commonmark-simple", "type": "github" } @@ -19,15 +20,16 @@ "commonmark-wikilink": { "flake": false, "locked": { - "lastModified": 1738248145, - "narHash": "sha256-UN2Nh+uf+DzM336Ojzr6YZV4RJy8BPx9Q5GZpax3wt0=", + "lastModified": 1755567049, + "narHash": "sha256-MWOb0Ojc4EQd9fOnQEveRDdbH5Cr6kjUt04uWzBPLGQ=", "owner": "srid", "repo": "commonmark-wikilink", - "rev": "1d7aa327fb33b41f3c4899d5b29aa122780c900f", + "rev": "5ab01515939047b58943cc1234e7ee0cb82d1c22", "type": "github" }, "original": { "owner": "srid", + "ref": "0.2.0.0", "repo": "commonmark-wikilink", "type": "github" } @@ -36,8 +38,8 @@ "inputs": { "emanote": "emanote", "flake-parts": "flake-parts_2", - "fourmolu-nix": "fourmolu-nix", - "git-hooks": "git-hooks", + "fourmolu-nix": "fourmolu-nix_2", + "git-hooks": "git-hooks_2", "haskell-flake": "haskell-flake_2", "lvar": "lvar_2", "nixpkgs": [ @@ -45,11 +47,11 @@ ] }, "locked": { - "lastModified": 1753325599, - "narHash": "sha256-LFAvuQczH4ZG1uyPFI4AQzLeJ5wmyjELi7dtoD2rVPU=", + "lastModified": 1763158383, + "narHash": "sha256-1pI9yIP1NCvclmRQ3aLxWzrsV1wOLaVvo0eFAblIVys=", "owner": "srid", "repo": "ema", - "rev": "e20c61cb21b27a8d01940c7caaaf04ed51994d0a", + "rev": "6d5057055bb8e9ccc26af6607d3bacecb909f396", "type": "github" }, "original": { @@ -82,21 +84,21 @@ "ema": "ema_2", "emanote-template": "emanote-template", "flake-parts": "flake-parts", - "flake-root": "flake-root", + "fourmolu-nix": "fourmolu-nix", + "git-hooks": "git-hooks", "haskell-flake": "haskell-flake", "heist-extra": "heist-extra", "lvar": "lvar", "nixos-unified": "nixos-unified", "nixpkgs": "nixpkgs", - "treefmt-nix": "treefmt-nix", "unionmount": "unionmount" }, "locked": { - "lastModified": 1753298660, - "narHash": "sha256-rE84s+P4hx4AtriCPagexOQ7KsqIYsLyXGVx+QyzWFw=", + "lastModified": 1761616734, + "narHash": "sha256-XU4Nie+5QBYs1sDm4AIFc4+fZKMczVF04zuT1qPuBHY=", "owner": "srid", "repo": "emanote", - "rev": "7d505ee7ecfdbce87daff982034561f6a4625abc", + "rev": "4297145584c1623ddab27f126f80b5ba73238c3e", "type": "github" }, "original": { @@ -166,11 +168,11 @@ "nixpkgs-lib": "nixpkgs-lib_2" }, "locked": { - "lastModified": 1753121425, - "narHash": "sha256-TVcTNvOeWWk1DXljFxVRp+E0tzG1LhrVjOGGoMHuXio=", + "lastModified": 1772408722, + "narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "644e0fc48951a860279da645ba77fe4a6e814c5e", + "rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3", "type": "github" }, "original": { @@ -179,22 +181,22 @@ "type": "github" } }, - "flake-root": { + "fourmolu-nix": { "locked": { - "lastModified": 1723604017, - "narHash": "sha256-rBtQ8gg+Dn4Sx/s+pvjdq3CB2wQNzx9XGFq/JVGCB6k=", - "owner": "srid", - "repo": "flake-root", - "rev": "b759a56851e10cb13f6b8e5698af7b59c44be26e", + "lastModified": 1707266073, + "narHash": "sha256-tCFzZQJicDdYjnuJiNK4hiiRAH7c2wQzMhOCdUMbVKE=", + "owner": "jedimahdi", + "repo": "fourmolu-nix", + "rev": "717f5a91b0d7b97b1be7ecc3a0fd42d37ffe1c9b", "type": "github" }, "original": { - "owner": "srid", - "repo": "flake-root", + "owner": "jedimahdi", + "repo": "fourmolu-nix", "type": "github" } }, - "fourmolu-nix": { + "fourmolu-nix_2": { "locked": { "lastModified": 1707266073, "narHash": "sha256-tCFzZQJicDdYjnuJiNK4hiiRAH7c2wQzMhOCdUMbVKE=", @@ -209,7 +211,7 @@ "type": "github" } }, - "fourmolu-nix_2": { + "fourmolu-nix_3": { "locked": { "lastModified": 1707266073, "narHash": "sha256-tCFzZQJicDdYjnuJiNK4hiiRAH7c2wQzMhOCdUMbVKE=", @@ -225,6 +227,22 @@ } }, "git-hooks": { + "flake": false, + "locked": { + "lastModified": 1748731907, + "narHash": "sha256-KVgK2PB1h5RNhHJzGn090XcW1i9Mq0FVh6qTVKsg2RU=", + "owner": "bmrips", + "repo": "git-hooks.nix", + "rev": "2749fc9197fd12231746ef685225eaf85fe087fd", + "type": "github" + }, + "original": { + "owner": "bmrips", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "git-hooks_2": { "flake": false, "locked": { "lastModified": 1750779888, @@ -240,14 +258,14 @@ "type": "github" } }, - "git-hooks_2": { + "git-hooks_3": { "flake": false, "locked": { - "lastModified": 1750779888, - "narHash": "sha256-wibppH3g/E2lxU43ZQHC5yA/7kIKLGxVEnsnVK1BtRg=", + "lastModified": 1772893680, + "narHash": "sha256-JDqZMgxUTCq85ObSaFw0HhE+lvdOre1lx9iI6vYyOEs=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "16ec914f6fb6f599ce988427d9d94efddf25fe6d", + "rev": "8baab586afc9c9b57645a734c820e4ac0a604af9", "type": "github" }, "original": { @@ -288,11 +306,11 @@ }, "haskell-flake_3": { "locked": { - "lastModified": 1753647560, - "narHash": "sha256-NQCOI4+vOtIKqjFZ4oLrzQF3LLGAmaVNQwOFdj61FMM=", + "lastModified": 1772328857, + "narHash": "sha256-6kpGzbT/dxCUy8CvufnYemmtdeWp22ZPrw78Z7hFM5A=", "owner": "srid", "repo": "haskell-flake", - "rev": "cc3bddb0b36787a0d55684ea0ec87ee1525b639c", + "rev": "ce6820803fb18c38628b3142a124b9c5f7ac3242", "type": "github" }, "original": { @@ -304,15 +322,16 @@ "heist-extra": { "flake": false, "locked": { - "lastModified": 1737313814, - "narHash": "sha256-WCXhs/xhCR4CKBEadQjqqgUb47bLzDY7P7oL5cSgDHc=", + "lastModified": 1755566620, + "narHash": "sha256-J/AmooFxQkFas0qWe2rxWJw9vTzG56nX22grUDMw9Oc=", "owner": "srid", "repo": "heist-extra", - "rev": "6f73e000a34b7c054b516b9504b5a7ed08ce6a2d", + "rev": "ee59ac1bd98ef90a902158b46401b66f4a3aad3b", "type": "github" }, "original": { "owner": "srid", + "ref": "0.4.0.0", "repo": "heist-extra", "type": "github" } @@ -368,11 +387,11 @@ }, "nixos-unified_2": { "locked": { - "lastModified": 1753730363, - "narHash": "sha256-IB+0W+n6cMnYwYjFGsJi7TIJA26pSaFhgzwmnmB9Pdc=", + "lastModified": 1764076447, + "narHash": "sha256-dpkdOPPCWaFtDoxVAtVaprtPX6jGl8o30EBc1gWBOnQ=", "owner": "srid", "repo": "nixos-unified", - "rev": "e91aecaaa310065b067b946774660febc7f212a2", + "rev": "90171c6936a8332ede17e09e337a0e71f4e659b1", "type": "github" }, "original": { @@ -414,11 +433,11 @@ }, "nixpkgs-lib_2": { "locked": { - "lastModified": 1751159883, - "narHash": "sha256-urW/Ylk9FIfvXfliA1ywh75yszAbiTEVgpPeinFyVZo=", + "lastModified": 1772328832, + "narHash": "sha256-e+/T/pmEkLP6BHhYjx6GmwP5ivonQQn0bJdH9YrRB+Q=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "14a40a1d7fb9afa4739275ac642ed7301a9ba1ab", + "rev": "c185c7a5e5dd8f9add5b2f8ebeff00888b070742", "type": "github" }, "original": { @@ -429,11 +448,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1753934836, - "narHash": "sha256-G06FmIBj0I5bMW1Q8hAEIl5N7IHMK7+Ta4KA+BmneDA=", + "lastModified": 1772771118, + "narHash": "sha256-xWzaTvmmACR/SRWtABgI/Z97lcqwJAeoSd5QW1KdK1s=", "owner": "nixos", "repo": "nixpkgs", - "rev": "8679b16e11becd487b45d568358ddf9d5640d860", + "rev": "e38213b91d3786389a446dfce4ff5a8aaf6012f2", "type": "github" }, "original": { @@ -445,11 +464,11 @@ }, "process-compose-flake": { "locked": { - "lastModified": 1749418557, - "narHash": "sha256-wJHHckWz4Gvj8HXtM5WVJzSKXAEPvskQANVoRiu2w1w=", + "lastModified": 1767863885, + "narHash": "sha256-XXekPAxzbv1DmHFo3Elmj/vDnvWc1V0jdDUvM0/Wf7k=", "owner": "Platonic-Systems", "repo": "process-compose-flake", - "rev": "91dcc48a6298e47e2441ec76df711f4e38eab94e", + "rev": "99bea96cf269cfd235833ebdf645b567069fd398", "type": "github" }, "original": { @@ -462,48 +481,27 @@ "inputs": { "ema": "ema", "flake-parts": "flake-parts_3", - "fourmolu-nix": "fourmolu-nix_2", - "git-hooks": "git-hooks_2", + "fourmolu-nix": "fourmolu-nix_3", + "git-hooks": "git-hooks_3", "haskell-flake": "haskell-flake_3", "nixos-unified": "nixos-unified_2", "nixpkgs": "nixpkgs_2", "process-compose-flake": "process-compose-flake" } }, - "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "ema", - "emanote", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1752909129, - "narHash": "sha256-Eh8FkMvGRaY71BU/oyZTTzt9RsBIq2E6j0r3eLZ/2kY=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "0043b95d80b5bf6d61e84d237e2007727f4dd38d", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } - }, "unionmount": { "flake": false, "locked": { - "lastModified": 1742156722, - "narHash": "sha256-5oRYBxnxo/YK2nUdrRdDCatkPWDwSGw4zG67mOATxcU=", + "lastModified": 1755566785, + "narHash": "sha256-1TBIhcgbQxBF48ET7Dy+PM3U2lCROBDVg5PhOtm2Q/M=", "owner": "srid", "repo": "unionmount", - "rev": "0349ae3e16e803101cbdd9c056e6b052f8817cba", + "rev": "4387cdeca64d22ff02da318b1527ff8817123ced", "type": "github" }, "original": { "owner": "srid", + "ref": "0.3.0.0", "repo": "unionmount", "type": "github" } diff --git a/nix/modules/flake/devshell.nix b/nix/modules/flake/devshell.nix index 167208d..85549d1 100644 --- a/nix/modules/flake/devshell.nix +++ b/nix/modules/flake/devshell.nix @@ -1,14 +1,11 @@ { perSystem = { config, pkgs, lib, ... }: - let - tailwind = pkgs.haskellPackages.tailwind; - in { devShells.default = pkgs.mkShell { name = "ema-template"; meta.description = "ema-template development environment"; packages = [ - tailwind + pkgs.tailwindcss pkgs.just pkgs.nixd ]; diff --git a/nix/modules/flake/packages.nix b/nix/modules/flake/packages.nix index 9b82bb4..181fe9c 100644 --- a/nix/modules/flake/packages.nix +++ b/nix/modules/flake/packages.nix @@ -5,20 +5,21 @@ ]; perSystem = { config, pkgs, lib, ... }: let - tailwind = pkgs.haskellPackages.tailwind; + tailwindcss = lib.getExe pkgs.tailwindcss; buildEmaSiteWithTailwind = { baseUrl }: pkgs.runCommand "site" { - LANG = "C.UTF-8"; - LC_ALL = "C.UTF-8"; + LANG = "C.UTF-8"; + LC_ALL = "C.UTF-8"; } '' mkdir -p $out pushd ${inputs.self}/ema-template ${lib.getExe config.packages.ema-template} \ --base-url=${baseUrl} gen $out - ${lib.getExe tailwind} \ - -o $out/tailwind.css 'src/**/*.hs' + rm -f $out/tailwind.css + ${tailwindcss} \ + --content 'src/**/*.hs' -o $out/tailwind.css --minify ''; in { @@ -28,7 +29,7 @@ processes = { haskell.command = "cd ./ema-template && ghcid"; tailwind = { - command = "cd ./ema-template && ${lib.getExe tailwind} -w -o ./static/tailwind.css './src/**/*.hs'"; + command = "cd ./ema-template && ${tailwindcss} --content './src/**/*.hs' -o ./static/tailwind.css --watch"; is_tty = true; }; };