[gimp-web/testing] Add new page type, /tutorials/list-all.html



commit b239e43c4607e10667b860e1ce1232c6600e3d98
Author: Pat David <patdavid gmail com>
Date:   Thu May 5 17:03:48 2016 -0500

    Add new page type, /tutorials/list-all.html
    
    Added a new page type list-all.html to list all of the
    tutorials on the site, even old and deprecated ones to
    have as a reference.

 content/tutorials/list-all.md               |   12 ++++
 themes/newgimp/templates/tutorial-list.html |   84 +++++++++++++++++++++++++++
 2 files changed, 96 insertions(+), 0 deletions(-)
---
diff --git a/content/tutorials/list-all.md b/content/tutorials/list-all.md
new file mode 100644
index 0000000..69f1502
--- /dev/null
+++ b/content/tutorials/list-all.md
@@ -0,0 +1,12 @@
+Title: All Tutorials List
+Date: 2016-05-05
+Authors: Pat David
+template: tutorial-list 
+
+This is a list of **all** of the tutorials. 
+
+This list is being provided for legacy reasons only. 
+Please do not use it for current, relevant tutorials.
+If you need a list of currently maintained tutorials with permissive licensing,
+please see [/tutorials/](/tutorials/).
+
diff --git a/themes/newgimp/templates/tutorial-list.html b/themes/newgimp/templates/tutorial-list.html
new file mode 100644
index 0000000..cdc1f90
--- /dev/null
+++ b/themes/newgimp/templates/tutorial-list.html
@@ -0,0 +1,84 @@
+{% extends "base.html" %}
+
+{% block head %}
+  {{ super() }}
+  {% for keyword in page.keywords %}
+    <meta name="keywords" content="{{keyword}}" />
+  {% endfor %}
+
+  {% for description in page.description %}
+    <meta name="description" content="{{description}}" />
+  {% endfor %}
+
+  {% for tag in page.tags %}
+    <meta name="tags" content="{{tag}}" />
+  {% endfor %}
+
+    <link rel='stylesheet' type='text/css' href="/theme/css/page.css" />
+
+{% endblock head %}
+
+{% block content %}
+
+<section id="content" class="body">
+    <div class='container'>
+        <div class='row clearfix'>
+            <div class='column full'>
+                {# <header> #}
+
+                    <h2 class="entry-title">
+                      <a href="/{{ page.url }}" rel="bookmark"
+                         title="Permalink to {{ page.title|striptags }}">{{ page.title }}</a></h2>
+                 {% import 'translations.html' as translations with context %}
+                 {{ translations.translations_for(page) }}
+
+                 {# </header> #}
+
+                 {#
+                  <div class="post-info">
+                    <abbr class="published" title="{{ page.date.isoformat() }}">
+                      {{ page.locale_date }}
+                    </abbr>
+                    {% if page.modified %}
+                    <abbr class="modified" title="{{ page.modified.isoformat() }}">
+                      {{ page.locale_modified }}
+                    </abbr>
+                    {% endif %}
+                    {% if page.authors %}
+                    <address class="vcard author">
+                      by {% for author in page.authors %}
+                          <a class="url fn" href="/{{ author.url }}">{{ author }}</a>
+                        {% endfor %}
+                    </address>
+                    {% endif %}
+                  </div><!-- /.post-info -->
+                  #}
+
+                  <div class="entry-content" style='text-align: left;'>
+                    {{ page.content }}
+                  </div><!-- /.entry-content -->
+
+
+                  <hr/>
+
+                  <div>
+                      <p>
+                          <ul>
+                          {# {% for page in pages if 'tutorial' in page.tags %} #}
+
+                          {% for page in pages if 'tutorials/' == page.url|truncate(10, True, '') %}
+                          <li><a href="/{{ page.url }}">{{ page.title }}</a><br>
+                              <small><a href="{{ SITEURL }}/{{ page.url }}">{{ SITEURL }}/{{ page.url 
}}</a></small>
+                          </li>
+                          {% endfor %}
+
+                          </ul>
+                      </p>
+                  </div>
+
+              </div>
+          </div>
+      </div>
+</section>
+
+{% endblock content %}


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