diff options
author | Alexis Metaireau <alexis@notmyidea.org> | 2011-12-05 15:13:27 -0800 |
---|---|---|
committer | Alexis Metaireau <alexis@notmyidea.org> | 2011-12-05 15:13:27 -0800 |
commit | 24394e5871dd901cd2001551984df5a3d0f8c867 (patch) | |
tree | 7b06f08893121f5efefa875dc40b4064e8317bdd /bootstrap/templates | |
parent | 28bc815799239f17f896b3b64929a0356fd090db (diff) | |
parent | 13496f38dfd148556524aa1805107aa3e6c93548 (diff) | |
download | pelican-themes-24394e5871dd901cd2001551984df5a3d0f8c867.tar.gz |
Merge pull request #7 from mapio/master
I've added a new theme based on Bootstrap (from Twitter)
Diffstat (limited to 'bootstrap/templates')
-rw-r--r-- | bootstrap/templates/analytics.html | 3 | ||||
-rw-r--r-- | bootstrap/templates/archives.html | 15 | ||||
-rw-r--r-- | bootstrap/templates/article.html | 15 | ||||
-rw-r--r-- | bootstrap/templates/author.html | 2 | ||||
-rw-r--r-- | bootstrap/templates/base.html | 76 | ||||
-rw-r--r-- | bootstrap/templates/categories.html | 9 | ||||
-rw-r--r-- | bootstrap/templates/category.html | 2 | ||||
-rw-r--r-- | bootstrap/templates/disqus.html | 10 | ||||
-rw-r--r-- | bootstrap/templates/facebook.html | 9 | ||||
-rw-r--r-- | bootstrap/templates/github.html | 3 | ||||
-rw-r--r-- | bootstrap/templates/index.html | 36 | ||||
-rw-r--r-- | bootstrap/templates/metadata.html | 4 | ||||
-rw-r--r-- | bootstrap/templates/tag.html | 2 | ||||
-rw-r--r-- | bootstrap/templates/tags.html | 9 | ||||
-rw-r--r-- | bootstrap/templates/twitter.html | 3 |
15 files changed, 198 insertions, 0 deletions
diff --git a/bootstrap/templates/analytics.html b/bootstrap/templates/analytics.html new file mode 100644 index 0000000..62f8511 --- /dev/null +++ b/bootstrap/templates/analytics.html @@ -0,0 +1,3 @@ +{% if GOOGLE_ANALYTICS %} +<script>var _gaq=[['_setAccount','{{GOOGLE_ANALYTICS}}'],['_trackPageview']];(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.src='//www.google-analytics.com/ga.js';s.parentNode.insertBefore(g,s)}(document,'script'))</script> +{% endif %}
\ No newline at end of file diff --git a/bootstrap/templates/archives.html b/bootstrap/templates/archives.html new file mode 100644 index 0000000..2d02e12 --- /dev/null +++ b/bootstrap/templates/archives.html @@ -0,0 +1,15 @@ +{% extends "base.html" %} +{% block title %}{{ SITENAME }} <small>[archive]</small>{% endblock %} +{% block content %} +{% for year, date_year in dates|groupby( 'date.year' ) %} +<h2>{{ year }}</h2> +{% for month, articles in date_year|groupby( 'date.month' ) %} +<h3>{{ articles[ 0 ].date.strftime( '%B' ) }}</h3> +<ul> +{% for article in articles %} + <li><a href="{{ article.url }}">{{ article.title }}</li> +{% endfor %} +</ul> +{% endfor %} +{% endfor %} +{% endblock %} diff --git a/bootstrap/templates/article.html b/bootstrap/templates/article.html new file mode 100644 index 0000000..7f86290 --- /dev/null +++ b/bootstrap/templates/article.html @@ -0,0 +1,15 @@ +{% extends "base.html" %} +{% block indextitle %}{% endblock %} +{% block content %} + <div class='article'> + <div class="page-header"><h1>{{ article.title }}</h1></div> + <div class="well small">{% include "metadata.html" %}</div> + <div>{{ article.content }}</div> + <div> + <h2>Comments</h2> + {% include "twitter.html" %} + {% if FACEBOOK_APPID %}<div id="disqus_thread"></div>{% endif %} + {% if FACEBOOK_APPID %}<div class="fb-comments" data-href="{{ FQ_SITEURL }}/{{ article.url }}" data-num-posts="10" data-width="760"></div>{% endif %} + <div> + </div> +{% endblock %} diff --git a/bootstrap/templates/author.html b/bootstrap/templates/author.html new file mode 100644 index 0000000..5b41b41 --- /dev/null +++ b/bootstrap/templates/author.html @@ -0,0 +1,2 @@ +{% extends "index.html" %} +{% block title %}{{ SITENAME }} <small>{{ author }}</small>{% endblock %}
\ No newline at end of file diff --git a/bootstrap/templates/base.html b/bootstrap/templates/base.html new file mode 100644 index 0000000..5710a5e --- /dev/null +++ b/bootstrap/templates/base.html @@ -0,0 +1,76 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>{% block windowtitle %}{{ SITENAME }}{% endblock %}</title> + <meta name="description" content=""> + <meta name="author" content="{{ AUTHOR }}"> + + <!-- Le HTML5 shim, for IE6-8 support of HTML elements --> + <!--[if lt IE 9]> + <script src="{{ SITEURL }}/theme/html5.js"></script> + <![endif]--> + + <!-- Le styles --> + <link href="{{ SITEURL }}/theme/bootstrap.min.css" rel="stylesheet"> + <link href="{{ SITEURL }}/theme/local.css" rel="stylesheet"> + <link href="{{ SITEURL }}/theme/pygments.css" rel="stylesheet"> + {% include "analytics.html" %} + {% include "disqus.html" %} +</head> +<body> + {% include "facebook.html" %} + {% include "github.html" %} + <div class="topbar"> + <div class="topbar-inner"> + <div class="container-fluid"> + <a class="brand" href="{{ SITEURL }}/index.html">{{ SITENAME }}</a> + <ul class="nav"> + {% for title, link in MENUITEMS %} + <li><a href="{{ link }}">{{ title }}</a></li> + {% endfor %} + {% if DISPLAY_PAGES_ON_MENU %} + {% for page in PAGES %} + <li><a href="{{ SITEURL }}/pages/{{ page.url }}">{{ page.title }}</a></li> + {% endfor %} + {% endif %} + {% for cat, null in categories %} + <li {% if cat == category %}class="active"{% endif %}><a href="{{ SITEURL }}/category/{{ cat }}.html">{{ cat }}</a></li> + {% endfor %} + </ul> + <p class="pull-right"><a href="{{ SITEURL }}/archives.html">[archives]</a> <a href="{{ SITEURL }}/tags.html">[tags]</a></p> + </div> + </div> + </div> + + <div class="container-fluid"> + <div class="sidebar"> + <div class="well"> + <h3>Blogroll</h3> + <ul> + {% for name, link in LINKS %} + <li><a href="{{ link }}">{{ name }}</a></li> + {% endfor %} + </ul> + <div class="social"> + <h3>Social</h3> + <ul> + {% for name, link in SOCIAL %} + <li><a href="{{ link }}">{{ name }}</a></li> + {% endfor %} + </ul> + </div> + </div> + </div> + <div class="content"> + {% block indextitle %}<div class="page-header"><h1>{% block title %} {{ self.windowtitle() }} {% endblock %}</h1></div>{% endblock %} + {% block content %}{% endblock %} + <footer> + <p> Powered by <a href="http://alexis.notmyidea.org/pelican/">Pelican</a>, theme based on <a href="http://twitter.github.com/bootstrap/">Bootstrap, from Twitter</a>.</p> + <p>© {{ AUTHOR }} 2011</p> + </footer> + </div> + + </div> +</body> +</html>
\ No newline at end of file diff --git a/bootstrap/templates/categories.html b/bootstrap/templates/categories.html new file mode 100644 index 0000000..36b57bc --- /dev/null +++ b/bootstrap/templates/categories.html @@ -0,0 +1,9 @@ +{% extends "base.html" %} +{% block title %}{{ SITENAME }} <small>[categories]</small>{% endblock %} +{% block content %} +<ul> +{% for category, articles in categories %} + <li><a href="{{ SITEURL }}/category/{{ category }}.html">{{ category }}</li> +{% endfor %} +</ul> +{% endblock %} diff --git a/bootstrap/templates/category.html b/bootstrap/templates/category.html new file mode 100644 index 0000000..52215e6 --- /dev/null +++ b/bootstrap/templates/category.html @@ -0,0 +1,2 @@ +{% extends "index.html" %} +{% block title %}{{ SITENAME }} <small>{{ category }}</small>{% endblock %}
\ No newline at end of file diff --git a/bootstrap/templates/disqus.html b/bootstrap/templates/disqus.html new file mode 100644 index 0000000..9ba2e42 --- /dev/null +++ b/bootstrap/templates/disqus.html @@ -0,0 +1,10 @@ +{% if DISQUS_SITENAME and article %} +<script type="text/javascript"> + var disqus_identifier = "{{ article.url }}"; + (function() { + var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; + dsq.src = 'http://{{ DISQUS_SITENAME }}.disqus.com/embed.js'; + (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); + })(); +</script> +{% endif %}
\ No newline at end of file diff --git a/bootstrap/templates/facebook.html b/bootstrap/templates/facebook.html new file mode 100644 index 0000000..1070ac3 --- /dev/null +++ b/bootstrap/templates/facebook.html @@ -0,0 +1,9 @@ +{% if FACEBOOK_APPID %} +<div id="fb-root"></div> +<script>(function(d){ + var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;} + js = d.createElement('script'); js.id = id; js.async = true; + js.src = "http://connect.facebook.net/en_US/all.js#xfbml=1&appId={{ FACEBOOK_APPID }}"; + d.getElementsByTagName('head')[0].appendChild(js); + }(document));</script> +{% endif %}
\ No newline at end of file diff --git a/bootstrap/templates/github.html b/bootstrap/templates/github.html new file mode 100644 index 0000000..0c14c71 --- /dev/null +++ b/bootstrap/templates/github.html @@ -0,0 +1,3 @@ +{% if GITHUB_URL %} +<a href="{{ GITHUB_URL }}"><img style="position: absolute; top: 39px; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_white_ffffff.png" alt="Fork me on GitHub" /></a> +{% endif %}
\ No newline at end of file diff --git a/bootstrap/templates/index.html b/bootstrap/templates/index.html new file mode 100644 index 0000000..35d4242 --- /dev/null +++ b/bootstrap/templates/index.html @@ -0,0 +1,36 @@ +{% extends "base.html" %} +{% block content %} + +{% if articles %} +{% for article in (articles_page.object_list if articles_page else articles) %} +<div class='article'> + <h2>{{ article.title }}</h2> + <div class="well small">{% include "metadata.html" %}</div> + <div class="summary">{{ article.summary }} <a class="btn primary xsmall" href="{{ SITEURL }}/{{ article.url }}">more…</a> + </div> +</div> +{% endfor %} +{%endif%} + +{% if articles_page and articles_paginator.num_pages > 1 %} +<div class="pagination"> +<ul> + {% if articles_page.has_previous() %} + {% set num = articles_page.previous_page_number() %} + <li class="prev"><a href="{{ SITEURL }}/{{ page_name }}{{ num if num > 1 else '' }}.html">← Previous</a></li> + {% else %} + <li class="prev disabled"><a href="#">← Previous</a></li> + {% endif %} + {% for num in range( 1, 1 + articles_paginator.num_pages ) %} + <li class="{{ 'active' if num == articles_page.number else '' }}"><a href="{{ SITEURL }}/{{ page_name }}{{ num if num > 1 else '' }}.html">{{ num }}</a></li> + {% endfor %} + {% 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 href="#">→ Next</a></li> + {% endif %} +</ul> +</div> +{% endif %} + +{% endblock %} diff --git a/bootstrap/templates/metadata.html b/bootstrap/templates/metadata.html new file mode 100644 index 0000000..876df8f --- /dev/null +++ b/bootstrap/templates/metadata.html @@ -0,0 +1,4 @@ +Permalink: <a class="more" href="{{ SITEURL }}/{{ article.url }}">{{ article.date }}</a> +{% if article.author %}by <a class="url fn" href="{{ SITEURL }}/author/{{ article.author }}.html">{{ article.author }}</a>{% endif %} +in <a href="{{ SITEURL }}/category/{{ article.category }}.html">{{ article.category }}</a> +{% if article.tags %}tags: {% for tag in article.tags %}<a href="{{ SITEURL }}/tag/{{ tag }}.html">{{ tag }}</a> {% endfor %}{% endif %} diff --git a/bootstrap/templates/tag.html b/bootstrap/templates/tag.html new file mode 100644 index 0000000..ce6dcb7 --- /dev/null +++ b/bootstrap/templates/tag.html @@ -0,0 +1,2 @@ +{% extends "index.html" %} +{% block title %}{{ SITENAME }} <small>{{ tag }}</small>{% endblock %}
\ No newline at end of file diff --git a/bootstrap/templates/tags.html b/bootstrap/templates/tags.html new file mode 100644 index 0000000..592cd0d --- /dev/null +++ b/bootstrap/templates/tags.html @@ -0,0 +1,9 @@ +{% extends "base.html" %} +{% block title %}{{ SITENAME }} <small>[tgs]</small>{% endblock %} +{% block content %} +<ul> +{% for tag, articles in tags %} + <li><a href="{{ SITEURL }}/tag/{{ tag }}.html">{{ tag }}</li> +{% endfor %} +</ul> +{% endblock %} diff --git a/bootstrap/templates/twitter.html b/bootstrap/templates/twitter.html new file mode 100644 index 0000000..c6b159f --- /dev/null +++ b/bootstrap/templates/twitter.html @@ -0,0 +1,3 @@ +{% if TWITTER_USERNAME %} +<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="{{TWITTER_USERNAME}}">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> +{% endif %}
\ No newline at end of file |