forked from randomchars42/pico-uncluttered
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.twig
79 lines (72 loc) · 2.4 KB
/
index.twig
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="author" content="{{ meta.author }}">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="robots" content="noindex" />
{% if meta.description %}
<meta name="description" content="{{ meta.description|striptags }}">
{% endif %}
<title>{% if meta.title %}{{ meta.title }} | {% endif %}{{ site_title }}</title>
<link rel="stylesheet" href="{{ theme_url }}/styles/main.css" type="text/css" />
<link rel="stylesheet" href="{{ theme_url }}/styles/highlightjs-github.css" type="text/css" />
</head>
<body>
<header role="banner">
{{ site_title }}
</header>
<nav role="navigation">
<ul>
<li>
<a href="{{ base_url }}">Start</a>
{% set crumbs = breadcrumbs(current_page.id) %}
{% set currentpath = current_page.id|split('/') %}
{% for foldername, folder in crumbs %}
<ul>
<li>
<a href="{{ base_url }}?{{ folder }}">{{ foldername }}</a>
{% endfor %}
<ul>
{% for page in pages if page.title %}
{% set pagepath = page.id|split('/') %}
{% if pagepath|last != 'index' or pagepath|length != currentpath|length %}
<li class="{% if page.id == current_page.id %}active{% endif %}">
<a href="{{ page.url }}" data-shortcut="{{page.meta.shortcut}}">
{{ page.title }}
{% if page.meta.shortcut %}
<span class="shortcut">{{page.meta.shortcut|replace({'+':' '})}}</a>
{% endif %}
</a>
</li>
{% endif %}
{% endfor %}
</ul>
{% for folder in crumbs %}
</li>
</ul>
{% endfor %}
</li>
</nav>
<main role="main">
<article>
{{ content }}
</article>
</main>
<footer role="content-info">
<a href="{{ base_url }}?about">About</a> | Running on <a href="http://picocms.org">Pico CMS</a>. Theme: <a href="https://github.com/randomchars42/pico-uncluttered">"uncluttered"</a> by <a href="https://github.com/randomchars42">randomchars42</a>
</footer>
<script src="{{ theme_url }}/scripts/highlight.js"></script>
<script src="{{ theme_url }}/scripts/mousetrap.min.js"></script>
<script>
hljs.initHighlightingOnLoad();
document.querySelectorAll('nav[role=navigation] a').forEach(function(el) {
if (el.getAttribute('data-shortcut').length > 0) {
Mousetrap.bind(el.getAttribute('data-shortcut'), function() {
location.assign(el.getAttribute('href'));
});
}
});
</script>
</body>
</html>