summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2024-01-09 23:25:59 +0100
committerAki <please@ignore.pl>2024-01-09 23:25:59 +0100
commit0f857271eac9995b90e16f58181d29a0bd6a47b6 (patch)
tree5b4d71e3942cb3f1c559cacec437eff274c52474
parent4c7bd2da2a7c0e01f9c7a70f46b2d9b9f575b49b (diff)
downloadrudone-0f857271eac9995b90e16f58181d29a0bd6a47b6.zip
rudone-0f857271eac9995b90e16f58181d29a0bd6a47b6.tar.gz
rudone-0f857271eac9995b90e16f58181d29a0bd6a47b6.tar.bz2
Added simple fancy style to the dashboard (maybe opinionated)
-rw-r--r--favicon.pngbin0 -> 7671 bytes
-rw-r--r--index.html.in4
-rw-r--r--main.go2
-rw-r--r--style.css12
4 files changed, 16 insertions, 2 deletions
diff --git a/favicon.png b/favicon.png
new file mode 100644
index 0000000..97c11b6
--- /dev/null
+++ b/favicon.png
Binary files differ
diff --git a/index.html.in b/index.html.in
index 3d813ad..9c1fbc3 100644
--- a/index.html.in
+++ b/index.html.in
@@ -1,8 +1,10 @@
<!doctype html>
<html lang="en">
<meta charset="utf-8">
+<link rel="icon" type="image/png" href="favicon.png">
+<link rel="stylesheet" type="text/css" href="style.css">
<title>rudone</title>
-<h1>rudone &mdash; <span style="color: green">OK</span></h1>
+<h1>rudone &mdash; <span class="ok">OK</span></h1>
<table>
{{range .Stats}}
<tr><th>{{.Title}}<td>{{.Amount}} visits
diff --git a/main.go b/main.go
index f5129ce..6b86223 100644
--- a/main.go
+++ b/main.go
@@ -13,7 +13,7 @@ import (
"github.com/gorilla/mux"
)
-//go:embed *.js *.in robots.txt
+//go:embed *.js *.html.in *.css *.png robots.txt
var content embed.FS
func handleEntryOptions(w http.ResponseWriter, r *http.Request) {
diff --git a/style.css b/style.css
new file mode 100644
index 0000000..cc7b87a
--- /dev/null
+++ b/style.css
@@ -0,0 +1,12 @@
+body {
+ padding: 1em;
+ margin: 0 auto;
+ width: max-content;
+ font-family: sans-serif;
+}
+
+
+.ok { color: green; }
+table { width: 100%; }
+th { text-align: left; }
+td { text-align: right; }