aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask/templates/base_macro.html
diff options
context:
space:
mode:
authorArun Isaac2023-12-29 18:55:37 +0000
committerArun Isaac2023-12-29 19:01:46 +0000
commit204a308be0f741726b9a620d88fbc22b22124c81 (patch)
treeb3cf66906674020b530c844c2bb4982c8a0e2d39 /gn2/wqflask/templates/base_macro.html
parent83062c75442160427b50420161bfcae2c5c34c84 (diff)
downloadgenenetwork2-204a308be0f741726b9a620d88fbc22b22124c81.tar.gz
Namespace all modules under gn2.
We move all modules under a gn2 directory. This is important for "correct" packaging and deployment as a Guix service.
Diffstat (limited to 'gn2/wqflask/templates/base_macro.html')
-rw-r--r--gn2/wqflask/templates/base_macro.html28
1 files changed, 28 insertions, 0 deletions
diff --git a/gn2/wqflask/templates/base_macro.html b/gn2/wqflask/templates/base_macro.html
new file mode 100644
index 00000000..7fcb6fe7
--- /dev/null
+++ b/gn2/wqflask/templates/base_macro.html
@@ -0,0 +1,28 @@
+{% macro flash_me() -%}
+ {% with messages = get_flashed_messages(with_categories=true) %}
+ {% if messages %}
+ <div class="container">
+ {% for category, message in messages %}
+ <div class="alert {{ category }}" role="alert">{{ message }}</div>
+ {% endfor %}
+ </div>
+ {% endif %}
+ {% endwith %}
+{% endmacro %}
+
+{% macro header(main, second) %}
+ <header class="jumbotron subhead" id="overview" >
+ <div class="container">
+ <h1>{{ main }}</h1>
+ <p class="lead">
+ {{ second }}
+ </p>
+ </div>
+ </header>
+
+ {{ flash_me() }}
+{% endmacro %}
+
+{% macro timeago(timestamp) %}
+<time class="timeago" datetime="{{ timestamp }}">{{ timestamp }}</time>
+{% endmacro %}