Summary Files Commits Branches @commit @diff @stats
path: root / ext
diff options
context:
space:
mode:
Commit6b8cae12cb5d60b37931332d9d8008649ae14566 (patch)
Author
 Syndamia <kamen@syndamia.com>
2026-09-12 11:31:19 +0300
Committer
 Syndamia <kamen@syndamia.com>
2026-09-12 13:54:29 +0300
Files9ff20cdba71fff44e7b23b43e46a75276df6d7f1 /ext
syndamia.com-6b8cae12cb5d60b37931332d9d8008649ae14566.tar
syndamia.com-6b8cae12cb5d60b37931332d9d8008649ae14566.tar.gz
syndamia.com-6b8cae12cb5d60b37931332d9d8008649ae14566.zip
Parent918bac7614e560678d51bfba2a25582a3284bdd9 (diff)
feat!: Update dunbar markup
Currently the newest version of the markup is not on the main branch, mostly because of polish and the documentation. As an effect from the changes to the language, the sitemap is the only thing which needs to be created externally.
4 files changed, 0 insertions, 247 deletions
-rw-r--r--ext/global.du104
-rw-r--r--ext/highlight.awk35
-rw-r--r--ext/pagenav.awk34
-rw-r--r--ext/presentation.awk74
diff --git a/ext/global.du b/ext/global.du
deleted file mode 100644
index bde5278..0000000
--- a/ext/global.du
+++ /dev/null
@@ -1,104 +0,0 @@
-'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 &#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 [`[url [$next_link] &gt;]`]
-'define pagination_second [`[url [$prev_link] &lt;]`] || [`[url [$next_link] &gt;]`]
-'define pagination_middle [`[url [$start_link] &lt;&lt;]`] || [`[url [$prev_link] &lt;]`] || [`[url [$next_link] &gt;]`]
-'define pagination_end [`[url [$start_link] &lt;&lt;]`] || [`[url [$prev_link] &lt;]`]
-
-# Teaching
-
-'define_block solution-link <div class="exercise-solution">&lt; &gt;</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>
diff --git a/ext/highlight.awk b/ext/highlight.awk
deleted file mode 100644
index a1f15fa..0000000
--- a/ext/highlight.awk
+++ /dev/null
@@ -1,35 +0,0 @@
-BEGIN {
- highlight_cmd = ENVIRON["HIGHLIGHT"] " -O html -f -S " # expected language name in the end!
- highlight_out = "/tmp/__fragment"
- highlight_langs = "awk,bat,bison,y,bash,sh,zsh,yacc,c,cpp,h,hpp,csharp,cs,css," \
- "diff,patch,dockerfile,email,go,haskell,hs,html,htm,xhtml," \
- "httpd,ini,cfg,desktop,java,gradle,javascript,js,json,kotlin," \
- "lisp,cl,clisp,sbcl,lua,makefile,mk,markdown,md,meson,mssql," \
- "nix,perl,pl,php,python,py,qmake,rust,rs,s,sql,svg,tex,toml,xml,yaml"
-}
-
-ENVIRON["HIGHLIGHT"] && language && blocks_names[blocks_opened] == "CODE" {
- hl_lang = tolower(language)
- if (hl_lang == "yacc") hl_lang = "y"
- if (hl_lang == "latex") hl_lang = "tex"
-
- transcludes_file = toupper($1) == "'INCLUDE" || toupper($1) == "'SNIPPET"
-
- if (highlight_langs ~ hl_lang && (transcludes_file || !/^[ \t]*'/)) {
- __tmp = FILE_EXTENSION
- FILE_EXTENSION = ""
-
- if (transcludes_file)
- process_command(toupper(substr($1, 2)))
-
- highlight = highlight_cmd hl_lang " > " highlight_out
-
- print | highlight
- close(highlight)
-
- $0 = getfile(highlight_out)
- gsub(/\\/, "\\\\")
-
- FILE_EXTENSION = __tmp
- }
-}
diff --git a/ext/pagenav.awk b/ext/pagenav.awk
deleted file mode 100644
index 0f2a297..0000000
--- a/ext/pagenav.awk
+++ /dev/null
@@ -1,34 +0,0 @@
-FNR == 1 {
- STD_FILENAME = FILENAME
- sub(/^\.\/website\//, "", STD_FILENAME)
-
- substitutions["dbarsep"] = "&ensp;||&ensp;"
-
- # Stats element
- stats = \
-" <div id=\"pagenav-stats\">" ORS \
-" <strong>Reading: [$expected-reading]</strong> " substitutions["dbarsep"] " <strong>Created: [$created]</strong> " substitutions["dbarsep"] " <strong>Edited: [$edited]</strong>" ORS \
-" " substitutions["dbarsep"] " <a href=\"https://gitlab.com/Syndamia/syndamiadotcom/-/blob/master/src/" STD_FILENAME "\"><strong>GitLab source</strong></a>" ORS \
-" </div>"
-
- # Breadcrumbs element
- match(FILEDIR, /(blog|slides|teaching|misc)/)
- foldersLen = split(substr(FILEDIR, RSTART), folders, "/")
-
- href = ".."
- breadcrumb = " &raquo; <em>" folders[foldersLen] "</em>"
- for (i = foldersLen-1; i > 0; i--) {
- breadcrumb = " &raquo; " "<a href=\"" href "\">" folders[i] "</a>" breadcrumb
- href = "../" href
- }
- breadcrumb = \
-" <div id=\"pagenav-breadcrumb\">" ORS \
-" " breadcrumb ORS \
-" </div>"
-
- substitutions["pagenav"] = \
-".text <div id=\"pagenav\">" ORS \
- stats ORS \
- breadcrumb ORS \
-"</div>"
-}
diff --git a/ext/presentation.awk b/ext/presentation.awk
deleted file mode 100644
index ee8a2ea..0000000
--- a/ext/presentation.awk
+++ /dev/null
@@ -1,74 +0,0 @@
-BEGIN {
- fontSizes[1] = "18"
- fontSizes[2] = "20"
- fontSizes[3] = "22"
- fontSizes[4] = "25"
- fontSizes[5] = "27"
- fontSizes[6] = "35"
-
- # Certain tags can exist without explicitly defining the font size
- # while others cannot
- # fontSizes[0] is used for simpler code for the tags which don't
- # require font size
- fontSizes[0] = ""
-
- for (ind in fontSizes) {
- if (ind > 0) {
- define_div("font" fontSizes[ind])
- fontClass = " font" fontSizes[ind]
- }
- else {
- fontClass = ""
- }
-
- define_div("centered" fontSizes[ind], "centered" fontClass)
-
- define("slide" fontSizes[ind], "<div id=\"slide-[?autoincrement?]\" class=\"slide" fontClass "\">", "</div>")
- define("middle_slide" fontSizes[ind], "<div id=\"slide-[?autoincrement?]\" class=\"slide centered-slide" fontClass "\"><div></div><div>", "</div><div></div></div>")
- define("title_slide" fontSizes[ind], "<div id=\"slide-[?autoincrement?]\" class=\"slide centered-slide centered" fontClass "\"><div></div><div>", "</div><div></div></div>")
- }
-
-
- substitutions["presentation-controller"] = ".text" ORS \
-"<nav id=\"presentCont\">" ORS \
-" <span id=\"prevSlideBtn\" class=\"btn nodisplay\">&#x2190;</span>" ORS \
-" <a id=\"slideIndex\" class=\"nodisplay\" href=\"#slide-0\">0</a>" ORS \
-" <span id=\"nextSlideBtn\" class=\"btn nodisplay\">&#x2192;</span>" ORS \
-" <span id=\"incrementationBtn\" class=\"btn nodisplay\">&#x22EE;</span>" ORS \
-" <span id=\"articleBtn\" class=\"btn setting-btn\">As article &#x2632;</span>" ORS \
-" <span id=\"presentBtn\" class=\"btn setting-btn\">Present &#x239A;</span>" ORS \
-" <span id=\"printBtn\" class=\"btn setting-btn\">Print &#x2399;</span>" ORS \
-"</nav><br><br>" ORS \
-"<script type=\"text/javascript\" src=\"/scripts/presentation.js\" crossorigin=\"anonymous\"></script>"
-
- define("row", "<div class=\"layout-table\"><div class=\"layout-row\">", "</div></div>")
- define("sqrow", "<div class=\"layout-table fixed-layout\"><div class=\"layout-row\">", "</div></div>")
- substitutions["newrow"] = ".text </div><div class=\"layout-row\">"
-
- #
- # Generated tags
- #
-
- for (i = 1; i <= 9; i++) {
- substitutions["br" i] = ".text <div class=\"br" i "\"></div>"
- }
- for (i = 5; i <= 95; i++) {
- define_div("width" i "%", "width" i "per")
- }
-
- #
- # Ordinary
- #
-
- define_div("fright", "float-right")
- define_div("column")
-}
-
-function define_div(name, class) {
- if (!class) class = name
- define(name, "<div class=\"" class "\">", "</div>")
-}
-
-FNR == 1 {
- autoincrement = 0
-}