blob: e177007e55b8db3376aca337381d13c879ce8e4c [file] [log] [blame]
Giulio Fidente44ccac72013-03-21 18:51:03 +01001<!DOCTYPE html>
2<html lang="{{ DEFAULT_LANG }}">
3
4<head>
pR0Ps6d648322015-01-15 01:34:55 -05005 <meta charset="utf-8">
pR0Psb1beb102015-01-11 22:19:11 -05006 <meta name="viewport" content="width=device-width, initial-scale=1.0">
Giulio Fidente663537a2013-04-17 16:48:53 +02007 <meta name="author" content="{{ AUTHOR }}">
pR0Ps277fab82014-09-25 01:52:29 -04008 <meta name="description" content="{% block description %}Posts by {{ AUTHOR }}{% endblock %}">
Giulio Fidentea3296652013-03-28 11:30:46 +01009
Carey Metcalfe9461e3f2015-12-08 00:02:33 -050010 {% block base %}{% endblock %}
pR0Ps9a451f12015-03-11 23:36:25 -040011 {% assets filters="pyscss,cssmin", output="css/style.%(version)s.min.css", "css/style.scss", "css/pygments.css" %}
pR0Psa9f82032015-03-11 21:36:35 -040012 <link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ ASSET_URL }}">
13 {% endassets %}
Carey Metcalfe3f00eb12016-03-09 20:04:43 -050014 <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
pR0Psa9f82032015-03-11 21:36:35 -040015
Giulio Fidente44ccac72013-03-21 18:51:03 +010016 {% if FEED_ALL_ATOM %}
Giulio Fidente8305e742013-03-22 23:17:45 +010017 <link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Full Atom Feed" />
Giulio Fidente44ccac72013-03-21 18:51:03 +010018 {% endif %}
19 {% if FEED_ALL_RSS %}
Giulio Fidente8305e742013-03-22 23:17:45 +010020 <link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Full RSS Feed" />
Giulio Fidente44ccac72013-03-21 18:51:03 +010021 {% endif %}
Giulio Fidentea3296652013-03-28 11:30:46 +010022
Giulio Fidente44ccac72013-03-21 18:51:03 +010023 {% block head %}
pR0Ps02550b72013-12-17 17:03:38 -050024 <meta name="keywords" content="
25 {%- if GLOBAL_KEYWORDS -%}
26 {{ GLOBAL_KEYWORDS|join(', ') }}
pR0Ps86b80862014-09-25 02:41:07 -040027 {%- if tags -%}{{', '}}{%- endif -%}
pR0Ps02550b72013-12-17 17:03:38 -050028 {%- endif -%}
29 {{tags|join(', ', attribute='0') }}">
Giulio Fidente44ccac72013-03-21 18:51:03 +010030 {% endblock %}
Giulio Fidentea3296652013-03-28 11:30:46 +010031
Giulio Fidenteda4d95b2013-04-29 15:59:35 +020032 <title>
33 {% block title %}{{ SITENAME }}{% endblock %}
34 </title>
Giulio Fidentefbc35fb2013-04-05 11:26:07 +020035
Giulio Fidente180d1722013-06-14 09:29:38 +020036 {% include "modules/analytics.html" %}
Giulio Fidente44ccac72013-03-21 18:51:03 +010037</head>
38
pR0Ps58acb372015-03-05 00:18:35 -050039{% macro get_icon(link) %}
40 {%- set class = 'fa-external-link-square' -%}
41
42 {# Attempt to normalize link URLs #}
43 {%- set temp = link|lower|replace('http://', '')|replace('https://', '')|replace('www.', '') -%}
44
45 {# Choosing a specific link icon #}
46 {%- if temp.startswith('bitcoin:') %}{% set class = 'fa-btc' %}
47 {% elif temp.startswith('irc:') %}{% set class = 'fa-comments' %}
48 {% elif temp.startswith('mailto:') %}{% set class = 'fa-envelope' %}
49 {% elif temp.startswith('skype:') %}{% set class = 'fa-skype' -%}
50
51 {%- elif temp.endswith('.pdf') or
52 temp.endswith('.txt') or
53 temp.endswith('.doc') or
54 temp.endswith('.docx') %}{% set class = 'fa-file-text' -%}
55
56 {%- elif temp.startswith('bitbucket.org') %}{% set class = 'fa-bitbucket' %}
57 {% elif temp.startswith('delicious.com') %}{% set class = 'fa-delicious' %}
58 {% elif temp.startswith('deviantart.com') %}{% set class = 'fa-deviantart' %}
59 {% elif temp.startswith('facebook.com') %}{% set class = 'fa-facebook' %}
60 {% elif temp.startswith('flickr.com') %}{% set class = 'fa-flickr' %}
61 {% elif temp.startswith('foursquare.com') %}{% set class = 'fa-foursquare' %}
62 {% elif temp.startswith('github.com') %}{% set class = 'fa-github' %}
63 {% elif temp.startswith('instagram.com') %}{% set class = 'fa-instagram' %}
64 {% elif temp.startswith('last.fm') %}{% set class = 'fa-lastfm' %}
65 {% elif temp.startswith('linkedin.com') %}{% set class = 'fa-linkedin' %}
66 {% elif temp.startswith('news.ycombinator.com') %}{% set class = 'fa-hacker-news' %}
67 {% elif temp.startswith('pinterest.com') %}{% set class = 'fa-pinterest' %}
68 {% elif temp.startswith('plus.google.com') %}{% set class = 'fa-google-plus' %}
69 {% elif temp.startswith('reddit.com') %}{% set class = 'fa-reddit' %}
70 {% elif temp.startswith('spotify.com') %}{% set class = 'fa-spotify' %}
71 {% elif temp.startswith('stackoverflow.com') %}{% set class = 'fa-stack-overflow' %}
72 {% elif temp.startswith('steamcommunity.com') %}{% set class = 'fa-steam' %}
73 {% elif temp.startswith('soundcloud.com') %}{% set class = 'fa-soundcloud' %}
74 {% elif temp.startswith('twitch.tv') %}{% set class = 'fa-twitch' %}
75 {% elif temp.startswith('twitter.com') %}{% set class = 'fa-twitter' %}
76 {% elif temp.startswith('vimeo.com') %}{% set class = 'fa-vimeo-square' %}
77 {% elif temp.startswith('vine.co') %}{% set class = 'fa-vine' %}
78 {% elif temp.startswith('youtube.com') %}{% set class = 'fa-youtube' -%}
79
80 {%- elif '.stackexchange.com' in temp %}{% set class = 'fa-stack-exchange' %}
81 {% elif '.tumblr.com' in temp %}{% set class = 'fa-tumblr' %}
82 {% endif -%}
83
84 <i class="fa {{ class }} fa-lg"></i>
85{%- endmacro -%}
86
pR0Psf072a8c2015-03-05 01:28:24 -050087{%- macro display_link(name, link, text) -%}
88 {%- if MANGLE_EMAILS and link.startswith('mailto:') -%}
89 <a data-email="{{ link|reverse }}"{% if not text %} data-title="{{ name }}"{% endif %} title="You need javascript enabled to view this email" class="email">{{ text }}{{ get_icon(link) }}</a>
90 {%- else -%}
91 <a href="{{ link }}"{% if not text %} title="{{ name }}"{% endif %}>{{ text }}{{ get_icon(link) }}</a>
92 {%- endif -%}
93{%- endmacro -%}
94
Giulio Fidente44ccac72013-03-21 18:51:03 +010095<body>
Giulio Fidentefc3b4d02013-03-26 15:23:42 +010096 <aside>
Giulio Fidente44ccac72013-03-21 18:51:03 +010097 <div id="user_meta">
Giulio Fidente5c9ed782013-03-27 11:20:31 +010098 <a href="{{ SITEURL }}">
99 {% if USER_LOGO_URL %}
pR0Ps27341772013-12-20 09:20:32 -0500100 <img src="{{ USER_LOGO_URL }}" alt="logo" id="logo">
Giulio Fidente5c9ed782013-03-27 11:20:31 +0100101 {% endif %}
102 </a>
Carey Metcalfe9a4c7512014-09-25 13:35:55 -0400103 <h2><a href="{{ SITEURL }}" class="nohover">{{ SITENAME }}</a></h2>
Giulio Fidentea6c58672013-03-30 14:55:03 +0100104 <p>{{ TAGLINE }}</p>
pR0Ps58acb372015-03-05 00:18:35 -0500105 <div class="social">
Giulio Fidente44ccac72013-03-21 18:51:03 +0100106 {% for name, link in SOCIAL %}
pR0Psf072a8c2015-03-05 01:28:24 -0500107 {{ display_link(name, link, "") }}
Giulio Fidente44ccac72013-03-21 18:51:03 +0100108 {% endfor %}
pR0Ps58acb372015-03-05 00:18:35 -0500109 </div>
pR0Pse5f49ca2014-03-04 01:47:54 -0500110 <ul>
Vincent Cheng713daa22014-02-21 04:49:15 -0800111 {% for name, link in LINKS %}
pR0Psf072a8c2015-03-05 01:28:24 -0500112 <li>{{ display_link(name, link, name) }}</li>
Vincent Cheng713daa22014-02-21 04:49:15 -0800113 {% endfor %}
Giulio Fidente44ccac72013-03-21 18:51:03 +0100114 </ul>
115 </div>
Giulio Fidentefc3b4d02013-03-26 15:23:42 +0100116 </aside>
Giulio Fidente44ccac72013-03-21 18:51:03 +0100117
pR0Ps6c173152013-12-11 12:13:15 -0500118 <main id="main">
Giulio Fidentea3296652013-03-28 11:30:46 +0100119 <header>
Giulio Fidenteda4d95b2013-04-29 15:59:35 +0200120 {% block header %}
pR0Ps09af9c42013-12-06 04:51:29 -0500121 <p id="header">
pR0Ps90df6e92013-12-05 15:17:52 -0500122 <a href="{{ SITEURL }}">Home</a>
123
Arundbadbb92015-08-31 06:39:15 +0530124 {% for p in pages %}
pR0Ps90df6e92013-12-05 15:17:52 -0500125 {% if p.url != "index.html" %}
126 &#124; <a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a>
127 {% endif %}
128 {% endfor %}
pR0Ps8096f8f2013-12-11 12:56:28 -0500129 {% if INDEX_SAVE_AS and INDEX_SAVE_AS != "index.html" %}
130 &#124; <a href="{{ SITEURL }}/{{ INDEX_SAVE_AS }}">Blog</a>
131 {% endif %}
Giulio Fidenteda4d95b2013-04-29 15:59:35 +0200132 {% if FEED_ALL_ATOM %}
133 &#124; <a href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}">Atom Feed</a>
134 {% endif %}
135 {% if FEED_ALL_RSS %}
136 &#124; <a href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}">RSS Feed</a>
137 {% endif %}
Giulio Fidentea6c58672013-03-30 14:55:03 +0100138 </p>
Giulio Fidenteda4d95b2013-04-29 15:59:35 +0200139 {% endblock header %}
pR0Psccef5bd2015-01-11 14:33:01 -0500140 {% block subheader %}{% include "modules/blogsubheader.html" %}{% endblock subheader %}
Giulio Fidentea3296652013-03-28 11:30:46 +0100141 </header>
142
Giulio Fidente44ccac72013-03-21 18:51:03 +0100143 {% block content %}
144 {% endblock %}
Giulio Fidentea3296652013-03-28 11:30:46 +0100145
pR0Ps721949b2013-12-11 13:09:22 -0500146 {% block footer %}
147 {% endblock %}
Giulio Fidentea3296652013-03-28 11:30:46 +0100148
Giulio Fidentebc2f70a2013-03-27 15:41:07 +0100149 <div id="ending_message">
Carey Metcalfef80588d2015-01-27 10:58:18 -0500150 <p>&copy; {{ AUTHOR }}. 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>
Giulio Fidentebc2f70a2013-03-27 15:41:07 +0100151 </div>
Giulio Fidentefc3b4d02013-03-26 15:23:42 +0100152 </main>
pR0Ps6c173152013-12-11 12:13:15 -0500153
pR0Ps2fd93002015-01-11 13:46:27 -0500154 {% block scripts %}
pR0Ps6c173152013-12-11 12:13:15 -0500155 <script type="text/javascript">
pR0Ps44f29b22015-01-11 22:20:52 -0500156 window.addEventListener('load', function(){
pR0Ps6c173152013-12-11 12:13:15 -0500157 if (window.location.pathname != '/' && window.location.pathname != '/index.html'){
158 window.scroll(0, document.getElementById('main').offsetTop);
pR0Ps44f29b22015-01-11 22:20:52 -0500159 }})
pR0Ps6c173152013-12-11 12:13:15 -0500160 </script>
pR0Ps8c524632013-12-11 13:04:15 -0500161
pR0Ps23cfbaa2013-12-11 13:06:06 -0500162 {% if MANGLE_EMAILS %}
163 <script type="text/javascript">
pR0Ps44f29b22015-01-11 22:20:52 -0500164 window.addEventListener('load', function(){
pR0Ps23cfbaa2013-12-11 13:06:06 -0500165 var e = document.querySelectorAll(".email");
166 for (var i = 0; i < e.length; i++) {
pR0Pse0255f62015-01-11 21:00:15 -0500167 var email = e[i].getAttribute("data-email")
pR0Psf072a8c2015-03-05 01:28:24 -0500168 var title = e[i].getAttribute("data-title")
pR0Pse0255f62015-01-11 21:00:15 -0500169 if (email){
170 e[i].href = email.split("").reverse().join("");
171 e[i].removeAttribute("data-email");
pR0Ps58acb372015-03-05 00:18:35 -0500172 e[i].removeAttribute("data-title");
pR0Pse0255f62015-01-11 21:00:15 -0500173 e[i].removeAttribute("class");
pR0Psf072a8c2015-03-05 01:28:24 -0500174 if (title){
175 e[i].setAttribute("title", title);
176 }
177 else{
178 e[i].removeAttribute("title");
179 }
pR0Pse0255f62015-01-11 21:00:15 -0500180 }
pR0Ps23cfbaa2013-12-11 13:06:06 -0500181 }
pR0Ps44f29b22015-01-11 22:20:52 -0500182 })
pR0Ps23cfbaa2013-12-11 13:06:06 -0500183 </script>
184 {% endif %}
pR0Ps2fd93002015-01-11 13:46:27 -0500185 {% endblock scripts %}
Giulio Fidente44ccac72013-03-21 18:51:03 +0100186</body>
187</html>