Summary Files Commits Branches @commit @diff @stats
path: root / awk-edits
diff options
context:
space:
mode:
Commit7c77caa3f219e3141213704d02af564e3279aeb3 (patch)
Author
 Syndamia <kamen@syndamia.com>
2023-11-04 15:11:19 +0200
Committer
 Syndamia <kamen@syndamia.com>
2023-11-04 15:11:19 +0200
Files457a29b5e8369af569d7c87695b9367c159eec5a /awk-edits
syndamia.com-7c77caa3f219e3141213704d02af564e3279aeb3.tar
syndamia.com-7c77caa3f219e3141213704d02af564e3279aeb3.tar.gz
syndamia.com-7c77caa3f219e3141213704d02af564e3279aeb3.zip
Parent3c107ad55afe66513320d6672299cee303586a42 (diff)
[Icons] Moved Flags.awk into Icons.awk and added &&question and &&warn ftags with Mint-Y icons
3 files changed, 27 insertions, 27 deletions
-rw-r--r--awk-edits/Flags.awk27
-rw-r--r--awk-edits/Icons.awk27
-rw-r--r--awk-edits/empty0
diff --git a/awk-edits/Flags.awk b/awk-edits/Flags.awk
deleted file mode 100644
index aad1343..0000000
--- a/awk-edits/Flags.awk
+++ /dev/null
@@ -1,27 +0,0 @@
-# .*html
-#
-# == About ==
-#
-# A collection of ftags that generate an image HTML tag, containing the specified
-# flag. This is done, because these tags need to have specific classes, which is
-# supported in Markdown, but is less flexible and more tedious.
-
-# == ftags ==
-#
-# &&gb Great Britain flag
-# &&bg Bulgarian flag
-#
-# -- Placement/Flow --
-#
-# They can reside absolutely anywhere in text.
-
-function flagSub(name, alt) {
- gsub("&#38;&#38;" name, "<img src=\"/img/" name ".svg\" class=\"flag unzoomable svg\" alt=\"" name "\" height=18>")
-}
-
-/&#38;&#38;gb/ {
- flagSub("gb", "ENG")
-}
-/&#38;&#38;bg/ {
- flagSub("bg", "BGN")
-}
diff --git a/awk-edits/Icons.awk b/awk-edits/Icons.awk
new file mode 100644
index 0000000..4b3abf7
--- /dev/null
+++ b/awk-edits/Icons.awk
@@ -0,0 +1,27 @@
+# .*html
+#
+# == About ==
+#
+# A collection of ftags that generate an image HTML tag, containing the specified
+# thing. This is done, because these tags need to have specific classes, which is
+# supported in Markdown, but is less flexible and more tedious.
+#
+# -- Placement/Flow --
+#
+# They can reside absolutely anywhere in text.
+
+function flagSub(name, alt) {
+ gsub("&#38;&#38;" name,
+ "<img src=\"/img/" name ".svg\" class=\"flag unzoomable svg\" alt=\"" name "\" height=18>")
+}
+
+/&#38;&#38;gb/ { flagSub("gb", "ENG") }
+/&#38;&#38;bg/ { flagSub("bg", "BGN") }
+
+function articleIconSub(name, filename) {
+ gsub("&#38;&#38;" name,
+ "<img src=\"/img/" filename "\" class=\"article-icons unzoomable\" alt=\"" name "\">")
+}
+
+/&#38;&#38;warn/ { articleIconSub("warn", "dialog-warning.png") }
+/&#38;&#38;question/ { articleIconSub("question", "dialog-question.png") }
diff --git a/awk-edits/empty b/awk-edits/empty
deleted file mode 100644
index e69de29..0000000
--- a/awk-edits/empty
+++ /dev/null