From e728a302ee3f38762971e80008ac769c8795c253 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20=C3=85hall?= Date: Sat, 29 Jun 2024 15:21:52 +0200 Subject: [PATCH] Added static resources --- static/css/default_light/notifications.css | 20 ++++++++ static/css/gruvbox/notifications.css | 20 ++++++++ static/images/default_light/notifications.svg | 51 +++++++++++++++++++ .../default_light/notifications_selected.svg | 49 ++++++++++++++++++ static/images/gruvbox/notifications.svg | 51 +++++++++++++++++++ .../images/gruvbox/notifications_selected.svg | 51 +++++++++++++++++++ static/less/notifications.less | 24 +++++++++ views/pages/notifications.gotmpl | 21 ++++++++ 8 files changed, 287 insertions(+) create mode 100644 static/css/default_light/notifications.css create mode 100644 static/css/gruvbox/notifications.css create mode 100644 static/images/default_light/notifications.svg create mode 100644 static/images/default_light/notifications_selected.svg create mode 100644 static/images/gruvbox/notifications.svg create mode 100644 static/images/gruvbox/notifications_selected.svg create mode 100644 static/less/notifications.less create mode 100644 views/pages/notifications.gotmpl diff --git a/static/css/default_light/notifications.css b/static/css/default_light/notifications.css new file mode 100644 index 0000000..8dc1736 --- /dev/null +++ b/static/css/default_light/notifications.css @@ -0,0 +1,20 @@ +#notifications { + display: grid; + grid-template-columns: repeat(4, min-content); + grid-gap: 4px 16px; + margin-top: 32px; + margin-bottom: 32px; + background-color: #2979b8; + padding: 16px 24px; + width: min-content; + border-top-left-radius: 8px; + border-top-right-radius: 8px; +} +#notifications div { + white-space: nowrap; + line-height: 24px; +} +#notifications .header { + font-weight: 800; + color: #7bb8eb; +} diff --git a/static/css/gruvbox/notifications.css b/static/css/gruvbox/notifications.css new file mode 100644 index 0000000..e454f96 --- /dev/null +++ b/static/css/gruvbox/notifications.css @@ -0,0 +1,20 @@ +#notifications { + display: grid; + grid-template-columns: repeat(4, min-content); + grid-gap: 4px 16px; + margin-top: 32px; + margin-bottom: 32px; + background-color: #333; + padding: 16px 24px; + width: min-content; + border-top-left-radius: 8px; + border-top-right-radius: 8px; +} +#notifications div { + white-space: nowrap; + line-height: 24px; +} +#notifications .header { + font-weight: 800; + color: #777; +} diff --git a/static/images/default_light/notifications.svg b/static/images/default_light/notifications.svg new file mode 100644 index 0000000..1e709b5 --- /dev/null +++ b/static/images/default_light/notifications.svg @@ -0,0 +1,51 @@ + + + + + + + + email-fast + email-fast-outline + + + diff --git a/static/images/default_light/notifications_selected.svg b/static/images/default_light/notifications_selected.svg new file mode 100644 index 0000000..46616f0 --- /dev/null +++ b/static/images/default_light/notifications_selected.svg @@ -0,0 +1,49 @@ + + + + + + + + email-fast + + + diff --git a/static/images/gruvbox/notifications.svg b/static/images/gruvbox/notifications.svg new file mode 100644 index 0000000..db6dace --- /dev/null +++ b/static/images/gruvbox/notifications.svg @@ -0,0 +1,51 @@ + + + + + + + + email-fast + email-fast-outline + + + diff --git a/static/images/gruvbox/notifications_selected.svg b/static/images/gruvbox/notifications_selected.svg new file mode 100644 index 0000000..00469dd --- /dev/null +++ b/static/images/gruvbox/notifications_selected.svg @@ -0,0 +1,51 @@ + + + + + + + + email-fast + email-fast-outline + + + diff --git a/static/less/notifications.less b/static/less/notifications.less new file mode 100644 index 0000000..f0a64f1 --- /dev/null +++ b/static/less/notifications.less @@ -0,0 +1,24 @@ +@import "theme-@{THEME}.less"; + +#notifications { + display: grid; + grid-template-columns: repeat(4, min-content); + grid-gap: 4px 16px; + margin-top: 32px; + margin-bottom: 32px; + background-color: @bg3; + padding: 16px 24px; + width: min-content; + border-top-left-radius: 8px; + border-top-right-radius: 8px; + + div { + white-space: nowrap; + line-height: 24px; + } + + .header { + font-weight: @bold; + color: @text3; + } +} diff --git a/views/pages/notifications.gotmpl b/views/pages/notifications.gotmpl new file mode 100644 index 0000000..45bb2a0 --- /dev/null +++ b/views/pages/notifications.gotmpl @@ -0,0 +1,21 @@ +{{ define "page" }} + + {{ block "page_label" . }}{{end}} + {{ $version := .VERSION }} + {{ $theme := .CONFIG.THEME }} + + +
+
Sent
+
OK
+
Trigger name
+
Service
+ {{ range .Data.Notifications }} +
{{ format_time .Sent }}
+
{{ if .OK }}✔{{ else }}✗{{ end }}
+
{{ .TriggerName }}
+
{{ .Prio }}:{{ .Service }}
+ {{ end }} +
+ +{{ end }}