diff options
author | housne <housne@gmail.com> | 2013-10-19 02:28:55 +0800 |
---|---|---|
committer | housne <housne@gmail.com> | 2013-10-19 02:28:55 +0800 |
commit | 7d192c0045b4b3441407e094fafbcf8d14448df5 (patch) | |
tree | 3381301037d02d080478a89e4d838346e181896f /simple-bootstrap/templates | |
parent | c3a18e33de278407c622daec0f4cbecb9125f96e (diff) | |
download | pelican-themes-7d192c0045b4b3441407e094fafbcf8d14448df5.tar.gz |
pelican new theme simple-bootstrap
Diffstat (limited to 'simple-bootstrap/templates')
-rwxr-xr-x | simple-bootstrap/templates/archives.html | 16 | ||||
-rwxr-xr-x | simple-bootstrap/templates/article.html | 46 | ||||
-rwxr-xr-x | simple-bootstrap/templates/author.html | 7 | ||||
-rwxr-xr-x | simple-bootstrap/templates/base.html | 61 | ||||
-rwxr-xr-x | simple-bootstrap/templates/categories.html | 10 | ||||
-rwxr-xr-x | simple-bootstrap/templates/category.html | 8 | ||||
-rwxr-xr-x | simple-bootstrap/templates/index.html | 16 | ||||
-rwxr-xr-x | simple-bootstrap/templates/page.html | 9 | ||||
-rw-r--r-- | simple-bootstrap/templates/pagination.html | 17 | ||||
-rw-r--r-- | simple-bootstrap/templates/period_archives.html | 16 | ||||
-rwxr-xr-x | simple-bootstrap/templates/tag.html | 7 | ||||
-rwxr-xr-x | simple-bootstrap/templates/tags.html | 12 | ||||
-rwxr-xr-x | simple-bootstrap/templates/translations.html | 9 |
13 files changed, 234 insertions, 0 deletions
diff --git a/simple-bootstrap/templates/archives.html b/simple-bootstrap/templates/archives.html new file mode 100755 index 0000000..eb5b2d3 --- /dev/null +++ b/simple-bootstrap/templates/archives.html @@ -0,0 +1,16 @@ +{% extends "base.html" %} +{% block archclass %} class="active"{%endblock%} +{% block title %}Archives{%endblock%} +{% block content %} + +<dl> + {% for year, date_year in dates|groupby( 'date.year' )|sort(reverse=True) %} + <h3><a href="{{SITEURL}}/{{year}}" class="text">Archive for {{ year }}</a></h3> + <ul class="archive-list"> + {% for article in date_year %} + <li><span class="text-muted">{{article.locale_date}} » </span><a href="{{ SITEURL }}/{{ article.url }}">{{article.title}}</a></li> + {% endfor %} + </ul> + {% endfor %} +</dl> +{% endblock %} diff --git a/simple-bootstrap/templates/article.html b/simple-bootstrap/templates/article.html new file mode 100755 index 0000000..9eae108 --- /dev/null +++ b/simple-bootstrap/templates/article.html @@ -0,0 +1,46 @@ +{% extends "base.html" %} +{% block title %}{{ article.title }} - {{SITENAME}}{% endblock title %} +{% block content %} +<section id="content" class="article content"> + <header> + <h2 class="entry-title"> + <a href="{{ SITEURL }}/{{ 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> + + + <div class="entry-content"> + {{ article.content }} + </div><!-- /.entry-content --> + <footer class="post-info text-muted"> + Posted on <abbr class="published" title="{{ article.date.isoformat() }}"> + {{ article.locale_date }} + </abbr> + {% if article.author %} + <address class="vcard author"> + by <a class="url fn" href="{{ SITEURL }}/{{ article.author.url }}">{{ article.author }}</a> + </address> in <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a> Tagged {% if article.tags %}{% for tag in article.tags %}<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }} </a>{% endfor %}{% endif %} + {% endif %} + </footer><!-- /.post-info --> +</section> + {% if DISQUS_SITENAME %} + <div class="comment"> + <div id="disqus_thread"></div> <!-- comment app container --> + </div> + <!-- Comment BEGIN --> + <script type="text/javascript"> + var disqus_shortname = '{{ DISQUS_SITENAME }}'; // required: replace example with your forum shortname + + /* * * DON'T EDIT BELOW THIS LINE * * */ + (function() { + var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; + dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; + (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); + })(); + </script> + <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> + <!-- Comment END --> + {% endif %} +{% endblock %} diff --git a/simple-bootstrap/templates/author.html b/simple-bootstrap/templates/author.html new file mode 100755 index 0000000..fde712d --- /dev/null +++ b/simple-bootstrap/templates/author.html @@ -0,0 +1,7 @@ +{% extends "index.html" %} +{% block title %} Articles by {{ author }} - {{ SITENAME }}{% endblock %} +{% block navclass %}{%endblock%} +{% block content_title %} +<h2>Articles by {{ author }}</h2> +{% endblock %} + diff --git a/simple-bootstrap/templates/base.html b/simple-bootstrap/templates/base.html new file mode 100755 index 0000000..b1f06a7 --- /dev/null +++ b/simple-bootstrap/templates/base.html @@ -0,0 +1,61 @@ +<!DOCTYPE html> +<html> + <head> + {% block head %} + <title>{% block title %}{{ SITENAME }}{% endblock %}</title> + <meta charset="utf-8" /> + <link href="http://cdn.staticfile.org/twitter-bootstrap/3.0.0-rc1/css/bootstrap.min.css" rel="stylesheet" /> + <link href="{{ SITEURL }}/theme/static/css/style.css" rel="stylesheet" /> + <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> + {% if FEED_ALL_ATOM %} + <link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Full Atom Feed" /> + {% endif %} + {% if FEED_ALL_RSS %} + <link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Full RSS Feed" /> + {% endif %} + {% if FEED_ATOM %} + <link href="{{ FEED_DOMAIN }}/{{ FEED_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Atom Feed" /> + {% endif %} + {% if FEED_RSS %} + <link href="{{ FEED_DOMAIN }}/{{ FEED_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} RSS Feed" /> + {% endif %} + {% if CATEGORY_FEED_ATOM and category %} + <link href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_ATOM|format(category.slug) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Categories Atom Feed" /> + {% endif %} + {% if CATEGORY_FEED_RSS and category %} + <link href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_RSS|format(category.slug) }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Categories RSS Feed" /> + {% endif %} + {% if TAG_FEED_ATOM and tag %} + <link href="{{ FEED_DOMAIN }}/{{ TAG_FEED_ATOM|format(tag.slug) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Tags Atom Feed" /> + {% endif %} + {% if TAG_FEED_RSS and tag %} + <link href="{{ FEED_DOMAIN }}/{{ TAG_FEED_RSS|format(tag.slug) }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Tags RSS Feed" /> + {% endif %} + {% endblock head %} + </head> + + <body id="index" class="archive"> + <div class="container"> + <div class="header"> + <ul class="nav nav-pills pull-right"> + <li class="{% block navclass %}{{ NAVCLASS }}{% endblock navclass %}"><a href="{{ SITEURL }}">Home</a></li> + {% for p in PAGES %} + <li{% if p == page %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a></li> + {% endfor %} + <li{% if author or tag %} class="active"{% endif %}{% block archclass %}{{ ARCHCLASS }}{% endblock archclass %}><a href="{{ SITEURL }}/archives.html">Archives</a></li> + </ul> + <h3 class="text-muted"><a href="{{ SITEURL }}">{{ SITENAME }}</a></h3> + </div> + {% block content %} + {% endblock %} + <footer id="contentinfo" class="footer"> + <nav class="pull-right bottom-nav"> + <a href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}">RSS</a> + </nav> + <address id="about" class="vcard body"> + © <a href="{{SITEURL}}">{{SITENAME}}</a> Proudly powered by <a href="http://getpelican.com/">Pelican</a> + </address><!-- /#about --> + </footer><!-- /#contentinfo --> + </div><!-- container --> + </body> +</html> diff --git a/simple-bootstrap/templates/categories.html b/simple-bootstrap/templates/categories.html new file mode 100755 index 0000000..e9c8b53 --- /dev/null +++ b/simple-bootstrap/templates/categories.html @@ -0,0 +1,10 @@ +{% extends "base.html" %} +{% block title %} Articles in {{ category }} - {{ SITENAME }}{% endblock %} +{% block archclass %} class="active"{%endblock%} +{% block content %} +<ul> +{% for category, articles in categories %} + <li><a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</a></li> +{% endfor %} +</ul> +{% endblock %} diff --git a/simple-bootstrap/templates/category.html b/simple-bootstrap/templates/category.html new file mode 100755 index 0000000..9028680 --- /dev/null +++ b/simple-bootstrap/templates/category.html @@ -0,0 +1,8 @@ +{% extends "index.html" %} +{% block title %} Articles in {{ category }} category - {{ SITENAME }}{% endblock %} +{% block navclass %}{%endblock%} +{% block archclass %} class="active"{%endblock%} +{% block content_title %} +<h2>Articles in the {{ category }} category</h2> +{% endblock %} + diff --git a/simple-bootstrap/templates/index.html b/simple-bootstrap/templates/index.html new file mode 100755 index 0000000..af88d8e --- /dev/null +++ b/simple-bootstrap/templates/index.html @@ -0,0 +1,16 @@ +{% extends "base.html" %} +{% block navclass %}active{%endblock%} +{% block content %} +<section id="content" class="content"> +{% block content_title %} +{% endblock %} + +{% for article in articles_page.object_list %} + <article class="hentry"> + <header> <h2 class="entry-title"><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2> </header> + <div class="entry-content"> {{ article.summary }} </div><!-- entry-content --> + </article> +{% endfor %} +{% include 'pagination.html' %} +</section><!-- content --> +{% endblock content %} diff --git a/simple-bootstrap/templates/page.html b/simple-bootstrap/templates/page.html new file mode 100755 index 0000000..3a0dc4a --- /dev/null +++ b/simple-bootstrap/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/simple-bootstrap/templates/pagination.html b/simple-bootstrap/templates/pagination.html new file mode 100644 index 0000000..eee5f20 --- /dev/null +++ b/simple-bootstrap/templates/pagination.html @@ -0,0 +1,17 @@ +{% if DEFAULT_PAGINATION %} +<div class="pager"> + <ul> + {% if articles_page.has_previous() %} + {% set num = articles_page.previous_page_number() %} + <li class="previous"><a href="{{ SITEURL }}/{{ page_name }}{{ num if num > 1 else '' }}.html">← Previous</a></li> + {% else %} + <li class="previous disabled"><a>← Previous</a></li> + {% endif %} + {% if articles_page.has_next() %} + <li class="next"><a href="{{ SITEURL }}/{{ page_name }}{{ articles_page.next_page_number() }}.html">Next →</a></li> + {% else %} + <li class="next disabled"><a>Next →</a></li> + {% endif %} + </ul> + </div> +{% endif %} diff --git a/simple-bootstrap/templates/period_archives.html b/simple-bootstrap/templates/period_archives.html new file mode 100644 index 0000000..b7d8f70 --- /dev/null +++ b/simple-bootstrap/templates/period_archives.html @@ -0,0 +1,16 @@ +{% extends "base.html" %} +{% block archclass %} class="active"{%endblock%} + +{% block content %} + +<dl> + {% for year, date_year in dates|groupby( 'date.year' )|sort(reverse=True) %} + <h3><a href="{{SITEURL}}/{{year}}" class="text">Archive for {{ year }}</a></h3> + <ul class="archive-list"> + {% for article in date_year %} + <li><span class="text-muted">{{article.locale_date}} » </span><a href="{{ SITEURL }}/{{ article.url }}">{{article.title}}</a></li> + {% endfor %} + </ul> + {% endfor %} +</dl> +{% endblock %} diff --git a/simple-bootstrap/templates/tag.html b/simple-bootstrap/templates/tag.html new file mode 100755 index 0000000..ff040d5 --- /dev/null +++ b/simple-bootstrap/templates/tag.html @@ -0,0 +1,7 @@ +{% extends "index.html" %} +{% block title %} Articles in {{ tag }} tag - {{ SITENAME }}{% endblock %} +{% block navclass %}{%endblock%} +{% block archclass %}active{%endblock%} +{% block content_title %} +<h2>Articles with the {{ tag }} tag</h2> +{% endblock %} diff --git a/simple-bootstrap/templates/tags.html b/simple-bootstrap/templates/tags.html new file mode 100755 index 0000000..85377e8 --- /dev/null +++ b/simple-bootstrap/templates/tags.html @@ -0,0 +1,12 @@ +{% extends "base.html" %} +{% block archclass %} class="active"{%endblock%} +{% block title %}Tags{%endblock%} +{% block content %} + +<ul class="tag"> + {% for tag in tag_cloud %} + <li class="tag-{{ tag.1 }}"><a href="{{ SITEURL }}/{{ tag.0.url }}">{{ tag.0 }}</a></li> + {% endfor %} +</ul> +{% endblock %} + diff --git a/simple-bootstrap/templates/translations.html b/simple-bootstrap/templates/translations.html new file mode 100755 index 0000000..db8c372 --- /dev/null +++ b/simple-bootstrap/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 %} + |