[tor-commits] [community/translations] update templates

emmapeel at torproject.org emmapeel at torproject.org
Thu Mar 4 19:06:57 UTC 2021


commit 5350a8cfb2b01376dd851af638077b90d1850ab1
Author: emma peel <emma.peel at riseup.net>
Date:   Thu Mar 4 20:06:25 2021 +0100

    update templates
---
 templates/blocks/slide.html       |  5 +++
 templates/gsoc.html               | 27 +++++++++++++
 templates/home.html               |  4 +-
 templates/homepage.html           |  8 +++-
 templates/macros/projects.html    | 24 ++++++++++++
 templates/meta.html               |  5 ++-
 templates/onion-services.html     | 19 ++++++++-
 templates/outreach-materials.html | 36 +++++++++++++++++
 templates/outreach-talk.html      | 81 +++++++++++++++++++++++++++++++++++++++
 templates/project.html            | 49 +++++++++++++++++++++++
 templates/relay-associations.html | 35 +++++++++++++++++
 templates/sidenav.html            |  5 +--
 templates/slideshow.html          | 63 ++++++++++++++++++++++++++++++
 templates/two-columns-page.html   |  9 +++--
 14 files changed, 358 insertions(+), 12 deletions(-)

diff --git a/templates/blocks/slide.html b/templates/blocks/slide.html
new file mode 100644
index 0000000..5f96574
--- /dev/null
+++ b/templates/blocks/slide.html
@@ -0,0 +1,5 @@
+<section data-background-color="{{ this.background }}">
+  <h2>{{ this.title }}</h2>
+  {{ this.description }}
+
+</section>
diff --git a/templates/gsoc.html b/templates/gsoc.html
new file mode 100644
index 0000000..115f666
--- /dev/null
+++ b/templates/gsoc.html
@@ -0,0 +1,27 @@
+<div class="container py-5">
+  <div class="row py-5">
+    <div class="col-lg-12">
+      {{ this.body }}
+    </div>
+  </div>
+  <div class="col-12">
+    {% from "macros/projects.html" import render_active %}
+    {% for child in this.children.filter(F.active == True).all() %}
+    <div class="row">
+      {{ render_active(child, this.alt) }}
+    </div>
+    {% endfor %}
+  </div>
+  <div class="row py-5 text-center mx-auto">
+    <p class="text-center">{{ _('None of these ideas seem appealing? You may also want to propose your own project idea — which often results in the best projects.') }} <a href="mailto:gso at torproject.org">{{ _('We invite you to contact us to discuss your own project idea.') }}</a></p>
+  </div>
+  <div class="row">
+    <h2>Past Projects</h2>
+    <p class="text-center">{{ _('Here are some successful projects which have been implemented in the past by Google Summer of Code and Outreachy participants') }}</p>
+    <ul>
+      {% for child in this.children.filter(F.active == False).filter(F.completed == True).all() %}
+      <li><a href={{ child.url }}>{{ child.title }}</a></li>
+      {% endfor %}
+    </ul>
+  </div>
+</div>
diff --git a/templates/home.html b/templates/home.html
index 8b6f12f..2ceb15e 100644
--- a/templates/home.html
+++ b/templates/home.html
@@ -7,8 +7,8 @@
   <section>
     <div class="container">
       <div class="row">
-        {% for child in this.children|sort(attribute='key') %}
-          <div class="col-sm-6 col-md-4 col-sm-12 col-xl-4 py-4">
+        {% for child in site.query('/').filter(F.section_id != 'gsoc')|sort(attribute='key') %}
+          <div class="col-lg-4 col-md-6 col-sm-12 py-4">
             <div class="card h-100 p-2">
               <div class="card-body">
                 <h2 class="card-title ">{{ child.title }}</h2>
diff --git a/templates/homepage.html b/templates/homepage.html
index 9f7db9e..d01c9ff 100644
--- a/templates/homepage.html
+++ b/templates/homepage.html
@@ -19,7 +19,13 @@
         </main>
       </div>
     </div>
-  </div>
+    <div class="container">
+      <div class="row p-5 m-3 border">
+        <p>
+          {{ _('The Tor Project is committed to fostering an inclusive environment and community. Tor is a place where people should feel safe to engage, share their point of view, and participate.') }} Read our <a href="https://gitweb.torproject.org/community/policies.git/tree/code_of_conduct.txt" title="Code of Conduct" target="_blank">Code of Conduct</a>, <a href="https://gitweb.torproject.org/community/policies.git/tree/social_contract.txt" title="Social Contract" target="_blank">Social Contract</a>, <a href="https://gitweb.torproject.org/community/policies.git/tree/statement_of_values.txt" title="Statement of Values" target="_blank">Statement of Values</a> and learn about the <a href="https://gitweb.torproject.org/community/policies.git/tree/community_council.txt" title="Tor Commmunity Council" target="_blank">Tor Community Council</a>.
+        </p>
+      </div>
+    </div>
   <footer>
     {% include 'footer.html' %}
   </footer>
diff --git a/templates/macros/projects.html b/templates/macros/projects.html
new file mode 100644
index 0000000..a4e2850
--- /dev/null
+++ b/templates/macros/projects.html
@@ -0,0 +1,24 @@
+{% macro render_active(item, alternative) %}
+<div class="card border-0">
+  <div class="card-header bg-white border-0" id="headingOne">
+    <h5 class="mb-0">
+      <a href="{{ item.path|url }}">{{ item.title }}</a>
+    </h5>
+    Languages:
+    {% for lang in item.languages %}
+      <span class="badge badge-primary">{{ lang }}</span>
+    {% endfor %}
+    <br>
+    Mentors:
+    {% for person in item.mentors %}
+      <span class="badge badge-secondary">{{ person }}</span>
+    {% endfor %}
+  </div>
+  <div>
+    <div class="card-body">
+      {{ item.subtitle }}
+      <a href="{{ item.path|url }}">{{ _('Read more.') }}</a>
+    </div>
+  </div>
+</div>
+{% endmacro %}
diff --git a/templates/meta.html b/templates/meta.html
index bcda0da..a265687 100644
--- a/templates/meta.html
+++ b/templates/meta.html
@@ -2,6 +2,9 @@
 <meta name="viewport" content="width=device-width, initial-scale=1">
 <meta name="description" content="{{ _('Defend yourself against tracking and surveillance. Circumvent censorship.') }} | {{ this.title }}">
 <link rel="stylesheet" href="{{ '/static/css/bootstrap.css'|asseturl }}">
-<link rel="stylesheet" href="{{ '/static/fonts/open-iconic/font/css/open-iconic-bootstrap.css'|asseturl }}">
 <link rel="stylesheet" href="{{ '/static/fonts/fontawesome/css/all.min.css'|asseturl }}" rel="stylesheet">
+<!-- Standard favicon -->
+<link rel="icon" type="image/x-icon" href="{{ '/static/images/favicon.ico'|asseturl }}">
+<!-- Recommended favicon format -->
+<link rel="icon" type="image/png" href="{{ '/static/images/favicon.png'|asseturl }}">
 <title>{{ _("Tor Project") }} | {% block title %}{{ this.title }}{% endblock %}</title>
diff --git a/templates/onion-services.html b/templates/onion-services.html
index a4a7ed6..a42891a 100644
--- a/templates/onion-services.html
+++ b/templates/onion-services.html
@@ -26,7 +26,7 @@
   <div class="row py-5 text-center mx-auto">
     <h2 class="display-4 text-primary text-center mx-auto">{{ _('Onionize any website') }}</h2>
     <p class="text-center">
-      {{ _('There\'s a toolkit that lets you take any existing website and host it as a .onion site. You would want do this because .onion sites are more secure than just regular sites. We show you how to use this toolkit and onionize a site.') }}
+      {{ _('There\'s a toolkit that lets you take any existing website and host it as a .onion site too. You would do this because .onion sites are more secure than just regular sites. There is an installation guide for how to use this toolkit to onionize your site.') }}
     </p>
     <a class="btn btn-lg btn-outline-primary mx-auto my-3" href="https://github.com/alecmuffett/eotk">
           {{ _('Check out the code') }}<i class="ml-3 pt-2 fas fa-arrow-right"></i>
@@ -50,6 +50,23 @@
         </div>
       </div>
     {% endfor %}
+  </div>
+  <div class="row py-5 text-center mx-auto">
+    <h2 class="display-4 text-primary text-center mx-auto">{{ _('Tools') }}</h2>
+  </div>
+  <div class="row mx-auto d-flex flex-wrap align-items-center">
+    {% for id, item in bag('onion-tools').items() %}
+    {% if item.active == "True" %}
+      <div class="col-4">
+        <div class="card h-50 border-0">
+          <a href="{{ item.link }}"><img class="card-img-top h-100 w-50 mx-auto d-block" src="{{ item.image|asseturl }}"></a>
+          <div class="card-body">
+            <p class="card-text text-primary text-center"><a href="{{ item.link }}">{{ item.label }}</a></p>
+          </div>
+        </div>
+      </div>
+      {% endif %}
+    {% endfor %}
   </div>
     <div class="row py-5 text-center mx-auto">
     <h2 class="display-4 text-primary text-center mx-auto my-3">{{ _('Learn More') }}</h2>
diff --git a/templates/outreach-materials.html b/templates/outreach-materials.html
new file mode 100644
index 0000000..d0bdaa8
--- /dev/null
+++ b/templates/outreach-materials.html
@@ -0,0 +1,36 @@
+<div class="row pt-5">
+  {% include 'sidenav.html' %}
+  <div class="col-sm-12 col-xs-12  ml-sm-auto col-md-9 col-lg-9 {{ bag('alternatives', this.alt, 'order') }}">
+    {{ this.body }}
+    <div class="container py-3">
+      <div class="row">
+        <table class="table">
+          <thead>
+            <tr>
+              <th scope="col">Title</th>
+              <th scope="col">Type</th>
+              <th scope="col">Links</th>
+              <th scope="col">Last Updated</th>
+            </tr>
+          </thead>
+          <tbody>
+          {% for id, item in bag('outreach-materials').items() %}
+            <tr>
+              <td>{{ item.label }}</td>
+              <td>{{ item.type }}</td>
+              <td>
+                {% if item.type=='handout' %}
+                  <a href="{{item.location}}{{item.filename_front}}">Front</a> / <a href="{{item.location}}{{item.filename_back}}">Back</a>
+                {% else %}
+                  <a href="{{item.location}}{{item.filename}}">File</a>
+                {% endif %}
+              </td>
+              <td>{{ item.year }}</td>
+            </tr>
+          {% endfor %}
+          </tbody>
+        </table>
+      </div>
+    </div>
+  </div>
+</div>
\ No newline at end of file
diff --git a/templates/outreach-talk.html b/templates/outreach-talk.html
new file mode 100644
index 0000000..72443f8
--- /dev/null
+++ b/templates/outreach-talk.html
@@ -0,0 +1,81 @@
+<div class="row">
+  <div class="container">
+    <h3 class="py-5">{{ _('Word of mouth is critical to reaching new people and helping them protect themselves online. Here\'s how you can help: ') }}</h3>
+    <div class="row">
+      <div class="col-md-6 col-sm-12 col-xl-4 py-4">
+        <div class="card h-100 p-2">
+          <div class="card-body">
+            <span class="display-4 text-primary">
+              <i class="fas fa-users pb-4"></i>
+            </span>
+            <h2 class="card-title ">{{ _('Privacy and freedom are human rights.') }}</h2>
+            <p class="card-text">{{ _('These rights are denied online around the world, but Tor gives them back.') }}</p>
+          </div>
+        </div>
+      </div>
+      <div class="col-md-6 col-sm-12 col-xl-4 py-4">
+        <div class="card h-100 p-2">
+          <div class="card-body">
+            <span class="display-4 text-primary">
+              <i class="fas fa-cookie-bite pb-4"></i>
+            </span>
+            <h2 class="card-title">{{ _('Tracking and surveillance are widespread.') }}</h2>
+            <p class="card-text">{{ _('We think privacy should be the default online, and that\'s what our software provides.') }}</p>
+          </div>
+        </div>
+      </div>
+      <div class="col-md-6 col-sm-12 col-xl-4 py-4">
+        <div class="card h-100 p-2">
+          <div class="card-body">
+            <span class="display-4 text-primary">
+              <i class="fas fa-person-booth pb-4"></i>
+            </span>
+            <h2 class="card-title">{{ _('Privacy isn\'t about having something to hide.') }}</h2>
+            <p class="card-text">{{ _('Privacy is about protecting who we are as human beings: our fears, our relationships, and our vulnerabilities.') }}</p>
+          </div>
+        </div>
+      </div>
+      <div class="col-md-6 col-sm-12 col-xl-4 py-4">
+        <div class="card h-100 p-2">
+          <div class="card-body">
+            <span class="display-4 text-primary">
+              <i class="fas fa-eye-slash pb-4"></i>
+            </span>
+            <h2 class="card-title">{{ _('People shouldn\'t be exploited for using the internet.') }}</h2>
+            <p class="card-text">{{ _('Trackers are harvesting our every move, but a safer internet is possible.') }}</p>
+          </div>
+        </div>
+      </div>
+      <div class="col-md-6 col-sm-12 col-xl-4 py-4">
+        <div class="card h-100 p-2">
+          <div class="card-body">
+            <span class="display-4 text-primary">
+              <i class="fas fa-hand-holding-heart pb-4"></i>
+            </span>
+            <h2 class="card-title">{{ _('Tor software is developed by the Tor Project, a 501(c)3 nonprofit organization.') }}</h2>
+            <p class="card-text">{{ _('We build free and open source software anyone can use.') }}</p>
+          </div>
+        </div>
+      </div>
+      <div class="col-md-6 col-sm-12 col-xl-4 py-4">
+        <div class="card h-100 p-2">
+          <div class="card-body">
+            <span class="display-4 text-primary">
+              <i class="fas fa-globe-africa pb-4"></i>
+            </span>
+            <h2 class="card-title">{{ _('Tor software is used by millions of people around the world.') }}</h2>
+            <p class="card-text">{{ _('Journalists, activists, and everyday internet users rely on Tor.') }}</p>
+          </div>
+        </div>
+      </div>
+    </div>
+
+    <div class="card mt-5">
+      <ul class="list-group list-group-flush">
+        <!--li class="list-group-item"><a><span class="card-text text-muted">{{ _("Contributors to this page:") }} <a href="#" title="#">cypherpunk</a></span></li-->
+        <li class="list-group-item">
+                <a href="{{ this.parent|url }}">{{ _("Back to previous page: ") }}{{ this.parent.title }}</a> - <a href="https://github.com/torproject/community/edit/master/content{{ this.path }}/contents.lr">{{ _("Edit this page") }}</a>
+        </li>
+      </ul>
+    </div>
+</div>
diff --git a/templates/project.html b/templates/project.html
new file mode 100644
index 0000000..f9c5623
--- /dev/null
+++ b/templates/project.html
@@ -0,0 +1,49 @@
+<!doctype html>
+{% include 'meta.html' %}
+<body class="no-gutters">
+  <header>
+    {% include 'navbar.html' %}
+  </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') }}">
+         <div class="container py-3 mt-5">
+          <h4>Project Title: {{ this.title }}</h4>
+          <span class="badge badge-primary">{{ this.languages }}</span> <span class="badge badge-secondary">{{ this.difficulty }}</span>
+        </div>
+         <div class="container py-3 mt-5">
+          <h4>Project Summary:</h4>
+          <p>
+          {{ this.subtitle }}
+        </p>
+        </div>
+        <div class="container py-3">
+          <h4>Project Description:</h4>
+          <p>
+          {{ this.body }}
+        </p>
+        </div>
+        <div class="container py-3">
+          <h4>Mentors:</h4>
+          <p>
+          {{ this.mentors }}
+        </p>
+        </div>
+      </main>
+    </div>
+    <div class="card mt-5">
+      <ul class="list-group list-group-flush">
+        <li class="list-group-item">
+          <a href="{{ this.parent|url }}">{{ _("Back to ") }}{{ this.parent.title }}</a>
+        </li>
+      </ul>
+    </div>
+  </div>
+</div>
+<footer>
+  {% include 'footer.html' %}
+</footer>
+</body>
diff --git a/templates/relay-associations.html b/templates/relay-associations.html
new file mode 100644
index 0000000..10448d8
--- /dev/null
+++ b/templates/relay-associations.html
@@ -0,0 +1,35 @@
+<div class="row pt-5">
+  {% include 'sidenav.html' %}
+  <div class="col-sm-12 col-xs-12  ml-sm-auto col-md-9 col-lg-9 {{ bag('alternatives', this.alt, 'order') }}">
+    {{ this.body }}
+    <div class="container py-3">
+      <div class="row">
+        <table class="table">
+          <thead>
+            <tr>
+              <th scope="col">Organization Name</th>
+              <th scope="col">Country</th>
+            </tr>
+          </thead>
+          <tbody>
+          {% for id, item in bag('relay-associations').items() %}
+            {% if item.active == 'True' %}
+                <tr>
+                    <td>
+                        {% if item.link|length %}
+                            <a href="{{ item.link }}">{{ item.label }}</a>
+                        {% else %}
+                            {{ item.label }}
+                        {% endif %}
+                    </td>
+
+                    <td>{{ item.country }}</td>
+                </tr>
+            {% endif %}
+          {% endfor %}
+          </tbody>
+        </table>
+      </div>
+    </div>
+  </div>
+</div>
\ No newline at end of file
diff --git a/templates/sidenav.html b/templates/sidenav.html
index ebcbeff..5ac15c8 100644
--- a/templates/sidenav.html
+++ b/templates/sidenav.html
@@ -1,9 +1,8 @@
 <div class="container-fluid sidebar col-xs-12 col-sm-12 col-md-3 col-lg-3">
   <nav class="smalltopics no-background navbar navbar-expand-lg navbar-light bg-white p-0 fixed">
     <label class="side-toggler" for="menu-toggle">
-      <a class="btn btn-lg outline-primary text-primary navbar-toggler chevron" data-toggle="collapse" data-target="#navbarSupportedTopicsContent" aria-controls="navbarSupportedTopicsContent" aria-expanded="false" aria-label="Toggle navigation">
-        <span class="oi oi-chevron-top chevron-up"></span>
-        <span class="oi oi-chevron-bottom chevron-down"></span>
+      <a class="btn btn-lg outline-primary text-primary navbar-toggler collapsed" data-toggle="collapse" data-target="#navbarSupportedTopicsContent" aria-controls="navbarSupportedTopicsContent" aria-expanded="false" aria-label="Toggle navigation">
+        <i class="fas"></i>
       </a>
     </label>
     <input type="checkbox" id="menu-toggle"/>
diff --git a/templates/slideshow.html b/templates/slideshow.html
new file mode 100644
index 0000000..260c123
--- /dev/null
+++ b/templates/slideshow.html
@@ -0,0 +1,63 @@
+<!doctype html>
+<html lang="en">
+	<head>
+		<meta charset="utf-8">
+		<title>{{ _("Tor Project") }} | {% block title %}{{ this.title }}{% endblock %}</title>
+		<meta name="description" content="{{ _('Tor Project') }} | {{ this.description }}">
+		<meta name="author" content="{{ this.author }}">
+		<meta name="apple-mobile-web-app-capable" content="yes">
+		<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
+		<meta name="viewport" content="width=device-width, initial-scale=1.0">
+		<link rel="stylesheet" href="{{ '/static/revealjs/dist/reset.css'|asseturl }}">
+		<link rel="stylesheet" href="{{ '/static/revealjs/dist/reveal.css'|asseturl }}">
+		<link rel="stylesheet" href="{{ '/static/revealjs/dist/theme/tor.css'|asseturl }}" id="theme">
+		<link rel="stylesheet" href="{{ '/static/revealjs/plugin/highlight/monokai.css'|asseturl }}" id="highlight-theme">
+	</head>
+	<body>
+    <div class="reveal">
+			<!-- Any section element inside of this container is displayed as a slide -->
+			<div class="slides">
+				<section data-background-color="{{ this.background }}" data-background-image="{{ this.image|asseturl }}" data-background-position="bottom right" data-background-size="3em">
+				  <h1>{{ this.title }}</h1>
+				  <h2>{{ this.subtitle }}</h2>
+					<p>{{ this.author }}</p>
+				</section>
+
+        {{ this.slides }}
+
+				<div class="footer">
+					<div class="left">
+						<a href="https://torproject.org">torproject.org</a>
+					</div>
+					<div class="right">
+						<img src="{{ '/static/images/tor-logo/White.png'|asseturl }}">
+					</div>
+				</div>
+      </div>
+
+    </div>
+
+    <script src="{{ '/static/revealjs/dist/reveal.js'|asseturl }}"></script>
+    <script src="{{ '/static/revealjs/plugin/zoom/zoom.js'|asseturl }}"></script>
+    <script src="{{ '/static/revealjs/plugin/notes/notes.js'|asseturl }}"></script>
+    <script src="{{ '/static/revealjs/plugin/search/search.js'|asseturl }}"></script>
+    <script src="{{ '/static/revealjs/plugin/markdown/markdown.js'|asseturl }}"></script>
+    <script src="{{ '/static/revealjs/plugin/highlight/highlight.js'|asseturl }}"></script>
+
+		<script>
+			// Also available as an ES module, see:
+			// https://revealjs.com/initialization/
+			Reveal.initialize({
+				controls: true,
+				progress: true,
+				center: true,
+				hash: true,
+
+				// Learn about plugins: https://revealjs.com/plugins/
+				plugins: [ RevealZoom, RevealNotes, RevealSearch, RevealMarkdown, RevealHighlight ]
+			});
+
+		</script>
+
+	</body>
+</html>
diff --git a/templates/two-columns-page.html b/templates/two-columns-page.html
index 5151905..1b4883a 100644
--- a/templates/two-columns-page.html
+++ b/templates/two-columns-page.html
@@ -1,10 +1,11 @@
-
 {% include 'breadcrumb.html' %}
 
 <div class="row">
   {% include 'sidenav.html' %}
-  <div class="col-sm-12 col-xs-12 col-md-8 col-lg-8 pt-3 mr-auto {{ bag('alternatives', this.alt, 'order') }}">
-    {{ this.body }}
+  <div class="col-sm-12 col-xs-12 col-md-8 col-lg-8 pt-3 mt-5 mr-auto {{ bag('alternatives', this.alt, 'order') }}">
+    <div class="col-10">
+      {{ this.body }}
+    </div>
     <div class="row">
     {% for child in this.children|sort(attribute='key') %}
         <div class="col-sm-6 col-md-6 col-sm-12 col-xl-6 py-3">
@@ -26,7 +27,7 @@
       <ul class="list-group list-group-flush">
         <!--li class="list-group-item"><a><span class="card-text text-muted">{{ _("Contributors to this page:") }} <a href="#" title="#">cypherpunk</a></span></li-->
         <li class="list-group-item">
-                <a href="{{ this.parent|url }}">{{ _("Back to previous page: ") }}{{ this.parent.title }}</a> - <a href="https://github.com/torproject/community/edit/master/content{{ this.path }}/contents.lr">{{ _("Edit this page") }}</a>
+          <a href="{{ this.parent|url }}">{{ _("Back to previous page: ") }}{{ this.parent.title }}</a> - <a href="https://github.com/torproject/community/edit/master/content{{ this.path }}/contents.lr">{{ _("Edit this page") }}</a>
         </li>
       </ul>
     </div>



More information about the tor-commits mailing list