Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit0afd8149fbdd381e671ac55d042a8326d034821a (patch)
Author
 Syndamia <kamen@syndamia.com>
2023-11-09 10:24:29 +0200
Committer
 Syndamia <kamen@syndamia.com>
2023-11-09 10:24:29 +0200
Files2d65d3f795c06a69e0e2bde0f178cfd18a9e4f46
syndamia.com-0afd8149fbdd381e671ac55d042a8326d034821a.tar
syndamia.com-0afd8149fbdd381e671ac55d042a8326d034821a.tar.gz
syndamia.com-0afd8149fbdd381e671ac55d042a8326d034821a.zip
Parented43fac2e61a30f567ca8519e791f2984335511f (diff)
[Icons] warn and question icons now have special formatting to make the "float" to the left
Also added border for warn
2 files changed, 16 insertions, 2 deletions
-rw-r--r--awk-edits/Icons.awk4
-rw-r--r--src/styles.css14
diff --git a/awk-edits/Icons.awk b/awk-edits/Icons.awk
index 4b3abf7..268efa2 100644
--- a/awk-edits/Icons.awk
+++ b/awk-edits/Icons.awk
@@ -19,8 +19,10 @@ function flagSub(name, alt) {
/&#38;&#38;bg/ { flagSub("bg", "BGN") }
function articleIconSub(name, filename) {
+ sub("p>&#38;&#38;" name,
+ "p class=\"special-par " name "-par\">\\&#38;\\&#38;" name)
gsub("&#38;&#38;" name,
- "<img src=\"/img/" filename "\" class=\"article-icons unzoomable\" alt=\"" name "\">")
+ "<img src=\"/img/" filename "\" class=\"special-par-icon borderless unzoomable\" alt=\"" name "\">")
}
/&#38;&#38;warn/ { articleIconSub("warn", "dialog-warning.png") }
diff --git a/src/styles.css b/src/styles.css
index 2207ac9..b66ec69 100644
--- a/src/styles.css
+++ b/src/styles.css
@@ -145,7 +145,19 @@ img {
.file-type-icon { min-width: 1.3em; vertical-align: middle; }
.borderless, .oldschool-badge, .file-type-icon { border: none; }
- .article-icons { border: none; margin-bottom: 0.25em; vertical-align: middle; }
+ .special-par {
+ margin-bottom: 0.25em;
+ position: relative;
+ padding: 0.5em;
+ padding-left: calc(32px + 1em);
+ }
+ .warn-par { border: 1px dashed #fac848; }
+ .special-par-icon { vertical-align: middle; }
+ .special-par > .special-par-icon {
+ position: absolute;
+ left: 0.5em;
+ top: calc(50% - 16px);
+ }
.btn, .h-anchor {
/* Thanks https://stackoverflow.com/a/4407335/12036073 */