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 teasersmain
parent
cb4f2e862f
commit
23ef8ca9cc
|
@ -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 %}
|
||||
|
|
|
@ -3,50 +3,150 @@
|
|||
|
||||
<head>
|
||||
{% block head %}
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="canonical" href="{{ SITEURL }}/{{ output_file }}" />
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<title>{% block title %}{{ SITE_SUBTEXT }}{% endblock title %}</title>
|
||||
<title>{% block title %}— {{ SITENAME }}{% endblock %}</title>
|
||||
<link rel="canonical" href="{{ SITEURL }}/{{ output_file }}">
|
||||
|
||||
{% if EXTRA_FAVICON %}
|
||||
<link rel="icon" type="image/png" href="/favicon-196x196.png" sizes="196x196">
|
||||
<link rel="icon" type="image/png" href="/favicon-160x160.png" sizes="160x160">
|
||||
<link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
|
||||
{% endif %}
|
||||
{% if FEED_ALL_ATOM %}
|
||||
<link rel="alternate" type="application/atom+xml" href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" title="{{ SITENAME }} Full Atom Feed">
|
||||
{% endif %}
|
||||
{% if FEED_ALL_RSS %}
|
||||
<link rel="alternate" type="application/rss+xml" href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}" title="{{ SITENAME }} Full RSS Feed">
|
||||
{% endif %}
|
||||
{% if FEED_ATOM %}
|
||||
<link rel="alternate" type="application/atom+xml" href="{{ FEED_DOMAIN }}/{{ FEED_ATOM }}" title="{{ SITENAME }} Atom Feed">
|
||||
{% endif %}
|
||||
{% if FEED_RSS %}
|
||||
<link rel="alternate" type="application/rss+xml" href="{{ FEED_DOMAIN }}/{{ FEED_RSS }}" title="{{ SITENAME }} RSS Feed">
|
||||
{% endif %}
|
||||
{% if CATEGORY_FEED_ATOM and category %}
|
||||
<link rel="alternate" type="application/atom+xml" href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_ATOM|format(category.slug) }}" title="{{ SITENAME }} Categories Atom Feed">
|
||||
{% endif %}
|
||||
{% if CATEGORY_FEED_RSS and category %}
|
||||
<link rel="alternate" type="application/rss+xml" href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_RSS|format(category.slug) }}" title="{{ SITENAME }} Categories RSS Feed">
|
||||
{% endif %}
|
||||
{% if TAG_FEED_ATOM and tag %}
|
||||
<link rel="alternate" type="application/atom+xml" href="{{ FEED_DOMAIN }}/{{ TAG_FEED_ATOM|format(tag.slug) }}" title="{{ SITENAME }} Tags Atom Feed">
|
||||
{% endif %}
|
||||
{% if TAG_FEED_RSS and tag %}
|
||||
<link rel="alternate" type="application/rss+xml" href="{{ FEED_DOMAIN }}/{{ TAG_FEED_RSS|format(tag.slug) }}" title="{{ SITENAME }} Tags RSS Feed">
|
||||
{% endif %}
|
||||
|
||||
{% if SHOW_FAVICONS %}
|
||||
<link rel="apple-touch-icon" href="/apple-touch-icon.png" sizes="180x180">
|
||||
<link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
|
||||
{% endif %}
|
||||
|
||||
{% if FEED_ATOM %}
|
||||
<link type="application/atom+xml" rel="alternate" href="/{{ FEED_ATOM }}" title="{{ SITENAME }} Atom Feed">
|
||||
{% endif %}
|
||||
{% if FEED_RSS %}
|
||||
<link type="application/rss+xml" rel="alternate" href="/{{ FEED_RSS }}" title="{{ SITENAME }} RSS Feed">
|
||||
{% endif %}
|
||||
<link rel="stylesheet" href="{{ SITEURL }}/theme/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="{{ SITEURL }}/theme/css/clean-blog.min.css">
|
||||
<link rel="stylesheet" href="{{ SITEURL }}/theme/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="{{ SITEURL }}/theme/css/style.css">
|
||||
|
||||
<link rel="stylesheet" href="{{ SITEURL }}/theme/css/style.css">
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
||||
{# WARNING: Respond.js doesn't work if you view the page via file:// #}
|
||||
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
{% include "include/google_analytics.html" %}
|
||||
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
{% endblock %}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{% include "include/header.html" %}
|
||||
<div class="container">
|
||||
{% block content %}{% endblock %}
|
||||
<div class="header">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
{% if SITE_IMAGE %}
|
||||
<a href="{{ SITEURL }}"><img class="img-responsive" src={{ SITE_IMAGE }}></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<h1><a href="{{ SITEURL }}">{{ SITENAME }}</a></h1>
|
||||
<p>{{ SITE_TAGLINE }}</p>
|
||||
<hr>
|
||||
{% if HEADER_LINKS or SHOW_HEADER_PAGES or EMAIL_ADDRESS or FACEBOOK_ADDRESS or GITHUB_ADDRESS or GOOGLE_ADDRESS or TWITTER_ADDRESS %}
|
||||
<ul class="list-inline">
|
||||
{% if HEADER_LINKS %}
|
||||
{% for title, link in HEADER_LINKS %}
|
||||
<li><a href="{{ link }}" target="_blank">{{ title }}</a></li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if SHOW_HEADER_PAGES %}
|
||||
{% for p in PAGES %}
|
||||
{% if loop.first %}
|
||||
<li class="text-muted">|</li>
|
||||
{% endif %}
|
||||
<li><a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a></li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if EMAIL_ADDRESS or FACEBOOK_ADDRESS or GITHUB_ADDRESS or GOOGLE_ADDRESS or TWITTER_ADDRESS %}
|
||||
<li class="text-muted">|</li>
|
||||
{% endif %}
|
||||
{% if EMAIL_ADDRESS %}
|
||||
<li><a class="fa fa-fw fa-envelope" href="mailto:{{ EMAIL_ADDRESS }}"></a></li>
|
||||
{% endif %}
|
||||
{% if FACEBOOK_ADDRESS %}
|
||||
<li><a class="fa fa-fw fa-facebook" href="{{ FACEBOOK_ADDRESS }}" target="_blank"></a></li>
|
||||
{% endif %}
|
||||
{% if FEED_ALL_ATOM %}
|
||||
<li><a class="fa fa-fw fa-feed" href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}"></a></li>
|
||||
{% endif %}
|
||||
{% if GITHUB_ADDRESS %}
|
||||
<li><a class="fa fa-fw fa-github" href="{{ GITHUB_ADDRESS }}" target="_blank"></a></li>
|
||||
{% endif %}
|
||||
{% if GOOGLE_ADDRESS %}
|
||||
<li><a class="fa fa-fw fa-google-plus" href="{{ GOOGLE_ADDRESS }}" target="_blank"></a></li>
|
||||
{% endif %}
|
||||
{% if TWITTER_ADDRESS %}
|
||||
<li><a class="fa fa-fw fa-twitter" href="{{ TWITTER_ADDRESS }}" target="_blank"></a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% include "include/footer.html" %}
|
||||
|
||||
<script src="{{ SITEURL }}/theme/js/jquery.min.js"></script>
|
||||
<script src="{{ SITEURL }}/theme/js/bootstrap.min.js"></script>
|
||||
<div class="main">
|
||||
<div class="container">
|
||||
<div class="page-header">
|
||||
<h1>{% block page_header %}{% endblock %}</h1>
|
||||
</div>
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
{% if SHOW_FOOTER_AUTHORS or SHOW_FOOTER_ARCHIVES or SHOW_FOOTER_CATEGORIES or SHOW_FOOTER_TAGS %}
|
||||
<ul class="list-inline">
|
||||
{% if SHOW_ARTICLE_AUTHOR and SHOW_FOOTER_AUTHORS %}
|
||||
<li><a href="{{ SITEURL }}/authors.html">Authors</a></li>
|
||||
{% endif %}
|
||||
{% if SHOW_FOOTER_ARCHIVES %}
|
||||
<li><a href="{{ SITEURL }}/archives.html">Archives</a></li>
|
||||
{% endif %}
|
||||
{% if SHOW_FOOTER_CATEGORIES %}
|
||||
<li><a href="{{ SITEURL }}/categories.html">Categories</a></li>
|
||||
{% endif %}
|
||||
{% if SHOW_FOOTER_TAGS %}
|
||||
<li><a href="{{ SITEURL }}/tags.html">Tags</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-sm-6 hidden-xs text-right text-muted">
|
||||
Generated by <a href="https://github.com/getpelican/pelican" target="_blank">Pelican</a> using <a href="https://github.com/nairobilug/pelican-alchemy">✨ alchemy</a>.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body> <!-- 42 -->
|
||||
|
||||
</html>
|
||||
|
|
|
@ -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,10 +0,0 @@
|
|||
<footer class="footer">
|
||||
<div class="container">
|
||||
<p class="text-center">
|
||||
{{ AUTHOR }}, <a href="{{ LICENSE_URL}}" target="_blank">{{ LICENSE_NAME }}</a> unless otherwise noted.
|
||||
</p>
|
||||
<div class="text-center">
|
||||
Generated by <a href="http://getpelican.com" target="_blank">Pelican</a> with the <a href="http://github.com/nairobilug/pelican-alchemy">alchemy</a> theme.
|
||||
</div>
|
||||
</div>
|
||||
</footer> <!-- /.footer -->
|
|
@ -1,61 +0,0 @@
|
|||
<header class="header">
|
||||
<div class="container">
|
||||
{% if PROFILE_IMAGE %}
|
||||
<div class="header-image pull-left">
|
||||
<a class="nodec" href="{{ SITEURL }}"><img src={{ PROFILE_IMAGE }}></a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="header-inner">
|
||||
<h1 class="header-name">
|
||||
<a class="nodec" href="{{ SITEURL }}">{{ SITENAME }}</a>
|
||||
</h1>
|
||||
<h3 class="header-text">{{ SITE_SUBTEXT }}</h3>
|
||||
<ul class="header-menu list-inline">
|
||||
{% for title, link in MENU_ITEMS %}
|
||||
<li><a class="nodec" href="{{ link }}" target="_blank">{{ title }}</a></li>
|
||||
{% endfor %}
|
||||
{% if PAGES_ON_MENU %}
|
||||
{% for p in PAGES %}
|
||||
{% if loop.first %}
|
||||
<li class="muted">|</li>
|
||||
{% endif %}
|
||||
<li><a class="nodec" href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a></li>
|
||||
{% if loop.last %}
|
||||
<li class="muted">|</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if CATEGORIES_ON_MENU %}
|
||||
<li><a class="nodec" href="{{ SITEURL }}/categories.html">Categories</a></li>
|
||||
<li class="muted">|</li>
|
||||
{% endif %}
|
||||
{% if TAGS_ON_MENU %}
|
||||
<li><a class="nodec" href="{{ SITEURL }}/tags.html">Tags</a></li>
|
||||
<li class="muted">|</li>
|
||||
{% endif %}
|
||||
{% if ARCHIVES_ON_MENU %}
|
||||
<li><a class="nodec" href="{{ SITEURL }}/archives.html">Archives</a></li>
|
||||
<li class="muted">|</li>
|
||||
{% endif %}
|
||||
{% if EMAIL_ADDRESS %}
|
||||
<li><a class="nodec icon-mail-alt" href="mailto:{{ EMAIL_ADDRESS }}"></a></li>
|
||||
{% endif %}
|
||||
{% if GITHUB_ADDRESS %}
|
||||
<li><a class="nodec icon-github" href="{{ GITHUB_ADDRESS }}"></a></li>
|
||||
{% endif %}
|
||||
{% if SO_ADDRESS %}
|
||||
<li><a class="nodec icon-stackoverflow" href="{{ SO_ADDRESS }}"></a></li>
|
||||
{% endif %}
|
||||
{% if TWITTER_ADDRESS %}
|
||||
<li><a class="nodec icon-twitter" href="{{ TWITTER_ADDRESS }}"></a></li>
|
||||
{% endif %}
|
||||
{% if FB_ADDRESS %}
|
||||
<li><a class="nodec icon-facebook" href="{{ FB_ADDRESS }}"></a></li>
|
||||
{% endif %}
|
||||
{% if FEED_ATOM or FEED_RSS %}
|
||||
<li><a class="nodec icon-rss" href="/{% if FEED_ATOM %}{{ FEED_ATOM }}{% else %}{{ FEED_RSS }}{% endif %}"></a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</header> <!-- /.header -->
|
|
@ -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.summary }}</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 %}
|
||||
|
|
|
@ -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…
Reference in New Issue