From: Michael Tremer Date: Wed, 1 Dec 2021 22:24:33 +0000 (+0000) Subject: Refactor graphs UI modules X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=06986af134b15327bb074673bff30bd2414b9406;p=people%2Fms%2Fwestferry.git Refactor graphs UI modules Signed-off-by: Michael Tremer --- diff --git a/Makefile.am b/Makefile.am index d2a522f..0ddef80 100644 --- a/Makefile.am +++ b/Makefile.am @@ -173,10 +173,7 @@ dist_templates_modules_forms_inputs_DATA = \ templates_modules_graphsdir = $(templates_modulesdir)/graphs dist_templates_modules_graphs_DATA = \ - src/templates/modules/graphs/box.html \ - src/templates/modules/graphs/preview.html \ - src/templates/modules/graphs/thumbnail.html \ - src/templates/modules/graphs/thumbnail-bar.html + src/templates/modules/graphs/box.html templates_modules_menudir = $(templates_modulesdir)/menu diff --git a/src/styles/westferry.scss b/src/styles/westferry.scss index 5efbd3a..46d4976 100644 --- a/src/styles/westferry.scss +++ b/src/styles/westferry.scss @@ -82,3 +82,7 @@ $foundation-palette: ( .top-bar { margin-bottom: 1rem; } + +img.graph { + margin-bottom: 1rem; +} diff --git a/src/templates/graph.html b/src/templates/graph.html deleted file mode 100644 index 36ed148..0000000 --- a/src/templates/graph.html +++ /dev/null @@ -1,5 +0,0 @@ -{% extends "base.html" %} - -{% block main %} - {% module GraphBox(graph) %} -{% end block %} diff --git a/src/templates/graphs.html b/src/templates/graphs.html index 6c7fe15..fe2a336 100644 --- a/src/templates/graphs.html +++ b/src/templates/graphs.html @@ -2,6 +2,6 @@ {% block main %} {% for g in graphs %} - {% module GraphBoxPreview(g) %} + {% module GraphBox(g) %} {% end %} {% end block %} diff --git a/src/templates/modules/graphs/box.html b/src/templates/modules/graphs/box.html index 9f9b974..f5a8228 100644 --- a/src/templates/modules/graphs/box.html +++ b/src/templates/modules/graphs/box.html @@ -1,32 +1,30 @@ - +{% set intervals = { + "hour" : _("Hour"), + "day" : _("Day"), + "week" : _("Week"), + "month" : _("Month"), + "year" : _("Year") +} %} -{{ graph.title }} +

{{ graph.title }}

-