[tor-commits] [community/master] Update two-columns-page to add a link back to the parent page

pili at torproject.org pili at torproject.org
Thu Jun 13 11:57:18 UTC 2019


commit cc5ad1135a818b6dbe88173f2e19ceab1b4ba207
Author: Pili Guerra <pili at piliguerra.com>
Date:   Thu Jun 13 13:56:02 2019 +0200

    Update two-columns-page to add a link back to the parent page
---
 templates/two-columns-page.html | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/templates/two-columns-page.html b/templates/two-columns-page.html
index e1f1839..51437e6 100644
--- a/templates/two-columns-page.html
+++ b/templates/two-columns-page.html
@@ -2,5 +2,19 @@
   {% 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="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">
+            <div class="card h-100">
+                <div class="card-body">
+                    <h4 class="card-title text-primary"><a href="{{ child.path|url }}">{{ child.title }}</a></h4>
+                    <p class="card-text">{{ child.subtitle }}</p>
+                </div>
+            </div>
+        </div>
+    {% endfor %}
+    </div>
+    <a href="{{ this.parent|url }}">Back to {{ this.parent.title }}</a>
   </div>
 </div>
+



More information about the tor-commits mailing list