blob: bde52787ac5877eef91f0001d7741cc9aaae8cf1 (
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
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
|
'stop_output
# Attention blocks
'define_block note <div class="special-par note-par"><div class="special-contents"> </div></div>
'define new_attention 'define_block [$name] <div class="special-par [$name]-par"><div class="special-contents special-with-icon"><img src="/img/[$image]" class="special-par-icon borderless unzoomable" alt="[$name]"> </div></div>
'define name question
'define image dialog-question.png
[$new_attention]
'define name warn
'define image dialog-warning.png
[$new_attention]
'define name important
'define image dialog-important.png
[$new_attention]
# Headers
For each header (except H1) we'll add a "gap" element and an anchor link to the end.
The gap is only for visual purposes.
'define new_header 'define_block header[$num] <div class="[$gap]"></div> <h[$num] id="[?header?]"> </h[$num]>\ <a\ class="h-anchor"\ href="#[?header?]"\ aria-hidden="true">#</a>
'define num 2
'define gap gap
[$new_header]
'define num 3
'define gap gap-small
[$new_header]
'define num 4
'define gap gap-small
[$new_header]
'define num 5
'define gap gap-small
[$new_header]
'define num 6
'define gap gap-small
[$new_header]
# Country flags
'define new_flag 'define [$flag] <img src="/img/[$flag].svg" class="flag unzoomable svg" alt="[$alt]" height=18>
'define flag gb
'define alt ENG
[$new_flag]
'define flag bg
'define alt BGN
[$new_flag]
# File types
'define new_ft 'define ft-[$name] <span class="file-type-icon">[$char]</span>
'define name photo
'define char 
[$new_ft]
'define name text
'define char 
[$new_ft]
'define name zip
'define char 
[$new_ft]
'define name movie
'define char 
[$new_ft]
'define name markdown
'define char 
[$new_ft]
'define name browser
'define char 
[$new_ft]
# Pagination
'define pagination_start [`[url [$next_link] >]`]
'define pagination_second [`[url [$prev_link] <]`] || [`[url [$next_link] >]`]
'define pagination_middle [`[url [$start_link] <<]`] || [`[url [$prev_link] <]`] || [`[url [$next_link] >]`]
'define pagination_end [`[url [$start_link] <<]`] || [`[url [$prev_link] <]`]
# Teaching
'define_block solution-link <div class="exercise-solution">< ></div>
# Other
'define line <hr>
'define due_for_rework [url /rework.html [=[*Due for rework*]=]]
'define_block contents <div id="contents-container"><h2 id="contents">Contents</h2> <a class="h-anchor" href="#contents" aria-hidden="true">#</a> </div>
|