-
Notifications
You must be signed in to change notification settings - Fork 0
/
base.html.dirac
executable file
·224 lines (193 loc) · 9.79 KB
/
base.html.dirac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
<!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 %}Articles by {{ AUTHOR }}{% endblock %}">
<link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css" type="text/css" media="all">
<link rel="stylesheet" href="{{ SITEURL }}/theme/css/font.css" type="text/css" media="all">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
<link rel="stylesheet" href="{{ SITEURL }}/theme/css/style.css" type="text/css" media="all">
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.12.3/jquery.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script type="text/javascript" src="{{ SITEURL }}/theme/js/functions.min.js"></script>
{% 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) %}
{# 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.startswith('bitbucket.org') %}{% set class = 'fa-bitbucket' %}
{% 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('instagram.com') %}{% set class = 'fa-instagram' %}
{% elif temp.startswith('last.fm') %}{% set class = 'fa-lastfm' %}
{% elif temp.startswith('sg.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' %}
{% elif temp.startswith('reddit.com') %}{% set class = 'fa-reddit' %}
{% 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 '.stackexchange.com' in temp %}{% set class = 'fa-stack-exchange' %}
{%- elif 'atom' in temp %}{% set class = 'fa-rss' %}
{% 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">{{ text }}{{ get_icon(link) }}</a>
{%- else -%}
<a href="{{ link }}"{% if not text %} title="{{ name }}"{% endif %} {{ 'class="active"' if output_file == link }}>{{ text }}{{ get_icon(link) }}</a>
{%- endif -%}
{%- endmacro -%}
<body class="home blog">
<div>
<header class="site-header">
<nav class="navbar navbar-default" role="navigation">
<div class="container">
<div class="row">
<div class="site-navigation-inner col-sm-12">
<div class="navbar-header">
<button type="button" class="btn navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul id="menu-all-pages" class="nav navbar-nav">
{% for name, link in LINKS %}
<li class="menu-item">{{ display_link(name, link, name) }}</li>
{% endfor %}
</ul>
</div>
<div class="social">
{% for name, link in SOCIAL %}
{{ display_link(name, link, "") }}
{% endfor %}
</div>
</div>
</div>
</div>
</nav><!-- .site-navigation -->
<div class="container">
<div id="logo" style="background:white">
<span class="site-name"><a class="navbar-brand" href="{{ SITEURL }}"><img width="650" src="{{ USER_LOGO_URL }}" class="attachment-full size-full" alt="logo"> </a>
</span><!-- end of .site-name -->
</div><!-- end of #logo -->
<div class="tagline">
{% if TAGS_URL %}
{% for tag, articles in tags|sort %}
<a href="{{ SITEURL }}/{{ tag.url }}" {{ 'class="active"' if output_file == tag.url }}>{{ tag }} ({{ articles|count }})</a> |
{% endfor %}
{% endif %}
{% if ARCHIVES_URL %}
<a href="{{ SITEURL }}/{{ ARCHIVES_URL }}" {{ 'class="active"' if output_file == ARCHIVES_URL }}>{{ 'Archives ('+ articles|count|string + ')' if articles|count > all_articles|count else 'Archives (' + all_articles|count|string + ')'}}</a>
{% endif %}
</div>
</div>
</header><!-- #masthead -->
</div>
<div id="content" class="site-content">
<div class="container main-content-area">
<div class="row">
<div class="main-content-inner col-sm-12 col-md-12">
<div id="primary" class="content-area">
<div id="main" class="site-main" role="main">
<div class="article-container">
{% block content %}
{% endblock %}
</div>
{% block footer %}
{% endblock %}
</div><!-- #main -->
</div><!-- #primary -->
</div>
</div><!-- close .row -->
</div><!-- close .container -->
</div><!-- close .site-content -->
<div id="footer-area">
<footer id="colophon" class="site-footer" role="contentinfo">
<div class="site-info container">
<div class="row">
<div class="copyright col-md-12">
<a href="{{ SITEURL }}/pages/privacy-policy.html">Privacy Policy</a> |
<a href="{{ SITEURL }}/feeds/all.atom.xml">Atom Feed</a> |
<a href="{{ SITEURL }}/sitemap.xml">Sitemap</a><br />
This site uses the <a href="https://github.com/limbenjamin/voce">voce</a> theme by <a href="//limbenjamin.com/">Benjamin Lim</a><br />
© 2017-2018 <a href="{{ SITEURL }}">{{ AUTHOR }}</a> </div>
</div>
</div><!-- .site-info -->
<div class="scroll-to-top" style="display: none;"><i class="fa fa-angle-up"></i></div><!-- .scroll-to-top -->
</footer><!-- #colophon -->
</div>
{% block scripts %}
<script type="text/javascript">
window.addEventListener('load', function(){
if (window.location.pathname != '/' && window.location.pathname != '/index.html'){
window.scroll(0, document.getElementById('main').offsetTop);
}})
</script>
{% if MANGLE_EMAILS %}
<script type="text/javascript">
window.addEventListener('load', function(){
var e = document.querySelectorAll(".email");
for (var i = 0; i < e.length; i++) {
var email = e[i].getAttribute("data-email")
var title = e[i].getAttribute("data-title")
if (email){
e[i].href = email.split("").reverse().join("");
e[i].removeAttribute("data-email");
e[i].removeAttribute("data-title");
e[i].removeAttribute("class");
if (title){
e[i].setAttribute("title", title);
}
else{
e[i].removeAttribute("title");
}
}
}
})
</script>
{% endif %}
{% endblock scripts %}
</body>
</html>