FIX: reduces visual noise of grouped events on mobile (#38)

This commit is contained in:
Joffrey JAFFEUX 2020-04-22 17:36:48 +02:00 committed by GitHub
parent cc193bf2ba
commit 3966e58c96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 4 deletions

View File

@ -389,13 +389,20 @@ function initializeDiscourseCalendar(api) {
const event = _buildEvent(detail);
event.classNames = ["grouped-event"];
const site = api.container.lookup("site:main");
if (usernames.length > 3) {
event.title =
`(${usernames.length}) ` + I18n.t("discourse_calendar.holiday");
site && site.mobileView
? usernames.length
: `(${usernames.length}) ` + I18n.t("discourse_calendar.holiday");
} else if (usernames.length === 1) {
event.title = usernames[0];
} else {
event.title = `(${usernames.length}) ` + usernames.slice(0, 3).join(", ");
event.title =
site && site.mobileView
? usernames.length
: `(${usernames.length}) ` + usernames.slice(0, 3).join(", ");
}
if (localEventNames.length > 1) {

View File

@ -124,8 +124,7 @@
}
&.grouped-event {
background-color: none;
background: $secondary;
background-color: $primary-low;
border: 1px solid $primary-low-mid;
color: $primary;