aboutsummaryrefslogtreecommitdiffstats
path: root/tuxlite_tbs/templates
diff options
context:
space:
mode:
authorAlexis Metaireau <alexis@notmyidea.org>2012-01-26 07:54:12 -0800
committerAlexis Metaireau <alexis@notmyidea.org>2012-01-26 07:54:12 -0800
commit5ca71a7c7793832e5becae5717b2f9ac4744bded (patch)
tree1cb09bd2e2b7217423a36240f6fcba5d6890fe5c /tuxlite_tbs/templates
parent77eff4701ac0bd7a11728531da319bb99d1dbd4a (diff)
parent24aaa07fa699407f56357f867be225a58eaf1bdd (diff)
downloadpelican-themes-5ca71a7c7793832e5becae5717b2f9ac4744bded.tar.gz
Merge pull request #11 from Mins/master
Added tuxlite theme, which is inspired by the original bootstrap theme.
Diffstat (limited to 'tuxlite_tbs/templates')
-rw-r--r--tuxlite_tbs/templates/analytics.html3
-rw-r--r--tuxlite_tbs/templates/archives.html15
-rw-r--r--tuxlite_tbs/templates/article.html17
-rw-r--r--tuxlite_tbs/templates/author.html2
-rw-r--r--tuxlite_tbs/templates/base.html134
-rw-r--r--tuxlite_tbs/templates/categories.html10
-rw-r--r--tuxlite_tbs/templates/category.html2
-rw-r--r--tuxlite_tbs/templates/disqus.html10
-rw-r--r--tuxlite_tbs/templates/github.html3
-rw-r--r--tuxlite_tbs/templates/index.html47
-rw-r--r--tuxlite_tbs/templates/metadata.html13
-rw-r--r--tuxlite_tbs/templates/page.html10
-rw-r--r--tuxlite_tbs/templates/pagination.html21
-rw-r--r--tuxlite_tbs/templates/tag.html2
-rw-r--r--tuxlite_tbs/templates/tags.html9
-rw-r--r--tuxlite_tbs/templates/twitter.html3
16 files changed, 301 insertions, 0 deletions
diff --git a/tuxlite_tbs/templates/analytics.html b/tuxlite_tbs/templates/analytics.html
new file mode 100644
index 0000000..62f8511
--- /dev/null
+++ b/tuxlite_tbs/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/tuxlite_tbs/templates/archives.html b/tuxlite_tbs/templates/archives.html
new file mode 100644
index 0000000..2d02e12
--- /dev/null
+++ b/tuxlite_tbs/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/tuxlite_tbs/templates/article.html b/tuxlite_tbs/templates/article.html
new file mode 100644
index 0000000..23e3c86
--- /dev/null
+++ b/tuxlite_tbs/templates/article.html
@@ -0,0 +1,17 @@
+{% extends "base.html" %}
+{% block content %}
+ <div class='article'>
+ <div class="content-title">
+ <h2>{{ article.title }}</h2>
+ {% include "metadata.html" %}
+ </div>
+
+ <div>{{ article.content }}</div>
+
+ <hr>
+
+ <h2>Comments</h2>
+ {% include "twitter.html" %}
+ {% if DISQUS_SITENAME %}<div id="disqus_thread"></div>{% endif %}
+ </div>
+{% endblock %}
diff --git a/tuxlite_tbs/templates/author.html b/tuxlite_tbs/templates/author.html
new file mode 100644
index 0000000..5b41b41
--- /dev/null
+++ b/tuxlite_tbs/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/tuxlite_tbs/templates/base.html b/tuxlite_tbs/templates/base.html
new file mode 100644
index 0000000..346837a
--- /dev/null
+++ b/tuxlite_tbs/templates/base.html
@@ -0,0 +1,134 @@
+<!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/bootstrap-responsive.min.css" rel="stylesheet">
+ <link href="{{ SITEURL }}/theme/local.css" rel="stylesheet">
+ <link href="{{ SITEURL }}/theme/pygments.css" rel="stylesheet">
+
+</head>
+
+<body>
+ {% include "github.html" %}
+
+<div class="navbar navbar-static">
+ <div class="navbar-inner">
+ <div class="container">
+
+ <a class="brand" href="{{ SITEURL }}">{{ 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 %}
+ {% if page.category|lower != "documentation" %}
+ <li><a href="{{ SITEURL }}/pages/{{ page.url }}">{{ page.title }}</a></li>
+ {% endif %}
+ {% endfor %}
+ {% endif %}
+ </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">
+ <div class="content">
+ <div class="row">
+
+ <div class="span9">
+ {% block content %}{% endblock %}
+ </div>
+
+ <div class="span3">
+
+ {% if categories %}
+ <div class="well" style="padding: 8px 0; background-color: #FBFBFB;">
+ <ul class="nav list">
+ <li class="nav-header">
+ Categories
+ </li>
+
+ {% for cat, null in categories %}
+ <li><a href="{{ SITEURL }}/category/{{ cat }}.html">{{ cat }}</a></li>
+ {% endfor %}
+ </ul>
+ </div>
+ {% endif %}
+
+ {% if LINKS %}
+ <div class="well" style="padding: 8px 0; background-color: #FBFBFB;">
+ <ul class="nav list">
+ <li class="nav-header">
+ Links
+ </li>
+
+ {% for name, link in LINKS %}
+ <li><a href="{{ link }}">{{ name }}</a></li>
+ {% endfor %}
+ </ul>
+ </div>
+ {% endif %}
+
+ {% if SOCIAL %}
+ <div class="social">
+ <div class="well" style="padding: 8px 0; background-color: #FBFBFB;">
+ <ul class="nav list">
+ <li class="nav-header">
+ Social
+ </li>
+
+ <li><a href="{{ SITEURL }}/{{ FEED }}" rel="alternate">atom feed</a></li>
+ {% if FEED_RSS %}
+ <li><a href="{{ SITEURL }}/{{ FEED_RSS }}" rel="alternate">rss feed</a></li>
+ {% endif %}
+
+ {% for name, link in SOCIAL %}
+ <li><a href="{{ link }}">{{ name }}</a></li>
+ {% endfor %}
+ </ul>
+ </div>
+ </div>
+ {% endif %}
+
+ {# <h3>Documentation</h3> #}
+ {# <ul> #}
+ {# {% for page in PAGES %} #}
+ {# {% if page.category|lower == "documentation" %} #}
+ {# <li><a href="{{ SITEURL }}/pages/{{ page.url }}">{{ page.title }}</a></li> #}
+ {# {% endif %} #}
+ {# {% endfor %} #}
+ {# </ul> #}
+
+ </div> {# End span3 #}
+ </div> {# End row #}
+ </div> {# End content #}
+
+<footer>
+<br />
+<p>{{ SITENAME }} &copy; {{ AUTHOR }} 2012</p>
+</footer>
+
+</div> <!-- /container -->
+
+{% include "analytics.html" %}
+{% include "disqus.html" %}
+
+</body>
+</html>
diff --git a/tuxlite_tbs/templates/categories.html b/tuxlite_tbs/templates/categories.html
new file mode 100644
index 0000000..c96774d
--- /dev/null
+++ b/tuxlite_tbs/templates/categories.html
@@ -0,0 +1,10 @@
+{% 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/tuxlite_tbs/templates/category.html b/tuxlite_tbs/templates/category.html
new file mode 100644
index 0000000..52215e6
--- /dev/null
+++ b/tuxlite_tbs/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/tuxlite_tbs/templates/disqus.html b/tuxlite_tbs/templates/disqus.html
new file mode 100644
index 0000000..9ba2e42
--- /dev/null
+++ b/tuxlite_tbs/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/tuxlite_tbs/templates/github.html b/tuxlite_tbs/templates/github.html
new file mode 100644
index 0000000..4c3d935
--- /dev/null
+++ b/tuxlite_tbs/templates/github.html
@@ -0,0 +1,3 @@
+{% if GITHUB_URL %}
+<a href="{{ GITHUB_URL }}"><img style="position: absolute; top: 40px; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_white_ffffff.png" alt="Fork me on GitHub" /></a>
+{% endif %}
diff --git a/tuxlite_tbs/templates/index.html b/tuxlite_tbs/templates/index.html
new file mode 100644
index 0000000..45a491d
--- /dev/null
+++ b/tuxlite_tbs/templates/index.html
@@ -0,0 +1,47 @@
+{% extends "base.html" %}
+{% block content_title %}{% endblock %}
+{% block content %}
+
+{% if articles %}
+{% for article in articles_page.object_list %}
+
+{# First item #}
+{% if loop.first and not articles_page.has_previous() %}
+
+ <div class='article'>
+ <div class="content-title">
+ <a href="{{ SITEURL }}/{{ article.url }}"><h2>{{ article.title }}</h2></a>
+ {% include "metadata.html" %}
+ </div>
+ <div>{{ article.content }}</div>
+ </div>
+
+ {% if loop.length == 1 %}
+ {% include 'pagination.html' %}
+ {% endif %}
+
+ {% if loop.length > 1 %}
+ <hr />
+ <br />
+ <h2>Other Entries</h2>
+ {% endif %}
+
+{# other items #}
+{% else %}
+
+ <div class='article'>
+ <a href="{{ SITEURL }}/{{ article.url }}"><h3>{{ article.title }}</h3></a>
+ <div class= "well small"> {% include "metadata.html" %} </div>
+ <div class="summary">{{ article.summary }} <a class="btn primary xsmall" href="{{ SITEURL }}/{{ article.url }}">read more</a></div>
+ </div>
+
+ {% if loop.last and (articles_page.has_previous() or not articles_page.has_previous() and loop.length > 1) %}
+ {% include 'pagination.html' %}
+ {% endif %}
+
+{% endif %} {# First item if #}
+
+{% endfor %} {# For article #}
+{% endif %} {# If articles #}
+
+{% endblock content %}
diff --git a/tuxlite_tbs/templates/metadata.html b/tuxlite_tbs/templates/metadata.html
new file mode 100644
index 0000000..cb04053
--- /dev/null
+++ b/tuxlite_tbs/templates/metadata.html
@@ -0,0 +1,13 @@
+{{ article.date.strftime("%d %b %Y") }}
+
+{% if article.author %}
+by <a class="url fn" href="{{ SITEURL }}/author/{{ article.author }}.html">{{ article.author }}</a>
+{% endif %}
+
+{# Filed under <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/tuxlite_tbs/templates/page.html b/tuxlite_tbs/templates/page.html
new file mode 100644
index 0000000..65470ea
--- /dev/null
+++ b/tuxlite_tbs/templates/page.html
@@ -0,0 +1,10 @@
+{% extends "base.html" %}
+{% block title %} {% endblock %}
+{% block content %}
+<section id="content" class="body">
+ <h2 class="content-title">{{ page.title }}</h2>
+ {% if PDF_PROCESSOR %}<a href="{{ SITEURL }}/pdf/{{ page.slug }}.pdf">get
+ the pdf</a>{% endif %}
+ {{ page.content }}
+</section>
+{% endblock %}
diff --git a/tuxlite_tbs/templates/pagination.html b/tuxlite_tbs/templates/pagination.html
new file mode 100644
index 0000000..6783ae5
--- /dev/null
+++ b/tuxlite_tbs/templates/pagination.html
@@ -0,0 +1,21 @@
+<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">&larr; Previous</a></li>
+{% else %}
+ <li class="prev disabled"><a href="#">&larr; 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 &rarr;</a></li>
+{% else %}
+ <li class="next disabled"><a href="#">&rarr; Next</a></li>
+{% endif %}
+
+</ul>
+</div>
diff --git a/tuxlite_tbs/templates/tag.html b/tuxlite_tbs/templates/tag.html
new file mode 100644
index 0000000..ce6dcb7
--- /dev/null
+++ b/tuxlite_tbs/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/tuxlite_tbs/templates/tags.html b/tuxlite_tbs/templates/tags.html
new file mode 100644
index 0000000..df6f55f
--- /dev/null
+++ b/tuxlite_tbs/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/tuxlite_tbs/templates/twitter.html b/tuxlite_tbs/templates/twitter.html
new file mode 100644
index 0000000..c6b159f
--- /dev/null
+++ b/tuxlite_tbs/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