chore: cleanup

This commit is contained in:
Gigi
2022-04-26 00:43:17 +02:00
parent 7724550f7e
commit 213c3693eb
2 changed files with 0 additions and 132 deletions

View File

@@ -1,119 +0,0 @@
---
class: docs
layout: default
toc: true
styles: ['/js/highlight/styles/github.css']
---
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/highlight/highlight.pack.js"></script>
<div class="alert">
Writing documentation (and keeping it up to date) is a lot of work. <b>You can help</b> improving it by <a href="https://github.com/kartograph/kartograph.org/issues/new">submitting any bug</a> you encounter, or, even better, directly patching
<a href="https://github.com/kartograph/kartograph.org/blob/master{{ page.url | replace:'html','md' }}">this page on Github</a>. Thanks!
</div>
{{ content }}
<script type="text/javascript">
$(function() {
var toc = $('.toc');
var ul = $('<ul></ul>'),
parent = ul;
toc.append(ul);
$('.docs h2, .docs h3').each(function(i, el) {
var h = $(el),
t = h.text(),
id = t.toLowerCase().replace(/[\s\.\:]+/g, '-'),
li = $('<li><a href="#'+id+'">'+t+'</a></li>');
h.append('<a class="headerlink" id="'+id+'" href="#'+id+'">¶</a>');
if (el.nodeName.toLowerCase() == 'h2') {
// parent = $('<ul></ul>');
// li.append(parent);
$(el).data('id', id);
$(li).data('id', id);
ul.append(li);
} else {
// parent.append(li);
}
});
$('.docs p').each(function(i, el) {
el = $(el);
if (el.html().substr(0,7) == 'Source:') {
el.addClass('source');
}
});
if (location.hash[0] == '#' && $(location.hash)) {
$(location.hash).parent()[0].scrollIntoView();
}
var tocTop = $('.toc').offset().top, tocTimeout;
function moveTOC() {
if (window.innerWidth < 780) return;
var sy = $(document).scrollTop(),
top = sy > 1000 ? sy - tocTop + 30 : 0;
$('.toc').css({
position: 'relative',
top: top
});
}
function highlightSection() {
$('.toc li').removeClass('active');
var m = null, sy = $(document).scrollTop();
$('.content h2').each(function(i, el) {
if (Math.round($(el).offset().top) <= sy) m = $(el);
});
$('.toc li').each(function(i, el) {
if ($(el).data('id') == m.data('id')) {
$(el).addClass('active');
return false;
}
});
}
$(window).scroll(function() {
if (tocTimeout) clearTimeout(tocTimeout);
if ($(document).scrollTop() < 1000) {
$('.toc').css('top', 0);
} else {
tocTimeout = setTimeout(moveTOC, 3000);
}
highlightSection();
});
moveTOC();
highlightSection();
});
$('pre code').each(function(i, e) {
var code = $(e).html().trim(),
code2 = code.replace(/\s/g, ''),
last = code2.substr(code2.length-1, 1);
if (code.substr(0,1) == '"' && (last == '}' || last == ']')) {
e.className = 'json';
$(e).html('{'+code+'}');
hljs.highlightBlock(e);
var i = $(e).html()
$(e).html(i.substr(1, i.length-2));
return;
} else if (last == ';') {
e.className = 'javascript';
}
hljs.highlightBlock(e)
});
</script>

View File

@@ -1,13 +0,0 @@
---
layout: default
---
<ul class="thumbnails">
{% for item in page.showcase %}
<li class="span3">
<a href="/showcase/{{ item }}/" class="thumbnail">
<img src="/showcase/{{ item }}/t.png" alt="{{ item }}" />
</a>
</li>
{% endfor %}
</ul>