From 22777df736870d5f1aa5dab81bc0170440f9c0b8 Mon Sep 17 00:00:00 2001 From: Szaal <41909804+Szaal@users.noreply.github.com> Date: Thu, 31 Oct 2019 05:12:41 +0700 Subject: [PATCH 1/2] Added changes to accommodate [icon] syntax --- web/style.css | 16 ++++++++++++++++ web/ui.js | 2 ++ 2 files changed, 18 insertions(+) diff --git a/web/style.css b/web/style.css index 9d87284a..eb983e8b 100644 --- a/web/style.css +++ b/web/style.css @@ -473,3 +473,19 @@ body.whitemode .next:hover { } } + +/*class icon for in-line images*/ +.icon { + height: 1.2em; + /*width: 1.2em; /*remove to accept unconventional rectangle icon?*/ + margin: -0.2em 0; + vertical-align: middle + /*This is a tweaked version of height/margin for near-perfect fitting of Font Awesome's placement and size. + height: 1em; margin: -0.06em 0 0.21em 0;*/ +} + +/*Icon Nightmode*/ +body.nightmode .nighticon { + -webkit-filter: invert(100%); + filter: invert(100%); +} \ No newline at end of file diff --git a/web/ui.js b/web/ui.js index cc9f0928..20576438 100644 --- a/web/ui.js +++ b/web/ui.js @@ -63,6 +63,8 @@ function replaceBbCode(msg) { .replace(/\[\/i\]/g, '') .replace(/\u2022([\s\S]*)/, '
In addition to the [icon] syntax, there's [p] syntax for html's
. Used mainly for the purpose of paragraph block inside a variable: *set var "[p]This is a paragraph[/p] [p]without the bigass n/ linebreaks[/p]". --- web/ui.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/ui.js b/web/ui.js index 20576438..5e053093 100644 --- a/web/ui.js +++ b/web/ui.js @@ -65,6 +65,8 @@ function replaceBbCode(msg) { .replace(/\u2022([^\u2022]*)/g, '
') //EXPERIMENTAL PARAGRAPH. For the purpose of inserting it into a text variable: ${[p]Standalone paragraph[/p] [n/][n/]Without the big linebreaks} + .replace(/\[\/p\]/g, '
') //SAME AS ABOVE } function println(msg, parent) {