From 1f8b5c2bbe20c4c6b7b334b00ae5e6622dcd51f7 Mon Sep 17 00:00:00 2001 From: xengineering Date: Wed, 11 Jan 2023 20:02:10 +0100 Subject: Switch to simple.css This makes it easier to maintain and it looks better. --- .gitmodules | 6 +++--- Makefile | 2 +- data/static/add.html | 19 +++++++++++-------- data/static/libweb.css | 1 - data/static/style.css | 1 + data/templates/index.html | 25 ++++++++++++++++--------- data/templates/recipe.html | 25 ++++++++++++++++++------- libweb | 1 - simple.css | 1 + web/router.go | 2 +- 10 files changed, 52 insertions(+), 31 deletions(-) delete mode 120000 data/static/libweb.css create mode 120000 data/static/style.css delete mode 160000 libweb create mode 160000 simple.css diff --git a/.gitmodules b/.gitmodules index 13669d0..a3875af 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "libweb"] - path = libweb - url = https://cgit.xengineering.eu/libweb +[submodule "simple.css"] + path = simple.css + url = https://github.com/kevquirk/simple.css.git diff --git a/Makefile b/Makefile index a7ae041..45f5d0b 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ install: all install -Dm 644 config/default.json $(DESTDIR)/etc/ceres/config.json install -Dm 644 data/static/add.html $(DESTDIR)$(PREFIX)/share/ceres/static/add.html - install -Dm 644 data/static/libweb.css $(DESTDIR)$(PREFIX)/share/ceres/static/libweb.css + install -Dm 644 data/static/style.css $(DESTDIR)$(PREFIX)/share/ceres/static/style.css install -Dm 644 data/templates/index.html $(DESTDIR)$(PREFIX)/share/ceres/templates/index.html install -Dm 644 data/templates/recipe.html $(DESTDIR)$(PREFIX)/share/ceres/templates/recipe.html diff --git a/data/static/add.html b/data/static/add.html index ed02811..15d9f0e 100644 --- a/data/static/add.html +++ b/data/static/add.html @@ -8,24 +8,27 @@ - + -
- +

Add a recipe

+
+
-
-
-
-
- +
+
+
+
diff --git a/data/static/libweb.css b/data/static/libweb.css deleted file mode 120000 index efe201e..0000000 --- a/data/static/libweb.css +++ /dev/null @@ -1 +0,0 @@ -../../libweb/libweb.css \ No newline at end of file diff --git a/data/static/style.css b/data/static/style.css new file mode 120000 index 0000000..c954338 --- /dev/null +++ b/data/static/style.css @@ -0,0 +1 @@ +../../simple.css/simple.min.css \ No newline at end of file diff --git a/data/templates/index.html b/data/templates/index.html index f216ed4..9115d31 100644 --- a/data/templates/index.html +++ b/data/templates/index.html @@ -8,22 +8,29 @@ - + -
+
+

Recipes

- +
+ +

Here are the available recipes 😋🍳🍔🍕🥘

- {{range .}} - -
-
{{.Title}}
-
-
{{end}} + + +
diff --git a/data/templates/recipe.html b/data/templates/recipe.html index fcfdf67..536cac9 100644 --- a/data/templates/recipe.html +++ b/data/templates/recipe.html @@ -8,24 +8,35 @@ - + -
+
{{if ne .UpstreamUrl ""}} + + {{end}}

{{.Title}}

- Recipe image{{if ne .UpstreamUrl ""}} -

Link to recipe

{{end}} +
+ +
+ Recipe image

Recipe description

- - - + + +
{{.RenderedDescriptionMarkdown}}
+ +