Merge pull request #2653 from thelounge/xpaw/motd
Use monospace font for MOTD, set an icon, fix new line trimming
This commit is contained in:
commit
91dcb7564b
@ -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,
|
||||
|
@ -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));
|
||||
|
@ -158,6 +158,7 @@
|
||||
color: #b7c5d1;
|
||||
}
|
||||
|
||||
#chat .msg.motd .text,
|
||||
code,
|
||||
.irc-monospace {
|
||||
background: #28333d;
|
||||
|
Loading…
Reference in New Issue
Block a user