[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [lego/master] Update navbar with links databag
commit 7ad3e5bff416f501e05aaa54fdc742a6fb567159
Author: hiro <hiro@xxxxxxxxxxxxxx>
Date: Mon Nov 11 16:30:12 2019 +0100
Update navbar with links databag
---
databags/links.ini | 9 +++++++++
templates/navbar.html | 7 ++++++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/databags/links.ini b/databags/links.ini
new file mode 100644
index 0000000..b632ab1
--- /dev/null
+++ b/databags/links.ini
@@ -0,0 +1,9 @@
+[en]
+about = https://www.torproject.org/about/history/
+support = https://support.torproject.org
+donate = https://donate.torproject.org
+
+[ca]
+about = https://www.torproject.org/ca/about/history/
+support = https://support.torproject.org/ca
+donate = https://donate.torproject.org/
diff --git a/templates/navbar.html b/templates/navbar.html
index 64b5695..a014de2 100644
--- a/templates/navbar.html
+++ b/templates/navbar.html
@@ -32,7 +32,12 @@
{% if link %}
<a class="nav-link" href="{{ item.path|url(alt=this.alt) }}">
{% else %}
- <a class="nav-link" href="{{ item.path }}">
+ {% set link = bag('links', this.alt, item.label) %}
+ {% if link %}
+ <a class="nav-link" href="{{ link }}">
+ {% else %}
+ <a class="nav-link" href="{{ item.path }}">
+ {% endif %}
{% endif %}
{{ _(item.label) }}
{% if this.path == item.path %}
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits