Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html lang="{{ DEFAULT_LANG }}"> |
| 3 | |
| 4 | <head> |
pR0Ps | 26d7087 | 2014-01-31 01:42:14 -0500 | [diff] [blame] | 5 | {% if SERVER_LESS %} |
| 6 | <link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/style.css"> |
| 7 | {% else %} |
Giulio Fidente | 0161f71 | 2013-04-13 02:55:10 +0200 | [diff] [blame] | 8 | <link rel="stylesheet/less" type="text/css" href="{{ SITEURL }}/theme/css/style.less"> |
pR0Ps | 2afe426 | 2015-01-12 19:38:09 -0500 | [diff] [blame] | 9 | <script src="//cdnjs.cloudflare.com/ajax/libs/less.js/2.2.0/less.min.js" type="text/javascript"></script> |
pR0Ps | 26d7087 | 2014-01-31 01:42:14 -0500 | [diff] [blame] | 10 | {% endif %} |
Giulio Fidente | 8305e74 | 2013-03-22 23:17:45 +0100 | [diff] [blame] | 11 | |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 12 | <link rel="stylesheet" type="text/css" href="{{ SITEURL }}/theme/css/pygments.css"> |
pR0Ps | 45d3382 | 2015-01-11 20:59:19 -0500 | [diff] [blame] | 13 | <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> |
Giulio Fidente | 8305e74 | 2013-03-22 23:17:45 +0100 | [diff] [blame] | 14 | |
pR0Ps | 6d64832 | 2015-01-15 01:34:55 -0500 | [diff] [blame] | 15 | <meta charset="utf-8"> |
pR0Ps | b1beb10 | 2015-01-11 22:19:11 -0500 | [diff] [blame] | 16 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
Giulio Fidente | 663537a | 2013-04-17 16:48:53 +0200 | [diff] [blame] | 17 | <meta name="author" content="{{ AUTHOR }}"> |
pR0Ps | 277fab8 | 2014-09-25 01:52:29 -0400 | [diff] [blame] | 18 | <meta name="description" content="{% block description %}Posts by {{ AUTHOR }}{% endblock %}"> |
Giulio Fidente | a329665 | 2013-03-28 11:30:46 +0100 | [diff] [blame] | 19 | |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 20 | {% if FEED_ALL_ATOM %} |
Giulio Fidente | 8305e74 | 2013-03-22 23:17:45 +0100 | [diff] [blame] | 21 | <link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} Full Atom Feed" /> |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 22 | {% endif %} |
| 23 | {% if FEED_ALL_RSS %} |
Giulio Fidente | 8305e74 | 2013-03-22 23:17:45 +0100 | [diff] [blame] | 24 | <link href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}" type="application/rss+xml" rel="alternate" title="{{ SITENAME }} Full RSS Feed" /> |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 25 | {% endif %} |
Giulio Fidente | a329665 | 2013-03-28 11:30:46 +0100 | [diff] [blame] | 26 | |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 27 | {% block head %} |
pR0Ps | 02550b7 | 2013-12-17 17:03:38 -0500 | [diff] [blame] | 28 | <meta name="keywords" content=" |
| 29 | {%- if GLOBAL_KEYWORDS -%} |
| 30 | {{ GLOBAL_KEYWORDS|join(', ') }} |
pR0Ps | 86b8086 | 2014-09-25 02:41:07 -0400 | [diff] [blame] | 31 | {%- if tags -%}{{', '}}{%- endif -%} |
pR0Ps | 02550b7 | 2013-12-17 17:03:38 -0500 | [diff] [blame] | 32 | {%- endif -%} |
| 33 | {{tags|join(', ', attribute='0') }}"> |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 34 | {% endblock %} |
Giulio Fidente | a329665 | 2013-03-28 11:30:46 +0100 | [diff] [blame] | 35 | |
Giulio Fidente | da4d95b | 2013-04-29 15:59:35 +0200 | [diff] [blame] | 36 | <title> |
| 37 | {% block title %}{{ SITENAME }}{% endblock %} |
| 38 | </title> |
Giulio Fidente | fbc35fb | 2013-04-05 11:26:07 +0200 | [diff] [blame] | 39 | |
Giulio Fidente | 180d172 | 2013-06-14 09:29:38 +0200 | [diff] [blame] | 40 | {% include "modules/analytics.html" %} |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 41 | </head> |
| 42 | |
pR0Ps | 58acb37 | 2015-03-05 00:18:35 -0500 | [diff] [blame] | 43 | {% macro get_icon(link) %} |
| 44 | {%- set class = 'fa-external-link-square' -%} |
| 45 | |
| 46 | {# Attempt to normalize link URLs #} |
| 47 | {%- set temp = link|lower|replace('http://', '')|replace('https://', '')|replace('www.', '') -%} |
| 48 | |
| 49 | {# Choosing a specific link icon #} |
| 50 | {%- if temp.startswith('bitcoin:') %}{% set class = 'fa-btc' %} |
| 51 | {% elif temp.startswith('irc:') %}{% set class = 'fa-comments' %} |
| 52 | {% elif temp.startswith('mailto:') %}{% set class = 'fa-envelope' %} |
| 53 | {% elif temp.startswith('skype:') %}{% set class = 'fa-skype' -%} |
| 54 | |
| 55 | {%- elif temp.endswith('.pdf') or |
| 56 | temp.endswith('.txt') or |
| 57 | temp.endswith('.doc') or |
| 58 | temp.endswith('.docx') %}{% set class = 'fa-file-text' -%} |
| 59 | |
| 60 | {%- elif temp.startswith('bitbucket.org') %}{% set class = 'fa-bitbucket' %} |
| 61 | {% elif temp.startswith('delicious.com') %}{% set class = 'fa-delicious' %} |
| 62 | {% elif temp.startswith('deviantart.com') %}{% set class = 'fa-deviantart' %} |
| 63 | {% elif temp.startswith('facebook.com') %}{% set class = 'fa-facebook' %} |
| 64 | {% elif temp.startswith('flickr.com') %}{% set class = 'fa-flickr' %} |
| 65 | {% elif temp.startswith('foursquare.com') %}{% set class = 'fa-foursquare' %} |
| 66 | {% elif temp.startswith('github.com') %}{% set class = 'fa-github' %} |
| 67 | {% elif temp.startswith('instagram.com') %}{% set class = 'fa-instagram' %} |
| 68 | {% elif temp.startswith('last.fm') %}{% set class = 'fa-lastfm' %} |
| 69 | {% elif temp.startswith('linkedin.com') %}{% set class = 'fa-linkedin' %} |
| 70 | {% elif temp.startswith('news.ycombinator.com') %}{% set class = 'fa-hacker-news' %} |
| 71 | {% elif temp.startswith('pinterest.com') %}{% set class = 'fa-pinterest' %} |
| 72 | {% elif temp.startswith('plus.google.com') %}{% set class = 'fa-google-plus' %} |
| 73 | {% elif temp.startswith('reddit.com') %}{% set class = 'fa-reddit' %} |
| 74 | {% elif temp.startswith('spotify.com') %}{% set class = 'fa-spotify' %} |
| 75 | {% elif temp.startswith('stackoverflow.com') %}{% set class = 'fa-stack-overflow' %} |
| 76 | {% elif temp.startswith('steamcommunity.com') %}{% set class = 'fa-steam' %} |
| 77 | {% elif temp.startswith('soundcloud.com') %}{% set class = 'fa-soundcloud' %} |
| 78 | {% elif temp.startswith('twitch.tv') %}{% set class = 'fa-twitch' %} |
| 79 | {% elif temp.startswith('twitter.com') %}{% set class = 'fa-twitter' %} |
| 80 | {% elif temp.startswith('vimeo.com') %}{% set class = 'fa-vimeo-square' %} |
| 81 | {% elif temp.startswith('vine.co') %}{% set class = 'fa-vine' %} |
| 82 | {% elif temp.startswith('youtube.com') %}{% set class = 'fa-youtube' -%} |
| 83 | |
| 84 | {%- elif '.stackexchange.com' in temp %}{% set class = 'fa-stack-exchange' %} |
| 85 | {% elif '.tumblr.com' in temp %}{% set class = 'fa-tumblr' %} |
| 86 | {% endif -%} |
| 87 | |
| 88 | <i class="fa {{ class }} fa-lg"></i> |
| 89 | {%- endmacro -%} |
| 90 | |
pR0Ps | f072a8c | 2015-03-05 01:28:24 -0500 | [diff] [blame^] | 91 | {%- macro display_link(name, link, text) -%} |
| 92 | {%- if MANGLE_EMAILS and link.startswith('mailto:') -%} |
| 93 | <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> |
| 94 | {%- else -%} |
| 95 | <a href="{{ link }}"{% if not text %} title="{{ name }}"{% endif %}>{{ text }}{{ get_icon(link) }}</a> |
| 96 | {%- endif -%} |
| 97 | {%- endmacro -%} |
| 98 | |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 99 | <body> |
Giulio Fidente | fc3b4d0 | 2013-03-26 15:23:42 +0100 | [diff] [blame] | 100 | <aside> |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 101 | <div id="user_meta"> |
Giulio Fidente | 5c9ed78 | 2013-03-27 11:20:31 +0100 | [diff] [blame] | 102 | <a href="{{ SITEURL }}"> |
| 103 | {% if USER_LOGO_URL %} |
pR0Ps | 2734177 | 2013-12-20 09:20:32 -0500 | [diff] [blame] | 104 | <img src="{{ USER_LOGO_URL }}" alt="logo" id="logo"> |
Giulio Fidente | 5c9ed78 | 2013-03-27 11:20:31 +0100 | [diff] [blame] | 105 | {% endif %} |
| 106 | </a> |
Carey Metcalfe | 9a4c751 | 2014-09-25 13:35:55 -0400 | [diff] [blame] | 107 | <h2><a href="{{ SITEURL }}" class="nohover">{{ SITENAME }}</a></h2> |
Giulio Fidente | a6c5867 | 2013-03-30 14:55:03 +0100 | [diff] [blame] | 108 | <p>{{ TAGLINE }}</p> |
pR0Ps | 58acb37 | 2015-03-05 00:18:35 -0500 | [diff] [blame] | 109 | <div class="social"> |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 110 | {% for name, link in SOCIAL %} |
pR0Ps | f072a8c | 2015-03-05 01:28:24 -0500 | [diff] [blame^] | 111 | {{ display_link(name, link, "") }} |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 112 | {% endfor %} |
pR0Ps | 58acb37 | 2015-03-05 00:18:35 -0500 | [diff] [blame] | 113 | </div> |
pR0Ps | e5f49ca | 2014-03-04 01:47:54 -0500 | [diff] [blame] | 114 | <ul> |
Vincent Cheng | 713daa2 | 2014-02-21 04:49:15 -0800 | [diff] [blame] | 115 | {% for name, link in LINKS %} |
pR0Ps | f072a8c | 2015-03-05 01:28:24 -0500 | [diff] [blame^] | 116 | <li>{{ display_link(name, link, name) }}</li> |
Vincent Cheng | 713daa2 | 2014-02-21 04:49:15 -0800 | [diff] [blame] | 117 | {% endfor %} |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 118 | </ul> |
| 119 | </div> |
Giulio Fidente | fc3b4d0 | 2013-03-26 15:23:42 +0100 | [diff] [blame] | 120 | </aside> |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 121 | |
pR0Ps | 6c17315 | 2013-12-11 12:13:15 -0500 | [diff] [blame] | 122 | <main id="main"> |
Giulio Fidente | a329665 | 2013-03-28 11:30:46 +0100 | [diff] [blame] | 123 | <header> |
Giulio Fidente | da4d95b | 2013-04-29 15:59:35 +0200 | [diff] [blame] | 124 | {% block header %} |
pR0Ps | 09af9c4 | 2013-12-06 04:51:29 -0500 | [diff] [blame] | 125 | <p id="header"> |
pR0Ps | 90df6e9 | 2013-12-05 15:17:52 -0500 | [diff] [blame] | 126 | <a href="{{ SITEURL }}">Home</a> |
| 127 | |
pR0Ps | 8096f8f | 2013-12-11 12:56:28 -0500 | [diff] [blame] | 128 | {% for p in pages|sort %} |
pR0Ps | 90df6e9 | 2013-12-05 15:17:52 -0500 | [diff] [blame] | 129 | {% if p.url != "index.html" %} |
| 130 | | <a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a> |
| 131 | {% endif %} |
| 132 | {% endfor %} |
pR0Ps | 8096f8f | 2013-12-11 12:56:28 -0500 | [diff] [blame] | 133 | {% if INDEX_SAVE_AS and INDEX_SAVE_AS != "index.html" %} |
| 134 | | <a href="{{ SITEURL }}/{{ INDEX_SAVE_AS }}">Blog</a> |
| 135 | {% endif %} |
Giulio Fidente | da4d95b | 2013-04-29 15:59:35 +0200 | [diff] [blame] | 136 | {% if FEED_ALL_ATOM %} |
| 137 | | <a href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}">Atom Feed</a> |
| 138 | {% endif %} |
| 139 | {% if FEED_ALL_RSS %} |
| 140 | | <a href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}">RSS Feed</a> |
| 141 | {% endif %} |
Giulio Fidente | a6c5867 | 2013-03-30 14:55:03 +0100 | [diff] [blame] | 142 | </p> |
Giulio Fidente | da4d95b | 2013-04-29 15:59:35 +0200 | [diff] [blame] | 143 | {% endblock header %} |
pR0Ps | ccef5bd | 2015-01-11 14:33:01 -0500 | [diff] [blame] | 144 | {% block subheader %}{% include "modules/blogsubheader.html" %}{% endblock subheader %} |
Giulio Fidente | a329665 | 2013-03-28 11:30:46 +0100 | [diff] [blame] | 145 | </header> |
| 146 | |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 147 | {% block content %} |
| 148 | {% endblock %} |
Giulio Fidente | a329665 | 2013-03-28 11:30:46 +0100 | [diff] [blame] | 149 | |
pR0Ps | 721949b | 2013-12-11 13:09:22 -0500 | [diff] [blame] | 150 | {% block footer %} |
| 151 | {% endblock %} |
Giulio Fidente | a329665 | 2013-03-28 11:30:46 +0100 | [diff] [blame] | 152 | |
Giulio Fidente | bc2f70a | 2013-03-27 15:41:07 +0100 | [diff] [blame] | 153 | <div id="ending_message"> |
Carey Metcalfe | f80588d | 2015-01-27 10:58:18 -0500 | [diff] [blame] | 154 | <p>© {{ 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 Fidente | bc2f70a | 2013-03-27 15:41:07 +0100 | [diff] [blame] | 155 | </div> |
Giulio Fidente | fc3b4d0 | 2013-03-26 15:23:42 +0100 | [diff] [blame] | 156 | </main> |
pR0Ps | 6c17315 | 2013-12-11 12:13:15 -0500 | [diff] [blame] | 157 | |
pR0Ps | 2fd9300 | 2015-01-11 13:46:27 -0500 | [diff] [blame] | 158 | {% block scripts %} |
pR0Ps | 6c17315 | 2013-12-11 12:13:15 -0500 | [diff] [blame] | 159 | <script type="text/javascript"> |
pR0Ps | 44f29b2 | 2015-01-11 22:20:52 -0500 | [diff] [blame] | 160 | window.addEventListener('load', function(){ |
pR0Ps | 6c17315 | 2013-12-11 12:13:15 -0500 | [diff] [blame] | 161 | if (window.location.pathname != '/' && window.location.pathname != '/index.html'){ |
| 162 | window.scroll(0, document.getElementById('main').offsetTop); |
pR0Ps | 44f29b2 | 2015-01-11 22:20:52 -0500 | [diff] [blame] | 163 | }}) |
pR0Ps | 6c17315 | 2013-12-11 12:13:15 -0500 | [diff] [blame] | 164 | </script> |
pR0Ps | 8c52463 | 2013-12-11 13:04:15 -0500 | [diff] [blame] | 165 | |
pR0Ps | 23cfbaa | 2013-12-11 13:06:06 -0500 | [diff] [blame] | 166 | {% if MANGLE_EMAILS %} |
| 167 | <script type="text/javascript"> |
pR0Ps | 44f29b2 | 2015-01-11 22:20:52 -0500 | [diff] [blame] | 168 | window.addEventListener('load', function(){ |
pR0Ps | 23cfbaa | 2013-12-11 13:06:06 -0500 | [diff] [blame] | 169 | var e = document.querySelectorAll(".email"); |
| 170 | for (var i = 0; i < e.length; i++) { |
pR0Ps | e0255f6 | 2015-01-11 21:00:15 -0500 | [diff] [blame] | 171 | var email = e[i].getAttribute("data-email") |
pR0Ps | f072a8c | 2015-03-05 01:28:24 -0500 | [diff] [blame^] | 172 | var title = e[i].getAttribute("data-title") |
pR0Ps | e0255f6 | 2015-01-11 21:00:15 -0500 | [diff] [blame] | 173 | if (email){ |
| 174 | e[i].href = email.split("").reverse().join(""); |
| 175 | e[i].removeAttribute("data-email"); |
pR0Ps | 58acb37 | 2015-03-05 00:18:35 -0500 | [diff] [blame] | 176 | e[i].removeAttribute("data-title"); |
pR0Ps | e0255f6 | 2015-01-11 21:00:15 -0500 | [diff] [blame] | 177 | e[i].removeAttribute("class"); |
pR0Ps | f072a8c | 2015-03-05 01:28:24 -0500 | [diff] [blame^] | 178 | if (title){ |
| 179 | e[i].setAttribute("title", title); |
| 180 | } |
| 181 | else{ |
| 182 | e[i].removeAttribute("title"); |
| 183 | } |
pR0Ps | e0255f6 | 2015-01-11 21:00:15 -0500 | [diff] [blame] | 184 | } |
pR0Ps | 23cfbaa | 2013-12-11 13:06:06 -0500 | [diff] [blame] | 185 | } |
pR0Ps | 44f29b2 | 2015-01-11 22:20:52 -0500 | [diff] [blame] | 186 | }) |
pR0Ps | 23cfbaa | 2013-12-11 13:06:06 -0500 | [diff] [blame] | 187 | </script> |
| 188 | {% endif %} |
pR0Ps | 2fd9300 | 2015-01-11 13:46:27 -0500 | [diff] [blame] | 189 | {% endblock scripts %} |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 190 | </body> |
| 191 | </html> |