diff options
Diffstat (limited to 'bootlex/templates')
-rw-r--r-- | bootlex/templates/analytics.html | 15 | ||||
-rw-r--r-- | bootlex/templates/archives.html | 15 | ||||
-rw-r--r-- | bootlex/templates/article.html | 28 | ||||
-rw-r--r-- | bootlex/templates/author.html | 7 | ||||
-rw-r--r-- | bootlex/templates/base.html | 87 | ||||
-rw-r--r-- | bootlex/templates/categories.html | 8 | ||||
-rw-r--r-- | bootlex/templates/category.html | 5 | ||||
-rw-r--r-- | bootlex/templates/index.html | 66 | ||||
-rw-r--r-- | bootlex/templates/page.html | 6 | ||||
-rw-r--r-- | bootlex/templates/tag.html | 2 | ||||
-rw-r--r-- | bootlex/templates/tags.html | 17 |
11 files changed, 256 insertions, 0 deletions
diff --git a/bootlex/templates/analytics.html b/bootlex/templates/analytics.html new file mode 100644 index 0000000..2d7b5f2 --- /dev/null +++ b/bootlex/templates/analytics.html @@ -0,0 +1,15 @@ +{% if GOOGLE_ANALYTICS %} +<script type="text/javascript"> + + var _gaq = _gaq || []; + _gaq.push(['_setAccount', '{{ GOOGLE_ANALYTICS }}']); + _gaq.push(['_trackPageview']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); + +</script> +{% endif %}
\ No newline at end of file diff --git a/bootlex/templates/archives.html b/bootlex/templates/archives.html new file mode 100644 index 0000000..6e364d0 --- /dev/null +++ b/bootlex/templates/archives.html @@ -0,0 +1,15 @@ +{% extends "base.html" %} +{% block title %}Archiv{%endblock%} +{% block menu_entry_archive %} +class="active" +{% endblock %} +{% block content %} +<h1>Archiv {{ pagename }}</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/bootlex/templates/article.html b/bootlex/templates/article.html new file mode 100644 index 0000000..d2cfda6 --- /dev/null +++ b/bootlex/templates/article.html @@ -0,0 +1,28 @@ +{% extends "base.html" %} +{% block title %}{{ article.title }}{%endblock%} +{% block content %} +<div id="content"> + <div class="header"> + <h1>{{ article.title }}</h1> + </div> + <p class="meta"><small><span>{% if article.author %}<a href="{{ SITEURL }}author/{{ article.author.slug }}/">{{ article.author }}</a> - {% endif %}</span><span>{{ article.locale_date }}</span> - <span class="tags">{% if article.tags %}{% for tag in article.tags %}<a href="/tag/{{ tag }}/">{{ tag }}</a>{% if not loop.last %}, {% endif %}{% endfor %}{% endif %}</span></small></p> + <div class="entry-content"> + {{ article.content }} + </div><!-- /.entry-content --> + {% if DISQUS_SITENAME %} + <div id="disqus_thread"></div> + <script type="text/javascript"> + /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */ + 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 = 'http://' + 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> + {% endif %} +</div> +{% endblock %} diff --git a/bootlex/templates/author.html b/bootlex/templates/author.html new file mode 100644 index 0000000..664aad1 --- /dev/null +++ b/bootlex/templates/author.html @@ -0,0 +1,7 @@ +{% extends "index.html" %} + +{% block title %}Posts von {{ author }}{% endblock %} +{% block content_title %} +<h2>Posts von {{ author }}</h2> +{% endblock %} + diff --git a/bootlex/templates/base.html b/bootlex/templates/base.html new file mode 100644 index 0000000..95629dd --- /dev/null +++ b/bootlex/templates/base.html @@ -0,0 +1,87 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" +"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="{{ DEFAULT_LANG }}"> + <head> + {% block head %} + <title>{% block title %}{% endblock title %} - {{ SITENAME }}</title> + <link href="http://fonts.googleapis.com/css?family=Arimo:400,700|Inika" rel="stylesheet" type="text/css" /> + <link rel="stylesheet" type="text/css" href="{{ SITEURL }}theme/bootstrap.css" /> + <link rel="stylesheet" type="text/css" href="{{ SITEURL }}theme/pastie.css" /> + {% endblock head %} + + {% include 'analytics.html' %} + + </head> + + <body> + <div class="container"> + <div class="row"> + <div class="span8"> + {% block content %} + {% endblock %} + </div> + <div class="span3 offset1"> + <div class="well"> + <ul class="nav nav-list"> + <li class="nav-header">Blog</li> + <li {% if page_name == 'index' %}class="active"{% endif %}><a href="{{ SITEURL }}">Index</a></li> + <li {% block menu_entry_tag %}{% endblock %}><a href="{{ SITEURL }}tags/">Tags</a></li> + <li {% block menu_entry_archive %}{% endblock %}><a href="{{ SITEURL }}archives/">Archiv</a></li> + {% if DISPLAY_PAGES_ON_MENU %} + {% if PAGES %} + <li class="nav-header">Seiten</li> + {% for p in PAGES %} + <li{% if p == page %} class="active"{% endif %}><a href="{{ SITEURL }}{{ p.url }}">{{ p.title }}</a></li> + {% endfor %} + {% endif %} + {% else %} +{# {% for cat, null in categories %} + <li{% if cat == category %} class="active"{% endif %}><a href="{{ SITEURL }}category/{{ cat }}/">{{ cat }}</a></li> + {% endfor %} +#} + {% endif %} + {% if MENUITEMS %} + <li class="nav-header">Anderes</li> + {% for title, link in MENUITEMS %} + <li><a href="{{ link }}">{{ title }}</a></li> + {% endfor %} + {% endif %} + {% if LINKS %} + <li class="nav-header">Links</li> + {% for title, link in LINKS %} + <li><a href="{{ link }}">{{ title }}</a></li> + {% endfor %} + {% endif %} + </ul> + </div><!-- /#menu --> + </div> + </div> + + <hr /> + + <div class="row"> + <div class="span12"> + <div id="about"> + <p>Proudly powered by <a href="http://twitter.github.com/bootstrap/">bootstrap</a>, <a href="http://docs.notmyidea.org/alexis/pelican/">pelican</a>, <a href="http://python.org">python</a> and <a href="http://www.julo.ch/about/">Alex</a>!</p> + </div><!-- /#about --> + </div><!-- /#contentinfo --> + </div> + </div> + + {% if DISQUS_SITENAME %} + <script type="text/javascript"> + /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */ + var disqus_shortname = '{{ DISQUS_SITENAME }}'; // required: replace example with your forum shortname + + /* * * DON'T EDIT BELOW THIS LINE * * */ + (function () { + var s = document.createElement('script'); s.async = true; + s.type = 'text/javascript'; + s.src = 'http://' + disqus_shortname + '.disqus.com/count.js'; + (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s); + }()); + </script> + {% endif %} + + </body> +</html> diff --git a/bootlex/templates/categories.html b/bootlex/templates/categories.html new file mode 100644 index 0000000..7e4bd2c --- /dev/null +++ b/bootlex/templates/categories.html @@ -0,0 +1,8 @@ +{% extends "base.html" %} +{% block content %} +<ul> +{% for category, articles in categories %} + <li>{{ category }}</li> +{% endfor %} +</ul> +{% endblock %} diff --git a/bootlex/templates/category.html b/bootlex/templates/category.html new file mode 100644 index 0000000..4e6fd24 --- /dev/null +++ b/bootlex/templates/category.html @@ -0,0 +1,5 @@ +{% extends "index.html" %} +{% block content_title %} +<h2>Articles in the {{ category }} category</h2> +{% endblock %} + diff --git a/bootlex/templates/index.html b/bootlex/templates/index.html new file mode 100644 index 0000000..c45a57a --- /dev/null +++ b/bootlex/templates/index.html @@ -0,0 +1,66 @@ +{% extends "base.html" %} +{% block title %}Blog{%endblock%} +{% block content %} +<div id="content"> +{% block content_title %} +<h1>Blog</h1> +{% endblock %} + +<ul class="unstyled"> +{% for article in articles_page.object_list %} + <li> + <div> + <div class="header"> + <h2>{{ article.title }}</h2> + </div> + <p class="meta"><small><span>{% if article.author %}<a href="{{ SITEURL }}author/{{ article.author.slug }}/">{{ article.author }}</a> - {% endif %}</span><span>{{ article.locale_date }}</span> - <span class="tags">{% if article.tags %}{% for tag in article.tags %}<a href="/tag/{{ tag }}/">{{ tag }}</a>{% if not loop.last %}, {% endif %}{% endfor %}{% endif %}</span></small></p> + <div class="entry-content"> + {{ article.summary }} + </div><!-- /.entry-content --> + <div class="row"> + <div class="span4"> + {% if DISQUS_SITENAME %} + <a class="btn btn-small disabled" href="{{ SITEURL }}{{ article.url }}#disqus_thread"></a> + {% endif %} + </div> + <div class="span1 offset3"> + <a class="btn btn-small" href="{{ SITEURL }}{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title}}">Mehr</a> + </div> + </div> + </div> + </li> + + <li><hr /></li> + + +{% endfor %} +</ul><!-- /#posts-list --> +<div class="pagination pagination-centered"> + <ul> + {% if articles_page.has_previous() and (articles_page.previous_page_number() != 1) %} + <li><a href="{{ SITEURL }}">1</a></li> + {% endif %} + {% if articles_page.previous_page_number() - 1 == 2 %} + <li><a href="{{ articles_page.previous_page_number() - 1}}">{{ articles_page.previous_page_number() - 1}}</a></li> + {% elif articles_page.previous_page_number() - 1 > 1 %} + <li class="disabled"><a href="#">...</a></li> + {% endif %} + {% if articles_page.has_previous() %} + <li><a href="{{ SITEURL }}{% if articles_page.previous_page_number() != 1 %}{{ page_name }}{{ articles_page.previous_page_number() }}/{% endif %}">{{ articles_page.previous_page_number() }}</a></li> + {% endif %} + <li class="active"><a href="#">{{ articles_page.number }}</a></li> + {% if articles_page.has_next() %} + <li><a href="{{ SITEURL }}{{ page_name }}{{ articles_page.next_page_number() }}/">{{ articles_page.next_page_number() }}</a></li> + {% endif %} + {% if articles_paginator.num_pages - articles_page.next_page_number() == 2 %} + <li><a href="{{ articles_page.next_page_number() + 1}}">{{ articles_page.next_page_number() + 1}}</a></li> + {% elif articles_paginator.num_pages - articles_page.next_page_number() > 2 %} + <li class="disabled"><a href="#">...</a></li> + {% endif %} + {% if articles_page.has_next() and (articles_page.next_page_number() != articles_paginator.num_pages) %} + <li><a href="{{ SITEURL }}{{ page_name }}{{ articles_paginator.num_pages }}/">{{ articles_paginator.num_pages }}</a></li> + {% endif %} + </ul> +</div> +</div><!-- /#content --> +{% endblock content %} diff --git a/bootlex/templates/page.html b/bootlex/templates/page.html new file mode 100644 index 0000000..6308d58 --- /dev/null +++ b/bootlex/templates/page.html @@ -0,0 +1,6 @@ +{% extends "base.html" %} +{% block title %}{{ page.title }}{%endblock%} +{% block content %} + <h1>{{ page.title }}</h1> + {{ page.content }} +{% endblock %} diff --git a/bootlex/templates/tag.html b/bootlex/templates/tag.html new file mode 100644 index 0000000..c4817d7 --- /dev/null +++ b/bootlex/templates/tag.html @@ -0,0 +1,2 @@ +{% extends "index.html" %} +{% block title %}Tag {{ tag }}{% endblock %}
\ No newline at end of file diff --git a/bootlex/templates/tags.html b/bootlex/templates/tags.html new file mode 100644 index 0000000..87f134c --- /dev/null +++ b/bootlex/templates/tags.html @@ -0,0 +1,17 @@ +{% extends "base.html" %} +{% block title %}Tags{%endblock%} +{% block menu_entry_tag %} +class="active" +{% endblock %} +{% block content %} + <h1>Tags</h1> + {% if tags %} + <ul> + {% for tag, articles in tags %} + <li><a href="{{ SITEURL }}tag/{{ tag }}/">{{ tag }}</a></li> + {% endfor %} + </ul> + {% else %} + <p>Sorry, bisher gibt es keine Tags.</p> + {% endif %} +{% endblock %} |