mirror of
https://github.com/nairobilug/pelican-alchemy.git
synced 2024-12-30 12:15:06 +01:00
Bring consistency to templates, update structure to use new base
This commit is contained in:
parent
8c9a23e374
commit
d2b298f147
12 changed files with 150 additions and 136 deletions
|
|
@ -1,15 +1,18 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}
|
||||
{{ SITENAME }} — Archives
|
||||
Archives {{ super() }}
|
||||
{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
Archives
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Archives</h1>
|
||||
<dl class="list dl-horizontal">
|
||||
{% for article in dates %}
|
||||
<dt>{{ article.locale_date }}</dt>
|
||||
<dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd>
|
||||
{% endfor %}
|
||||
</dl>
|
||||
<dl class="dl-horizontal">
|
||||
{% for article in dates %}
|
||||
<dt>{{ article.locale_date }}</dt>
|
||||
<dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd>
|
||||
{% endfor %}
|
||||
</dl>
|
||||
{% endblock %}
|
||||
|
|
|
|||
|
|
@ -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 %}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
{% extends "index.html" %}
|
||||
|
||||
{% block title %}
|
||||
{{ SITENAME }} — Articles by {{ author }}
|
||||
{{ author }} Articles — {{ SITENAME }}
|
||||
{% endblock %}
|
||||
|
||||
{% block page_title %}
|
||||
<h1>Articles by {{ author }}</h1>
|
||||
{% block page_header %}
|
||||
{{ author }} Articles
|
||||
{% endblock %}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,17 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}
|
||||
{{ SITENAME }} — Authors
|
||||
Authors {{ super() }}
|
||||
{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
Authors
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Authors on {{ SITENAME }}</h1>
|
||||
<ul class="list-unstyled">
|
||||
{% for author, articles in authors|sort %}
|
||||
<li><a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a> ({{ articles|count }})</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<ul class="list-unstyled">
|
||||
{% for author, articles in authors|sort %}
|
||||
<li><a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a> ({{ articles|count }})</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,17 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}
|
||||
{{ SITENAME }} — Categories
|
||||
Categories {{ super() }}
|
||||
{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
Categories
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Categories on {{ SITENAME }}</h1>
|
||||
<ul class="list-unstyled">
|
||||
{% for category, articles in categories %}
|
||||
<li><a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<ul class="list-unstyled">
|
||||
{% for category, articles in categories %}
|
||||
<li><a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
{% extends "index.html" %}
|
||||
|
||||
{% block title %}
|
||||
{{ SITENAME }} — Articles in the {{ category }} category
|
||||
{{ category }} Articles — {{ SITENAME }}
|
||||
{% endblock %}
|
||||
|
||||
{% block page_title %}
|
||||
<h1>Articles in the {{ category }} category</h1>
|
||||
{% block page_header %}
|
||||
{{ category }} Articles
|
||||
{% endblock %}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,15 @@
|
|||
{% if DEFAULT_PAGINATION %}
|
||||
<ul class="pagination">
|
||||
{% if articles_page.has_previous() %}
|
||||
<li><a href="{{ SITEURL }}/{{ articles_previous_page.url }}">«</a></li>
|
||||
{% endif %}
|
||||
<li class="disabled"><a href="#">Page {{ articles_page.number }} / {{ articles_paginator.num_pages }}</a></li>
|
||||
{% if articles_page.has_next() %}
|
||||
<li><a href="{{ SITEURL }}/{{ articles_next_page.url }}">»</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<ul class="pagination">
|
||||
{% if articles_page.has_previous() %}
|
||||
<li><a href="{{ SITEURL }}/{{ articles_previous_page.url }}">«</a></li>
|
||||
{% else %}
|
||||
<li class="disabled"><span>«<span></li>
|
||||
{% endif %}
|
||||
<li><span>{{ articles_page.number }} of {{ articles_paginator.num_pages }}</span></li>
|
||||
{% if articles_page.has_next() %}
|
||||
<li><a href="{{ SITEURL }}/{{ articles_next_page.url }}">»</a></li>
|
||||
{% else %}
|
||||
<li class="disabled"><span>»<span></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
|
|
|||
|
|
@ -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 }} — {{ 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.content|striptags|truncate(256) }}</p>
|
||||
</div>
|
||||
</div>
|
||||
{% include 'include/pagination.html' %}
|
||||
</div>
|
||||
<hr>
|
||||
{% endfor %}
|
||||
{% include 'include/pagination.html' %}
|
||||
{% endblock %}
|
||||
|
|
|
|||
|
|
@ -1,25 +1,24 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block head %}
|
||||
{{ super() }}
|
||||
{% if page.author %}
|
||||
<meta name="author" content="{{ page.author }}">
|
||||
{% endif %}
|
||||
{% if page.summary %}
|
||||
<meta name="description" content="{{ page.summary|striptags }}">
|
||||
{% endif %}
|
||||
<meta name="tags" contents="{% for tag in page.tags %}{{ tag }}, {% endfor %}">
|
||||
{{ super() }}
|
||||
{% if page.summary %}
|
||||
<meta name="description" content="{{ page.summary|striptags }}">
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
{{ SITENAME }} — {{ page.title|striptags }}
|
||||
{{ page.title|striptags }} {{ super() }}
|
||||
{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{{ page.title }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="page">
|
||||
<h1 class="title">{{ page.title }}</h1>
|
||||
<div class="content">
|
||||
{{ page.content }}
|
||||
</div>
|
||||
<div class="page">
|
||||
<div class="page-main">
|
||||
{{ page.content }}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
|||
18
alchemy/templates/period_archives.html
Normal file
18
alchemy/templates/period_archives.html
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}
|
||||
Archives for {{ period | reverse | join(' ') }} {{ super() }}
|
||||
{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
Archives for {{ period | reverse | join(' ') }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<dl class="dl-horizontal">
|
||||
{% for article in dates %}
|
||||
<dt>{{ article.locale_date }}</dt>
|
||||
<dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd>
|
||||
{% endfor %}
|
||||
</dl>
|
||||
{% endblock %}
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
{% extends "index.html" %}
|
||||
|
||||
{% block title %}
|
||||
{{ SITENAME }} — Articles with the {{ tag }} tag
|
||||
#{{ tag }} Articles — {{ SITENAME }}
|
||||
{% endblock %}
|
||||
|
||||
{% block page_title %}
|
||||
<h1>Articles with the {{ tag }} tag</h1>
|
||||
{% block page_header %}
|
||||
#{{ tag }} Articles
|
||||
{% endblock %}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,17 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}
|
||||
{{ SITENAME }} — Tags
|
||||
Tags {{ super() }}
|
||||
{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
Tags
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Tags on {{ SITENAME }}</h1>
|
||||
<ul class="list-unstyled">
|
||||
{% for tag, articles in tags|sort %}
|
||||
<li><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a> ({{ articles|count }})</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<ul class="list-unstyled">
|
||||
{% for tag, articles in tags|sort %}
|
||||
<li><a href="{{ SITEURL }}/{{ tag.url }}">#{{ tag }}</a> ({{ articles|count }})</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue