Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit82d49ec07ee13b5c4726a29a6267b9ee83891b4d (patch)
Author
 Syndamia <kamen@syndamia.com>
2024-02-25 14:39:24 +0200
Committer
 Syndamia <kamen@syndamia.com>
2024-02-25 14:39:24 +0200
Files8a327c79f48d1c421feb615f7c75f4ae6b96eced
syndamia.com-82d49ec07ee13b5c4726a29a6267b9ee83891b4d.tar
syndamia.com-82d49ec07ee13b5c4726a29a6267b9ee83891b4d.tar.gz
syndamia.com-82d49ec07ee13b5c4726a29a6267b9ee83891b4d.zip
Parentab29c6dfd0c640b831e94d56cd3718d4db0dfd0c (diff)
(awk-edits) Ported File-type.awk to MEL
1 files changed, 15 insertions, 0 deletions
-rw-r--r--awk-edits/MEL-Iconified.awk15
diff --git a/awk-edits/MEL-Iconified.awk b/awk-edits/MEL-Iconified.awk
index bbe353d..332be46 100644
--- a/awk-edits/MEL-Iconified.awk
+++ b/awk-edits/MEL-Iconified.awk
@@ -16,6 +16,17 @@ BEGIN {
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) {
@@ -25,3 +36,7 @@ function melFlagTag(name, alt) {
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>"
+}