diff --git a/assets/css/src/components-plugin/_listing.scss b/assets/css/src/components-plugin/_listing.scss index d7069767d4..631ab4f654 100644 --- a/assets/css/src/components-plugin/_listing.scss +++ b/assets/css/src/components-plugin/_listing.scss @@ -1,3 +1,79 @@ +.mailpoet-listing { + background: $color-white; + border: 1px solid $color-tertiary-light; + border-radius: 0 4px 4px; + font-family: $font-family; + padding: $grid-gap; + + .mailpoet-tab-content & { + background: none; + border: 0; + border-radius: 0; + padding: 0; + } +} + +.mailpoet-listing-groups { + list-style: none; + margin: 0; + padding: $grid-gap ($grid-gap / 2); + + li { + display: inline-block; + margin-bottom: 0; + padding: 0 $grid-gap $grid-gap $grid-gap; + white-space: nowrap; + } + + li:first-child { + padding-left: 0; + } + + li:last-child { + padding-right: 0; + } + + li a { + color: $color-text-light; + font-size: $font-size; + text-decoration: none; + } + + li a.mailpoet-listing-groups-current { + color: $color-secondary; + font-weight: bold; + } + + li a span.mailpoet-listing-groups-count { + background-color: $color-tertiary-light; + border-radius: 8px; + font-size: $font-size-extra-small; + font-weight: 600; + margin-left: 2px; + padding: 1px 6px; + } + + li a.mailpoet-listing-groups-current span.mailpoet-listing-groups-count { + background-color: $color-secondary-light; + } + + a.mailpoet-listing-groups-current span.mailpoet-listing-groups-title { + position: relative; + } + + a.mailpoet-listing-groups-current span.mailpoet-listing-groups-title:after { + background: $color-secondary; + border-radius: 2px; + content: ''; + height: 4px; + left: 0; + margin-top: 5px; + position: absolute; + top: 100%; + width: 100%; + } +} + .mailpoet_listing_loading tbody tr, .mailpoet_form_loading tbody tr { opacity: .2; diff --git a/assets/css/src/settings/_typography.scss b/assets/css/src/settings/_typography.scss index fae8840fdd..30676475c6 100644 --- a/assets/css/src/settings/_typography.scss +++ b/assets/css/src/settings/_typography.scss @@ -1,6 +1,7 @@ $font-family: 'proxima-soft', sans-serif; $font-size: 16px; $font-size-small: 14px; +$font-size-extra-small: 12px; $line-height: 1.5; $heading-line-height: 1.25; diff --git a/assets/js/src/listing/groups.jsx b/assets/js/src/listing/groups.jsx index d3a2e65259..5db51b807d 100644 --- a/assets/js/src/listing/groups.jsx +++ b/assets/js/src/listing/groups.jsx @@ -13,18 +13,17 @@ class ListingGroups extends React.Component { } render() { - const groups = this.props.groups.map((group, index) => { + const groups = this.props.groups.map((group) => { if (group.name === 'trash' && group.count === 0) { return false; } const classes = classNames( - { current: (group.name === this.props.group) } + { 'mailpoet-listing-groups-current': (group.name === this.props.group) } ); return (
  • - {(index > 0) ? ' |' : ''} - {group.label} -   - - ( - { parseInt(group.count, 10).toLocaleString() } - ) + + {group.label} + {group.count > 0 && ( + <> +   + + { parseInt(group.count, 10).toLocaleString() } + + + )}
  • ); }); return ( -