blob: b59631a08b2b777be357b5bb7958fbd240aa8716 [file] [log] [blame]
<!DOCTYPE html>
<html lang="{{ DEFAULT_LANG }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="{{ AUTHOR }}">
<meta name="description" content="{% block description %}Posts by {{ AUTHOR }}{% endblock %}">
{% block base %}{% endblock %}
{% assets filters="pyscss,cssmin", output="css/styles.%(version)s.min.css", "css/style.scss", "css/pygments.css" %}
<link rel="stylesheet" type="text/css" href="{{ THEMEURL }}/{{ ASSET_URL }}">
{% endassets %}
{% assets filters="slimit", output="js/scripts.%(version)s.min.js", "js/lw-timeago/lw-timeago.js", "js/scroll.js", "js/email.js" %}
<script src="{{ THEMEURL }}/{{ ASSET_URL }}" type="text/javascript"></script>
{% endassets%}
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet">
{% 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 %}
{% block head %}
<meta name="keywords" content="
{%- if GLOBAL_KEYWORDS -%}
{{ GLOBAL_KEYWORDS|join(', ') }}
{%- if tags -%}{{', '}}{%- endif -%}
{%- endif -%}
{{tags|join(', ', attribute='0') }}">
{% endblock %}
<title>{% block title %}{{ SITENAME }}{% endblock %}</title>
{% include "modules/analytics.html" %}
</head>
{% macro get_icon(link) %}
{%- set class = 'fa-external-link-square' -%}
{# Attempt to normalize link URLs #}
{%- set temp = link|lower|replace('http://', '')|replace('https://', '')|replace('www.', '') -%}
{# Choosing a specific link icon #}
{%- if temp.startswith('bitcoin:') %}{% set class = 'fa-btc' %}
{% elif temp.startswith('irc:') %}{% set class = 'fa-comments' %}
{% elif temp.startswith('mailto:') %}{% set class = 'fa-envelope' %}
{% elif temp.startswith('skype:') %}{% set class = 'fa-skype' -%}
{%- elif temp.endswith('.pdf') or
temp.endswith('.txt') or
temp.endswith('.doc') or
temp.endswith('.docx') %}{% set class = 'fa-file-text' -%}
{%- elif temp.startswith('500px.com') %}{% set class = 'fa-500px' %}
{% elif temp.startswith('behance.net') %}{% set class = 'fa-behance' %}
{% elif temp.startswith('bitbucket.org') %}{% set class = 'fa-bitbucket' %}
{% elif temp.startswith('codepen.io') %}{% set class = 'fa-codepen' %}
{% elif temp.startswith('delicious.com') %}{% set class = 'fa-delicious' %}
{% elif temp.startswith('deviantart.com') %}{% set class = 'fa-deviantart' %}
{% elif temp.startswith('facebook.com') %}{% set class = 'fa-facebook' %}
{% elif temp.startswith('flickr.com') %}{% set class = 'fa-flickr' %}
{% elif temp.startswith('foursquare.com') %}{% set class = 'fa-foursquare' %}
{% elif temp.startswith('github.com') %}{% set class = 'fa-github' %}
{% elif temp.startswith('gitlab.com') %}{% set class = 'fa-gitlab' %}
{% elif temp.startswith('instagram.com') %}{% set class = 'fa-instagram' %}
{% elif temp.startswith('last.fm') %}{% set class = 'fa-lastfm' %}
{% elif temp.startswith('linkedin.com') %}{% set class = 'fa-linkedin' %}
{% elif temp.startswith('news.ycombinator.com') %}{% set class = 'fa-hacker-news' %}
{% elif temp.startswith('pinterest.com') %}{% set class = 'fa-pinterest' %}
{% elif temp.startswith('plus.google.com') %}{% set class = 'fa-google-plus-official' %}
{% elif temp.startswith('reddit.com') %}{% set class = 'fa-reddit' %}
{% elif temp.startswith('snapchat.com') %}{% set class = 'fa-snapchat-ghost' %}
{% elif temp.startswith('spotify.com') %}{% set class = 'fa-spotify' %}
{% elif temp.startswith('stackoverflow.com') %}{% set class = 'fa-stack-overflow' %}
{% elif temp.startswith('steamcommunity.com') %}{% set class = 'fa-steam' %}
{% elif temp.startswith('soundcloud.com') %}{% set class = 'fa-soundcloud' %}
{% elif temp.startswith('twitch.tv') %}{% set class = 'fa-twitch' %}
{% elif temp.startswith('twitter.com') %}{% set class = 'fa-twitter' %}
{% elif temp.startswith('vimeo.com') %}{% set class = 'fa-vimeo-square' %}
{% elif temp.startswith('vine.co') %}{% set class = 'fa-vine' %}
{% elif temp.startswith('youtube.com') %}{% set class = 'fa-youtube' -%}
{% elif temp.startswith('keybase.io') %}{% set class = 'fa-key' -%}
{%- elif '.stackexchange.com' in temp %}{% set class = 'fa-stack-exchange' %}
{% elif '.tumblr.com' in temp %}{% set class = 'fa-tumblr' %}
{% elif 'debian.org' in temp %}{% set class = 'fa fa-linux fa-lg' %}
{% endif -%}
<i class="fa {{ class }} fa-lg"></i>
{%- endmacro -%}
{%- macro display_link(name, link, text) -%}
{%- if MANGLE_EMAILS and link.startswith('mailto:') -%}
<a data-email="{{ link|reverse }}"{% if not text %} data-title="{{ name }}"{% endif %} title="You need javascript enabled to view this email" class="email" target="_blank" rel="noopener noreferrer">{{ text }}{{ get_icon(link) }}</a>
{%- else -%}
<a href="{{ link }}"{% if not text %} title="{{ name }}"{% endif %} target="_blank" rel="noopener noreferrer">{{ text }}{{ get_icon(link) }}</a>
{%- endif -%}
{%- endmacro -%}
<body>
<aside>
<div id="user_meta">
<a href="{{ SITEURL }}">
{% if USER_LOGO_URL %}
<img src="{{ USER_LOGO_URL }}" id="logo">
{% endif %}
</a>
<h2><a href="{{ SITEURL }}" class="nohover">{{ SITENAME }}</a></h2>
{{ TAGLINE }}
{% if SOCIAL|length > 1 %}
<div class="social">
{% for name, link in SOCIAL %}
{{ display_link(name, link, "") }}
{% endfor %}
</div>
{% endif %}
{% if LINKS|length > 1 %}
<ul>
{% for name, link in LINKS %}
<li>{{ display_link(name, link, name) }}</li>
{% endfor %}
</ul>
{% endif %}
</div>
</aside>
<main id="main">
<header>
{% block header %}
<p id="header">
<a href="{{ SITEURL }}">Home</a>
{% if DISPLAY_PAGES_ON_MENU %}
{% for p in pages %}
{% if p.url != "index.html" %}
&#124; <a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a>
{% endif %}
{% endfor %}
{% endif %}
{% if INDEX_SAVE_AS and INDEX_SAVE_AS != "index.html" %}
&#124; <a href="{{ SITEURL }}/{{ INDEX_LINK_AS }}">Blog</a>
{% endif %}
{% if FEED_ALL_ATOM %}
&#124; <a href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}">Atom Feed</a>
{% endif %}
{% if FEED_ALL_RSS %}
&#124; <a href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}">RSS Feed</a>
{% endif %}
{% for title, link in MENUITEMS %}
&#124; <a href="{{ SITEURL }}/{{ link }}">{{ title }}</a>
{% endfor %}
</p>
{% endblock header %}
{% block subheader %}{% include "modules/blogsubheader.html" %}{% endblock subheader %}
</header>
{% block content %}
{% endblock %}
{% block footer %}
{% endblock %}
<div id="ending_message">
<p>{{ SITENAME }}. Built using <a href="http://getpelican.com">Pelican</a>. Theme is <a href="https://github.com/pR0Ps/pelican-subtle">subtle</a> by <a href="http://cmetcalfe.ca">Carey Metcalfe</a>. Based on <a href="https://github.com/giulivo/pelican-svbhack">svbhack</a> by Giulio Fidente.</p>
</div>
</main>
{% block scripts %}
<script type="text/javascript">
window.addEventListener('load', skipHeader)
</script>
{% if MANGLE_EMAILS %}
<script type="text/javascript">
window.addEventListener('load', unmangleEmail)
</script>
{% endif %}
{% endblock scripts %}
</body>
</html>