From 60c8c967c988dac41382d68dec965fe477bd4d5f Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Fri, 26 Mar 2021 05:56:10 +0300 Subject: user defined css --- Makefile | 1 + PKGBUILD | 2 ++ configs/kvmd/web.css | 1 + configs/nginx/kvmd.ctx-server.conf | 5 +++++ web/base.pug | 2 +- web/index.html | 1 + web/ipmi/index.html | 1 + web/kvm/index.html | 1 + web/login/index.html | 1 + web/vnc/index.html | 1 + 10 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 configs/kvmd/web.css diff --git a/Makefile b/Makefile index ed40fcb9..f3b75061 100644 --- a/Makefile +++ b/Makefile @@ -125,6 +125,7 @@ run: testenv $(TESTENV_GPIO) && cp /usr/share/kvmd/configs.default/kvmd/*passwd /etc/kvmd \ && cp /usr/share/kvmd/configs.default/kvmd/main/$(if $(P),$(P),$(DEFAULT_PLATFORM)).yaml /etc/kvmd/main.yaml \ && cp /testenv/$(if $(P),$(P),$(DEFAULT_PLATFORM)).override.yaml /etc/kvmd/override.yaml \ + && cp /usr/share/kvmd/configs.default/kvmd/web.css /etc/kvmd \ && nginx -c /etc/kvmd/nginx/nginx.conf -g 'user http; error_log stderr;' \ && ln -s $(TESTENV_VIDEO) /dev/kvmd-video \ && ln -s $(TESTENV_GPIO) /dev/kvmd-gpio \ diff --git a/PKGBUILD b/PKGBUILD index adbea2e3..0954789d 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -83,6 +83,7 @@ backup=( etc/kvmd/{override,logging,auth,meta}.yaml etc/kvmd/{ht,ipmi,vnc}passwd etc/kvmd/nginx/{kvmd.ctx-{http,server},loc-{login,nocache,proxy,websocket},mime-types,ssl,nginx}.conf + etc/kvmd/web.css ) @@ -127,6 +128,7 @@ package_kvmd() { install -Dm644 -t "$pkgdir/etc/kvmd" "$_cfg_default/kvmd"/*.yaml install -Dm600 -t "$pkgdir/etc/kvmd" "$_cfg_default/kvmd"/*passwd + install -Dm644 -t "$pkgdir/etc/kvmd" "$_cfg_default/kvmd"/web.css mkdir -p "$pkgdir/var/lib/kvmd/msd" diff --git a/configs/kvmd/web.css b/configs/kvmd/web.css new file mode 100644 index 00000000..01890494 --- /dev/null +++ b/configs/kvmd/web.css @@ -0,0 +1 @@ +/* Here you can customize the Web UI */ diff --git a/configs/nginx/kvmd.ctx-server.conf b/configs/nginx/kvmd.ctx-server.conf index 1eb37842..a074fa26 100644 --- a/configs/nginx/kvmd.ctx-server.conf +++ b/configs/nginx/kvmd.ctx-server.conf @@ -32,6 +32,11 @@ location /share { auth_request off; } +location /share/css/user.css { + alias /etc/kvmd/web.css; + auth_request off; +} + location = /favicon.ico { alias /usr/share/kvmd/web/favicon.ico; auth_request off; diff --git a/web/base.pug b/web/base.pug index 2a294dfe..7d507db6 100644 --- a/web/base.pug +++ b/web/base.pug @@ -30,7 +30,7 @@ doctype html - var title = "" - var main_js = "" - var body_class = "" -- var css_list = ["vars", "main"] +- var css_list = ["vars", "main", "user"] block vars diff --git a/web/index.html b/web/index.html index 1888f4b6..6b40f2f4 100644 --- a/web/index.html +++ b/web/index.html @@ -35,6 +35,7 @@ + diff --git a/web/ipmi/index.html b/web/ipmi/index.html index d014b16b..c77c6436 100644 --- a/web/ipmi/index.html +++ b/web/ipmi/index.html @@ -35,6 +35,7 @@ +