From fbb9f200260718701af554748fd39d0284f079fc Mon Sep 17 00:00:00 2001 From: Harvey Tindall Date: Wed, 30 Jun 2021 01:16:51 +0100 Subject: [PATCH] site: fix docker; modal with 'make all' --- site/Makefile | 4 ++-- site/index.html | 37 +++++++++++++++---------------------- site/ts/main.ts | 17 +++++++++++++++++ 3 files changed, 34 insertions(+), 24 deletions(-) diff --git a/site/Makefile b/site/Makefile index 324783e..29b4003 100644 --- a/site/Makefile +++ b/site/Makefile @@ -1,9 +1,9 @@ all: -mkdir -p out - cp index.html out/ + cp index.html ../css/modal.css out/ cp -r node_modules/remixicon/fonts/remixicon.css node_modules/remixicon/fonts/remixicon.woff2 out/ npx esbuild --bundle ts/main.ts --outfile=out/main.js --minify - npx esbuild --bundle base.css --outfile=out/bundle.css --external:remixicon.css --minify + npx esbuild --bundle base.css --outfile=out/bundle.css --external:remixicon.css --external:modal.css --minify cd out && npx uncss index.html --stylesheets bundle.css > _bundle.css; cd .. mv out/_bundle.css out/bundle.css cd out && npx uncss index.html --stylesheets remixicon.css > _remixicon.css; cd .. diff --git a/site/index.html b/site/index.html index 606f34c..12f809c 100644 --- a/site/index.html +++ b/site/index.html @@ -2,16 +2,17 @@ + - - - - - + + + + + jfa-go - a better way to manage Jellyfin users @@ -33,8 +34,7 @@ sudo apt-get install jfa-go # ------ # For desktops/servers with GUI (has dependencies) sudo apt-get install jfa-go-tray -# ------ - +# ------
diff --git a/site/ts/main.ts b/site/ts/main.ts index 825fdf2..5f5d87b 100644 --- a/site/ts/main.ts +++ b/site/ts/main.ts @@ -23,16 +23,33 @@ const unstableSect = document.getElementById("sect-unstable"); const stableButton = document.getElementById("download-stable") as HTMLSpanElement; const unstableButton = document.getElementById("download-unstable") as HTMLSpanElement; +const dockerStable = document.getElementById("docker-stable"); +const dockerUnstable = document.getElementById("docker-unstable"); + stableButton.onclick = () => { + dockerStable.classList.remove("unfocused"); + dockerUnstable.classList.add("unfocused"); stableButton.classList.add("!high"); unstableButton.classList.remove("!high"); stableSect.classList.remove("unfocused"); unstableSect.classList.add("unfocused"); + } unstableButton.onclick = () => { + dockerUnstable.classList.remove("unfocused"); + dockerStable.classList.add("unfocused"); unstableButton.classList.add("!high"); stableButton.classList.remove("!high"); stableSect.classList.add("unfocused"); unstableSect.classList.remove("unfocused"); } + +const dockerModal = new Modal(document.getElementById("modal-docker")); +const dockerButton = document.getElementById("download-docker") as HTMLSpanElement; +const dockerUnstableButton = document.getElementById("download-docker-unstable") as HTMLSpanElement; + +dockerButton.onclick = dockerModal.toggle; +dockerUnstableButton.onclick = dockerModal.toggle; + +