/
index.html
294 lines (270 loc) · 11.2 KB
/
index.html
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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Themes for Nikola</title>
<link href="https://getnikola.com/assets/css/all-nocdn.css" rel="stylesheet" type="text/css">
<link rel="canonical" href="https://themes.getnikola.com/">
<link rel="shortcut icon" href="https://getnikola.com/favicon.ico">
<!--[if lt IE 9]><script src="/assets/js/html5.js"></script><![endif]-->
<style type="text/css">
html {
overflow-y: scroll;
}
.holder {
margin: 15px 0;
padding: 10px;
border: 1px solid #dddddd;
border-radius: 5px;
text-align: center;
}
.holder a {
/* font-size: 12px; */
cursor: pointer;
margin: 0 5px;
color: #333;
}
.holder a:hover {
background-color: #222;
color: #fff;
}
.holder a.jp-previous { margin-right: 15px; }
.holder a.jp-next { margin-left: 15px; }
.holder a.jp-current, a.jp-current:hover {
color: #FF4242;
font-weight: bold;
}
.holder a.jp-disabled, a.jp-disabled:hover {
color: #bbb;
}
.holder a.jp-current, a.jp-current:hover,
.holder a.jp-disabled, a.jp-disabled:hover {
cursor: default;
background: none;
}
.holder span {
margin: 0 5px;
}
code {
color: #333;
background-color: #F9F2F4;
}
.navbar-nav.navbar-right:last-child {
margin-right: 0;
}
</style>
</head>
<body>
<!-- Menubar -->
<nav class="navbar navbar-inverse navbar-static-top" role="navigation">
<div class="container">
<!-- This keeps the margins nice -->
<div class="navbar-header">
<button type="button" class="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>
<a class="navbar-brand" href="https://getnikola.com/">
<img src="https://getnikola.com/assets/img/logo.svg" alt="Nikola" id="logo">
</a>
</div>
<!-- /.navbar-header -->
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav">
<li>
<a href="https://getnikola.com/documentation.html">Documentation</a>
</li>
<li>
<a href="https://getnikola.com/contact.html">Help/Bugs/Contact</a>
</li>
<li>
<a href="https://github.com/getnikola/nikola">GitHub</a>
</li>
<li class="active">
<a href="https://themes.getnikola.com">Themes</a>
</li>
<li>
<a href="https://plugins.getnikola.com">Plugins</a>
</li>
<li>
<a href="https://users.getnikola.com">Users</a>
</li>
<li>
<a href="https://getnikola.com/blog/index.html">Blog</a>
</li>
<li>
<a href="https://getnikola.com/changes.html">Changelog</a>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<!-- End of Menubar -->
<div class="container" style="margin-top: 14px;">
<div class="starter-template">
</div>
<div class="row jumbotron" style="padding-top: 30px;">
<h2>Themes for Nikola <small>version
<div class="btn-group" id="version-picker">
</div>
</small></h2>
<p>This is the theme repository for <a href="https://getnikola.com">Nikola</a>, a static site and
blog generator.</p>
<p style="font-size: 0.8em;">If you want to contribute a theme, you can do so at the
<a href="https://github.com/getnikola/nikola-themes">GitHub
repository</a>. <span style="font-size: 0.8em;">Or just ask in the
<a href="https://groups.google.com/forum/#!forum/nikola-discuss">mailing
list</a>.</span></p>
<p class="text-warning" style="font-size: 0.7em;">Warning: some
themes may contain Python code. Some of it may be malicious,
intentionally or not. Use at your own risk.</p>
</div>
<div class="row">
<div class="col-md-4" style="padding-left: 0;">
<!-- <div class="holder"></div> let's do this once we have 100 themes-->
<div class="list-group" style="margin-top: 14px" id="itemContainer">
</div>
</div>
<div class="col-md-8" id="rightside" style="margin-top:14px; border: 1px solid #dddddd; border-radius: 5px; padding-bottom: 15px; background-color: white; margin-bottom: 10px;">
</div>
</div>
<div class="row well well-sm" id="footer" style='text-align: center;'>
© The Nikola Team and each theme's authors
</div>
</div>
<!-- /.container -->
<script src="https://getnikola.com/assets/js/all-nocdn.js" type="text/javascript"></script>
<!-- <script src="jPages.min.js"></script> -->
<script src="theme_data.js"></script>
<script src="stmd.js"></script>
<script type="text/javascript">
var writer = new stmd.HtmlRenderer();
var reader = new stmd.DocParser();
function get_supported_and_eat_meta() {
var supported = data['__meta__']['allver'];
delete data.__meta__;
for (i in supported) {
var v = supported[i];
var o = $('<button/>');
o.attr('id', 'p-v' + v);
o.attr('type', 'button');
o.data('version', v);
o.addClass('btn');
o.addClass('btn-info');
o.html(v.toString());
o.click(function() {fetch($(this).data('version'))});
$('#version-picker').append(o);
}
return supported;
}
function fetch(version){
current_version = version;
// Change picker
for (i in supported) {
var v = supported[i];
var o = $('#p-v' + v);
o.removeClass('active');
}
$('#p-v' + version).addClass('active');
// Add plugins to the list
th_list = $("#itemContainer");
th_list.html('');
for (plugin in data) {
if (data[plugin]['allver'].indexOf(version) != -1) {
var anchor = $('<a/>')
.addClass('list-group-item')
.attr('id', 'li-'+ plugin)
.attr('href', '#'+plugin)
.text(plugin)
.appendTo(th_list)
}
};
// Paginate
// Let's do this once we have 100 themes, dude
//$("div.holder").jPages({ containerID : "itemContainer", perPage: 30 });
hash_handler();
}
var supported = get_supported_and_eat_meta();
// DEFAULT VERSION SET HERE
var current_version = 7;
fetch(current_version);
function hash_handler() {
if (location.hash) {
theme = location.hash.slice(1);
}
else {
theme = 'bootstrap3';
}
// Show theme data
container = $('#rightside');
container.html('');
var title = $('<h2/>').text(theme).appendTo(container);
var small = $('<small/>').appendTo(title)
if (data[theme]['bootswatch']) {
$('<span/>').html(' | Supports <a href="https://bootswatch.com">Bootswatch</a>').appendTo(small)
}
if (data[theme]['engine'] == 'mako') {
$('<span/>').html(' | Uses <a href="https://www.makotemplates.org/">Mako</a>').appendTo(small)
} else {
$('<span/>').html(' | Uses <a href="https://jinja.pocoo.org/docs/">Jinja2</a>').appendTo(small)
}
$('<span/>').html(' | <a href="v'+current_version+'/'+theme+'/index.html">See demo</a>').appendTo(small)
thumb = $('<div/>').appendTo(container)
full_image_link = $('<a/>').attr('href', 'v'+current_version+'/'+theme+'.jpg').appendTo(thumb)
$('<img/>').attr('src', 'v'+current_version+'/'+theme+'.jpg').attr('style', 'width:500px; margin: 10px auto 10px auto; display: block;')
.addClass('img-thumbnail').appendTo(full_image_link)
$('<div/>').addClass('well well-sm').html('To install, use <code>nikola install_theme '+theme+'</code></span>').appendTo(container)
$('<div/>').html(writer.renderBlock(reader.parse(data[theme]['readme']))).appendTo(container)
if (data[theme]['confpy'] != null) {
$('<h3/>').html('Suggested Configuration:').appendTo(container)
$('<div/>').html(data[theme]['confpy']).appendTo(container)
}
// DISQUS comments. This code is a mess.
// MAKE SURE TO :set tw=93409564302956 before editing
$('<div/>').html('<div id="disqus_thread"></div><sc' + 'ript type="text/javascript"> var disqus_shortname = "nikolathemes"; var disqus_identifier = "THEME_'+theme+'"; var disqus_title = "Nikola Theme: " +theme; var disqus_url = "https://themes.getnikola.com/go/" + theme; (function() { var dsq = document.createElement("script"); dsq.type = "text/javascript"; dsq.async = true; dsq.src = "//" + disqus_shortname + ".disqus.com/embed.js"; (document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0]).appendChild(dsq); })(); </s'+'cript><noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript><a href="https://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>').appendTo(container)
// Mark theme as active and paginate to it
var listItems = $("#itemContainer a");
listItems.each(function(idx, item) {
console.log(item.id , 'li-'+theme)
if (item.id == 'li-'+theme) {
$('#li-'+theme).addClass('active');
// var page = parseInt(idx/30)+1;
// $("div.holder").jPages(page);
document.title = theme + ' — Themes for Nikola';
} else {
$('#'+item.id).removeClass('active');
}
});
// Theme inheritance chain, need to find a good place for it...
var crumbbar = $('<ul/>')
.addClass('breadcrumb')
.attr('style', 'margin-top:8px;')
.appendTo(container)
for (idx in data[theme]['chain']) {
parent = data[theme]['chain'][idx]
crumb = $('<li/>').appendTo(crumbbar);
$('<a/>').attr('href', '#'+parent).text(parent).appendTo(crumb)
}
};
$(window).on('hashchange', hash_handler);
var sc_project=9276307;
var sc_invisible=1;
var sc_security="5f7346a9";
var scJsHost = (("https:" == document.location.protocol) ?
"https://secure." : "https://www.");
document.write("<sc"+"ript type='text/javascript' src='" +
scJsHost+
"statcounter.com/counter/counter.js'></"+"script>");
</script>
<noscript><div class="statcounter"><a title="web statistics"
href="https://statcounter.com/" target="_blank"><img
class="statcounter"
src="https://c.statcounter.com/9276307/0/5f7346a9/1/"
alt="web statistics"></a></div></noscript>
</body>
</html>