From 3085c14c3b68b145cf5144f293665e65a2359a70 Mon Sep 17 00:00:00 2001 From: Xaver Maierhofer Date: Thu, 24 May 2018 00:51:41 +0200 Subject: [PATCH] [TASK] Add posibility for links DSGVO --- config.js | 10 ++++++++++ lib/legend.js | 11 +++++++++++ scss/modules/_legend.scss | 4 ++++ 3 files changed, 25 insertions(+) diff --git a/config.js b/config.js index 238c209..bebd820 100644 --- a/config.js +++ b/config.js @@ -118,6 +118,16 @@ module.exports = function () { 'site': 'ffrgb', 'name': 'Regensburg' } + ], + 'linkList': [ + { + 'title': 'Impressum', + 'href': '/verein/impressum/' + }, + { + 'title': 'Datenschutz', + 'href': '/verein/datenschutz/' + } ] }; }; diff --git a/lib/legend.js b/lib/legend.js index 71c1011..45091f2 100644 --- a/lib/legend.js +++ b/lib/legend.js @@ -36,6 +36,17 @@ define(['helper'], function (helper) { p.appendChild(stats); p.appendChild(document.createElement('br')); p.appendChild(timestamp); + + if (config.linkList) { + p.appendChild(document.createElement('br')); + config.linkList.forEach(function (link) { + var a = document.createElement('a'); + a.innerText = link.title; + a.href = link.href; + p.appendChild(a); + }); + } + el.appendChild(p); }; diff --git a/scss/modules/_legend.scss b/scss/modules/_legend.scss index d359c74..ca20f16 100644 --- a/scss/modules/_legend.scss +++ b/scss/modules/_legend.scss @@ -17,6 +17,10 @@ header { } .legend { + a { + margin-right: 10px; + } + span { &:not(:first-child) { margin-left: 1em;