Restructure coc templates
authorMagnus Hagander <magnus@hagander.net>
Tue, 27 Oct 2020 09:49:47 +0000 (10:49 +0100)
committerMagnus Hagander <magnus@hagander.net>
Wed, 28 Oct 2020 15:39:27 +0000 (16:39 +0100)
This creates a base templatefor the coc pages that will include the coc
itself and translations, the committee and the annual reports.

This removes the include files with _ in the name in the coc section,
which would previously both be directly accessible as pages and
part of the sitemap. The pages/ directory in the templates should really
only contain directly accessible pages.

templates/base/cocpage.html [new file with mode: 0644]
templates/pages/about/policies/coc.html
templates/pages/about/policies/coc/_reportlist.html [deleted file]
templates/pages/about/policies/coc/_translations.html [deleted file]
templates/pages/about/policies/coc/ja.html
templates/pages/about/policies/coc/reports/2018.html
templates/pages/about/policies/coc/reports/2019.html
templates/pages/about/policies/coc_committee.html

diff --git a/templates/base/cocpage.html b/templates/base/cocpage.html
new file mode 100644 (file)
index 0000000..cf31137
--- /dev/null
@@ -0,0 +1,24 @@
+{%extends "base/page.html"%}
+{%block contents%}
+<div class="row">
+  <div class="col-lg-9">
+{%block cocmain%}{%endblock%}
+  </div>
+  <div class="col-lg-3">
+    <h1>Translations</h1>
+    <ul>
+      <li><span lang="en"><a href="/about/policies/coc/">English</a></span></li>
+      <li><span lang="ja"><a href="/about/policies/coc/ja/">Japanese</a></span></li>
+    </ul>
+    <h1>Committee</h1>
+    <ul>
+      <li><a href="/about/policies/coc_committee/">Current committee</a></li>
+    </ul>
+    <h1>Annual Reports</h1>
+    <ul>
+      <li><a href="/about/policies/coc/reports/2019/">2019</a></li>
+      <li><a href="/about/policies/coc/reports/2018/">2018</a></li>
+    </ul>
+  </div>
+</div>
+{%endblock%}
index f6fa8e621f710e7762093c8ad97a2b50945adfba..a6987300e6488769260e0fdd64658c43fe810a3a 100644 (file)
@@ -1,10 +1,7 @@
-{%extends "base/page.html"%}
+{%extends "base/cocpage.html"%}
 {%load pgfilters%}
 {%block title%}Code of Conduct{%endblock%}
-{%block contents%}
-
-<div class="row">
-  <div class="col-lg-9">
+{%block cocmain%}
     <h1>Code of Conduct <i class="fas fa-gavel"></i></h1>
 
     <p><em>Last updated: August 18, 2020. {%git_changes_link%}</em></p>
     <p>In all interactions with the community, use your professional judgment, and
         keep the discussion focused on moving our project and our community forward
         in a positive direction for all.</p>
-
-    {% include "pages/about/policies/coc/_translations.html" %}
-  </div>
-{%include "pages/about/policies/coc/_reportlist.html" %}
-</div>
 {%endblock%}
diff --git a/templates/pages/about/policies/coc/_reportlist.html b/templates/pages/about/policies/coc/_reportlist.html
deleted file mode 100644 (file)
index 74bf525..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-  <div class="col-lg-3">
-    <h1>Annual Reports</h1>
-    <ul>
-      <li><a href="/about/policies/coc/reports/2019/">2019</a></li>
-      <li><a href="/about/policies/coc/reports/2018/">2018</a></li>
-    </ul>
-  </div>
diff --git a/templates/pages/about/policies/coc/_translations.html b/templates/pages/about/policies/coc/_translations.html
deleted file mode 100644 (file)
index 885a708..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<h1>Translations of the Code of Conduct</h1>
-<p>The Code of Conduct has been translated into multiple languages. Each
-  translation was verified independently by at least one additional party.</p>
-<p>If there are any discrepancies in language between a translation and the
-    <a href="/about/policies/coc/">Code of Conduct written in English</a>, the
-    English language Code of Conduct will take precedence.</p>
-
-<ul>
-  <li><span lang="en"><a href="/about/policies/coc/">English</a></span></li>
-  <li><span lang="ja"><a href="/about/policies/coc/ja/">Japanese</a></span></li>
-</ul>
index aaa271e4a567650ff6a76c2f79187bb6b41b2715..ef305b178a0f9be16ac6c75fbfaffb3e5341b204 100644 (file)
@@ -1,7 +1,7 @@
-{%extends "base/page.html"%}
+{%extends "base/cocpage.html"%}
 {%block title%}Code of Conduct - Japanese Translation{%endblock%}
 
-{% block contents %}
+{% block cocmain %}
 <h1>行動規範 <i class="fas fa-gavel"></i></h1>
 
 <p><em>最終更新日 (Last updated): 2018年8月18日</em></p>
 
 <p>コミュニティ内の連絡においては、専門的判断を発揮し、議論の焦点を本プロジェクトとコミュニティを全員にとって建設的な方向へ進める事に絞るものとします。</p>
 
-{% include "pages/about/policies/coc/_translations.html" %}
-{% endblock contents %}
+{% endblock cocmain %}
index 64306b0e81db1cfe6f6377dfe6eb4b50ae1f9f91..3718fef168100f11189568dfe5b85e8b3cb0ca20 100644 (file)
@@ -1,9 +1,6 @@
-{%extends "base/page.html"%}
+{%extends "base/cocpage.html"%}
 {%block title%}2018 Annual Report | Code of Conduct Committee{%endblock%}
-{%block contents%}
-
-<div class="row">
-  <div class="col-lg-9">
+{%block cocmain%}
     <h1>Code of Conduct Committee: 2018 Annual Report <i class="fas fa-gavel"></i></h1>
 
     <p><em>Delivered: April 9, 2019</em></p>
@@ -35,7 +32,4 @@
       <li>Investigation ongoing as of December 31, 2018: 1</li>
     </ul>
     <p>We would like to thank the Core Team and the community members who have supported the adoption of the <a href="/about/policies/coc/">Code of Conduct</a>, and who continue to uphold the professional standards of the PostgreSQL Community.</p>
-  </div>
-{%include "pages/about/policies/coc/_reportlist.html" %}
-</div>
 {%endblock%}
index a0d836ed13502ad334f200144ee8b65e4187e37f..6d0ee41e35f0142fe8acae9e94d7c549b56c7a89 100644 (file)
@@ -1,9 +1,6 @@
-{%extends "base/page.html"%}
+{%extends "base/cocpage.html"%}
 {%block title%}2019 Annual Report | Code of Conduct Committee{%endblock%}
-{%block contents%}
-
-<div class="row">
-  <div class="col-lg-9">
+{%block cocmain%}
     <h1>Code of Conduct Committee: 2019 Annual Report <i class="fas fa-gavel"></i></h1>
 
     <p><em>Delivered: March 17, 2020</em></p>
@@ -53,7 +50,4 @@
     <p>
       We would like to thank the Core Team and the community members who have supported the adoption of the <a href="/about/policies/coc/">Code of Conduct</a>, and who continue to uphold the professional standards of the PostgreSQL Community.
     </p>
-  </div>
-{%include "pages/about/policies/coc/_reportlist.html" %}
-</div>
 {%endblock%}
index 68a9efbc2dff42e360e9dd4c36cefc7f485b05ab..282c3f959be1ac3e2439e184d137136866d5509b 100644 (file)
@@ -1,7 +1,7 @@
-{%extends "base/page.html"%}
+{%extends "base/cocpage.html"%}
 {%load pgfilters%}
 {%block title%}Code of Conduct Committee{%endblock%}
-{%block contents%}
+{%block cocmain%}
 
 <h1>Code of Conduct Committee <i class="fas fa-users"></i></h1>