Initial templates

main
Raymond Wanyoike 2013-11-24 20:53:19 +03:00
parent e43301b65e
commit b12b50104e
5 changed files with 131 additions and 0 deletions

View File

@ -0,0 +1,56 @@
<!DOCTYPE html>
<html lang="{{ DEFAULT_LANG }}">
<head>
{% block head_meta %}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% if article and article.author %}
<meta name="author" content="{{ article.author }}">
<meta name="copyright" content="{{ article.author }}">
{% endif %}
{% endblock %}
<title>{% block title %}{{ SITENAME|striptags }}{% endblock %}</title>
{% block head_link %}
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/styles.css">
{%if USE_FAVICON %}
<link rel="shortcut icon" href="{{ SITEURL }}/theme/images/favicon.ico" type="image/x-icon">
<link rel="apple-touch-icon" href="{{ SITEURL }}/theme/images/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="57x57" href="{{ SITEURL }}/theme/images/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="72x72" href="{{ SITEURL }}/theme/images/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="{{ SITEURL }}/theme/images/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="144x144" href="{{ SITEURL }}/theme/images/apple-touch-icon-144x144.png">
<link rel="icon" href="{{ SITEURL }}/theme/images/apple-touch-icon-144x144.png">
{% endif %}
{% if FEED_ATOM %}
<link href="/{{ FEED_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME|striptags }} Atom Feed">
{% endif %}
{% if FEED_RSS %}
<link href="/{{ FEED_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME|striptags }} RSS Feed">
{% endif %}
{% endblock %}
{% block head_script %}
{# HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries #}
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
{% endblock %}
</head>
<body>
<a href="#content" class="sr-only">Skip to main content</a>
<div id="wrap">
{% include "header.html" %}
<div id="content">
<div class="container">
{% block content %}{% endblock %}
</div>
</div>
</div>
{% include "footer.html" %}
{% block script %}
<script src="{{ SITEURL }}/theme/js/jquery.min.js"></script>
<script src="{{ SITEURL }}/theme/js/bootstrap.min.js"></script>
{% endblock %}
</body>
</html>

View File

@ -0,0 +1,5 @@
<div id="footer">
<div class="container">
<div>&copy; {{ SITENAME }}, license <a href="{{ LICENSE_URL}}"> {{ LICENSE_NAME }}</a> unless otherwise noted. Generated by <a href= "http://docs.getpelican.com/">Pelican</a> using the <a href="http://github.com/nairobilug/pelican-alchemy">alchemy</a> theme.</div>
</div>
</div>

View File

@ -0,0 +1,11 @@
<div id="header">
<div class="container">
<div class="row">
<div class="col-sm-4">
<a class="site-logo" href="{{ SITEURL }}" title="{{ SITENAME|striptags }}">
<img class="img-responsive" src="{{ PROFILE_IMAGE_URL }}">
</a>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,48 @@
{% extends "base.html" %}
{% block title %}
{{ super() }}
{% endblock %}
{% block content %}
<div class="page">
{% block content_title %}
<h3 class="page-title">All Articles</h2>
{% endblock %}
<ul class="article-list list-unstyled">
{% for article in articles_page.object_list %}
<li class="list-item">
<article class="article">
<header class="row">
<div class="col-sm-6">
<div class="article-title">
<a href="/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a>
</div>
</div>
<div class="col-sm-2">
{% if article.author and SHOW_ARTICLE_AUTHOR %}
<li class="article-author">
<address>
<a class="text-muted" href="{{ SITEURL }}/{{ article.author.url }}">{{ article.author }}</a>
</address>
</li>
{% endif %}
</div>
<div class="col-sm-2">
<li class="article-category">
<a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>
</li>
</div>
<div class="col-sm-2">
<li class="article-date" title="{{ article.date.isoformat() }}">
{{ article.locale_date }}
</li>
</div>
</header>
</article>
</li>
{% endfor %}
</ul>
{% include 'pagination.html' %}
</div>
{% endblock content %}

View File

@ -0,0 +1,11 @@
{% if DEFAULT_PAGINATION %}
<ul class="pagination">
<li{% if not articles_page.has_previous() %} class="disabled"{% endif %}>
<a {% if articles_page.has_previous() %}href="{{ SITEURL }}/{{ articles_previous_page.url }}"{% else %}href="#"{% endif %}>&laquo;</a>
</li>
<li><a href="#">Page {{ articles_page.number }} / {{ articles_paginator.num_pages }}</a></li>
<li{% if not articles_page.has_next() %} class="disabled"{% endif %}>
<a {% if articles_page.has_next() %}href="{{ SITEURL }}/{{ articles_next_page.url }}"{% else %}href="#"{% endif %}>&raquo;</a>
</li>
</ul>
{% endif %}