mirror of
https://github.com/flarum/core.git
synced 2025-07-21 16:51:34 +02:00
New look for discussion reply/unread count
Also decrease the max page width by 100px
This commit is contained in:
@@ -39,6 +39,7 @@ export default class DiscussionListItem extends Component {
|
|||||||
|
|
||||||
return this.subtree.retain() || m('div.discussion-list-item', {className: this.active() ? 'active' : ''}, [
|
return this.subtree.retain() || m('div.discussion-list-item', {className: this.active() ? 'active' : ''}, [
|
||||||
controls.length ? DropdownButton.component({
|
controls.length ? DropdownButton.component({
|
||||||
|
icon: 'ellipsis-h',
|
||||||
items: controls,
|
items: controls,
|
||||||
className: 'contextual-controls',
|
className: 'contextual-controls',
|
||||||
buttonClass: 'btn btn-default btn-icon btn-sm btn-naked slidable-underneath slidable-underneath-right',
|
buttonClass: 'btn btn-default btn-icon btn-sm btn-naked slidable-underneath slidable-underneath-right',
|
||||||
@@ -70,9 +71,8 @@ export default class DiscussionListItem extends Component {
|
|||||||
m('ul.info', listItems(this.infoItems().toArray()))
|
m('ul.info', listItems(this.infoItems().toArray()))
|
||||||
]),
|
]),
|
||||||
|
|
||||||
m('span.count', {onclick: this.markAsRead.bind(this)}, [
|
m('span.count', {onclick: this.markAsRead.bind(this), title: displayUnread ? 'Mark as Read' : ''}, [
|
||||||
abbreviateNumber(discussion[displayUnread ? 'unreadCount' : 'repliesCount']()),
|
abbreviateNumber(discussion[displayUnread ? 'unreadCount' : 'repliesCount']())
|
||||||
m('span.label', displayUnread ? 'unread' : 'replies')
|
|
||||||
]),
|
]),
|
||||||
|
|
||||||
(relevantPosts && relevantPosts.length)
|
(relevantPosts && relevantPosts.length)
|
||||||
|
@@ -90,10 +90,13 @@
|
|||||||
&.active {
|
&.active {
|
||||||
background: @fl-body-control-bg;
|
background: @fl-body-control-bg;
|
||||||
}
|
}
|
||||||
|
& .contextual-controls {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
& .discussion-summary {
|
& .discussion-summary {
|
||||||
padding-left: 57px + 15px;
|
padding-left: 52px + 15px;
|
||||||
padding-right: 65px + 15px;
|
padding-right: 60px + 15px;
|
||||||
|
|
||||||
& .title {
|
& .title {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@@ -101,6 +104,9 @@
|
|||||||
& .relevant-posts {
|
& .relevant-posts {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
& .count {
|
||||||
|
margin-top: 11px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -189,7 +195,7 @@
|
|||||||
padding: 12px 0;
|
padding: 12px 0;
|
||||||
}
|
}
|
||||||
&:hover .title {
|
&:hover .title {
|
||||||
text-decoration: underline;
|
// text-decoration: underline;
|
||||||
}
|
}
|
||||||
& .title {
|
& .title {
|
||||||
margin: 0 0 5px;
|
margin: 0 0 5px;
|
||||||
@@ -369,37 +375,43 @@
|
|||||||
@media @tablet, @desktop, @desktop-hd {
|
@media @tablet, @desktop, @desktop-hd {
|
||||||
.discussion-list-item {
|
.discussion-list-item {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-right: -25px;
|
margin-right: -15px;
|
||||||
padding-right: 25px;
|
padding-right: 15px;
|
||||||
|
padding-left: 15px;
|
||||||
|
margin-left: -15px;
|
||||||
|
border-radius: @border-radius-base;
|
||||||
|
|
||||||
& .contextual-controls {
|
& .contextual-controls {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
right: 90px;
|
||||||
top: 8px;
|
top: 15px;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
|
||||||
& .dropdown-toggle {
|
& .dropdown-toggle {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
&:hover {
|
||||||
|
background: lighten(@fl-body-secondary-color, 3%);
|
||||||
|
}
|
||||||
&:hover .contextual-controls, & .contextual-controls.open {
|
&:hover .contextual-controls, & .contextual-controls.open {
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.discussion-summary {
|
.discussion-summary {
|
||||||
padding-left: 57px;
|
padding-left: 52px;
|
||||||
padding-right: 65px;
|
padding-right: 60px;
|
||||||
|
|
||||||
& .author {
|
& .author {
|
||||||
margin-left: -57px;
|
margin-left: -52px;
|
||||||
}
|
}
|
||||||
& .badges {
|
& .badges {
|
||||||
margin-left: -55px;
|
margin-left: -55px;
|
||||||
width: 48px;
|
width: 48px;
|
||||||
}
|
}
|
||||||
& .avatar {
|
& .avatar {
|
||||||
.avatar-size(40px);
|
.avatar-size(36px);
|
||||||
}
|
}
|
||||||
& .main {
|
& .main {
|
||||||
margin-right: -65px;
|
margin-right: -65px;
|
||||||
@@ -408,22 +420,27 @@
|
|||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
& .count {
|
& .count {
|
||||||
margin-right: -65px;
|
margin-top: 21px;
|
||||||
width: 60px;
|
margin-right: -60px;
|
||||||
text-align: center;
|
width: 55px;
|
||||||
text-transform: uppercase;
|
|
||||||
color: @fl-body-muted-color;
|
color: @fl-body-muted-color;
|
||||||
font-size: 20px;
|
font-size: 15px;
|
||||||
font-weight: 300;
|
padding-left: 24px;
|
||||||
|
|
||||||
& .label {
|
&:before {
|
||||||
font-size: 11px;
|
.fa();
|
||||||
display: block;
|
content: @fa-var-comment-o;
|
||||||
font-weight: normal;
|
float: left;
|
||||||
|
margin-left: -24px;
|
||||||
|
margin-top: 2px;
|
||||||
}
|
}
|
||||||
.unread& {
|
.unread& {
|
||||||
color: @fl-body-heading-color;
|
color: @fl-body-heading-color;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
content: @fa-var-comment;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -69,9 +69,9 @@
|
|||||||
& .label, & .icon-caret {
|
& .label, & .icon-caret {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
& .fa-ellipsis-v {
|
& .icon {
|
||||||
font-size: 17px;
|
font-size: 16px;
|
||||||
vertical-align: middle;
|
vertical-align: -1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media @phone {
|
@media @phone {
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
@fl-body-bg: #fff;
|
@fl-body-bg: #fff;
|
||||||
@fl-body-color: #333;
|
@fl-body-color: #333;
|
||||||
@fl-body-muted-color: hsl(@fl-secondary-hue, min(25%, @fl-secondary-sat), 60%);
|
@fl-body-muted-color: hsl(@fl-secondary-hue, min(25%, @fl-secondary-sat), 63%);
|
||||||
@fl-body-muted-more-color: #bbb;
|
@fl-body-muted-more-color: #bbb;
|
||||||
@fl-shadow-color: rgba(0, 0, 0, 0.35);
|
@fl-shadow-color: rgba(0, 0, 0, 0.35);
|
||||||
}
|
}
|
||||||
@@ -87,6 +87,8 @@
|
|||||||
// ---------------------------------
|
// ---------------------------------
|
||||||
// BOOTSTRAP
|
// BOOTSTRAP
|
||||||
|
|
||||||
|
@container-large-desktop: (1040px + @grid-gutter-width);
|
||||||
|
|
||||||
@brand-primary: @fl-body-primary-color;
|
@brand-primary: @fl-body-primary-color;
|
||||||
|
|
||||||
@body-bg: @fl-body-bg;
|
@body-bg: @fl-body-bg;
|
||||||
|
Reference in New Issue
Block a user