summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2022-05-16 18:59:43 +0200
committerxengineering <me@xengineering.eu>2022-05-16 18:59:43 +0200
commit3b4f49a63fbab23ab36bccdfc82b86e5223f2495 (patch)
tree7fddafaee99654865402290a98931a138a5e49e6
parent96e66b41169a005613fe45f47bb7d1d92950a10f (diff)
downloadwebiot-3b4f49a63fbab23ab36bccdfc82b86e5223f2495.tar
webiot-3b4f49a63fbab23ab36bccdfc82b86e5223f2495.tar.zst
webiot-3b4f49a63fbab23ab36bccdfc82b86e5223f2495.zip
Implement CSS installation
-rw-r--r--Makefile1
-rw-r--r--main.go2
l---------webiot.css1
3 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 81f3235..e258995 100644
--- a/Makefile
+++ b/Makefile
@@ -19,6 +19,7 @@ install: all
install -Dm 755 build/$(PROGRAM) $(DESTDIR)$(PREFIX)/bin/$(PROGRAM)
install -Dm 644 config.json $(DESTDIR)/etc/$(PROGRAM)/config.json
install -Dm 644 index.html.tmpl $(DESTDIR)$(PREFIX)/share/$(PROGRAM)/index.html.tmpl
+ install -Dm 644 libweb/libweb.css $(DESTDIR)$(PREFIX)/share/$(PROGRAM)/webiot.css
install -Dm 644 systemd/$(PROGRAM).service $(DESTDIR)$(PREFIX)/lib/systemd/system/$(PROGRAM).service
install -Dm 644 systemd/$(PROGRAM).sysusers $(DESTDIR)$(PREFIX)/lib/sysusers.d/$(PROGRAM).conf
diff --git a/main.go b/main.go
index 76e9f85..35bacc1 100644
--- a/main.go
+++ b/main.go
@@ -87,7 +87,7 @@ func index(devices DevicesConfig, appdata string) func(http.ResponseWriter, *htt
func css(appdata string) func(http.ResponseWriter, *http.Request) {
// read CSS file
- path := filepath.Join(appdata, "libweb/libweb.css")
+ path := filepath.Join(appdata, "webiot.css")
css := string(mustRead(path))
return func(w http.ResponseWriter, r *http.Request) {
diff --git a/webiot.css b/webiot.css
new file mode 120000
index 0000000..7efcff2
--- /dev/null
+++ b/webiot.css
@@ -0,0 +1 @@
+libweb/libweb.css \ No newline at end of file