Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html lang="{{ DEFAULT_LANG }}"> |
| 3 | |
| 4 | <head> |
pR0Ps | 6d64832 | 2015-01-15 01:34:55 -0500 | [diff] [blame] | 5 | <meta charset="utf-8"> |
pR0Ps | b1beb10 | 2015-01-11 22:19:11 -0500 | [diff] [blame] | 6 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
Giulio Fidente | 663537a | 2013-04-17 16:48:53 +0200 | [diff] [blame] | 7 | <meta name="author" content="{{ AUTHOR }}"> |
pR0Ps | 277fab8 | 2014-09-25 01:52:29 -0400 | [diff] [blame] | 8 | <meta name="description" content="{% block description %}Posts by {{ AUTHOR }}{% endblock %}"> |
Giulio Fidente | a329665 | 2013-03-28 11:30:46 +0100 | [diff] [blame] | 9 | |
Carey Metcalfe | 9461e3f | 2015-12-08 00:02:33 -0500 | [diff] [blame] | 10 | {% block base %}{% endblock %} |
Carey Metcalfe | ed3a552 | 2016-03-12 14:14:30 -0500 | [diff] [blame] | 11 | {% assets filters="pyscss,cssmin", output="css/styles.%(version)s.min.css", "css/style.scss", "css/pygments.css" %} |
Luigi Santivetti | d93cb0f | 2020-02-17 22:21:28 +0000 | [diff] [blame^] | 12 | <link rel="stylesheet" type="text/css" href="{{ THEMEURL }}/{{ ASSET_URL }}"> |
pR0Ps | a9f8203 | 2015-03-11 21:36:35 -0400 | [diff] [blame] | 13 | {% endassets %} |
Carey Metcalfe | ed3a552 | 2016-03-12 14:14:30 -0500 | [diff] [blame] | 14 | |
| 15 | {% assets filters="slimit", output="js/scripts.%(version)s.min.js", "js/lw-timeago/lw-timeago.js", "js/scroll.js", "js/email.js" %} |
Luigi Santivetti | d93cb0f | 2020-02-17 22:21:28 +0000 | [diff] [blame^] | 16 | <script src="{{ THEMEURL }}/{{ ASSET_URL }}" type="text/javascript"></script> |
Carey Metcalfe | ed3a552 | 2016-03-12 14:14:30 -0500 | [diff] [blame] | 17 | {% endassets%} |
| 18 | |
Carey Metcalfe | 288f060 | 2016-09-14 23:10:55 -0400 | [diff] [blame] | 19 | <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet"> |
pR0Ps | a9f8203 | 2015-03-11 21:36:35 -0400 | [diff] [blame] | 20 | |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 21 | {% if FEED_ALL_ATOM %} |
Giulio Fidente | 8305e74 | 2013-03-22 23:17:45 +0100 | [diff] [blame] | 22 | <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] | 23 | {% endif %} |
| 24 | {% if FEED_ALL_RSS %} |
Giulio Fidente | 8305e74 | 2013-03-22 23:17:45 +0100 | [diff] [blame] | 25 | <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] | 26 | {% endif %} |
Giulio Fidente | a329665 | 2013-03-28 11:30:46 +0100 | [diff] [blame] | 27 | |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 28 | {% block head %} |
pR0Ps | 02550b7 | 2013-12-17 17:03:38 -0500 | [diff] [blame] | 29 | <meta name="keywords" content=" |
| 30 | {%- if GLOBAL_KEYWORDS -%} |
| 31 | {{ GLOBAL_KEYWORDS|join(', ') }} |
pR0Ps | 86b8086 | 2014-09-25 02:41:07 -0400 | [diff] [blame] | 32 | {%- if tags -%}{{', '}}{%- endif -%} |
pR0Ps | 02550b7 | 2013-12-17 17:03:38 -0500 | [diff] [blame] | 33 | {%- endif -%} |
| 34 | {{tags|join(', ', attribute='0') }}"> |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 35 | {% endblock %} |
Giulio Fidente | a329665 | 2013-03-28 11:30:46 +0100 | [diff] [blame] | 36 | |
Carey Metcalfe | bc52661 | 2016-10-21 23:38:02 -0400 | [diff] [blame] | 37 | <title>{% block title %}{{ SITENAME }}{% endblock %}</title> |
Giulio Fidente | fbc35fb | 2013-04-05 11:26:07 +0200 | [diff] [blame] | 38 | |
Giulio Fidente | 180d172 | 2013-06-14 09:29:38 +0200 | [diff] [blame] | 39 | {% include "modules/analytics.html" %} |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 40 | </head> |
| 41 | |
pR0Ps | 58acb37 | 2015-03-05 00:18:35 -0500 | [diff] [blame] | 42 | {% macro get_icon(link) %} |
| 43 | {%- set class = 'fa-external-link-square' -%} |
| 44 | |
| 45 | {# Attempt to normalize link URLs #} |
| 46 | {%- set temp = link|lower|replace('http://', '')|replace('https://', '')|replace('www.', '') -%} |
| 47 | |
| 48 | {# Choosing a specific link icon #} |
| 49 | {%- if temp.startswith('bitcoin:') %}{% set class = 'fa-btc' %} |
| 50 | {% elif temp.startswith('irc:') %}{% set class = 'fa-comments' %} |
| 51 | {% elif temp.startswith('mailto:') %}{% set class = 'fa-envelope' %} |
| 52 | {% elif temp.startswith('skype:') %}{% set class = 'fa-skype' -%} |
| 53 | |
| 54 | {%- elif temp.endswith('.pdf') or |
| 55 | temp.endswith('.txt') or |
| 56 | temp.endswith('.doc') or |
| 57 | temp.endswith('.docx') %}{% set class = 'fa-file-text' -%} |
| 58 | |
Carey Metcalfe | 288f060 | 2016-09-14 23:10:55 -0400 | [diff] [blame] | 59 | {%- elif temp.startswith('500px.com') %}{% set class = 'fa-500px' %} |
| 60 | {% elif temp.startswith('behance.net') %}{% set class = 'fa-behance' %} |
| 61 | {% elif temp.startswith('bitbucket.org') %}{% set class = 'fa-bitbucket' %} |
| 62 | {% elif temp.startswith('codepen.io') %}{% set class = 'fa-codepen' %} |
pR0Ps | 58acb37 | 2015-03-05 00:18:35 -0500 | [diff] [blame] | 63 | {% elif temp.startswith('delicious.com') %}{% set class = 'fa-delicious' %} |
| 64 | {% elif temp.startswith('deviantart.com') %}{% set class = 'fa-deviantart' %} |
| 65 | {% elif temp.startswith('facebook.com') %}{% set class = 'fa-facebook' %} |
| 66 | {% elif temp.startswith('flickr.com') %}{% set class = 'fa-flickr' %} |
| 67 | {% elif temp.startswith('foursquare.com') %}{% set class = 'fa-foursquare' %} |
| 68 | {% elif temp.startswith('github.com') %}{% set class = 'fa-github' %} |
Carey Metcalfe | 288f060 | 2016-09-14 23:10:55 -0400 | [diff] [blame] | 69 | {% elif temp.startswith('gitlab.com') %}{% set class = 'fa-gitlab' %} |
pR0Ps | 58acb37 | 2015-03-05 00:18:35 -0500 | [diff] [blame] | 70 | {% elif temp.startswith('instagram.com') %}{% set class = 'fa-instagram' %} |
| 71 | {% elif temp.startswith('last.fm') %}{% set class = 'fa-lastfm' %} |
| 72 | {% elif temp.startswith('linkedin.com') %}{% set class = 'fa-linkedin' %} |
| 73 | {% elif temp.startswith('news.ycombinator.com') %}{% set class = 'fa-hacker-news' %} |
| 74 | {% elif temp.startswith('pinterest.com') %}{% set class = 'fa-pinterest' %} |
Carey Metcalfe | 288f060 | 2016-09-14 23:10:55 -0400 | [diff] [blame] | 75 | {% elif temp.startswith('plus.google.com') %}{% set class = 'fa-google-plus-official' %} |
pR0Ps | 58acb37 | 2015-03-05 00:18:35 -0500 | [diff] [blame] | 76 | {% elif temp.startswith('reddit.com') %}{% set class = 'fa-reddit' %} |
Carey Metcalfe | 288f060 | 2016-09-14 23:10:55 -0400 | [diff] [blame] | 77 | {% elif temp.startswith('snapchat.com') %}{% set class = 'fa-snapchat-ghost' %} |
pR0Ps | 58acb37 | 2015-03-05 00:18:35 -0500 | [diff] [blame] | 78 | {% elif temp.startswith('spotify.com') %}{% set class = 'fa-spotify' %} |
| 79 | {% elif temp.startswith('stackoverflow.com') %}{% set class = 'fa-stack-overflow' %} |
| 80 | {% elif temp.startswith('steamcommunity.com') %}{% set class = 'fa-steam' %} |
| 81 | {% elif temp.startswith('soundcloud.com') %}{% set class = 'fa-soundcloud' %} |
| 82 | {% elif temp.startswith('twitch.tv') %}{% set class = 'fa-twitch' %} |
| 83 | {% elif temp.startswith('twitter.com') %}{% set class = 'fa-twitter' %} |
| 84 | {% elif temp.startswith('vimeo.com') %}{% set class = 'fa-vimeo-square' %} |
| 85 | {% elif temp.startswith('vine.co') %}{% set class = 'fa-vine' %} |
| 86 | {% elif temp.startswith('youtube.com') %}{% set class = 'fa-youtube' -%} |
filgal | 6614873 | 2016-09-14 23:41:58 +0200 | [diff] [blame] | 87 | {% elif temp.startswith('keybase.io') %}{% set class = 'fa-key' -%} |
pR0Ps | 58acb37 | 2015-03-05 00:18:35 -0500 | [diff] [blame] | 88 | |
| 89 | {%- elif '.stackexchange.com' in temp %}{% set class = 'fa-stack-exchange' %} |
| 90 | {% elif '.tumblr.com' in temp %}{% set class = 'fa-tumblr' %} |
Luigi Santivetti | d93cb0f | 2020-02-17 22:21:28 +0000 | [diff] [blame^] | 91 | {% elif 'debian.org' in temp %}{% set class = 'fa fa-linux fa-lg' %} |
pR0Ps | 58acb37 | 2015-03-05 00:18:35 -0500 | [diff] [blame] | 92 | {% endif -%} |
| 93 | |
| 94 | <i class="fa {{ class }} fa-lg"></i> |
| 95 | {%- endmacro -%} |
| 96 | |
pR0Ps | f072a8c | 2015-03-05 01:28:24 -0500 | [diff] [blame] | 97 | {%- macro display_link(name, link, text) -%} |
| 98 | {%- if MANGLE_EMAILS and link.startswith('mailto:') -%} |
Justin Montgomery | ad60cae | 2016-05-04 17:41:16 -0700 | [diff] [blame] | 99 | <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> |
pR0Ps | f072a8c | 2015-03-05 01:28:24 -0500 | [diff] [blame] | 100 | {%- else -%} |
Justin Montgomery | 3bcd02f | 2016-05-04 17:19:30 -0700 | [diff] [blame] | 101 | <a href="{{ link }}"{% if not text %} title="{{ name }}"{% endif %} target="_blank" rel="noopener noreferrer">{{ text }}{{ get_icon(link) }}</a> |
pR0Ps | f072a8c | 2015-03-05 01:28:24 -0500 | [diff] [blame] | 102 | {%- endif -%} |
| 103 | {%- endmacro -%} |
| 104 | |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 105 | <body> |
Giulio Fidente | fc3b4d0 | 2013-03-26 15:23:42 +0100 | [diff] [blame] | 106 | <aside> |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 107 | <div id="user_meta"> |
Giulio Fidente | 5c9ed78 | 2013-03-27 11:20:31 +0100 | [diff] [blame] | 108 | <a href="{{ SITEURL }}"> |
| 109 | {% if USER_LOGO_URL %} |
Carey Metcalfe | 36b4a30 | 2016-10-17 22:49:10 -0400 | [diff] [blame] | 110 | <img src="{{ USER_LOGO_URL }}" id="logo"> |
Giulio Fidente | 5c9ed78 | 2013-03-27 11:20:31 +0100 | [diff] [blame] | 111 | {% endif %} |
| 112 | </a> |
Carey Metcalfe | 9a4c751 | 2014-09-25 13:35:55 -0400 | [diff] [blame] | 113 | <h2><a href="{{ SITEURL }}" class="nohover">{{ SITENAME }}</a></h2> |
Luigi Santivetti | d93cb0f | 2020-02-17 22:21:28 +0000 | [diff] [blame^] | 114 | {{ TAGLINE }} |
| 115 | {% if SOCIAL|length > 1 %} |
pR0Ps | 58acb37 | 2015-03-05 00:18:35 -0500 | [diff] [blame] | 116 | <div class="social"> |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 117 | {% for name, link in SOCIAL %} |
Luigi Santivetti | d93cb0f | 2020-02-17 22:21:28 +0000 | [diff] [blame^] | 118 | {{ display_link(name, link, "") }} |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 119 | {% endfor %} |
pR0Ps | 58acb37 | 2015-03-05 00:18:35 -0500 | [diff] [blame] | 120 | </div> |
Luigi Santivetti | d93cb0f | 2020-02-17 22:21:28 +0000 | [diff] [blame^] | 121 | {% endif %} |
| 122 | {% if LINKS|length > 1 %} |
pR0Ps | e5f49ca | 2014-03-04 01:47:54 -0500 | [diff] [blame] | 123 | <ul> |
Vincent Cheng | 713daa2 | 2014-02-21 04:49:15 -0800 | [diff] [blame] | 124 | {% for name, link in LINKS %} |
pR0Ps | f072a8c | 2015-03-05 01:28:24 -0500 | [diff] [blame] | 125 | <li>{{ display_link(name, link, name) }}</li> |
Vincent Cheng | 713daa2 | 2014-02-21 04:49:15 -0800 | [diff] [blame] | 126 | {% endfor %} |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 127 | </ul> |
Luigi Santivetti | d93cb0f | 2020-02-17 22:21:28 +0000 | [diff] [blame^] | 128 | {% endif %} |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 129 | </div> |
Giulio Fidente | fc3b4d0 | 2013-03-26 15:23:42 +0100 | [diff] [blame] | 130 | </aside> |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 131 | |
pR0Ps | 6c17315 | 2013-12-11 12:13:15 -0500 | [diff] [blame] | 132 | <main id="main"> |
Giulio Fidente | a329665 | 2013-03-28 11:30:46 +0100 | [diff] [blame] | 133 | <header> |
Giulio Fidente | da4d95b | 2013-04-29 15:59:35 +0200 | [diff] [blame] | 134 | {% block header %} |
pR0Ps | 09af9c4 | 2013-12-06 04:51:29 -0500 | [diff] [blame] | 135 | <p id="header"> |
pR0Ps | 90df6e9 | 2013-12-05 15:17:52 -0500 | [diff] [blame] | 136 | <a href="{{ SITEURL }}">Home</a> |
Justin Montgomery | ee5f77c | 2016-04-04 14:40:32 -0700 | [diff] [blame] | 137 | |
| 138 | {% if DISPLAY_PAGES_ON_MENU %} |
Carey Metcalfe | fa300fd | 2017-06-19 21:14:49 -0400 | [diff] [blame] | 139 | {% for p in pages %} |
pR0Ps | 90df6e9 | 2013-12-05 15:17:52 -0500 | [diff] [blame] | 140 | {% if p.url != "index.html" %} |
| 141 | | <a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a> |
| 142 | {% endif %} |
| 143 | {% endfor %} |
Justin Montgomery | ee5f77c | 2016-04-04 14:40:32 -0700 | [diff] [blame] | 144 | {% endif %} |
pR0Ps | 8096f8f | 2013-12-11 12:56:28 -0500 | [diff] [blame] | 145 | {% if INDEX_SAVE_AS and INDEX_SAVE_AS != "index.html" %} |
Luigi Santivetti | d93cb0f | 2020-02-17 22:21:28 +0000 | [diff] [blame^] | 146 | | <a href="{{ SITEURL }}/{{ INDEX_LINK_AS }}">Blog</a> |
pR0Ps | 8096f8f | 2013-12-11 12:56:28 -0500 | [diff] [blame] | 147 | {% endif %} |
Giulio Fidente | da4d95b | 2013-04-29 15:59:35 +0200 | [diff] [blame] | 148 | {% if FEED_ALL_ATOM %} |
| 149 | | <a href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}">Atom Feed</a> |
| 150 | {% endif %} |
| 151 | {% if FEED_ALL_RSS %} |
| 152 | | <a href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}">RSS Feed</a> |
| 153 | {% endif %} |
Luigi Santivetti | d93cb0f | 2020-02-17 22:21:28 +0000 | [diff] [blame^] | 154 | {% for title, link in MENUITEMS %} |
| 155 | | <a href="{{ SITEURL }}/{{ link }}">{{ title }}</a> |
| 156 | {% endfor %} |
Giulio Fidente | a6c5867 | 2013-03-30 14:55:03 +0100 | [diff] [blame] | 157 | </p> |
Giulio Fidente | da4d95b | 2013-04-29 15:59:35 +0200 | [diff] [blame] | 158 | {% endblock header %} |
pR0Ps | ccef5bd | 2015-01-11 14:33:01 -0500 | [diff] [blame] | 159 | {% block subheader %}{% include "modules/blogsubheader.html" %}{% endblock subheader %} |
Giulio Fidente | a329665 | 2013-03-28 11:30:46 +0100 | [diff] [blame] | 160 | </header> |
| 161 | |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 162 | {% block content %} |
| 163 | {% endblock %} |
Giulio Fidente | a329665 | 2013-03-28 11:30:46 +0100 | [diff] [blame] | 164 | |
pR0Ps | 721949b | 2013-12-11 13:09:22 -0500 | [diff] [blame] | 165 | {% block footer %} |
| 166 | {% endblock %} |
Giulio Fidente | a329665 | 2013-03-28 11:30:46 +0100 | [diff] [blame] | 167 | |
Giulio Fidente | bc2f70a | 2013-03-27 15:41:07 +0100 | [diff] [blame] | 168 | <div id="ending_message"> |
Luigi Santivetti | d93cb0f | 2020-02-17 22:21:28 +0000 | [diff] [blame^] | 169 | <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> |
Giulio Fidente | bc2f70a | 2013-03-27 15:41:07 +0100 | [diff] [blame] | 170 | </div> |
Giulio Fidente | fc3b4d0 | 2013-03-26 15:23:42 +0100 | [diff] [blame] | 171 | </main> |
pR0Ps | 6c17315 | 2013-12-11 12:13:15 -0500 | [diff] [blame] | 172 | |
pR0Ps | 2fd9300 | 2015-01-11 13:46:27 -0500 | [diff] [blame] | 173 | {% block scripts %} |
pR0Ps | 6c17315 | 2013-12-11 12:13:15 -0500 | [diff] [blame] | 174 | <script type="text/javascript"> |
Carey Metcalfe | ed3a552 | 2016-03-12 14:14:30 -0500 | [diff] [blame] | 175 | window.addEventListener('load', skipHeader) |
pR0Ps | 6c17315 | 2013-12-11 12:13:15 -0500 | [diff] [blame] | 176 | </script> |
pR0Ps | 8c52463 | 2013-12-11 13:04:15 -0500 | [diff] [blame] | 177 | |
pR0Ps | 23cfbaa | 2013-12-11 13:06:06 -0500 | [diff] [blame] | 178 | {% if MANGLE_EMAILS %} |
| 179 | <script type="text/javascript"> |
Carey Metcalfe | ed3a552 | 2016-03-12 14:14:30 -0500 | [diff] [blame] | 180 | window.addEventListener('load', unmangleEmail) |
pR0Ps | 23cfbaa | 2013-12-11 13:06:06 -0500 | [diff] [blame] | 181 | </script> |
| 182 | {% endif %} |
pR0Ps | 2fd9300 | 2015-01-11 13:46:27 -0500 | [diff] [blame] | 183 | {% endblock scripts %} |
Giulio Fidente | 44ccac7 | 2013-03-21 18:51:03 +0100 | [diff] [blame] | 184 | </body> |
| 185 | </html> |