blob: 9ce656619b803e7bfc2dd85e5cc294e75526c71c (
plain) (
blame)
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
|
extends layout.pug
block prepend js
script(src='/assets/js/jquery.slim.min.js')
script(src='/assets/js/transition.min.js')
script(src='/assets/js/collapse.min.js')
block content
div.row
div.col-lg-3.col-md-4
ul.nav.nav-pills.nav-stacked
block menu
mixin menu(...items)
-
function pad_zero (n) {
return n < 10 ? '0' + n : n;
}
function item_link (item) {
if (!('link' in item)) {
item.link = new String(item.name).toLowerCase().replace(/\W/g, '-').replace(/--+/g, '-');
if ('year' in item && 'month' in item && 'day' in item)
item.link = item.year + '-' + pad_zero(item.month) + '-' + pad_zero(item.day) + '-' + item.link;
}
return item.link;
}
function item_is_active (item) {
return item_link(item) == page;
}
each item in items
if 'menu' in item
- const active = item.menu.some(item_is_active)
li(role='presentation')
- const id = 'menu-' + item_link(item);
a(href='#' + id, data-toggle='collapse', role='button', aria-expanded=active.toString(), aria-controls=id)= item.name
div.collapse(id=id, class=active ? 'in' : '')
ul.nav.nav-pills.nav-stacked.col-xs-11.col-md-10.pull-right
+menu(...item.menu)
br(style='clear:both;')
else
- var link = item_link(item)
li(role='presentation', class=item_is_active(item) ? 'active' : '')
a(href=base_url + (link == '' ? '' : link + '.html'))= item.name
div.col-lg-9.col-md-8
ol.breadcrumb.hidden-xs.hidden-sm
mixin breadcrumb(link, title)
li
if typeof title != 'undefined'
a(href=link)= title
else
a(href=base_url + page + '.html')= link
block breadcrumbs
+breadcrumb('/', 'Home')
div.row.article
div.col-lg-12
h3
strong
block subtitle
block subtitleExtra
small
|  by
block subtitleAuthor
| Camil Staps
| ,
block subtitleDate
article.col-lg-12.text-justify.markdown
block page
|