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..5e053093 100644 --- a/web/ui.js +++ b/web/ui.js @@ -63,6 +63,10 @@ function replaceBbCode(msg) { .replace(/\[\/i\]/g, '') .replace(/\u2022([\s\S]*)/, '') .replace(/\u2022([^\u2022]*)/g, '
  • $1
  • ') + .replace(/\[icon\=(.*?)\](.*?)\[\/icon\]/g, '$2') //trying to include syntax for in-line images + .replace(/\[texticon\=(.*?)\](.*?)\[\/icon\]/g, '$2') //trying to include syntax for nightmode in-line images + .replace(/\[p\]/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) {