[tor-commits] [community/master] Update to template

hiro at torproject.org hiro at torproject.org
Fri Mar 15 15:55:29 UTC 2019


commit 9c91091c70cd28ca87cc3f6d807ba2f2d465d77b
Author: hiro <hiro at torproject.org>
Date:   Fri Mar 15 16:54:59 2019 +0100

    Update to template
---
 content/localization/contents+en.lr       |  2 +-
 content/localization/contents+es.lr       |  2 +-
 content/localization/contents+fr.lr       |  2 +-
 content/localization/contents.lr          |  2 +-
 content/onion-services/contents+en.lr     |  2 +-
 content/onion-services/contents+es.lr     |  2 +-
 content/onion-services/contents+fr.lr     |  2 +-
 content/onion-services/contents.lr        |  2 +-
 content/outreach/contents+en.lr           |  2 +-
 content/outreach/contents+es.lr           |  2 +-
 content/outreach/contents+fr.lr           |  2 +-
 content/outreach/contents.lr              |  2 +-
 content/relay-operations/contents+en.lr   |  2 +-
 content/relay-operations/contents+es.lr   |  2 +-
 content/relay-operations/contents+fr.lr   |  2 +-
 content/relay-operations/contents.lr      |  2 +-
 content/training/contents+en.lr           |  2 +-
 content/training/contents+es.lr           |  2 +-
 content/training/contents+fr.lr           |  2 +-
 content/training/contents.lr              |  2 +-
 content/user-testing/contents+en.lr       |  2 +-
 content/user-testing/contents+es.lr       |  2 +-
 content/user-testing/contents+fr.lr       |  2 +-
 content/user-testing/contents.lr          |  2 +-
 databags/about+fr.ini                     | 19 -------------------
 databags/pagenav+en.ini                   | 23 +++++++++++++++++++++++
 databags/{about+en.ini => pagenav+es.ini} |  0
 databags/{about+es.ini => pagenav+fr.ini} |  0
 templates/header.html                     |  3 ---
 templates/layout.html                     |  1 +
 templates/pagenav.html                    |  9 +++++----
 31 files changed, 53 insertions(+), 50 deletions(-)

diff --git a/content/localization/contents+en.lr b/content/localization/contents+en.lr
index b60915f..b483d03 100644
--- a/content/localization/contents+en.lr
+++ b/content/localization/contents+en.lr
@@ -4,7 +4,7 @@ section_id: localization
 ---
 color: primary
 ---
-_template: jumbotron.html
+_template: layout.html
 ---
 title: Join the Tor Community
 ---
diff --git a/content/localization/contents+es.lr b/content/localization/contents+es.lr
index b60915f..b483d03 100644
--- a/content/localization/contents+es.lr
+++ b/content/localization/contents+es.lr
@@ -4,7 +4,7 @@ section_id: localization
 ---
 color: primary
 ---
-_template: jumbotron.html
+_template: layout.html
 ---
 title: Join the Tor Community
 ---
diff --git a/content/localization/contents+fr.lr b/content/localization/contents+fr.lr
index b60915f..b483d03 100644
--- a/content/localization/contents+fr.lr
+++ b/content/localization/contents+fr.lr
@@ -4,7 +4,7 @@ section_id: localization
 ---
 color: primary
 ---
-_template: jumbotron.html
+_template: layout.html
 ---
 title: Join the Tor Community
 ---
diff --git a/content/localization/contents.lr b/content/localization/contents.lr
index b60915f..b483d03 100644
--- a/content/localization/contents.lr
+++ b/content/localization/contents.lr
@@ -4,7 +4,7 @@ section_id: localization
 ---
 color: primary
 ---
-_template: jumbotron.html
+_template: layout.html
 ---
 title: Join the Tor Community
 ---
diff --git a/content/onion-services/contents+en.lr b/content/onion-services/contents+en.lr
index b828b52..b862a5d 100644
--- a/content/onion-services/contents+en.lr
+++ b/content/onion-services/contents+en.lr
@@ -4,7 +4,7 @@ section_id: onion-services
 ---
 color: primary
 ---
-_template: jumbotron.html
+_template: layout.html
 ---
 title: .onion Services
 ---
diff --git a/content/onion-services/contents+es.lr b/content/onion-services/contents+es.lr
index b828b52..b862a5d 100644
--- a/content/onion-services/contents+es.lr
+++ b/content/onion-services/contents+es.lr
@@ -4,7 +4,7 @@ section_id: onion-services
 ---
 color: primary
 ---
-_template: jumbotron.html
+_template: layout.html
 ---
 title: .onion Services
 ---
diff --git a/content/onion-services/contents+fr.lr b/content/onion-services/contents+fr.lr
index b828b52..b862a5d 100644
--- a/content/onion-services/contents+fr.lr
+++ b/content/onion-services/contents+fr.lr
@@ -4,7 +4,7 @@ section_id: onion-services
 ---
 color: primary
 ---
-_template: jumbotron.html
+_template: layout.html
 ---
 title: .onion Services
 ---
diff --git a/content/onion-services/contents.lr b/content/onion-services/contents.lr
index b828b52..b862a5d 100644
--- a/content/onion-services/contents.lr
+++ b/content/onion-services/contents.lr
@@ -4,7 +4,7 @@ section_id: onion-services
 ---
 color: primary
 ---
-_template: jumbotron.html
+_template: layout.html
 ---
 title: .onion Services
 ---
diff --git a/content/outreach/contents+en.lr b/content/outreach/contents+en.lr
index a3ec8da..b93634f 100644
--- a/content/outreach/contents+en.lr
+++ b/content/outreach/contents+en.lr
@@ -4,7 +4,7 @@ section_id: outreach
 ---
 color: primary
 ---
-_template: jumbotron.html
+_template: layout.html
 ---
 title: Outreach
 ---
diff --git a/content/outreach/contents+es.lr b/content/outreach/contents+es.lr
index a3ec8da..b93634f 100644
--- a/content/outreach/contents+es.lr
+++ b/content/outreach/contents+es.lr
@@ -4,7 +4,7 @@ section_id: outreach
 ---
 color: primary
 ---
-_template: jumbotron.html
+_template: layout.html
 ---
 title: Outreach
 ---
diff --git a/content/outreach/contents+fr.lr b/content/outreach/contents+fr.lr
index a3ec8da..b93634f 100644
--- a/content/outreach/contents+fr.lr
+++ b/content/outreach/contents+fr.lr
@@ -4,7 +4,7 @@ section_id: outreach
 ---
 color: primary
 ---
-_template: jumbotron.html
+_template: layout.html
 ---
 title: Outreach
 ---
diff --git a/content/outreach/contents.lr b/content/outreach/contents.lr
index a3ec8da..b93634f 100644
--- a/content/outreach/contents.lr
+++ b/content/outreach/contents.lr
@@ -4,7 +4,7 @@ section_id: outreach
 ---
 color: primary
 ---
-_template: jumbotron.html
+_template: layout.html
 ---
 title: Outreach
 ---
diff --git a/content/relay-operations/contents+en.lr b/content/relay-operations/contents+en.lr
index fb788e8..3b5142e 100644
--- a/content/relay-operations/contents+en.lr
+++ b/content/relay-operations/contents+en.lr
@@ -4,7 +4,7 @@ section_id: relay-operations
 ---
 color: primary
 ---
-_template: jumbotron.html
+_template: layout.html
 ---
 title: Relay Operations
 ---
diff --git a/content/relay-operations/contents+es.lr b/content/relay-operations/contents+es.lr
index fb788e8..3b5142e 100644
--- a/content/relay-operations/contents+es.lr
+++ b/content/relay-operations/contents+es.lr
@@ -4,7 +4,7 @@ section_id: relay-operations
 ---
 color: primary
 ---
-_template: jumbotron.html
+_template: layout.html
 ---
 title: Relay Operations
 ---
diff --git a/content/relay-operations/contents+fr.lr b/content/relay-operations/contents+fr.lr
index fb788e8..3b5142e 100644
--- a/content/relay-operations/contents+fr.lr
+++ b/content/relay-operations/contents+fr.lr
@@ -4,7 +4,7 @@ section_id: relay-operations
 ---
 color: primary
 ---
-_template: jumbotron.html
+_template: layout.html
 ---
 title: Relay Operations
 ---
diff --git a/content/relay-operations/contents.lr b/content/relay-operations/contents.lr
index fb788e8..3b5142e 100644
--- a/content/relay-operations/contents.lr
+++ b/content/relay-operations/contents.lr
@@ -4,7 +4,7 @@ section_id: relay-operations
 ---
 color: primary
 ---
-_template: jumbotron.html
+_template: layout.html
 ---
 title: Relay Operations
 ---
diff --git a/content/training/contents+en.lr b/content/training/contents+en.lr
index 4131562..4aad2cc 100644
--- a/content/training/contents+en.lr
+++ b/content/training/contents+en.lr
@@ -4,7 +4,7 @@ section_id: training
 ---
 color: primary
 ---
-_template: jumbotron.html
+_template: layout.html
 ---
 title: Training
 ---
diff --git a/content/training/contents+es.lr b/content/training/contents+es.lr
index 4131562..4aad2cc 100644
--- a/content/training/contents+es.lr
+++ b/content/training/contents+es.lr
@@ -4,7 +4,7 @@ section_id: training
 ---
 color: primary
 ---
-_template: jumbotron.html
+_template: layout.html
 ---
 title: Training
 ---
diff --git a/content/training/contents+fr.lr b/content/training/contents+fr.lr
index 4131562..4aad2cc 100644
--- a/content/training/contents+fr.lr
+++ b/content/training/contents+fr.lr
@@ -4,7 +4,7 @@ section_id: training
 ---
 color: primary
 ---
-_template: jumbotron.html
+_template: layout.html
 ---
 title: Training
 ---
diff --git a/content/training/contents.lr b/content/training/contents.lr
index 4131562..4aad2cc 100644
--- a/content/training/contents.lr
+++ b/content/training/contents.lr
@@ -4,7 +4,7 @@ section_id: training
 ---
 color: primary
 ---
-_template: jumbotron.html
+_template: layout.html
 ---
 title: Training
 ---
diff --git a/content/user-testing/contents+en.lr b/content/user-testing/contents+en.lr
index 48c7d8c..97a6b13 100644
--- a/content/user-testing/contents+en.lr
+++ b/content/user-testing/contents+en.lr
@@ -4,7 +4,7 @@ section_id: user-testing
 ---
 color: primary
 ---
-_template: jumbotron.html
+_template: layout.html
 ---
 title: User Testing
 ---
diff --git a/content/user-testing/contents+es.lr b/content/user-testing/contents+es.lr
index 48c7d8c..97a6b13 100644
--- a/content/user-testing/contents+es.lr
+++ b/content/user-testing/contents+es.lr
@@ -4,7 +4,7 @@ section_id: user-testing
 ---
 color: primary
 ---
-_template: jumbotron.html
+_template: layout.html
 ---
 title: User Testing
 ---
diff --git a/content/user-testing/contents+fr.lr b/content/user-testing/contents+fr.lr
index 48c7d8c..97a6b13 100644
--- a/content/user-testing/contents+fr.lr
+++ b/content/user-testing/contents+fr.lr
@@ -4,7 +4,7 @@ section_id: user-testing
 ---
 color: primary
 ---
-_template: jumbotron.html
+_template: layout.html
 ---
 title: User Testing
 ---
diff --git a/content/user-testing/contents.lr b/content/user-testing/contents.lr
index 48c7d8c..97a6b13 100644
--- a/content/user-testing/contents.lr
+++ b/content/user-testing/contents.lr
@@ -4,7 +4,7 @@ section_id: user-testing
 ---
 color: primary
 ---
-_template: jumbotron.html
+_template: layout.html
 ---
 title: User Testing
 ---
diff --git a/databags/about+fr.ini b/databags/about+fr.ini
deleted file mode 100644
index 43f44fd..0000000
--- a/databags/about+fr.ini
+++ /dev/null
@@ -1,19 +0,0 @@
-[history]
-path = about/history
-label = History
-
-[people]
-path = about/people
-label = People
-
-[sponsors]
-path = about/sponsors
-label = Sponsors
-
-[reports]
-path = about/reports
-label = Reports
-
-[jobs]
-path = about/jobs
-label = Jobs
diff --git a/databags/pagenav+en.ini b/databags/pagenav+en.ini
new file mode 100644
index 0000000..1ad40f2
--- /dev/null
+++ b/databags/pagenav+en.ini
@@ -0,0 +1,23 @@
+[relay-operations]
+path = relay-operations
+label = Relay Operations
+
+[user-testing]
+path = user-testing
+label = User Testing
+
+[training]
+path = training
+label = Training
+
+[outreach]
+path = outreach
+label = Outreach
+
+[translations]
+path = translations
+label = Translations
+
+[onion-services]
+path = onion-services
+label = .Onion Services
diff --git a/databags/about+en.ini b/databags/pagenav+es.ini
similarity index 100%
rename from databags/about+en.ini
rename to databags/pagenav+es.ini
diff --git a/databags/about+es.ini b/databags/pagenav+fr.ini
similarity index 100%
rename from databags/about+es.ini
rename to databags/pagenav+fr.ini
diff --git a/templates/header.html b/templates/header.html
index 9290699..7951855 100644
--- a/templates/header.html
+++ b/templates/header.html
@@ -22,6 +22,3 @@
     </div>
   </div>
 </div>
-{% if this.section_id == 'about' %}
-  {% include 'pagenav.html' %}
-{% endif %}
diff --git a/templates/layout.html b/templates/layout.html
index 82e7e5f..bdc039b 100644
--- a/templates/layout.html
+++ b/templates/layout.html
@@ -11,6 +11,7 @@
   </header>
   <div class="page">
     {% include 'header.html' %}
+    {% include 'pagenav.html' %}
     <div class="container-fluid">
       <div class="row flex-xl-nowrap">
         <main role="main" class="mx-auto col-12 {{ bag('alternatives', this.alt, 'order') }}">
diff --git a/templates/pagenav.html b/templates/pagenav.html
index d572da1..90f5ff9 100644
--- a/templates/pagenav.html
+++ b/templates/pagenav.html
@@ -2,12 +2,13 @@
   <div class="row flex-xl-nowrap {{ bag('alternatives', this.alt, 'order') }}">
     <div class="row col-12 justify-content-center">
       <ul class="nav">
-        {% set menubag = this.section_id + '+' + this.alt %}
+        {% set menubag = 'pagenav' + '+' + this.alt %}
         {% for id, item in bag(menubag).items() %}
         <li{% if this.path == '/' + item.path %} class="nav-item active border-active" {% else %} class="nav-item" {% endif %}>
-          {% set item_path = site.get(item.path) %}
-          <a class="nav-link" href="{{ this.url_to(item_path) }}">{{ item.label }}
-          {% if this.path == '/' + item.path %}
+          {% set elm = site.get(item.path) %}
+          {% if elm %}
+            <a class="nav-link" href="{{ elm.path|url }}">{{ item.label }}
+          {% elif this.path == '/' + item.path %}
             <span class="sr-only">(current)</span>
           {% endif %}
           </a>



More information about the tor-commits mailing list