UX: Styling embedded post collapse button
This commit is contained in:
parent
6fff16a999
commit
dc5b0e05e2
|
@ -300,14 +300,15 @@ createWidget('post-contents', {
|
|||
const repliesBelow = state.repliesBelow;
|
||||
if (repliesBelow.length) {
|
||||
result.push(h('section.embedded-posts.bottom', [
|
||||
|
||||
repliesBelow.map(p => {
|
||||
return this.attach('embedded-post', p, { model: this.store.createRecord('post', p) });
|
||||
}),
|
||||
this.attach('button', {
|
||||
title: 'post.collapse',
|
||||
icon: 'chevron-up',
|
||||
action: 'toggleRepliesBelow',
|
||||
className: 'btn collapse-up'
|
||||
}),
|
||||
repliesBelow.map(p => {
|
||||
return this.attach('embedded-post', p, { model: this.store.createRecord('post', p) });
|
||||
})
|
||||
]));
|
||||
}
|
||||
|
|
|
@ -433,7 +433,7 @@ blockquote > *:last-child {
|
|||
}
|
||||
|
||||
.small-action-desc {
|
||||
padding: 1em 1em 1.25em 1em;
|
||||
padding: 1em;
|
||||
text-transform: uppercase;
|
||||
font-weight: bold;
|
||||
font-size: $font-down-1;
|
||||
|
|
|
@ -207,7 +207,7 @@ nav.post-controls {
|
|||
|
||||
.topic-body {
|
||||
box-sizing: border-box;
|
||||
width: calc(100% - 60px); // [100% - .topic-avatar width]
|
||||
width: calc(100% - 70px); // [100% - .topic-avatar width]
|
||||
// WARNING: overflow hide is required for quoted / embedded images
|
||||
// which expect "normal" post width, but expansions are narrower
|
||||
overflow: hidden;
|
||||
|
@ -221,10 +221,14 @@ nav.post-controls {
|
|||
}
|
||||
|
||||
.topic-avatar {
|
||||
padding-left: 15px;
|
||||
padding-left: 25px;
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
.row {
|
||||
border: 1px solid $primary-low;
|
||||
}
|
||||
|
||||
// bottom means "reply expansion" below a post
|
||||
&.bottom {
|
||||
&.hidden {
|
||||
|
@ -233,15 +237,42 @@ nav.post-controls {
|
|||
}
|
||||
}
|
||||
&.bottom {
|
||||
.collapse-up {
|
||||
position: absolute;
|
||||
transform: translate(-50%, -170%);
|
||||
background: $secondary;
|
||||
border: 1px solid $primary-low;
|
||||
padding: 6px 9px 8px;
|
||||
z-index: 99; // Needs to be higher than topic-avatar
|
||||
}
|
||||
.row {
|
||||
padding-top: 7px;
|
||||
padding-bottom: .5em;
|
||||
border-top: none;
|
||||
border-bottom: none;
|
||||
.topic-avatar, .topic-body {
|
||||
border-top: 1px solid $primary-low;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// top means "in reply to expansion" above a post
|
||||
&.top {
|
||||
.collapse-down {
|
||||
position: absolute;
|
||||
transform: translate(-50%, 55%);
|
||||
background: $secondary;
|
||||
border: 1px solid $primary-low;
|
||||
padding: 6px 9px 8px;
|
||||
z-index: 99; // Needs to be higher than topic-avatar
|
||||
}
|
||||
margin-left: 56px;
|
||||
width: 701px;
|
||||
.row {
|
||||
border-bottom: none;
|
||||
.topic-avatar, .topic-body {
|
||||
border-top: 1px solid $primary-low;
|
||||
}
|
||||
}
|
||||
}
|
||||
&.top.topic-body {
|
||||
padding: 0;
|
||||
|
@ -615,7 +646,7 @@ $topic-avatar-width: 45px;
|
|||
position: relative;
|
||||
z-index: 2;
|
||||
border-top: 1px solid $primary-low;
|
||||
padding: 12px $topic-body-width-padding 15px $topic-body-width-padding;
|
||||
padding: 12px $topic-body-width-padding 0 $topic-body-width-padding;
|
||||
}
|
||||
|
||||
.topic-avatar {
|
||||
|
@ -636,6 +667,11 @@ $topic-avatar-width: 45px;
|
|||
border-top: none;
|
||||
}
|
||||
|
||||
.time-gap + .topic-post .embedded-posts.top {
|
||||
border-bottom: 1px solid $primary-low;
|
||||
}
|
||||
|
||||
|
||||
.posts-wrapper {
|
||||
position: relative;
|
||||
-webkit-font-smoothing: subpixel-antialiased;
|
||||
|
|
|
@ -10,8 +10,7 @@
|
|||
}
|
||||
|
||||
.post-menu-area {
|
||||
margin-bottom: 10px;
|
||||
margin-top: 20px;
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
.edits {margin-right: 5px;}
|
||||
|
|
Loading…
Reference in New Issue