blob: d71a6f61e40bd75d3b9c7f93c2d96b9256ad53f6 [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 %}
Carey Metcalfeed3a5522016-03-12 14:14:30 -050011 {% assets filters="pyscss,cssmin", output="css/styles.%(version)s.min.css", "css/style.scss", "css/pygments.css" %}
Luigi Santivettid93cb0f2020-02-17 22:21:28 +000012 <link rel="stylesheet" type="text/css" href="{{ THEMEURL }}/{{ ASSET_URL }}">
pR0Psa9f82032015-03-11 21:36:35 -040013 {% endassets %}
Carey Metcalfeed3a5522016-03-12 14:14:30 -050014
15 {% assets filters="slimit", output="js/scripts.%(version)s.min.js", "js/lw-timeago/lw-timeago.js", "js/scroll.js", "js/email.js" %}
Luigi Santivettid93cb0f2020-02-17 22:21:28 +000016 <script src="{{ THEMEURL }}/{{ ASSET_URL }}" type="text/javascript"></script>
Carey Metcalfeed3a5522016-03-12 14:14:30 -050017 {% endassets%}
18
Luigi Santivetti6ce0e132020-10-07 23:28:00 +010019 <link href="https://use.fontawesome.com/releases/v5.8.2/css/all.css" rel="stylesheet">
pR0Psa9f82032015-03-11 21:36:35 -040020
Giulio Fidente44ccac72013-03-21 18:51:03 +010021 {% if FEED_ALL_ATOM %}
Giulio Fidente8305e742013-03-22 23:17:45 +010022 <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 +010023 {% endif %}
24 {% if FEED_ALL_RSS %}
Giulio Fidente8305e742013-03-22 23:17:45 +010025 <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 +010026 {% endif %}
Giulio Fidentea3296652013-03-28 11:30:46 +010027
Giulio Fidente44ccac72013-03-21 18:51:03 +010028 {% block head %}
pR0Ps02550b72013-12-17 17:03:38 -050029 <meta name="keywords" content="
30 {%- if GLOBAL_KEYWORDS -%}
31 {{ GLOBAL_KEYWORDS|join(', ') }}
pR0Ps86b80862014-09-25 02:41:07 -040032 {%- if tags -%}{{', '}}{%- endif -%}
pR0Ps02550b72013-12-17 17:03:38 -050033 {%- endif -%}
34 {{tags|join(', ', attribute='0') }}">
Giulio Fidente44ccac72013-03-21 18:51:03 +010035 {% endblock %}
Giulio Fidentea3296652013-03-28 11:30:46 +010036
Carey Metcalfebc526612016-10-21 23:38:02 -040037 <title>{% block title %}{{ SITENAME }}{% endblock %}</title>
Giulio Fidentefbc35fb2013-04-05 11:26:07 +020038
Giulio Fidente180d1722013-06-14 09:29:38 +020039 {% include "modules/analytics.html" %}
Giulio Fidente44ccac72013-03-21 18:51:03 +010040</head>
41
pR0Ps58acb372015-03-05 00:18:35 -050042{% 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' %}
Luigi Santivetti6ce0e132020-10-07 23:28:00 +010051 {% elif temp.startswith('mailto:') %}{% set class = 'fa fa-envelope' %}
pR0Ps58acb372015-03-05 00:18:35 -050052 {% 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
Luigi Santivetti6ce0e132020-10-07 23:28:00 +010059 {%- elif temp.startswith('500px.com') %}{% set class = 'fa fa-500px fa-lg' %}
60 {% elif temp.startswith('behance.net') %}{% set class = 'fa behance fa-lg' %}
61 {% elif temp.startswith('bitbucket.org') %}{% set class = 'fa bitbucket fa-lg' %}
62 {% elif temp.startswith('codepen.io') %}{% set class = 'fa codepen fa-lg' %}
63 {% elif temp.startswith('delicious.com') %}{% set class = 'fa delicious fa-lg' %}
64 {% elif temp.startswith('deviantart.com') %}{% set class = 'fa deviantart fa-lg' %}
65 {% elif temp.startswith('facebook.com') %}{% set class = 'fa facebook fa-lg' %}
66 {% elif temp.startswith('flickr.com') %}{% set class = 'fa flickr fa-lg' %}
67 {% elif temp.startswith('foursquare.com') %}{% set class = 'fa foursquare fa-lg' %}
68 {% elif temp.startswith('github.com') %}{% set class = 'fa github fa-lg' %}
69 {% elif temp.startswith('gitlab.com') %}{% set class = 'fa gitlab fa-lg' %}
70 {% elif temp.startswith('instagram.com') %}{% set class = 'fa instagram fa-lg' %}
71 {% elif temp.startswith('last.fm') %}{% set class = 'fa lastfm fa-lg' %}
72 {% elif temp.startswith('linkedin.com') %}{% set class = 'fa linkedin fa-lg' %}
73 {% elif temp.startswith('news.ycombinator.com') %}{% set class = 'fa hacker-news fa-lg' %}
74 {% elif temp.startswith('pinterest.com') %}{% set class = 'fa pinterest fa-lg' %}
75 {% elif temp.startswith('plus.google.com') %}{% set class = 'fa google-plus-official fa-lg' %}
76 {% elif temp.startswith('reddit.com') %}{% set class = 'fa reddit fa-lg' %}
77 {% elif temp.startswith('snapchat.com') %}{% set class = 'fa snapchat-ghost fa-lg' %}
78 {% elif temp.startswith('spotify.com') %}{% set class = 'fa spotify fa-lg' %}
79 {% elif temp.startswith('stackoverflow.com') %}{% set class = 'fa stack-overflow fa-lg' %}
80 {% elif temp.startswith('steamcommunity.com') %}{% set class = 'fa steam fa-lg' %}
81 {% elif temp.startswith('soundcloud.com') %}{% set class = 'fa soundcloud fa-lg' %}
82 {% elif temp.startswith('twitch.tv') %}{% set class = 'fa twitch fa-lg' %}
83 {% elif temp.startswith('twitter.com') %}{% set class = 'fa twitter fa-lg' %}
84 {% elif temp.startswith('vimeo.com') %}{% set class = 'fa vimeo-square fa-lg' %}
85 {% elif temp.startswith('vine.co') %}{% set class = 'fa vine fa-lg' %}
86 {% elif temp.startswith('youtube.com') %}{% set class = 'fa youtube fa-lg' -%}
87 {% elif temp.startswith('keybase.io') %}{% set class = 'fa key fa-lg' -%}
88 {% elif temp.endswith('/gitles') %}{% set class = 'fas fa-code-branch' %}
pR0Ps58acb372015-03-05 00:18:35 -050089
Luigi Santivetti6ce0e132020-10-07 23:28:00 +010090 {%- elif '.stackexchange.com' in temp %}{% set class = 'fa fa-stack-exchange fa-lg' %}
91 {% elif '.tumblr.com' in temp %}{% set class = 'fa fa-tumblr fa-lg' %}
92 {% elif 'debian.org' in temp %}{% set class = 'fab fa-linux' %}
pR0Ps58acb372015-03-05 00:18:35 -050093 {% endif -%}
94
Luigi Santivetti6ce0e132020-10-07 23:28:00 +010095<i class="{{ class }}" style="font-size:1.5em"></i>
pR0Ps58acb372015-03-05 00:18:35 -050096{%- endmacro -%}
97
pR0Psf072a8c2015-03-05 01:28:24 -050098{%- macro display_link(name, link, text) -%}
99 {%- if MANGLE_EMAILS and link.startswith('mailto:') -%}
Justin Montgomeryad60cae2016-05-04 17:41:16 -0700100 <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>
pR0Psf072a8c2015-03-05 01:28:24 -0500101 {%- else -%}
Justin Montgomery3bcd02f2016-05-04 17:19:30 -0700102 <a href="{{ link }}"{% if not text %} title="{{ name }}"{% endif %} target="_blank" rel="noopener noreferrer">{{ text }}{{ get_icon(link) }}</a>
pR0Psf072a8c2015-03-05 01:28:24 -0500103 {%- endif -%}
104{%- endmacro -%}
105
Giulio Fidente44ccac72013-03-21 18:51:03 +0100106<body>
Giulio Fidentefc3b4d02013-03-26 15:23:42 +0100107 <aside>
Giulio Fidente44ccac72013-03-21 18:51:03 +0100108 <div id="user_meta">
Giulio Fidente5c9ed782013-03-27 11:20:31 +0100109 <a href="{{ SITEURL }}">
110 {% if USER_LOGO_URL %}
Carey Metcalfe36b4a302016-10-17 22:49:10 -0400111 <img src="{{ USER_LOGO_URL }}" id="logo">
Giulio Fidente5c9ed782013-03-27 11:20:31 +0100112 {% endif %}
113 </a>
Carey Metcalfe9a4c7512014-09-25 13:35:55 -0400114 <h2><a href="{{ SITEURL }}" class="nohover">{{ SITENAME }}</a></h2>
Luigi Santivettid93cb0f2020-02-17 22:21:28 +0000115 {{ TAGLINE }}
116 {% if SOCIAL|length > 1 %}
pR0Ps58acb372015-03-05 00:18:35 -0500117 <div class="social">
Giulio Fidente44ccac72013-03-21 18:51:03 +0100118 {% for name, link in SOCIAL %}
Luigi Santivettid93cb0f2020-02-17 22:21:28 +0000119 {{ display_link(name, link, "") }}
Giulio Fidente44ccac72013-03-21 18:51:03 +0100120 {% endfor %}
pR0Ps58acb372015-03-05 00:18:35 -0500121 </div>
Luigi Santivettid93cb0f2020-02-17 22:21:28 +0000122 {% endif %}
123 {% if LINKS|length > 1 %}
pR0Pse5f49ca2014-03-04 01:47:54 -0500124 <ul>
Vincent Cheng713daa22014-02-21 04:49:15 -0800125 {% for name, link in LINKS %}
pR0Psf072a8c2015-03-05 01:28:24 -0500126 <li>{{ display_link(name, link, name) }}</li>
Vincent Cheng713daa22014-02-21 04:49:15 -0800127 {% endfor %}
Giulio Fidente44ccac72013-03-21 18:51:03 +0100128 </ul>
Luigi Santivettid93cb0f2020-02-17 22:21:28 +0000129 {% endif %}
Giulio Fidente44ccac72013-03-21 18:51:03 +0100130 </div>
Giulio Fidentefc3b4d02013-03-26 15:23:42 +0100131 </aside>
Giulio Fidente44ccac72013-03-21 18:51:03 +0100132
pR0Ps6c173152013-12-11 12:13:15 -0500133 <main id="main">
Giulio Fidentea3296652013-03-28 11:30:46 +0100134 <header>
Giulio Fidenteda4d95b2013-04-29 15:59:35 +0200135 {% block header %}
pR0Ps09af9c42013-12-06 04:51:29 -0500136 <p id="header">
Justin Montgomeryee5f77c2016-04-04 14:40:32 -0700137 {% if DISPLAY_PAGES_ON_MENU %}
Carey Metcalfefa300fd2017-06-19 21:14:49 -0400138 {% for p in pages %}
pR0Ps90df6e92013-12-05 15:17:52 -0500139 {% if p.url != "index.html" %}
Luigi Santivetti6ce0e132020-10-07 23:28:00 +0100140 <a href="{{ SITEURL }}/{{ p.url }}">{{ p.title }}</a>&nbsp;&#124;
pR0Ps90df6e92013-12-05 15:17:52 -0500141 {% endif %}
142 {% endfor %}
Justin Montgomeryee5f77c2016-04-04 14:40:32 -0700143 {% endif %}
pR0Ps8096f8f2013-12-11 12:56:28 -0500144 {% if INDEX_SAVE_AS and INDEX_SAVE_AS != "index.html" %}
Luigi Santivetti6ce0e132020-10-07 23:28:00 +0100145 <a href="{{ SITEURL }}/{{ INDEX_LINK_URL }}">Blog</a>&nbsp;&#124;
pR0Ps8096f8f2013-12-11 12:56:28 -0500146 {% endif %}
Giulio Fidenteda4d95b2013-04-29 15:59:35 +0200147 {% if FEED_ALL_ATOM %}
Luigi Santivetti6ce0e132020-10-07 23:28:00 +0100148 <a href="{{ FEED_DOMAIN }}/{{ FEED_ALL_ATOM }}">Atom Feed</a>&nbsp;&#124;
Giulio Fidenteda4d95b2013-04-29 15:59:35 +0200149 {% endif %}
150 {% if FEED_ALL_RSS %}
Luigi Santivetti6ce0e132020-10-07 23:28:00 +0100151 <a href="{{ FEED_DOMAIN }}/{{ FEED_ALL_RSS }}">RSS Feed</a>&nbsp;&#124;
Giulio Fidenteda4d95b2013-04-29 15:59:35 +0200152 {% endif %}
Luigi Santivettid93cb0f2020-02-17 22:21:28 +0000153 {% for title, link in MENUITEMS %}
Luigi Santivetti6ce0e132020-10-07 23:28:00 +0100154 <a href="{{ SITEURL }}/{{ link }}">{{ title }}</a>
155 {% if not loop.last %}&#124;{% endif %}
Luigi Santivettid93cb0f2020-02-17 22:21:28 +0000156 {% endfor %}
Giulio Fidentea6c58672013-03-30 14:55:03 +0100157 </p>
Giulio Fidenteda4d95b2013-04-29 15:59:35 +0200158 {% endblock header %}
pR0Psccef5bd2015-01-11 14:33:01 -0500159 {% block subheader %}{% include "modules/blogsubheader.html" %}{% endblock subheader %}
Giulio Fidentea3296652013-03-28 11:30:46 +0100160 </header>
161
Giulio Fidente44ccac72013-03-21 18:51:03 +0100162 {% block content %}
163 {% endblock %}
Giulio Fidentea3296652013-03-28 11:30:46 +0100164
pR0Ps721949b2013-12-11 13:09:22 -0500165 {% block footer %}
166 {% endblock %}
Giulio Fidentea3296652013-03-28 11:30:46 +0100167
Giulio Fidentebc2f70a2013-03-27 15:41:07 +0100168 <div id="ending_message">
Luigi Santivettid93cb0f2020-02-17 22:21:28 +0000169 <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 Fidentebc2f70a2013-03-27 15:41:07 +0100170 </div>
Giulio Fidentefc3b4d02013-03-26 15:23:42 +0100171 </main>
pR0Ps6c173152013-12-11 12:13:15 -0500172
pR0Ps2fd93002015-01-11 13:46:27 -0500173 {% block scripts %}
pR0Ps6c173152013-12-11 12:13:15 -0500174 <script type="text/javascript">
Carey Metcalfeed3a5522016-03-12 14:14:30 -0500175 window.addEventListener('load', skipHeader)
pR0Ps6c173152013-12-11 12:13:15 -0500176 </script>
pR0Ps8c524632013-12-11 13:04:15 -0500177
pR0Ps23cfbaa2013-12-11 13:06:06 -0500178 {% if MANGLE_EMAILS %}
179 <script type="text/javascript">
Carey Metcalfeed3a5522016-03-12 14:14:30 -0500180 window.addEventListener('load', unmangleEmail)
pR0Ps23cfbaa2013-12-11 13:06:06 -0500181 </script>
182 {% endif %}
pR0Ps2fd93002015-01-11 13:46:27 -0500183 {% endblock scripts %}
Giulio Fidente44ccac72013-03-21 18:51:03 +0100184</body>
185</html>