Summary Files Commits Branches @commit @diff @stats
path: root / awk-edits / MEL-Iconified.awk
diff options
context:
space:
mode:
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", "")
+ melFiletypeTag("ft-text", "")
+ melFiletypeTag("ft-zip", "")
+ melFiletypeTag("ft-movie", "")
+ melFiletypeTag("ft-markdown", "")
+ melFiletypeTag("ft-browser", "")
+}
+
+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>"
+}