[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [lego/master] Add databags for navbar and footer
commit b33b51fe9d1dd0f8d0de66e520e687415989e0cf
Author: hiro <hiro@xxxxxxxxxxxxxx>
Date: Fri Aug 23 13:54:50 2019 +0200
Add databags for navbar and footer
---
databags/menu+en.ini | 23 +++++++++++++++++++++++
databags/menu_footer+en.ini | 15 +++++++++++++++
templates/navbar.html | 4 +++-
3 files changed, 41 insertions(+), 1 deletion(-)
diff --git a/databags/menu+en.ini b/databags/menu+en.ini
new file mode 100644
index 0000000..e4826c0
--- /dev/null
+++ b/databags/menu+en.ini
@@ -0,0 +1,23 @@
+[about]
+path = https://www.torproject.org/about/history
+label = About
+
+[documentation]
+path = https://2019.www.torproject.org/docs/documentation.html.en
+label = Documentation
+
+[support]
+path = https://support.torproject.org/
+label = Support
+
+[community]
+path = https://community.torproject.org/
+label = Community
+
+[blog]
+path = https://blog.torproject.org
+label = Blog
+
+[donate]
+path = https://donate.torproject.org
+label = Donate
diff --git a/databags/menu_footer+en.ini b/databags/menu_footer+en.ini
new file mode 100644
index 0000000..51d909b
--- /dev/null
+++ b/databags/menu_footer+en.ini
@@ -0,0 +1,15 @@
+[jobs]
+path = https://www.torproject.org/about/jobs
+label = Jobs
+
+[blog]
+path = https://blog.torproject.org
+label = Blog
+
+[contact]
+path = https://www.torproject.org/contact
+label = Contact
+
+[press]
+path = https://www.torproject.org/press
+label = Press
diff --git a/templates/navbar.html b/templates/navbar.html
index 7600885..9e343cf 100644
--- a/templates/navbar.html
+++ b/templates/navbar.html
@@ -28,8 +28,10 @@
{% set link = site.get(item.path) %}
{% if link %}
<a class="nav-link" href="{{ item.path|url(alt=this.alt) }}">
- {% else %}
+ {% elif item.label == "Documentation"}
<a class="nav-link" href="{{ item.path }}">
+ {% else %}
+ <a class="nav-link" href="{{ item.path }}/{{this.alt}}">
{% 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