From 3b4f49a63fbab23ab36bccdfc82b86e5223f2495 Mon Sep 17 00:00:00 2001 From: xengineering Date: Mon, 16 May 2022 18:59:43 +0200 Subject: Implement CSS installation --- Makefile | 1 + main.go | 2 +- webiot.css | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) create mode 120000 webiot.css 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 -- cgit v1.2.3-70-g09d2