diff --git a/client/css/style.css b/client/css/style.css index e65cc1ae..ba45183e 100644 --- a/client/css/style.css +++ b/client/css/style.css @@ -109,6 +109,7 @@ button { code, pre, +#chat .msg.motd .text, .irc-monospace, textarea#user-specified-css-input { font-family: Consolas, Menlo, Monaco, "Lucida Console", "DejaVu Sans Mono", "Courier New", monospace; @@ -248,6 +249,7 @@ kbd { #chat .quit .from::before, #chat .topic .from::before, #chat .mode .from::before, +#chat .motd .from::before, #chat .ctcp .from::before, #chat .ctcp_request .from::before, #chat .whois .from::before, @@ -365,6 +367,10 @@ kbd { color: #2ecc40; } +#chat .motd .from::before { + content: "\f02e"; /* https://fontawesome.com/icons/bookmark?style=solid */ +} + #chat .ctcp .from::before, #chat .ctcp_request .from::before { content: "\f15c"; /* https://fontawesome.com/icons/file-alt?style=solid */ @@ -1335,6 +1341,13 @@ background on hover (unless active) */ display: none !important; } +#chat .msg.motd .text { + background: #f6f6f6; + display: inline-block; + border-radius: 4px; + padding: 6px; +} + #chat .condensed .content, #chat .away .content, #chat .back .content, diff --git a/client/js/render.js b/client/js/render.js index 3fd6cec6..ddde4400 100644 --- a/client/js/render.js +++ b/client/js/render.js @@ -112,7 +112,10 @@ function buildChatMessage(msg) { } // Remove empty lines around the MOTD (but not within it) - msg.text = lines.join("\n").trim(); + msg.text = lines + .map((line) => line.trimEnd()) + .join("\n") + .replace(/^[\r\n]+|[\r\n]+$/g, ""); } const renderedMessage = $(templates[template](msg)); diff --git a/client/themes/morning.css b/client/themes/morning.css index 0ce68f90..2cdf150f 100644 --- a/client/themes/morning.css +++ b/client/themes/morning.css @@ -158,6 +158,7 @@ color: #b7c5d1; } +#chat .msg.motd .text, code, .irc-monospace { background: #28333d;