-
Notifications
You must be signed in to change notification settings - Fork 559
/
garden.jade
95 lines (76 loc) · 2.8 KB
/
garden.jade
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
doctype html
html(lang=language)
head
title #{title}
meta(charset='utf-8')
meta(name='description', content=description)
meta(name='viewport', content='width=device-width, initial-scale=1')
link(rel='shortcut icon' href='/' + pathPrefix + 'favicon.ico?v=2')
- if (language === baseLanguage)
link(rel='stylesheet', href='style/garden.css', media='all')
link(rel='stylesheet', href='style/print.css', media='print')
- else
link(rel='stylesheet', href='../style/garden.css', media='all')
link(rel='stylesheet', href='../style/print.css', media='print')
<!--[if lt IE 9]>
<script src="javascript/html5.js"></script>
<![endif]-->
body
// Navigation
nav(id='nav_main')
div
ul
- each lang in languages
li(class=lang.id === language ? 'active' : '')
- if (lang.id === baseLanguage)
a(href= '/' + pathPrefix, title=lang.title) #{lang.id}
- else
a(href= '/' + pathPrefix + lang.id, title=lang.title) #{lang.id}
a(id='top', href='#intro', title='Back to top') #top
a(id='hide_menu', class='tablet') Hide Menu
ul
- each section in navigation
li(class='nav_' + section.link.replace(/\./g, '_'))
h1
a(href='#' + section.link) #{section.title}
ul
- if (section.articles.length > 0 && !section.isIntro)
- each article in section.articles
li
a(href='#' + article.link)!=article.title
// Mobile navigation
nav(id='nav_mobile')
a(id='nav_prev_section', href='#') prev section
span(class='nav_section_name') section name
a(id='nav_next_section', href='#') next section
span(class='nav_section_name') section name
a(id='show_menu') show menu
// Sections
- each section in sections
section(id=section.link)
// Introduction
header(id=section.link + '.intro')
h1 #{section.title}
- if (section.index)
div!=section.index.text
// Articles
- each article in section.articles
article(id=article.link)
h2!=article.title
- each sub in article.subs
div!=sub
// Footer
footer
p Copyright ©. Built with
|
a(href='http://nodejs.org/') Node.js
| using a
a(href='https://github.com/visionmedia/jade/') jade
| template.
script(src='//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js')
- if (language === baseLanguage)
script(src='javascript/prettify.js')
script(src='javascript/garden.js')
- else
script(src='../javascript/prettify.js')
script(src='../javascript/garden.js')