Summary Files Commits Branches @commit @diff @stats
path: root / ext
diff options
context:
space:
mode:
Commit6f20ac5169469d42f5c945e3de01b297dc028c02 (patch)
Author
 Syndamia <kamen@syndamia.com>
2025-08-18 18:59:54 +0300
Committer
 Syndamia <kamen@syndamia.com>
2025-08-18 18:59:54 +0300
Files2f01258358e52704dc236c8bc45d212fd90d472b /ext
syndamia.com-6f20ac5169469d42f5c945e3de01b297dc028c02.tar
syndamia.com-6f20ac5169469d42f5c945e3de01b297dc028c02.tar.gz
syndamia.com-6f20ac5169469d42f5c945e3de01b297dc028c02.zip
Parentfa067f8ad565207969bb0471d13dd0b51fe989c4 (diff)
chore: Move file locations around, so they make more sense
1 files changed, 101 insertions, 0 deletions
-rw-r--r--ext/global.du101
diff --git a/ext/global.du b/ext/global.du
new file mode 100644
index 0000000..1e31ec6
--- /dev/null
+++ b/ext/global.du
@@ -0,0 +1,101 @@
+'stop_output
+
+# Attention blocks
+
+'define new_attention 'define_block [$name] <p class="special-par [$name]-par"><img src="/img/[$image]" class="special-par-icon borderless unzoomable" alt="[$name]"> </p>
+
+ '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 &#xeb0a;
+ [$new_ft]
+
+ 'define name text
+ 'define char &#xeaa2;
+ [$new_ft]
+
+ 'define name zip
+ 'define char &#xed4e;
+ [$new_ft]
+
+ 'define name movie
+ 'define char &#xeafa;
+ [$new_ft]
+
+ 'define name markdown
+ 'define char &#xec41;
+ [$new_ft]
+
+ 'define name browser
+ 'define char &#xebb7;
+ [$new_ft]
+
+# Pagination
+
+'define pagination_start `[[$next_link] >]`
+'define pagination_second `[< [$prev_link]]` || `[[$next_link] >]`
+'define pagination_middle `[[url [$start_url] <<]]` || `[< [$prev_link]]` || `[[$next_link] >]`
+'define pagination_end `[[url [$start_url] <<]]` || `[< [$prev_link]]`
+
+# Teaching
+
+'define_block solution-link <div class="exercise-solution">&lt; &gt;</div>
+
+# Other
+
+'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>