Summary Files Commits Branches @commit @diff @stats
path: root / awk-edits / MEL-Iconified.awk
diff options
context:
space:
mode:
Commit010597ad71b3bc48784cb9a13b3e0fc8dccc69cd (patch)
Author
 Kamen Mladenov <kamen@syndamia.com>
2024-10-06 07:59:36 +0000
Committer
 Kamen Mladenov <kamen@syndamia.com>
2024-10-06 07:59:36 +0000
Files784604f5818679987f940285077cd8e0460a6488 /awk-edits/MEL-Iconified.awk
syndamia.com-010597ad71b3bc48784cb9a13b3e0fc8dccc69cd.tar
syndamia.com-010597ad71b3bc48784cb9a13b3e0fc8dccc69cd.tar.gz
syndamia.com-010597ad71b3bc48784cb9a13b3e0fc8dccc69cd.zip
Parent6fe00c6ec76028fc055084a3398004fbbefac0be (diff)
Parentc027ddea2e1d6ed69a012edf47d3b39e25b6c9d5 (diff)
Merge branch 'master' into 'blog/black-hole-shader'
# Conflicts: # src/blog/index.md
1 files changed, 42 insertions, 0 deletions
-rw-r--r--awk-edits/MEL-Iconified.awk42
diff --git a/awk-edits/MEL-Iconified.awk b/awk-edits/MEL-Iconified.awk
new file mode 100644
index 0000000..332be46
--- /dev/null
+++ b/awk-edits/MEL-Iconified.awk
@@ -0,0 +1,42 @@
+# .*html
+
+BEGIN {
+ usesMEL()
+ #
+ # Flags
+ #
+
+ melFlagTag("gb", "ENG")
+ melFlagTag("bg", "BGN")
+
+ #
+ # Noteworthy paragraphs
+ #
+
+ melParTag("question", "dialog-question.png")
+ melParTag("warn", "dialog-warning.png")
+ melParTag("important", "dialog-important.png")
+
+ #
+ # File type
+ #
+
+ melFiletypeTag("ft-photo", "&#xeb0a;")
+ melFiletypeTag("ft-text", "&#xeaa2;")
+ melFiletypeTag("ft-zip", "&#xed4e;")
+ melFiletypeTag("ft-movie", "&#xeafa;")
+ melFiletypeTag("ft-markdown", "&#xec41;")
+ melFiletypeTag("ft-browser", "&#xebb7;")
+}
+
+function melFlagTag(name, alt) {
+ MEL[name, MELINSERT] = "<img src=\"/img/" name ".svg\" class=\"flag unzoomable svg\" alt=\"" name "\" height=18>"
+}
+
+function melParTag(name, image) {
+ MEL[name, MELPARAGRAPH] = "class=\"special-par " name "-par\"><img src=\"/img/" image "\" class=\"special-par-icon borderless unzoomable\" alt=\"" name "\">"
+}
+
+function melFiletypeTag(name, repl) {
+ MEL[name, MELINSERT] = "<span class=\"file-type-icon\">" repl "</span>"
+}