Simplify jinja2 base templates, update theme options

- New realfavicongenerator.net packages (https://realfavicongenerator.net/blog/new-favicon-package-less-is-more/)
- Support all possible Pelican feed links
- Add recommended HEAD elements (https://github.com/joshbuchea/HEAD)
- Use minified css assets
- Link to boostrap, clean-blog and font-awesome stylesheets
- Add theme options, better options names

Template consistency, update structure on base.html

Fix missing article summary on index.html

Show the article.summary for teasers
This commit is contained in:
Raymond Wanyoike 2016-11-06 22:32:20 +03:00
commit 23ef8ca9cc
15 changed files with 288 additions and 245 deletions

View file

@ -1,44 +1,36 @@
{% extends "base.html" %}
{% block head %}
{{ super() }}
<meta name="author" content="{{ AUTHOR }}">
<meta name="description" content="{{ META_DESCRIPTION|striptags }}">
{{ super() }}
<meta name="description" content="{{ SITE_DESCRIPTION|striptags }}">
{% endblock %}
{% block title %}
{{ SITENAME }} &mdash; {{ SITE_TAGLINE }}
{% endblock %}
{% block page_header %}
All Articles
{% endblock %}
{% block content %}
{% block page_title %}
<h1>All Articles</h1>
{% endblock %}
<div>
{% for article in articles_page.object_list %}
<div class="post mini-post">
<div class="row">
<div class="col-md-4">
<p class="post-date">
<a class="text-muted" href="/{{ article.url }}" title="{{ article.date.isoformat() }}">{{ article.locale_date }}</a>
</p>
<p class="post-category">
<a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>
</p>
{% if article.author and SHOW_ARTICLE_AUTHOR %}
<address class="post-author">
By <a href="{{ SITEURL }}/{{ article.author.url }}">{{ article.author }}</a>
</address>
{% endif %}
</div>
<div class="col-md-8">
<h2 class="post-title">
<a href="/{{ article.url }}" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a>
</h2>
<div class="post-content">
{{ article.content|striptags|truncate(256) }}
</div>
</div>
</div>
</div>
{% endfor %}
{% for article in articles_page.object_list %}
<div class="teaser">
<div class="row">
<div class="col-sm-4 hidden-xs teaser-header">
<div class="text-muted teaser-date" title="{{ article.date.isoformat() }}">{{ article.locale_date }}</div>
<div><a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a></div>
{% if article.author and SHOW_ARTICLE_AUTHOR %}
<div>By <a href="{{ SITEURL }}/{{ article.author.url }}">{{ article.author }}</a></div>
{% endif %}
</div>
<div class="col-sm-8 teaser-main">
<h2><a href="/{{ article.url }}" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2>
<p>{{ article.summary }}</p>
</div>
</div>
{% include 'include/pagination.html' %}
</div>
<hr>
{% endfor %}
{% include 'include/pagination.html' %}
{% endblock %}