allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [2/4] allura-site git commit: Link to older news
Date Wed, 09 Dec 2015 14:53:12 GMT
Link to older news


Project: http://git-wip-us.apache.org/repos/asf/allura-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura-site/commit/5a92330f
Tree: http://git-wip-us.apache.org/repos/asf/allura-site/tree/5a92330f
Diff: http://git-wip-us.apache.org/repos/asf/allura-site/diff/5a92330f

Branch: refs/heads/asf-site
Commit: 5a92330fb7bc0e00b3c7aa9b46e2ba4d8bd35bda
Parents: 490c80f
Author: Dave Brondsema <dave@brondsema.net>
Authored: Tue Dec 8 16:49:18 2015 -0500
Committer: Dave Brondsema <dave@brondsema.net>
Committed: Tue Dec 8 16:49:18 2015 -0500

----------------------------------------------------------------------
 _src/allura-theme/templates/article_list.html |  4 ++--
 _src/allura-theme/templates/index.html        |  1 +
 _src/allura-theme/templates/news.html         | 14 ++++++++++++++
 _src/pelicanconf.py                           |  2 +-
 4 files changed, 18 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura-site/blob/5a92330f/_src/allura-theme/templates/article_list.html
----------------------------------------------------------------------
diff --git a/_src/allura-theme/templates/article_list.html b/_src/allura-theme/templates/article_list.html
index c514f75..ba7b6cb 100644
--- a/_src/allura-theme/templates/article_list.html
+++ b/_src/allura-theme/templates/article_list.html
@@ -8,7 +8,7 @@
 {% endblock %}
 
 <div class="row bg-white pad-bot-md text-center">
-{% for article in articles_page.object_list %}
+{% for article in (articles_page is defined and articles_page.object_list) or custom_article_list
%}
   <div class="row pad-top-md">
     <h3><a class="text-black" href="{{ SITEURL }}/{{ article.url }}">{{ article.title
}}</a></h3>
   </div>
@@ -23,7 +23,7 @@
 {% endfor %}
 </div>
 
-{% if articles_page.has_other_pages() %}
+{% if articles_page|default and articles_page.has_other_pages() %}
     {% include 'pagination.html' %}
 {% endif %}
 

http://git-wip-us.apache.org/repos/asf/allura-site/blob/5a92330f/_src/allura-theme/templates/index.html
----------------------------------------------------------------------
diff --git a/_src/allura-theme/templates/index.html b/_src/allura-theme/templates/index.html
index 841e0a7..3823938 100644
--- a/_src/allura-theme/templates/index.html
+++ b/_src/allura-theme/templates/index.html
@@ -59,6 +59,7 @@
                 {% for art in articles[:5]%}
                     <li><a href="{{ SITEURL }}/{{ art.url }}">{{ art.title }}</a></li>
                 {% endfor %}
+                <li><a href="{{ SITEURL }}/news.html">All News &rarr;</a></li>
             </ul>
         </div>
       </div>

http://git-wip-us.apache.org/repos/asf/allura-site/blob/5a92330f/_src/allura-theme/templates/news.html
----------------------------------------------------------------------
diff --git a/_src/allura-theme/templates/news.html b/_src/allura-theme/templates/news.html
new file mode 100644
index 0000000..ed325b5
--- /dev/null
+++ b/_src/allura-theme/templates/news.html
@@ -0,0 +1,14 @@
+{% extends "article_list.html" %}
+
+{% block title %}Apache Allura : All News{% endblock %}
+
+{% set custom_article_list = articles %}
+
+{% block head %}
+    {{ super() }}
+    <link rel="alternate" type="application/atom+xml" href="{{ SITEURL }}/feeds/all.atom.xml"
title="All Allura News">
+{% endblock %}
+
+{% block content_title %}
+    <h2>All News</h2>
+{% endblock %}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/allura-site/blob/5a92330f/_src/pelicanconf.py
----------------------------------------------------------------------
diff --git a/_src/pelicanconf.py b/_src/pelicanconf.py
index 3c91b41..7202832 100644
--- a/_src/pelicanconf.py
+++ b/_src/pelicanconf.py
@@ -28,7 +28,7 @@ EXTRA_PATH_METADATA = {
     'extra/favicon.ico': {'path': 'favicon.ico'},
     'extra/.htaccess': {'path': '.htaccess'},
 }
-DIRECT_TEMPLATES = ['index', '404']
+DIRECT_TEMPLATES = ['index', '404', 'news']
 
 ARTICLE_SAVE_AS = 'posts/{date:%Y}-{slug}.html'
 ARTICLE_URL = 'posts/{date:%Y}-{slug}.html'


Mime
View raw message