diff options
-rw-r--r-- | public/style.css | 45 | ||||
-rw-r--r-- | views/head.pug | 23 |
2 files changed, 24 insertions, 44 deletions
diff --git a/public/style.css b/public/style.css index 9db076f..8290892 100644 --- a/public/style.css +++ b/public/style.css @@ -72,7 +72,7 @@ input[type="text"], input[type="password"], textarea { margin: 5px 0; border: 1px solid black; } -input:focus { +input:focus, textarea:focus { outline: 2px solid lightsteelblue; } button, select { @@ -98,42 +98,21 @@ p.warning { color: brown; } p.warning::before { content: "\26a0"; } div.post { - margin-bottom: 2em; max-width: 50em; - display: grid; - grid-template: - "from time" auto - "body body" 1fr - "xxxx edit" auto - / 1fr auto -} -div.post div.from { - grid-area: from; - background-color: gainsboro; - padding: 5px 10px; - border-top: 1px solid black; - border-left: 1px solid black; - font-weight: bold; -} -div.post div.time { - grid-area: time; - background-color: gainsboro; - padding: 5px; - border-top: 1px solid black; - border-right: 1px solid black; -} -div.post div.body { - grid-area: body; + margin-top: 24px; border: 1px solid black; - padding: 15px; - white-space: pre-wrap; } -div.post div.edit{ - grid-area: edit; - padding: 5px; - text-align:right; +div.post > div.head { + display: flex; + justify-content: space-between; + padding: 5px 10px; + background-color: gainsboro; + border-bottom: 1px solid black; } -div.post div.from a:not(:hover) {color:black;text-decoration:none} +div.post > div.head a { font-weight: bold; } +div.post > div.head a:not(:hover) { color: black; text-decoration: none; } +div.post > div.body { padding: 15px; white-space: pre-wrap; } +div.post + div.edit { max-width: 50em; margin-top: 5px; text-align:right; } article hr { max-width: 50rem; margin-right: auto; margin-left: 0; } article hr { border: none; border-top: 2px dotted brown; } diff --git a/views/head.pug b/views/head.pug index f896ce2..2b7858e 100644 --- a/views/head.pug +++ b/views/head.pug @@ -7,18 +7,19 @@ link(rel="stylesheet" href="/style.css") mixin forumpost(row,show_buttons) .post - .from: a(href="/user/"+row.author_name)= row.author_name - .time= row.ctime - if row.edited - | - | (edited #{row.mtime}) - .body!= row.body - if show_buttons && user - .edit - if row.author_id === user.user_id - | #[a(href="/forum/edit/"+row.post_id) Edit] + .head + .from: a(href="/user/"+row.author_name)= row.author_name + .time= row.ctime + if row.edited | - | #[a(href="/forum/reply/"+row.post_id) Reply] + | (edited #{row.mtime}) + .body!= row.body + if show_buttons && user + .edit + if row.author_id === user.user_id + | #[a(href="/forum/edit/"+row.post_id) Edit] + | + | #[a(href="/forum/reply/"+row.post_id) Reply] mixin gametable(status,table,hide_title=0) table |