From c1ce5425eb125a4166252da41f349fb0a63dd7a4 Mon Sep 17 00:00:00 2001
From: nd <git@notandy.de>
Date: Fri, 25 Sep 2020 13:49:05 +0200
Subject: [PATCH] set a footer link list via config and not raw html

---
 uffd/default_config.cfg  | 2 +-
 uffd/templates/base.html | 8 +++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/uffd/default_config.cfg b/uffd/default_config.cfg
index b51d9c9f..9ccb35cb 100644
--- a/uffd/default_config.cfg
+++ b/uffd/default_config.cfg
@@ -29,7 +29,7 @@ ROLES_BASEROLES=['base']
 
 SQLALCHEMY_TRACK_MODIFICATIONS=False
 
-FOOTER_CONTENT='<div class="container"><span class="text-muted">Place sticky footer content here.</span></div>'
+FOOTER_LINKS=[{"url": "https://example.com", "title": "example"}]
 
 # do NOT set in production
 
diff --git a/uffd/templates/base.html b/uffd/templates/base.html
index 815225ac..66f90a7d 100644
--- a/uffd/templates/base.html
+++ b/uffd/templates/base.html
@@ -97,7 +97,13 @@
 
 		<footer class="footer">
 			{% block footer %}
-			{{ config["FOOTER_CONTENT"]|safe }}
+			<div class="container">
+				<ul class="list-inline">
+					{% for link in config["FOOTER_LINKS"]%}
+					<li class="list-inline-item"><a href="{{ link.url }}">{{ link.title }}</a></li>
+					{% endfor %}
+				</ul>
+			</div>
 			{% endblock footer %}
 		</footer>
 
-- 
GitLab