Flex theme.

This commit is contained in:
Alexandre Vicenzi 2015-07-18 21:04:01 -03:00
parent 0bb44cb06f
commit b35cde0428
30 changed files with 1437 additions and 0 deletions

18
templates/archives.html Normal file
View file

@ -0,0 +1,18 @@
{% extends "base.html" %}
{% block title %}– Archives{% endblock %}
{% block content %}
<article>
<header>
<h2>Archives</h2>
</header>
<div>
<dl>
{% for article in dates %}
<dt>{{ article.locale_date }}</dt>
<dd><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></dd>
{% endfor %}
</dl>
</div>
</article>
{% endblock %}

28
templates/article.html Normal file
View file

@ -0,0 +1,28 @@
{% extends "base.html" %}
{% block head %}
<meta name="keywords" content="{{ article.tags|join(', ') }}">
{% endblock %}
{% block title %}&ndash; {{ article.title }}{% endblock %}
{% block content %}
<article>
<header>
<h2 id="{{ article.slug }}">{{ article.title }}</h2>
<p>Posted on {{ article.locale_date }} in <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a></p>
</header>
<div>
{{ article.content }}
</div>
<div class="tag-cloud">
<p>
{% if article.tags %}
{% for tag in article.tags %}
<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>
{% endfor %}
{% endif %}
</p>
</div>
{% include "partial/disqus.html" %}
</article>
{% endblock %}

3
templates/author.html Normal file
View file

@ -0,0 +1,3 @@
{% extends "index.html" %}
{% block title %}&ndash; Posts by: {{ author }}{% endblock %}
{% set summarise = True %}

17
templates/authors.html Normal file
View file

@ -0,0 +1,17 @@
{% extends "base.html" %}
{% block title %}&ndash; Authors{% endblock %}
{% block content %}
<article>
<header>
<h2>Authors</h2>
</header>
<div>
<ul class="list">
{% for author, articles in authors|sort %}
<li><a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a> ({{ articles|count }})</li>
{% endfor %}
</ul>
</div>
</article>
{% endblock %}

108
templates/base.html Normal file
View file

@ -0,0 +1,108 @@
<!DOCTYPE html>
<html lang="{{ DEFAULT_LANG }}">
<head>
<link href='//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700,400italic' rel='stylesheet' type='text/css'>
{% if USE_LESS %}
<link rel="stylesheet/less" type="text/css" href="{{ SITEURL }}/theme/css/style.less">
<script src="//cdnjs.cloudflare.com/ajax/libs/less.js/2.5.1/less.min.js" type="text/javascript"></script>
{% else %}
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/style.min.css">
{% endif %}
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/pygments.min.css">
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/font-awesome.min.css">
{% if FEED_ALL_ATOM %}
<link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Atom" />
{% endif %}
{% if FEED_ALL_RSS %}
<link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} RSS" />
{% endif %}
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="robots" content="index, follow">
<meta name="author" content="{{ AUTHOR }}">
<meta name="description" content="{{ AUTHOR }}'s Thoughts and Writings">
<title>{{ SITENAME }}{% block title %}{% endblock %}</title>
{% block head %}
{% endblock %}
</head>
<body>
{% include "partial/gtm.html" %}
<aside>
<div class="profile">
<a href="{{ SITEURL }}">
{% if AUTHOR_IMG_URL %}
<img src="{{ AUTHOR_IMG_URL }}" alt="{{ AUTHOR }}" title="{{ AUTHOR }}">
{% else %}
<img src="{{ SITEURL }}/theme/img/profile.png" alt="{{ AUTHOR }}" title="{{ AUTHOR }}">
{% endif %}
</a>
<h1><a href="{{ SITEURL }}">{{ AUTHOR }}</a></h1>
{% if AUTHOR_SHORT_DESC %}
<p>{{ AUTHOR_SHORT_DESC }}</p>
{% endif %}
<nav>
<ul class="list">
{% for page in pages|sort %}
<li><a href="{{ SITEURL }}/{{ page.url }}#{{ page.slug }}">{{ page.title }}</a></li>
{% endfor %}
{% for name, link in LINKS %}
<li><a href="{{ link }}" target="_blank">{{ name }}</a></li>
{% endfor %}
</ul>
</nav>
<ul class="social">
{% for name, link in SOCIAL %}
<li><a class="sc-{{ name }}" href="{{ link }}" target="_blank"><i class="fa fa-{{ name }}"></i></a></li>
{% endfor %}
</ul>
</div>
</aside>
<main>
{% if MAIN_MENU %}
<nav>
<a href="{{ SITEURL }}">Home</a>
{% for title, link in MENUITEMS %}
<a href="{{ link }}">{{ title }}</a>
{% endfor %}
{% if FEED_ALL_ATOM %}
<a href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}">Atom</a>
{% endif %}
{% if FEED_ALL_RSS %}
<a href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}">RSS</a>
{% endif %}
</nav>
{% endif %}
{% block content %}
{% endblock %}
<footer>
{% if CC_LICENSE %}
<p>
&copy; {{ AUTHOR }} {{ COPYRIGHT_YEAR }} - This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/{{ CC_LICENSE['slug'] }}/{{ CC_LICENSE['version'] }}/">{{ CC_LICENSE['name'] }} {{ CC_LICENSE['version'] }} International License</a>
</p>
{% include "partial/flex.html" %}
<p>
<a rel="license"
href="http://creativecommons.org/licenses/{{ CC_LICENSE['slug'] }}/{{ CC_LICENSE['version'] }}/"
target="_blank">
<img alt="Creative Commons License"
title="Creative Commons License"
style="border-width:0"
src="https://i.creativecommons.org/l/{{ CC_LICENSE['slug'] }}/{{ CC_LICENSE['version'] }}/80x15.png"
width="80"
height="15"/></a>
{% include "partial/statuscake.html" %}
</p>
{% else %}
<p>&copy; {{ AUTHOR }} {{ COPYRIGHT_YEAR }}</p>
{% include "partial/flex.html" %}
{% include "partial/statuscake.html" %}
{% endif %}
</footer>
</main>
{% include "partial/ga.html" %}
{% block additional_js %}{% endblock %}
</body>
</html>

17
templates/categories.html Normal file
View file

@ -0,0 +1,17 @@
{% extends "base.html" %}
{% block title %}&ndash; Categories{% endblock %}
{% block content %}
<article>
<header>
<h2>Categories</h2>
</header>
<div>
<ul class="list">
{% for category, articles in categories|sort %}
<li><a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</a> ({{ articles|count }})</li>
{% endfor %}
</ul>
</div>
</article>
{% endblock %}

3
templates/category.html Normal file
View file

@ -0,0 +1,3 @@
{% extends "index.html" %}
{% block title %}&ndash; Category: {{ category }}{% endblock %}
{% set summarise = True %}

39
templates/index.html Normal file
View file

@ -0,0 +1,39 @@
{% extends "base.html" %}
{% block content %}
{% for article in articles_page.object_list %}
<article>
<header>
<h2><a href="{{ SITEURL }}/{{ article.url }}#{{ article.slug }}">{{ article.title }}</a></h2>
<p>
Posted on {{ article.locale_date }} in <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a> &#8226;
{% if article.tags %}Tagged with
{% for tag in article.tags %}
<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>{% if not loop.last %},{% endif %}
{% endfor %}
{% endif %}
{% if DISQUS_SITENAME %}
&#8226; <a href="{{ SITEURL }}/{{ article.url }}#disqus_thread">Leave a comment</a>
{% endif %}
</p>
</header>
<div>
{% if summarise or article.metadata['summary'] or article.metadata['summarise'] %}
{{ article.summary }}
<a class="btn" href="{{ SITEURL }}/{{ article.url }}#{{ article.slug }}">Continue reading</a>
{% else %}
{{ article.content }}
{% endif %}
</div>
{% if not loop.last %}
<hr />
{% endif %}
</article>
{% endfor %}
{% include "partial/pagination.html" %}
{% endblock %}
{% block additional_js %}
{% include "partial/disqus_count.html" %}
{% endblock %}

13
templates/page.html Normal file
View file

@ -0,0 +1,13 @@
{% extends "base.html" %}
{% block title %}&ndash; {{ page.title }}{% endblock %}
{% block content %}
<article>
<header>
<h2 id="{{ page.slug }}">{{ page.title }}</h2>
</header>
<div>
{{ page.content }}
</div>
</article>
{% endblock %}

View file

@ -0,0 +1,12 @@
{% if DISQUS_SITENAME %}
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = '{{ DISQUS_SITENAME }}';
(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="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
{% endif %}

View file

@ -0,0 +1,11 @@
{% if DISQUS_SITENAME %}
<script type="text/javascript">
var disqus_shortname = '{{ DISQUS_SITENAME }}';
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>
{% endif %}

View file

@ -0,0 +1 @@
<p>Built using <a href="http://getpelican.com" target="_blank">Pelican</a> - <a href="https://github.com/alexandrevicenzi/flex" target="_blank">Flex</a> theme by <a href="http://alexandrevicenzi.com" target="_blank">Alexandre Vicenzi</a></p>

11
templates/partial/ga.html Normal file
View file

@ -0,0 +1,11 @@
{% if GOOGLE_ANALYTICS %}
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '{{ GOOGLE_ANALYTICS }}', 'auto');
ga('send', 'pageview');
</script>
{% endif %}

View file

@ -0,0 +1,11 @@
{% if GOOGLE_TAG_MANAGER %}
<!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id={{ GOOGLE_TAG_MANAGER }}"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','{{ GOOGLE_TAG_MANAGER }}');</script>
<!-- End Google Tag Manager -->
{% endif %}

View file

@ -0,0 +1,20 @@
{% if DEFAULT_PAGINATION %}
<div class="pagination">
{% if articles_page.has_next() %}
<a class="btn" href="{{ SITEURL }}/{{ page_name }}{{ articles_page.next_page_number() }}.html">
<i class="fa fa-angle-left"></i> Older Posts
</a>
{% endif %}
{% if articles_page.has_previous() %}
{% if articles_page.previous_page_number() == 1 %}
<a class="btn float-right" href="{{ SITEURL }}/{{ page_name }}.html">
Newer Posts <i class="fa fa-angle-right"></i>
</a>
{% else %}
<a class="btn float-right" href="{{ SITEURL }}/{{ page_name }}{{ articles_page.previous_page_number() }}.html">
Newer Posts <i class="fa fa-angle-right"></i>
</a>
{% endif %}
{% endif %}
</div>
{% endif %}

View file

@ -0,0 +1,5 @@
{% if STATUSCAKE %}
<a href="https://www.statuscake.com" title="{{ SITENAME }} Uptime">
<img src="https://www.statuscake.com/App/button/index.php?Track={{ STATUSCAKE['trackid'] }}&amp;Days={{ STATUSCAKE['days'] }}&amp;Design=6" alt="{{ SITENAME }} Uptime" width="96" height="15"/>
</a>
{% endif %}

3
templates/tag.html Normal file
View file

@ -0,0 +1,3 @@
{% extends "index.html" %}
{% block title %}&ndash; Tag: {{ tag }}{% endblock %}
{% set summarise = True %}

17
templates/tags.html Normal file
View file

@ -0,0 +1,17 @@
{% extends "base.html" %}
{% block title %}&ndash; Tags{% endblock %}
{% block content %}
<article>
<header>
<h2>Tags</h2>
</header>
<div>
<ul class="list">
{%- for tag, articles in tags|sort %}
<li><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a> ({{ articles|count }})</li>
{% endfor %}
</ul>
</div>
</article>
{% endblock %}