[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [lego/develop] Change templates and reduce databags



commit 98e55dace8bbfc909ec21d36ef9f7eaca687fa15
Author: hiro <hiro@xxxxxxxxxxxxxx>
Date:   Mon Nov 11 14:17:07 2019 +0100

    Change templates and reduce databags
---
 databags/menu.ini        | 23 +++++++++++++++++++++++
 databags/menu_footer.ini | 15 +++++++++++++++
 templates/footer.html    |  2 +-
 templates/navbar.html    |  2 +-
 4 files changed, 40 insertions(+), 2 deletions(-)

diff --git a/databags/menu.ini b/databags/menu.ini
new file mode 100644
index 0000000..e7a52b2
--- /dev/null
+++ b/databags/menu.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.ini b/databags/menu_footer.ini
new file mode 100644
index 0000000..c997390
--- /dev/null
+++ b/databags/menu_footer.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/footer.html b/templates/footer.html
index 63f9f46..555faed 100644
--- a/templates/footer.html
+++ b/templates/footer.html
@@ -29,7 +29,7 @@
       </div>
       <div class="col-sm-2 mt-5 d-none d-sm-block">
         <ul class="nav flex-column mt-sm-5">
-          {% set menubag = 'menu_footer+' + this.alt %}
+          {% set menubag = 'menu_footer' %}
           {% for id, item in bag(menubag).items() %}
           <li{% if this.is_child_of(item.path) %} class="nav-item active" {% else %} class="nav-item"{% endif %}>
           {% set link = site.get(item.path) %}
diff --git a/templates/navbar.html b/templates/navbar.html
index 96c0961..498b005 100644
--- a/templates/navbar.html
+++ b/templates/navbar.html
@@ -25,7 +25,7 @@
     <div class="collapse navbar-collapse hamburger-menu" id="navbarSupportedContent">
       <div class="mx-auto">
         <ul class="navbar-nav">
-        	{% set menubag = 'menu+' + this.alt %}
+        	{% set menubag = 'menu' %}
         	{% for id, item in bag(menubag).items() %}
         	<li{% if this.path == item.path %} class="nav-item active" {% else %} class="nav-item"{% endif %}>
             {% set link = site.get(item.path) %}



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits