From c2883bc85e702128fbe6c6f7b730188c84c52b25 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Tue, 23 Jun 2015 10:36:36 +0930 Subject: [PATCH] Add light horizontal rule between posts. closes flarum/core#133 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also remove time information from event posts (it’s not useful) --- .../js/forum/src/components/event-post.js | 3 +- framework/core/less/forum/discussion.less | 39 +++++++++---------- framework/core/less/lib/buttons.less | 8 ++-- 3 files changed, 23 insertions(+), 27 deletions(-) diff --git a/framework/core/js/forum/src/components/event-post.js b/framework/core/js/forum/src/components/event-post.js index 00dd63b6d..7cb865486 100644 --- a/framework/core/js/forum/src/components/event-post.js +++ b/framework/core/js/forum/src/components/event-post.js @@ -17,8 +17,7 @@ export default class EventPost extends Post { m('div.event-post-info', [ user ? m('a.post-user', {href: app.route.user(user), config: m.route}, username(user)) : username(user), ' ', content - ]), - m('div.event-post-time', humanTime(post.time())) + ]) ], attrs); } } diff --git a/framework/core/less/forum/discussion.less b/framework/core/less/forum/discussion.less index af45c3a32..f47d76f13 100644 --- a/framework/core/less/forum/discussion.less +++ b/framework/core/less/forum/discussion.less @@ -67,10 +67,14 @@ // Stream .discussion-posts { - margin-top: 40px; + margin-top: 10px; & .item { - margin-bottom: 40px; + padding: 30px 0; + + &:not(:last-child) { + border-bottom: 1px solid @fl-body-secondary-color; + } } } @keyframes blink { @@ -117,7 +121,7 @@ & .contextual-controls { float: right; - margin-top: -3px; + margin-top: -8px; margin-left: 10px; } } @@ -316,7 +320,6 @@ } .event-post-info { font-size: 15px; - margin-bottom: 5px; } .discussion-renamed-post { & .old-title, & .new-title { @@ -373,19 +376,11 @@ text-transform: uppercase; font-weight: bold; color: @fl-body-muted-color; - margin-top: 60px; - margin-bottom: 60px; - padding-left: 90px; - border-top: 1px solid @fl-body-secondary-color; + margin-top: -30px; + margin-bottom: 30px; + padding: 20px 20px 20px 90px; + background: @fl-body-secondary-color; font-size: 12px; - - & span { - float: left; - background: #fff; - margin-top: -9px; - margin-left: -10px; - padding: 0 10px; - } } .post-preview { @@ -445,16 +440,18 @@ } @media @tablet, @desktop, @desktop-hd { - .post { - padding-left: 90px; - + .item { & .contextual-controls { - visibility: hidden; + opacity: 0; + transition: opacity 0.2s; } &:hover .contextual-controls, & .contextual-controls.open { - visibility: visible; + opacity: 1; } } + .post { + padding-left: 90px; + } .post-header { & .avatar { margin-left: -90px; diff --git a/framework/core/less/lib/buttons.less b/framework/core/less/lib/buttons.less index 6b73df6a2..1f7191689 100644 --- a/framework/core/less/lib/buttons.less +++ b/framework/core/less/lib/buttons.less @@ -60,11 +60,11 @@ // Little round icon buttons .btn-icon.btn-sm { - border-radius: 14px; - height: 28px; - width: 28px; + border-radius: 16px; + height: 32px; + width: 32px; text-align: center; - padding: 5px 0; + padding: 7px 0; & .label, & .icon-caret { display: none;