mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: Use full width when displaying a single recommendations list. (#22896)
This commit is contained in:
parent
6a9726e252
commit
dd8d89d9c8
@ -1,6 +1,5 @@
|
||||
<div
|
||||
class="more-content-wrapper
|
||||
{{if this.showTitleOnMobile 'mobile-single-list'}}"
|
||||
class="more-content-wrapper {{if this.singleList 'single-list'}}"
|
||||
{{did-insert this.buildListPills}}
|
||||
>
|
||||
{{#if this.showTopicListsNav}}
|
||||
|
@ -15,10 +15,6 @@ export default class MoreTopics extends Component {
|
||||
return this.site.mobileView && !this.singleList;
|
||||
}
|
||||
|
||||
get showTitleOnMobile() {
|
||||
return this.site.mobileView && this.singleList;
|
||||
}
|
||||
|
||||
@action
|
||||
rememberTopicListPreference(value) {
|
||||
this.moreTopicsPreferenceTracking.updatePreference(value);
|
||||
@ -28,10 +24,6 @@ export default class MoreTopics extends Component {
|
||||
|
||||
@action
|
||||
buildListPills() {
|
||||
if (!this.site.mobileView) {
|
||||
return;
|
||||
}
|
||||
|
||||
next(() => {
|
||||
const pills = Array.from(
|
||||
document.querySelectorAll(".more-content-topics")
|
||||
@ -44,6 +36,9 @@ export default class MoreTopics extends Component {
|
||||
|
||||
if (pills.length <= 1) {
|
||||
this.singleList = true;
|
||||
}
|
||||
|
||||
if (this.singleList || !this.site.mobileView) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -368,10 +368,6 @@ a.badge-category {
|
||||
max-width: 757px;
|
||||
}
|
||||
|
||||
.more-content-wrapper .topic-list-body .topic-list-data:first-of-type {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
// Target the .badge-category text, the bullet icon needs to maintain `display: block`
|
||||
.more-content-topics h3 .badge-wrapper.bullet span.badge-category,
|
||||
.more-content-topics h3 .badge-wrapper.box span,
|
||||
|
@ -362,6 +362,12 @@ pre.codeblock-buttons:hover {
|
||||
}
|
||||
}
|
||||
|
||||
.more-content-wrapper.single-list {
|
||||
.more-content-topics {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.more-content-topics {
|
||||
margin-top: 2em;
|
||||
|
||||
|
@ -138,6 +138,7 @@
|
||||
|
||||
.more-content-wrapper {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
|
||||
.topic-list-header,
|
||||
.posts-map,
|
||||
@ -148,6 +149,10 @@
|
||||
.topic-list-body {
|
||||
border-top: none;
|
||||
|
||||
.topic-list-item {
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.topic-list-item:last-of-type {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
@ -253,11 +253,15 @@ a.reply-to-tab {
|
||||
}
|
||||
|
||||
.more-content-wrapper {
|
||||
&:not(.mobile-single-list) {
|
||||
&:not(.single-list) {
|
||||
.more-topics-title {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.topic-list-data {
|
||||
padding-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.more-content-topics {
|
||||
|
Loading…
Reference in New Issue
Block a user