From 3b390858ff8b92f45f3c4adedc7dfe30df07e8ea Mon Sep 17 00:00:00 2001
From: Patrick Jentsch
Date: Tue, 8 Aug 2023 10:48:36 +0200
Subject: [PATCH] Use macros for html generation instead of variables
---
.../corpora/_analysis/concordance.html.j2 | 291 +++++++++---------
.../corpora/_analysis/reader.html.j2 | 139 ++++-----
.../corpora/_analysis/template.html.j2 | 18 +-
app/templates/corpora/analysis.html.j2 | 36 ++-
4 files changed, 234 insertions(+), 250 deletions(-)
diff --git a/app/templates/corpora/_analysis/concordance.html.j2 b/app/templates/corpora/_analysis/concordance.html.j2
index 7fe1c6a6..a26c1a9a 100644
--- a/app/templates/corpora/_analysis/concordance.html.j2
+++ b/app/templates/corpora/_analysis/concordance.html.j2
@@ -2,168 +2,156 @@
{% import 'corpora/_analysis/query_builder/_query_builder.html.j2' as query_builder with context %}
+{% set icon = 'list_alt' %}
{% set name = 'Concordance' %}
+{% set description = 'Query your corpus with the CQP query language utilizing a KWIC view.' %}
-{% set description %}
-Query your corpus with the CQP query language utilizing a KWIC view.
-{% endset %}
-{% set id_prefix = name.lower().replace(' ', '-') + '-extension' %}
-
-{% set tab_content %}
-list_alt{{ name }}
-{% endset %}
-
-{% set container_content %}
-
- {% for extension in extensions if extension.name != 'Static Visualization (beta)' %}
+ {% for id, extension in extensions.items() if extension.name != 'Static Visualization (beta)' %}
-
+
{{ extension.name }}
{{ extension.description }}
@@ -37,9 +46,9 @@
-{% for extension in extensions if extension.name != 'Static Visualization (beta)' %}
-
- {{ extension.container_content }}
+{% for id, extension in extensions.items() if extension.name != 'Static Visualization (beta)' %}
+