diff options
| author | Thibaut Horel <thibaut.horel@gmail.com> | 2013-01-21 12:10:58 +0100 |
|---|---|---|
| committer | Thibaut Horel <thibaut.horel@gmail.com> | 2013-01-21 12:10:58 +0100 |
| commit | 5c4e85fe93ec3a713cf173db34e422072254d1c7 (patch) | |
| tree | e1b0cb4d442e429a485d64eb2df3596e7d1360ca /theme/templates | |
| parent | f62624ae5229ecc32fc57de8e6ae7aab051f9a4a (diff) | |
| download | blog-5c4e85fe93ec3a713cf173db34e422072254d1c7.tar.gz | |
Configuration update. Custom theme
Diffstat (limited to 'theme/templates')
| -rw-r--r-- | theme/templates/archives.html | 11 | ||||
| -rw-r--r-- | theme/templates/article.html | 20 | ||||
| -rw-r--r-- | theme/templates/author.html | 7 | ||||
| -rw-r--r-- | theme/templates/base.html | 50 | ||||
| -rw-r--r-- | theme/templates/categories.html | 8 | ||||
| -rw-r--r-- | theme/templates/category.html | 5 | ||||
| -rw-r--r-- | theme/templates/gosquared.html | 14 | ||||
| -rw-r--r-- | theme/templates/index.html | 16 | ||||
| -rw-r--r-- | theme/templates/page.html | 9 | ||||
| -rw-r--r-- | theme/templates/pagination.html | 15 | ||||
| -rw-r--r-- | theme/templates/tag.html | 0 | ||||
| -rw-r--r-- | theme/templates/tags.html | 0 | ||||
| -rw-r--r-- | theme/templates/translations.html | 9 |
13 files changed, 164 insertions, 0 deletions
diff --git a/theme/templates/archives.html b/theme/templates/archives.html new file mode 100644 index 0000000..050f268 --- /dev/null +++ b/theme/templates/archives.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} +{% block content %} +<h1>Archives for {{ SITENAME }}</h1> + +<dl> +{% for article in dates %} + <dt>{{ article.locale_date }}</dt> + <dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd> +{% endfor %} +</dl> +{% endblock %} diff --git a/theme/templates/article.html b/theme/templates/article.html new file mode 100644 index 0000000..637b3a1 --- /dev/null +++ b/theme/templates/article.html @@ -0,0 +1,20 @@ +{% extends "base.html" %} +{% block content %} +<section id="content" class="body"> + <header> + <h2 class="entry-title"> + <a href="{{ article.url }}" rel="bookmark" + title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2> + {% import 'translations.html' as translations with context %} + {{ translations.translations_for(article) }} + </header> + <footer class="post-info"> + Posted on <abbr class="published" title="{{ article.date.isoformat() }}"> + {{ article.locale_date }} + </abbr> + </footer><!-- /.post-info --> + <div class="entry-content"> + {{ article.content }} + </div><!-- /.entry-content --> +</section> +{% endblock %} diff --git a/theme/templates/author.html b/theme/templates/author.html new file mode 100644 index 0000000..e9f7870 --- /dev/null +++ b/theme/templates/author.html @@ -0,0 +1,7 @@ +{% extends "index.html" %} + +{% block title %}{{ SITENAME }} - Articles by {{ author }}{% endblock %} +{% block content_title %} +<h2>Articles by {{ author }}</h2> +{% endblock %} + diff --git a/theme/templates/base.html b/theme/templates/base.html new file mode 100644 index 0000000..ca6f2e3 --- /dev/null +++ b/theme/templates/base.html @@ -0,0 +1,50 @@ +<!DOCTYPE html> +<html lang="{{ DEFAULT_LANG }}"> +<head> + {% block head %} + <title>{% block title %}{{ SITENAME }}{% endblock title %}</title> + <meta charset="utf-8" /> + <link rel="stylesheet" href="{{ SITEURL }}/theme/bootstrap.css" /> + <link rel="stylesheet" href="{{ SITEURL }}/theme/highlight.css" /> + <link rel="stylesheet" href="{{ SITEURL }}/theme/main.css" /> + <link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Full Atom Feed" /> + {% endblock head %} +</head> + +<body id="index" class="home"> + <div id="wrap"> + + <nav id="menu"> + <ul class="inline"> + {% for title, link in MENUITEMS %} + <li><a href="{{ link }}">{{ title }}</a></li> + {% endfor %} + </ul> + </nav> + + <header id="banner" class="body"> + <h1><a href="{{ SITEURL }}">{{ SITENAME }}</a></h1> + </header> + + <hr class="top" /> + + {% block content %} + {% endblock %} + + <hr/> + + <footer> + <a rel="license" + href="http://creativecommons.org/licenses/by/3.0/deed.en_US"> + <img alt="Creative Commons License" style="border-width:0" + src="http://i.creativecommons.org/l/by/3.0/80x15.png" /> </a> + This <span xmlns:dct="http://purl.org/dc/terms/" + href="http://purl.org/dc/dcmitype/Text" + rel="dct:type">blog</span> is licensed under a <a rel="license" + href="http://creativecommons.org/licenses/by/3.0/deed.en_US">Creative + Commons Attribution 3.0 Unported License</a>. + </footer> + + </div> +</body> +</html> diff --git a/theme/templates/categories.html b/theme/templates/categories.html new file mode 100644 index 0000000..e29be0c --- /dev/null +++ b/theme/templates/categories.html @@ -0,0 +1,8 @@ +{% extends "base.html" %} +{% block content %} +<ul> +{% for category, articles in categories %} + <li><a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</a></li> +{% endfor %} +</ul> +{% endblock %} diff --git a/theme/templates/category.html b/theme/templates/category.html new file mode 100644 index 0000000..4e6fd24 --- /dev/null +++ b/theme/templates/category.html @@ -0,0 +1,5 @@ +{% extends "index.html" %} +{% block content_title %} +<h2>Articles in the {{ category }} category</h2> +{% endblock %} + diff --git a/theme/templates/gosquared.html b/theme/templates/gosquared.html new file mode 100644 index 0000000..f47efcf --- /dev/null +++ b/theme/templates/gosquared.html @@ -0,0 +1,14 @@ +{% if GOSQUARED_SITENAME %} +<script type="text/javascript"> + var GoSquared={}; + GoSquared.acct = "{{ GOSQUARED_SITENAME }}"; + (function(w){ + function gs(){ + w._gstc_lt=+(new Date); var d=document; + var g = d.createElement("script"); g.type = "text/javascript"; g.async = true; g.src = "//d1l6p2sc9645hc.cloudfront.net/tracker.js"; + var s = d.getElementsByTagName("script")[0]; s.parentNode.insertBefore(g, s); + } + w.addEventListener?w.addEventListener("load",gs,false):w.attachEvent("onload",gs); + })(window); +</script> +{% endif %} diff --git a/theme/templates/index.html b/theme/templates/index.html new file mode 100644 index 0000000..47bf7be --- /dev/null +++ b/theme/templates/index.html @@ -0,0 +1,16 @@ +{% extends "base.html" %} +{% block content %} +<section id="content"> +<h2>Blog posts</h2> + +<ul id="post-list"> +{% for article in articles_page.object_list %} + <li> + <span class="post-date"><abbr title="{{ article.date.isoformat() }}">{{ article.locale_date }}</abbr></span> + <a class="post-title" href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a> + </li> +{% endfor %} +</ul> +{% include 'pagination.html' %} +</section> +{% endblock content %} diff --git a/theme/templates/page.html b/theme/templates/page.html new file mode 100644 index 0000000..3a0dc4a --- /dev/null +++ b/theme/templates/page.html @@ -0,0 +1,9 @@ +{% extends "base.html" %} +{% block title %}{{ page.title }}{%endblock%} +{% block content %} + <h1>{{ page.title }}</h1> + {% import 'translations.html' as translations with context %} + {{ translations.translations_for(page) }} + + {{ page.content }} +{% endblock %} diff --git a/theme/templates/pagination.html b/theme/templates/pagination.html new file mode 100644 index 0000000..83c587a --- /dev/null +++ b/theme/templates/pagination.html @@ -0,0 +1,15 @@ +{% if DEFAULT_PAGINATION %} +<p class="paginator"> + {% if articles_page.has_previous() %} + {% if articles_page.previous_page_number() == 1 %} + <a href="{{ SITEURL }}/{{ page_name }}.html">«</a> + {% else %} + <a href="{{ SITEURL }}/{{ page_name }}{{ articles_page.previous_page_number() }}.html">«</a> + {% endif %} + {% endif %} + Page {{ articles_page.number }} / {{ articles_paginator.num_pages }} + {% if articles_page.has_next() %} + <a href="{{ SITEURL }}/{{ page_name }}{{ articles_page.next_page_number() }}.html">»</a> + {% endif %} +</p> +{% endif %} diff --git a/theme/templates/tag.html b/theme/templates/tag.html new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/theme/templates/tag.html diff --git a/theme/templates/tags.html b/theme/templates/tags.html new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/theme/templates/tags.html diff --git a/theme/templates/translations.html b/theme/templates/translations.html new file mode 100644 index 0000000..db8c372 --- /dev/null +++ b/theme/templates/translations.html @@ -0,0 +1,9 @@ +{% macro translations_for(article) %} +{% if article.translations %} +Translations: +{% for translation in article.translations %} +<a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a> +{% endfor %} +{% endif %} +{% endmacro %} + |
