Compare commits

...

2 Commits

Author SHA1 Message Date
xfnw 83eaa7bca4 html: fix chat with multiline content 2024-04-11 08:45:50 -04:00
xfnw fc49252e79 html: fix formatting
not sure why rustfmt is ignoring specifically these lines...
2024-04-11 00:18:26 -04:00
2 changed files with 23 additions and 6 deletions

View File

@ -137,9 +137,15 @@ impl Traverser for Handler {
self.exp.push_str("../");
}
self.exp.push_str(format!(
r#"faces/{}.png"><span class=chat-nick aria-label="{1} says">&lt;{1}&gt;</span> "#,
slugify!(usr), HtmlEscape(usr.rsplit_once('/').map_or(usr, |u| u.0))
));
r#"faces/{}.png"><div class=chat-text><span class=chat-nick aria-label="{1} says">&lt;{1}&gt;</span> "#,
slugify!(usr), HtmlEscape(usr.rsplit_once('/').map_or(usr, |u| u.0))
));
self.output_block_children(block, ctx);
self.exp.push_str("</div></div>");
return ctx.skip();
}
}
}

View File

@ -35,11 +35,11 @@ code, kbd, pre, textarea {
color: #eee;
}
code, kbd, pre, .flex div, .box, .chat, textarea {
code, kbd, pre, .flex div, .box, .chat-text, textarea {
background: #222;
}
.box, .alert, .warning, .chat, .fixme, .FIXME {
.box, .alert, .warning, .fixme, .FIXME {
padding: 10px;
margin-top: 10px;
}
@ -143,6 +143,12 @@ img {
float: left;
}
.chat {
margin-top: 10px;
display: flex;
align-items: center;
}
.chat-head {
margin-right: 10px;
vertical-align: middle;
@ -152,6 +158,11 @@ img {
font-weight: bold;
}
.chat-text {
display: inline-block;
padding: 10px;
}
@media (prefers-color-scheme: light) {
body {
background: white;
@ -176,7 +187,7 @@ img {
code, kbd, pre, textarea {
color: #111;
}
code, kbd, pre, .flex div, .box, .chat, textarea {
code, kbd, pre, .flex div, .box, .chat-text, textarea {
background: #ddd;
}
blockquote {