From 47d00d1f27af1dfae1de09a2de4b7e1888caad62 Mon Sep 17 00:00:00 2001 From: Harvey Tindall Date: Thu, 29 Dec 2022 21:15:07 +0000 Subject: [PATCH] site: properly fix modals uncss was clearing out the "block" and "animate-fade-in/out", so removed that step since tailwind does a similar thing anyway. --- site/Makefile | 6 ++---- site/base.css | 1 + site/index.html | 1 - site/safelist.html | 23 +++++++++++++++++++++++ site/tailwind.config.js | 4 +++- 5 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 site/safelist.html diff --git a/site/Makefile b/site/Makefile index 5bde6a9..c078b15 100644 --- a/site/Makefile +++ b/site/Makefile @@ -8,9 +8,7 @@ all: ../scripts/dark-variant.sh tempts npx esbuild --bundle tempts/main.ts --outfile=out/main.js --minify npx esbuild --bundle base.css --outfile=out/bundle.css --external:remixicon.css --external:modal.css --minify - npx tailwindcss -i out/bundle.css -o out/bundle.css - cd out && npx uncss index.html --stylesheets bundle.css > _bundle.css; cd .. - mv out/_bundle.css out/bundle.css + npx tailwindcss -c tailwind.config.js -i out/bundle.css -o out/bundle.css cd out && npx uncss index.html --stylesheets remixicon.css > _remixicon.css; cd .. mv out/_remixicon.css out/remixicon.css cp ../static/* out/ @@ -26,7 +24,7 @@ debug: ../scripts/dark-variant.sh tempts npx esbuild --bundle base.css --outfile=out/bundle.css --external:remixicon.css --minify npx esbuild --bundle ts/main.ts --sourcemap --outfile=out/main.js --minify - npx tailwindcss -i out/bundle.css -o out/bundle.css + npx tailwindcss -c tailwind.config.js -i out/bundle.css -o out/bundle.css cp ../static/* out/ monitor: diff --git a/site/base.css b/site/base.css index 012dd0d..9024d26 100644 --- a/site/base.css +++ b/site/base.css @@ -1,4 +1,5 @@ @import "../css/base.css"; +@import "../css/modal.css"; :root { --c-1: #ffe3ef; diff --git a/site/index.html b/site/index.html index 0336c32..79e4fe4 100644 --- a/site/index.html +++ b/site/index.html @@ -2,7 +2,6 @@ - diff --git a/site/safelist.html b/site/safelist.html new file mode 100644 index 0000000..902d6c2 --- /dev/null +++ b/site/safelist.html @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + jfa-go - a better way to manage Jellyfin users + + + + + diff --git a/site/tailwind.config.js b/site/tailwind.config.js index 60826f4..e1f1f52 100644 --- a/site/tailwind.config.js +++ b/site/tailwind.config.js @@ -2,8 +2,9 @@ let colors = require("tailwindcss/colors") let dark = require("../css/dark"); module.exports = { - content: ["./index.html", "./out/main.js"], + content: ["./safelist.html", "./index.html", "./out/main.js"], darkMode: 'class', + important: true, theme: { extend: { keyframes: { @@ -44,5 +45,6 @@ module.exports = { } } }, + safelist: ["block", "animate-fade-in", "animate-fade-out"], plugins: [require("a17t")], }