added bootlex theme.

This commit is contained in:
Alexander Jung-Loddenkemper
2012-03-18 14:52:34 +01:00
parent e38b06c659
commit e6f3c75122
15 changed files with 4313 additions and 0 deletions

45
bootlex/README.md Normal file
View File

@@ -0,0 +1,45 @@
# What is bootlex?
Bootlex is a theme for the [pelican](https://github.com/ametaireau/pelican) static blog generator.
It is based on a modified bootstrap and works nicely with a lot of pelican features.
# Requirements
At some points I switched to the git version, so this theme might work with the stable version, but I recommend to use the latest version from git.
# Installation
Just pull the repo with `git clone git://github.com/alexex/bootlex.git` and include its location via the `THEME` option in your settings.py
There are some settings that will make it work flawlessly:
Your `SITEURL`must have a **trailing slash**. I would recommend the following url config, that I am using with my theme, and seems to work quite good:
ARTICLE_URL = ('{slug}/')
ARTICLE_SAVE_AS = ('{slug}.html')
PAGE_URL = ('{slug}/')
PAGE_SAVE_AS = ('{slug}.html')
AUTHOR_URL = ('author/{name}/')
TAG_URL = ('tag/{name}/')
You will probably need some RewriteRules for your Webserver aswell, my `.htaccess` looks like this:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.+)/$ $1.html [L]
# Features
You can make use of the following settings:
* `Pages` (will be included in the menu automatically)
* `MENUITEMS` (will be included aswell)
* `LINKS` (as the above)
* `GOOGLE_ANALYTICS` (will be included automatically, if set)
# Missing
I do not know whether it works, but as I never cared about it, I suppose that categorys will not work properly

BIN
bootlex/screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 KiB

3991
bootlex/static/bootstrap.css vendored Executable file

File diff suppressed because it is too large Load Diff

60
bootlex/static/pastie.css Normal file
View File

@@ -0,0 +1,60 @@
.codehilite .hll { background-color: #ffffcc }
.codehilite .c { color: #888888 } /* Comment */
.codehilite .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.codehilite .k { color: #008800; font-weight: bold } /* Keyword */
.codehilite .cm { color: #888888 } /* Comment.Multiline */
.codehilite .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.codehilite .c1 { color: #888888 } /* Comment.Single */
.codehilite .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.codehilite .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.codehilite .ge { font-style: italic } /* Generic.Emph */
.codehilite .gr { color: #aa0000 } /* Generic.Error */
.codehilite .gh { color: #303030 } /* Generic.Heading */
.codehilite .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.codehilite .go { color: #888888 } /* Generic.Output */
.codehilite .gp { color: #555555 } /* Generic.Prompt */
.codehilite .gs { font-weight: bold } /* Generic.Strong */
.codehilite .gu { color: #606060 } /* Generic.Subheading */
.codehilite .gt { color: #aa0000 } /* Generic.Traceback */
.codehilite .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.codehilite .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.codehilite .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.codehilite .kp { color: #008800 } /* Keyword.Pseudo */
.codehilite .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.codehilite .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.codehilite .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.codehilite .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.codehilite .na { color: #336699 } /* Name.Attribute */
.codehilite .nb { color: #003388 } /* Name.Builtin */
.codehilite .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.codehilite .no { color: #003366; font-weight: bold } /* Name.Constant */
.codehilite .nd { color: #555555 } /* Name.Decorator */
.codehilite .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.codehilite .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.codehilite .nl { color: #336699; font-style: italic } /* Name.Label */
.codehilite .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.codehilite .py { color: #336699; font-weight: bold } /* Name.Property */
.codehilite .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.codehilite .nv { color: #336699 } /* Name.Variable */
.codehilite .ow { color: #008800 } /* Operator.Word */
.codehilite .w { color: #bbbbbb } /* Text.Whitespace */
.codehilite .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.codehilite .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.codehilite .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.codehilite .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.codehilite .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.codehilite .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
.codehilite .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
.codehilite .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
.codehilite .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
.codehilite .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
.codehilite .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
.codehilite .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
.codehilite .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
.codehilite .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
.codehilite .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
.codehilite .bp { color: #003388 } /* Name.Builtin.Pseudo */
.codehilite .vc { color: #336699 } /* Name.Variable.Class */
.codehilite .vg { color: #dd7700 } /* Name.Variable.Global */
.codehilite .vi { color: #3333bb } /* Name.Variable.Instance */
.codehilite .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */

View File

@@ -0,0 +1,11 @@
{% if GOOGLE_ANALYTICS %}
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("{{GOOGLE_ANALYTICS}}");
pageTracker._trackPageview();
} catch(err) {}</script>
{% endif %}

View File

@@ -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 %}

View File

@@ -0,0 +1,13 @@
{% extends "base.html" %}
{% block title %}{{ article.title }}{%endblock%}
{% block content %}
<div id="content">
<div class="header">
<h1>{{ article.title }}</h2>
</div>
<p class="meta"><small><span>{% if article.author %}<a href="{{ SITEURL }}author/{{ article.author }}/">{{ 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 %}</small></p>
<div class="entry-content">
{{ article.content }}
</div><!-- /.entry-content -->
</div>
{% endblock %}

View File

@@ -0,0 +1,7 @@
{% extends "index.html" %}
{% block title %}Posts von {{ author }}{% endblock %}
{% block content_title %}
<h2>Posts von {{ author }}</h2>
{% endblock %}

View File

@@ -0,0 +1,80 @@
<!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="en">
<html lang="{{ DEFAULT_LANG }}">
<head>
{% block head %}
<title>{% block title %}{% endblock title %} - {{ SITENAME }}</title>
<meta http-equiv="content-type" content="charset=utf-8" />
<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 %}
</head>
<body>
<div class="navbar">
<div class="navbar-inner">
<div class="container">
<h1><a class="brand" href="{{ SITEURL }}">{{ SITENAME }}</a></h1>
</div>
</div>
</div>
<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/pages/about">Alex</a>!</p>
</div><!-- /#about -->
</div><!-- /#contentinfo -->
</div>
</div>
{% include 'analytics.html' %}
</body>
</html>

View File

@@ -0,0 +1,8 @@
{% extends "base.html" %}
{% block content %}
<ul>
{% for category, articles in categories %}
<li>{{ category }}</li>
{% endfor %}
</ul>
{% endblock %}

View File

@@ -0,0 +1,5 @@
{% extends "index.html" %}
{% block content_title %}
<h2>Articles in the {{ category }} category</h2>
{% endblock %}

View File

@@ -0,0 +1,53 @@
{% extends "base.html" %}
{% block title %}Blog{%endblock%}
{% block content %}
<div id="content">
{% block content_title %}
<h1>Blog</h2>
{% 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 }}/">{{ 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 %}</small></p>
<div class="entry-content">
{{ article.summary }}
</div><!-- /.entry-content -->
<div class="row">
<div class="span1 offset7">
<a class="btn btn-small" href="{{ SITEURL }}{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title}}">Mehr</a>
</div>
</div>
</div>
</li>
<hr>
{% endfor %}
</ul><!-- /#posts-list -->
<div class="pagination pagination-centered">
<ul>
{% if articles_page.has_previous() %}
<li><a href="{{ SITEURL }}{% if articles_page.previous_page_number() != 1 %}{{ page_name }}{{ articles_page.previous_page_number() }}/{% endif %}"></a></li>
{% endif %}
{% if articles_page.has_previous() and (articles_page.previous_page_number() != 1) %}
<li><a href="{{ SITEURL }}">1</a></li>
<li class="disabled"><a href="#">...</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() }}/"></a></li>
{% endif %}
{% if articles_page.has_next() and (articles_page.next_page_number() != articles_paginator.num_pages) %}
<li class="disabled"><a href="#">...</a></li>
<li><a href="{{ SITEURL }}{{ page_name }}{{ articles_page.num_pages }}/">{{ articles_paginator.num_pages }}</a></li>
{% endif %}
</ul>
</div>
</div><!-- /#content -->
{% endblock content %}

View File

@@ -0,0 +1,6 @@
{% extends "base.html" %}
{% block title %}{{ page.title }}{%endblock%}
{% block content %}
<h1>{{ page.title }}</h1>
{{ page.content }}
{% endblock %}

View File

@@ -0,0 +1,2 @@
{% extends "index.html" %}
{% block title %}Tag {{ tag }}{% endblock %}

View File

@@ -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 %}