mirror of
https://github.com/nairobilug/pelican-alchemy.git
synced 2024-12-30 12:15:06 +01:00
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:
parent
cb4f2e862f
commit
23ef8ca9cc
15 changed files with 288 additions and 245 deletions
|
|
@ -1,56 +1,45 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block head %}
|
||||
{{ super() }}
|
||||
{% if article.author %}
|
||||
<meta name="author" content="{{ article.author }}">
|
||||
{% endif %}
|
||||
{% if article.summary %}
|
||||
<meta name="description" content="{{ article.summary|striptags }}">
|
||||
{% endif %}
|
||||
<meta name="tags" contents="{% for tag in article.tags %}{{ tag }}, {% endfor %}">
|
||||
{{ super() }}
|
||||
{% if article.summary %}
|
||||
<meta name="description" content="{{ article.summary|striptags }}">
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{{ SITENAME }} — {{ article.title|striptags }}
|
||||
{{ article.title|striptags }} {{ super() }}
|
||||
{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{{ article.title }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="post full-post">
|
||||
<h1 class="post-title">
|
||||
<a href="/{{ article.url }}" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a>
|
||||
</h1>
|
||||
<div class="article">
|
||||
<div class="article-header">
|
||||
<ul class="list-inline">
|
||||
<li class="post-date">
|
||||
<a class="text-muted" href="/{{ article.url }}" title="{{ article.date.isoformat() }}">{{ article.locale_date }}</a>
|
||||
</li>
|
||||
<li class="muted">·</li>
|
||||
<li class="post-category">
|
||||
<a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>
|
||||
</li>
|
||||
{% if article.tags %}
|
||||
<li class="muted">·</li>
|
||||
<li>
|
||||
{% for tag in article.tags %}
|
||||
<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>{% if not loop.last %}, {% endif %}
|
||||
{% endfor %}
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="text-muted" title="{{ article.date.isoformat() }}">{{ article.locale_date }}</li>
|
||||
<li>·</li>
|
||||
<li><a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a></li>
|
||||
{% if article.author and SHOW_ARTICLE_AUTHOR %}
|
||||
<li class="muted">·</li>
|
||||
<li>
|
||||
<address class="post-author">
|
||||
By <a href="{{ SITEURL }}/{{ article.author.url }}">{{ article.author }}</a>
|
||||
</address>
|
||||
</li>
|
||||
<li>·</li>
|
||||
<li>By <a href="{{ SITEURL }}/{{ article.author.url }}">{{ article.author }}</a></li>
|
||||
{% endif %}
|
||||
{% if article.tags %}
|
||||
<li>·</li>
|
||||
<li>
|
||||
{% for tag in article.tags %}
|
||||
<a href="{{ SITEURL }}/{{ tag.url }}">#{{ tag }}</a>{% if not loop.last %}, {% endif %}
|
||||
{% endfor %}
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<div class="post-content">
|
||||
{{ article.content }}
|
||||
</div>
|
||||
</div>
|
||||
<hr class="separator">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
{% include 'include/disqus_comments.html' %}
|
||||
<div class="article-main">
|
||||
{{ article.content }}
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
{% include 'include/comments.html' %}
|
||||
{% endblock %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue