From 889b7f359f3d582c4ef5d48f803fd02346cfbe89 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Sat, 30 Oct 2021 15:42:39 -0400 Subject: [PATCH] Use overflow:hidden style to keep the user avatar photo from breaking through the rounded corner of the container. --- webcit-ng/static/css/webcit.css | 2 ++ webcit-ng/static/js/views.js | 31 +++++++++++++++---------------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/webcit-ng/static/css/webcit.css b/webcit-ng/static/css/webcit.css index 7a5ba5d5e..4c4c11e70 100644 --- a/webcit-ng/static/css/webcit.css +++ b/webcit-ng/static/css/webcit.css @@ -12,6 +12,7 @@ html,body,h1,h2,h3,h4,h5 { } .ctdl-msg-wrapper { + overflow: hidden; border-radius: 25px; background-color: white; margin-left: 4px; @@ -28,6 +29,7 @@ html,body,h1,h2,h3,h4,h5 { .ctdl-username { font-weight: bold; color: #000055; + padding: 4px; } .ctdl-username a { diff --git a/webcit-ng/static/js/views.js b/webcit-ng/static/js/views.js index 00f68b0b1..9b07d1d0c 100644 --- a/webcit-ng/static/js/views.js +++ b/webcit-ng/static/js/views.js @@ -15,19 +15,19 @@ // List of defined views shamelessly swiped from libcitadel headers // var views = { - VIEW_BBS : 0, /* Bulletin board view */ - VIEW_MAILBOX : 1, /* Mailbox summary */ - VIEW_ADDRESSBOOK : 2, /* Address book view */ - VIEW_CALENDAR : 3, /* Calendar view */ - VIEW_TASKS : 4, /* Tasks view */ - VIEW_NOTES : 5, /* Notes view */ - VIEW_WIKI : 6, /* Wiki view */ - VIEW_CALBRIEF : 7, /* Brief Calendar view */ - VIEW_JOURNAL : 8, /* Journal view */ - VIEW_DRAFTS : 9, /* Drafts view */ - VIEW_BLOG : 10, /* Blog view */ - VIEW_QUEUE : 11, /* SMTP QUEUE rooms */ - VIEW_WIKIMD : 12, /* Markdown Wiki view */ + VIEW_BBS : 0, // Bulletin board view + VIEW_MAILBOX : 1, // Mailbox summary + VIEW_ADDRESSBOOK : 2, // Address book view + VIEW_CALENDAR : 3, // Calendar view + VIEW_TASKS : 4, // Tasks view + VIEW_NOTES : 5, // Notes view + VIEW_WIKI : 6, // Wiki view + VIEW_CALBRIEF : 7, // Brief Calendar view + VIEW_JOURNAL : 8, // Journal view + VIEW_DRAFTS : 9, // Drafts view + VIEW_BLOG : 10, // Blog view + VIEW_QUEUE : 11, // SMTP queue rooms + VIEW_WIKIMD : 12, // markdown wiki (no longer implemented) }; @@ -50,7 +50,7 @@ function render_room_view(gt_msg, lt_msg) { } -// Forum view (flat) -- let's have another go at this with the rendering done client-side +// Forum view (flat) -- all rendering is done client-side // function forum_readmessages(target_div, gt_msg, lt_msg) { original_text = document.getElementById(target_div).innerHTML; // in case we need to replace it after an error @@ -159,7 +159,6 @@ function forum_render_one(div, msgnum, scroll_to) { response = await fetch("/ctdl/r/" + escapeHTMLURI(current_room) + "/" + msgs[i] + "/json"); msg = await response.json(); if (response.ok) { - document.getElementById(div).innerHTML = "
" // begin message wrapper + "
" // begin avatar @@ -168,7 +167,7 @@ function forum_render_one(div, msgnum, scroll_to) { + "
" // end avatar + "
" // begin content + "