1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-12-22 09:00:10 +00:00

site: fix docker; modal with 'make all'

This commit is contained in:
Harvey Tindall 2021-06-30 01:16:51 +01:00
parent d5a33cf242
commit fbb9f20026
Signed by: hrfee
GPG Key ID: BBC65952848FB1A2
3 changed files with 34 additions and 24 deletions

View File

@ -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 ..

View File

@ -2,16 +2,17 @@
<html lang="en" class="light-theme">
<head>
<link rel="stylesheet" type="text/css" href="bundle.css">
<link rel="stylesheet" type="text/css" href="modal.css">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="Description" content="jfa-go, a better way to manage Jellyfin users.">
<meta name="color-scheme" content="dark light">
<link rel="apple-touch-icon" sizes="180x180" href="{{ .urlBase }}/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="{{ .urlBase }}/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="{{ .urlBase }}/favicon-16x16.png">
<link rel="manifest" href="{{ .urlBase }}/site.webmanifest">
<link rel="mask-icon" href="{{ .urlBase }}/safari-pinned-tab.svg" color="#5bbad5">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#603cba">
<meta name="theme-color" content="#ffffff">
<title>jfa-go - a better way to manage Jellyfin users</title>
@ -33,8 +34,7 @@ sudo apt-get install jfa-go
# ------
# For desktops/servers with GUI (has dependencies)
sudo apt-get install jfa-go-tray
# ------
</pre>
# ------</pre>
</div>
</div>
<div id="modal-deb-unstable" class="modal">
@ -53,8 +53,7 @@ sudo apt-get install jfa-go
# ------
# For desktops/servers with GUI (has dependencies)
sudo apt-get install jfa-go-tray
# ------
</pre>
# ------</pre>
</div>
</div>
<div id="modal-docker" class="modal">
@ -62,19 +61,13 @@ sudo apt-get install jfa-go-tray
<span class="heading"> Docker</span>
<pre class="monospace pre-line">
docker create \
--name "jfa-go" \ # Whatever you want to name it
-p 8056:8056 \
# -p 8057:8057 if using tls
-v /path/to/.config/jfa-go:/data \ # Path to wherever you want to store the config file and other data
-v /path/to/jellyfin:/jf \ # Path to Jellyfin config directory, ignore if using Emby
-v /etc/localtime:/etc/localtime:ro \ # Makes sure time is correct
<span id="docker-stable">
hrfee/jfa-go
</span>
<span id="docker-unstable" class="unfocused">
hrfee/jfa-go:unstable
</span>
</pre>
--name "jfa-go" \ # Whatever you want to name it
-p 8056:8056 \
# -p 8057:8057 if using tls
-v /path/to/.config/jfa-go:/data \ # Path to wherever you want to store the config file and other data
-v /path/to/jellyfin:/jf \ # Path to Jellyfin config directory, ignore if using Emby
-v /etc/localtime:/etc/localtime:ro \ # Makes sure time is correct
<span id="docker-stable">hrfee/jfa-go</span><span id="docker-unstable" class="unfocused">hrfee/jfa-go:unstable</span></pre>
</div>
</div>
<div class="page-container" id="page-container">

View File

@ -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;