pelican new theme simple-bootstrap
This commit is contained in:
16
simple-bootstrap/templates/archives.html
Executable file
16
simple-bootstrap/templates/archives.html
Executable file
@@ -0,0 +1,16 @@
|
||||
{% extends "base.html" %}
|
||||
{% block archclass %} class="active"{%endblock%}
|
||||
{% block title %}Archives{%endblock%}
|
||||
{% block content %}
|
||||
|
||||
<dl>
|
||||
{% for year, date_year in dates|groupby( 'date.year' )|sort(reverse=True) %}
|
||||
<h3><a href="{{SITEURL}}/{{year}}" class="text">Archive for {{ year }}</a></h3>
|
||||
<ul class="archive-list">
|
||||
{% for article in date_year %}
|
||||
<li><span class="text-muted">{{article.locale_date}} » </span><a href="{{ SITEURL }}/{{ article.url }}">{{article.title}}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endfor %}
|
||||
</dl>
|
||||
{% endblock %}
|
||||
46
simple-bootstrap/templates/article.html
Executable file
46
simple-bootstrap/templates/article.html
Executable file
@@ -0,0 +1,46 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}{{ article.title }} - {{SITENAME}}{% endblock title %}
|
||||
{% block content %}
|
||||
<section id="content" class="article content">
|
||||
<header>
|
||||
<h2 class="entry-title">
|
||||
<a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark"
|
||||
title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2>
|
||||
{% import 'translations.html' as translations with context %}
|
||||
{{ translations.translations_for(article) }}
|
||||
</header>
|
||||
|
||||
|
||||
<div class="entry-content">
|
||||
{{ article.content }}
|
||||
</div><!-- /.entry-content -->
|
||||
<footer class="post-info text-muted">
|
||||
Posted on <abbr class="published" title="{{ article.date.isoformat() }}">
|
||||
{{ article.locale_date }}
|
||||
</abbr>
|
||||
{% if article.author %}
|
||||
<address class="vcard author">
|
||||
by <a class="url fn" href="{{ SITEURL }}/{{ article.author.url }}">{{ article.author }}</a>
|
||||
</address> in <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a> Tagged {% if article.tags %}{% for tag in article.tags %}<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }} </a>{% endfor %}{% endif %}
|
||||
{% endif %}
|
||||
</footer><!-- /.post-info -->
|
||||
</section>
|
||||
{% if DISQUS_SITENAME %}
|
||||
<div class="comment">
|
||||
<div id="disqus_thread"></div> <!-- comment app container -->
|
||||
</div>
|
||||
<!-- Comment BEGIN -->
|
||||
<script type="text/javascript">
|
||||
var disqus_shortname = '{{ DISQUS_SITENAME }}'; // required: replace example with your forum shortname
|
||||
|
||||
/* * * DON'T EDIT BELOW THIS LINE * * */
|
||||
(function() {
|
||||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
||||
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||
})();
|
||||
</script>
|
||||
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
||||
<!-- Comment END -->
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
7
simple-bootstrap/templates/author.html
Executable file
7
simple-bootstrap/templates/author.html
Executable file
@@ -0,0 +1,7 @@
|
||||
{% extends "index.html" %}
|
||||
{% block title %} Articles by {{ author }} - {{ SITENAME }}{% endblock %}
|
||||
{% block navclass %}{%endblock%}
|
||||
{% block content_title %}
|
||||
<h2>Articles by {{ author }}</h2>
|
||||
{% endblock %}
|
||||
|
||||
61
simple-bootstrap/templates/base.html
Executable file
61
simple-bootstrap/templates/base.html
Executable file
@@ -0,0 +1,61 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
{% block head %}
|
||||
<title>{% block title %}{{ SITENAME }}{% endblock %}</title>
|
||||
<meta charset="utf-8" />
|
||||
<link href="http://cdn.staticfile.org/twitter-bootstrap/3.0.0-rc1/css/bootstrap.min.css" rel="stylesheet" />
|
||||
<link href="{{ SITEURL }}/theme/static/css/style.css" rel="stylesheet" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
{% if FEED_ALL_ATOM %}
|
||||
<link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Full Atom Feed" />
|
||||
{% endif %}
|
||||
{% if FEED_ALL_RSS %}
|
||||
<link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Full RSS Feed" />
|
||||
{% endif %}
|
||||
{% if FEED_ATOM %}
|
||||
<link href="{{ FEED_DOMAIN }}/{{ FEED_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Atom Feed" />
|
||||
{% endif %}
|
||||
{% if FEED_RSS %}
|
||||
<link href="{{ FEED_DOMAIN }}/{{ FEED_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} RSS Feed" />
|
||||
{% endif %}
|
||||
{% if CATEGORY_FEED_ATOM and category %}
|
||||
<link href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_ATOM|format(category.slug) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Categories Atom Feed" />
|
||||
{% endif %}
|
||||
{% if CATEGORY_FEED_RSS and category %}
|
||||
<link href="{{ FEED_DOMAIN }}/{{ CATEGORY_FEED_RSS|format(category.slug) }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Categories RSS Feed" />
|
||||
{% endif %}
|
||||
{% if TAG_FEED_ATOM and tag %}
|
||||
<link href="{{ FEED_DOMAIN }}/{{ TAG_FEED_ATOM|format(tag.slug) }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Tags Atom Feed" />
|
||||
{% endif %}
|
||||
{% if TAG_FEED_RSS and tag %}
|
||||
<link href="{{ FEED_DOMAIN }}/{{ TAG_FEED_RSS|format(tag.slug) }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Tags RSS Feed" />
|
||||
{% endif %}
|
||||
{% endblock head %}
|
||||
</head>
|
||||
|
||||
<body id="index" class="archive">
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<ul class="nav nav-pills pull-right">
|
||||
<li class="{% block navclass %}{{ NAVCLASS }}{% endblock navclass %}"><a href="{{ SITEURL }}">Home</a></li>
|
||||
{% for p in PAGES %}
|
||||
<li{% if p == page %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a></li>
|
||||
{% endfor %}
|
||||
<li{% if author or tag %} class="active"{% endif %}{% block archclass %}{{ ARCHCLASS }}{% endblock archclass %}><a href="{{ SITEURL }}/archives.html">Archives</a></li>
|
||||
</ul>
|
||||
<h3 class="text-muted"><a href="{{ SITEURL }}">{{ SITENAME }}</a></h3>
|
||||
</div>
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
<footer id="contentinfo" class="footer">
|
||||
<nav class="pull-right bottom-nav">
|
||||
<a href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}">RSS</a>
|
||||
</nav>
|
||||
<address id="about" class="vcard body">
|
||||
© <a href="{{SITEURL}}">{{SITENAME}}</a> Proudly powered by <a href="http://getpelican.com/">Pelican</a>
|
||||
</address><!-- /#about -->
|
||||
</footer><!-- /#contentinfo -->
|
||||
</div><!-- container -->
|
||||
</body>
|
||||
</html>
|
||||
10
simple-bootstrap/templates/categories.html
Executable file
10
simple-bootstrap/templates/categories.html
Executable file
@@ -0,0 +1,10 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %} Articles in {{ category }} - {{ SITENAME }}{% endblock %}
|
||||
{% block archclass %} class="active"{%endblock%}
|
||||
{% block content %}
|
||||
<ul>
|
||||
{% for category, articles in categories %}
|
||||
<li><a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
8
simple-bootstrap/templates/category.html
Executable file
8
simple-bootstrap/templates/category.html
Executable file
@@ -0,0 +1,8 @@
|
||||
{% extends "index.html" %}
|
||||
{% block title %} Articles in {{ category }} category - {{ SITENAME }}{% endblock %}
|
||||
{% block navclass %}{%endblock%}
|
||||
{% block archclass %} class="active"{%endblock%}
|
||||
{% block content_title %}
|
||||
<h2>Articles in the {{ category }} category</h2>
|
||||
{% endblock %}
|
||||
|
||||
16
simple-bootstrap/templates/index.html
Executable file
16
simple-bootstrap/templates/index.html
Executable file
@@ -0,0 +1,16 @@
|
||||
{% extends "base.html" %}
|
||||
{% block navclass %}active{%endblock%}
|
||||
{% block content %}
|
||||
<section id="content" class="content">
|
||||
{% block content_title %}
|
||||
{% endblock %}
|
||||
|
||||
{% for article in articles_page.object_list %}
|
||||
<article class="hentry">
|
||||
<header> <h2 class="entry-title"><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2> </header>
|
||||
<div class="entry-content"> {{ article.summary }} </div><!-- entry-content -->
|
||||
</article>
|
||||
{% endfor %}
|
||||
{% include 'pagination.html' %}
|
||||
</section><!-- content -->
|
||||
{% endblock content %}
|
||||
9
simple-bootstrap/templates/page.html
Executable file
9
simple-bootstrap/templates/page.html
Executable file
@@ -0,0 +1,9 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}{{ page.title }}{%endblock%}
|
||||
{% block content %}
|
||||
<h1>{{ page.title }}</h1>
|
||||
{% import 'translations.html' as translations with context %}
|
||||
{{ translations.translations_for(page) }}
|
||||
|
||||
{{ page.content }}
|
||||
{% endblock %}
|
||||
17
simple-bootstrap/templates/pagination.html
Normal file
17
simple-bootstrap/templates/pagination.html
Normal file
@@ -0,0 +1,17 @@
|
||||
{% if DEFAULT_PAGINATION %}
|
||||
<div class="pager">
|
||||
<ul>
|
||||
{% if articles_page.has_previous() %}
|
||||
{% set num = articles_page.previous_page_number() %}
|
||||
<li class="previous"><a href="{{ SITEURL }}/{{ page_name }}{{ num if num > 1 else '' }}.html">← Previous</a></li>
|
||||
{% else %}
|
||||
<li class="previous disabled"><a>← Previous</a></li>
|
||||
{% endif %}
|
||||
{% if articles_page.has_next() %}
|
||||
<li class="next"><a href="{{ SITEURL }}/{{ page_name }}{{ articles_page.next_page_number() }}.html">Next →</a></li>
|
||||
{% else %}
|
||||
<li class="next disabled"><a>Next →</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
16
simple-bootstrap/templates/period_archives.html
Normal file
16
simple-bootstrap/templates/period_archives.html
Normal file
@@ -0,0 +1,16 @@
|
||||
{% extends "base.html" %}
|
||||
{% block archclass %} class="active"{%endblock%}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<dl>
|
||||
{% for year, date_year in dates|groupby( 'date.year' )|sort(reverse=True) %}
|
||||
<h3><a href="{{SITEURL}}/{{year}}" class="text">Archive for {{ year }}</a></h3>
|
||||
<ul class="archive-list">
|
||||
{% for article in date_year %}
|
||||
<li><span class="text-muted">{{article.locale_date}} » </span><a href="{{ SITEURL }}/{{ article.url }}">{{article.title}}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endfor %}
|
||||
</dl>
|
||||
{% endblock %}
|
||||
7
simple-bootstrap/templates/tag.html
Executable file
7
simple-bootstrap/templates/tag.html
Executable file
@@ -0,0 +1,7 @@
|
||||
{% extends "index.html" %}
|
||||
{% block title %} Articles in {{ tag }} tag - {{ SITENAME }}{% endblock %}
|
||||
{% block navclass %}{%endblock%}
|
||||
{% block archclass %}active{%endblock%}
|
||||
{% block content_title %}
|
||||
<h2>Articles with the {{ tag }} tag</h2>
|
||||
{% endblock %}
|
||||
12
simple-bootstrap/templates/tags.html
Executable file
12
simple-bootstrap/templates/tags.html
Executable file
@@ -0,0 +1,12 @@
|
||||
{% extends "base.html" %}
|
||||
{% block archclass %} class="active"{%endblock%}
|
||||
{% block title %}Tags{%endblock%}
|
||||
{% block content %}
|
||||
|
||||
<ul class="tag">
|
||||
{% for tag in tag_cloud %}
|
||||
<li class="tag-{{ tag.1 }}"><a href="{{ SITEURL }}/{{ tag.0.url }}">{{ tag.0 }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
||||
9
simple-bootstrap/templates/translations.html
Executable file
9
simple-bootstrap/templates/translations.html
Executable file
@@ -0,0 +1,9 @@
|
||||
{% macro translations_for(article) %}
|
||||
{% if article.translations %}
|
||||
Translations:
|
||||
{% for translation in article.translations %}
|
||||
<a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
Reference in New Issue
Block a user