From a3015ba8429a09878ed6c35d7c7c76a882de7dcf Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 8 Nov 2014 15:52:18 -0600 Subject: Override default sitemap.xml template The Django one uses the spaceless tag, which isn't all that useful when we are gzipping the response anyway. Remove it to make generation a tad faster. Signed-off-by: Dan McGee --- templates/sitemaps/sitemap.xml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 templates/sitemaps/sitemap.xml (limited to 'templates') diff --git a/templates/sitemaps/sitemap.xml b/templates/sitemaps/sitemap.xml new file mode 100644 index 00000000..50a95237 --- /dev/null +++ b/templates/sitemaps/sitemap.xml @@ -0,0 +1,9 @@ + + +{% for url in urlset %} +{{ url.location }} +{% if url.lastmod %}{{ url.lastmod|date:"Y-m-d" }}{% endif %} +{% if url.changefreq %}{{ url.changefreq }}{% endif %} +{% if url.priority %}{{ url.priority }}{% endif %} +{% endfor %} + -- cgit v1.2.3-2-g168b From 4c5b478543184ea395e0e692d3bcf666fb7513ad Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 8 Nov 2014 15:58:26 -0600 Subject: Convert sitemap.xml template to Jinja2 Signed-off-by: Dan McGee --- templates/sitemaps/sitemap.xml | 9 --------- templates/sitemaps/sitemap.xml.jinja | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) delete mode 100644 templates/sitemaps/sitemap.xml create mode 100644 templates/sitemaps/sitemap.xml.jinja (limited to 'templates') diff --git a/templates/sitemaps/sitemap.xml b/templates/sitemaps/sitemap.xml deleted file mode 100644 index 50a95237..00000000 --- a/templates/sitemaps/sitemap.xml +++ /dev/null @@ -1,9 +0,0 @@ - - -{% for url in urlset %} -{{ url.location }} -{% if url.lastmod %}{{ url.lastmod|date:"Y-m-d" }}{% endif %} -{% if url.changefreq %}{{ url.changefreq }}{% endif %} -{% if url.priority %}{{ url.priority }}{% endif %} -{% endfor %} - diff --git a/templates/sitemaps/sitemap.xml.jinja b/templates/sitemaps/sitemap.xml.jinja new file mode 100644 index 00000000..0808a7de --- /dev/null +++ b/templates/sitemaps/sitemap.xml.jinja @@ -0,0 +1,9 @@ + + +{% for url in urlset %} +{{ url.location }} +{% if url.lastmod %}{{ url.lastmod|date("Y-m-d") }}{% endif %} +{% if url.changefreq %}{{ url.changefreq }}{% endif %} +{% if url.priority %}{{ url.priority }}{% endif %} +{% endfor %} + -- cgit v1.2.3-2-g168b From 96a7614285325b693434f3fd011238000d75926d Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 8 Nov 2014 16:31:38 -0600 Subject: Add a news-specific sitemap This follows the spec at https://support.google.com/news/publisher/answer/74288?hl=en#tagdefinitions Signed-off-by: Dan McGee --- templates/sitemaps/news_sitemap.xml.jinja | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 templates/sitemaps/news_sitemap.xml.jinja (limited to 'templates') diff --git a/templates/sitemaps/news_sitemap.xml.jinja b/templates/sitemaps/news_sitemap.xml.jinja new file mode 100644 index 00000000..97dd17b5 --- /dev/null +++ b/templates/sitemaps/news_sitemap.xml.jinja @@ -0,0 +1,14 @@ + + +{% for url in urlset %} +{{ url.location }} +{% if url.lastmod %}{{ url.lastmod|date("Y-m-d") }}{% endif %} +{% if url.changefreq %}{{ url.changefreq }}{% endif %} +{% if url.priority %}{{ url.priority }}{% endif %} + + Arch Linux Newsen + {% if url.item.postdate %}{{ url.item.postdate|date("c") }}{% endif %} + {% if url.item.title %}{{ url.item.title }}{% endif %} + +{% endfor %} + -- cgit v1.2.3-2-g168b From 88a457f1c8ae057278f1a7cadb6c163183484019 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 8 Nov 2014 19:14:32 -0600 Subject: Minor news listing tweaks Signed-off-by: Dan McGee --- templates/news/list.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'templates') diff --git a/templates/news/list.html b/templates/news/list.html index 4acbc7e9..71cd3d02 100644 --- a/templates/news/list.html +++ b/templates/news/list.html @@ -10,7 +10,7 @@ {% block content %}
-

News Archives

+

Arch Linux News Archives

{% if perms.news.add_news %}
    @@ -54,6 +54,5 @@ {% include "news/paginator.html" %} -
{% endblock %} -- cgit v1.2.3-2-g168b From 327bd4cfc599dbeddd501afd5221a1d2ff7eee08 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 8 Nov 2014 19:15:35 -0600 Subject: Paginate the todolist listing page Signed-off-by: Dan McGee --- templates/todolists/list.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'templates') diff --git a/templates/todolists/list.html b/templates/todolists/list.html index 7f0368de..983a49f0 100644 --- a/templates/todolists/list.html +++ b/templates/todolists/list.html @@ -16,7 +16,10 @@

Todo lists are used by the developers when a rebuild of a set of packages is needed. This is common when a library has a version bump, during a toolchain rebuild, or a general cleanup of packages in the - repositories. The progress can be tracked here.

+ repositories. The progress can be tracked here, and completed todo lists + can be browsed as well.

+ + {% include "todolists/paginator.html" %} @@ -46,6 +49,8 @@ {% endfor %}
+ + {% include "todolists/paginator.html" %} {% endblock %} -- cgit v1.2.3-2-g168b From e5fc7cd53f6082f2911bc6c8cf8ea4f4ca4addc8 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 8 Nov 2014 19:41:21 -0600 Subject: Add paginator template for todolists Signed-off-by: Dan McGee --- templates/todolists/paginator.html | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 templates/todolists/paginator.html (limited to 'templates') diff --git a/templates/todolists/paginator.html b/templates/todolists/paginator.html new file mode 100644 index 00000000..3b077419 --- /dev/null +++ b/templates/todolists/paginator.html @@ -0,0 +1,22 @@ +{% if is_paginated %} + +{% endif %} -- cgit v1.2.3-2-g168b