Add notification badge for events, default disclosures to closed

This commit is contained in:
Bryan Housel
2018-04-08 21:55:36 -04:00
parent cd2d42799e
commit cab78c2c6b
2 changed files with 42 additions and 2 deletions
+33 -1
View File
@@ -3460,6 +3460,9 @@ img.tile-debug {
color: #ccf;
}
/* Notification Badges */
/* For an icon (e.g. new version) */
.badge {
display: inline-block;
background: #d32232;
@@ -3486,6 +3489,24 @@ img.tile-debug {
fill: white;
}
/* For text (e.g. upcoming events) */
.badge-text {
display: inline-block;
color: white;
text-align: center;
width: 16px;
height: 16px;
font-size: 10px;
font-weight: bold;
margin-left: 5px;
background: #f00;
border-radius: 9px;
}
[dir='rtl'] .badge-text {
margin-left: 0;
margin-right: 5px;
}
/* Modals
------------------------------------------------------- */
@@ -3647,8 +3668,12 @@ img.tile-debug {
font-weight: bold;
}
.community-languages {
margin-top: 5px;
font-style: italic;
}
.community-languages:only-child {
margin-top: 0;
}
.save-summary .details {
margin: 0px 5px;
white-space: nowrap;
@@ -3665,6 +3690,10 @@ img.tile-debug {
height: 15px;
}
.community-events {
margin-top: 5px;
}
.community-event,
.community-more {
background-color: #efefef;
@@ -3673,7 +3702,10 @@ img.tile-debug {
margin-bottom: 5px;
}
.community-event-name,
.community-event-name {
font-size: 14px;
font-weight: bold;
}
.community-event-when {
font-weight: bold;
}
+9 -1
View File
@@ -191,6 +191,8 @@ export function uiSuccess(context) {
selection
.append('div')
.call(uiDisclosure(context, 'community-more-' + d.id, false)
.expanded(false)
.updatePreference(false)
.title(t('success.more'))
.content(showMore)
);
@@ -215,9 +217,15 @@ export function uiSuccess(context) {
selection
.append('div')
.call(uiDisclosure(context, 'community-events-' + d.id, false)
.expanded(false)
.updatePreference(false)
.title(t('success.events'))
.content(showNextEvents)
);
)
.select('.hide-toggle')
.append('span')
.attr('class', 'badge-text')
.text(nextEvents.length);
}