about summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--default.css14
-rw-r--r--html.c9
2 files changed, 23 insertions, 0 deletions
diff --git a/default.css b/default.css
index 40d9e88..ddd0982 100644
--- a/default.css
+++ b/default.css
@@ -36,6 +36,20 @@ nav form {
 	margin-top: 1em;
 }
 
+table {
+	border-collapse: collapse;
+}
+tr {
+	vertical-align: top;
+}
+tr td:not(:last-child) {
+	padding-right: 1ch;
+}
+
+td.time {
+	white-space: nowrap;
+}
+
 td.nick {
 	text-align: right;
 }
diff --git a/html.c b/html.c
index c1e4b15..37e52b3 100644
--- a/html.c
+++ b/html.c
@@ -271,6 +271,14 @@ static enum kcgi_err eventNick(struct khtmlreq *html, struct Event event) {
 	return error;
 }
 
+static enum kcgi_err eventMessage(struct khtmlreq *html, struct Event event) {
+	if (!event.message) return KCGI_OK;
+	return 0
+		|| khtml_attr(html, KELEM_TD, KATTR_CLASS, "message", KATTR__MAX)
+		|| khtml_puts(html, event.message)
+		|| khtml_closeelem(html, 1);
+}
+
 static const char *Types[TypesLen] = {
 #define X(id, name) [id] = name,
 	ENUM_TYPE
@@ -290,5 +298,6 @@ enum kcgi_err htmlEvent(struct khtmlreq *html, struct Event event) {
 		|| eventNetwork(html, event)
 		|| eventContext(html, event)
 		|| eventNick(html, event)
+		|| eventMessage(html, event)
 		|| khtml_closeelem(html, 1);
 }