2013-02-06 03:16:51 +08:00
|
|
|
// --------------------------------------------------
|
|
|
|
// Badges
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
// Base
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
%badge {
|
|
|
|
display: inline-block;
|
2014-03-16 00:01:17 +08:00
|
|
|
font-weight: normal;
|
2013-02-06 03:16:51 +08:00
|
|
|
white-space: nowrap;
|
2018-07-13 04:38:51 +08:00
|
|
|
border-radius: 10px;
|
2013-02-06 03:16:51 +08:00
|
|
|
}
|
|
|
|
|
2015-03-05 11:15:21 +08:00
|
|
|
// Category badges
|
2013-02-06 03:16:51 +08:00
|
|
|
// --------------------------------------------------
|
|
|
|
|
2023-11-13 23:46:15 +08:00
|
|
|
.badge-category__wrapper {
|
|
|
|
color: var(--primary-high);
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
2022-10-12 21:31:59 +08:00
|
|
|
font-size: var(--font-down-1);
|
2013-07-26 22:11:00 +08:00
|
|
|
white-space: nowrap;
|
2015-01-29 11:53:02 +08:00
|
|
|
position: relative;
|
2018-02-27 05:32:56 +08:00
|
|
|
display: inline-flex;
|
2018-02-27 03:20:32 +08:00
|
|
|
align-items: baseline;
|
2018-06-08 17:49:31 +08:00
|
|
|
|
2018-01-11 20:05:29 +08:00
|
|
|
.badge-category {
|
2018-06-08 17:49:31 +08:00
|
|
|
display: inline-flex;
|
|
|
|
align-items: baseline;
|
2023-11-13 23:46:15 +08:00
|
|
|
gap: 0.33em;
|
|
|
|
color: var(--primary-high);
|
2017-08-05 02:12:21 +08:00
|
|
|
|
2023-11-13 23:46:15 +08:00
|
|
|
&:before {
|
|
|
|
content: "";
|
|
|
|
background: var(--category-badge-color);
|
2018-12-18 10:05:32 +08:00
|
|
|
flex: 0 0 auto;
|
2023-11-13 23:46:15 +08:00
|
|
|
width: 0.67rem; // fixed dimensions because otherwise they may not be square
|
|
|
|
height: 0.67rem;
|
2016-01-18 17:08:24 +08:00
|
|
|
}
|
2015-03-10 00:25:27 +08:00
|
|
|
|
2023-11-13 23:46:15 +08:00
|
|
|
&__name {
|
|
|
|
color: currentColor;
|
2015-09-10 02:46:40 +08:00
|
|
|
text-overflow: ellipsis;
|
2018-02-03 08:03:25 +08:00
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
2023-11-13 23:46:15 +08:00
|
|
|
&.--has-parent {
|
2018-02-03 08:03:25 +08:00
|
|
|
&:before {
|
2023-11-13 23:46:15 +08:00
|
|
|
background: linear-gradient(
|
|
|
|
90deg,
|
|
|
|
var(--parent-category-badge-color) 50%,
|
|
|
|
var(--category-badge-color) 50%
|
|
|
|
);
|
2015-03-05 11:15:21 +08:00
|
|
|
}
|
2015-02-06 13:20:55 +08:00
|
|
|
}
|
2015-01-30 14:57:46 +08:00
|
|
|
|
2023-11-13 23:46:15 +08:00
|
|
|
.extra-info-wrapper & {
|
|
|
|
color: var(--header_primary-high);
|
2023-05-26 05:08:39 +08:00
|
|
|
}
|
2016-02-10 16:34:43 +08:00
|
|
|
}
|
2016-02-10 16:27:03 +08:00
|
|
|
|
2023-11-13 23:46:15 +08:00
|
|
|
.d-icon {
|
|
|
|
width: 0.74em;
|
|
|
|
height: 0.74em;
|
|
|
|
color: var(--primary-medium);
|
2015-01-29 14:48:55 +08:00
|
|
|
}
|
|
|
|
}
|
2015-01-29 11:53:02 +08:00
|
|
|
|
2013-02-06 03:16:51 +08:00
|
|
|
// Notification badge
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
.badge-notification {
|
|
|
|
@extend %badge;
|
2019-01-18 04:46:55 +08:00
|
|
|
padding: 0.21em 0.42em;
|
|
|
|
min-width: 0.5em;
|
2020-08-04 10:57:10 +08:00
|
|
|
color: var(--secondary);
|
2022-10-12 21:31:59 +08:00
|
|
|
font-size: var(--font-down-2);
|
2022-10-12 22:05:42 +08:00
|
|
|
line-height: var(--line-height-small);
|
2013-08-03 03:41:02 +08:00
|
|
|
text-align: center;
|
2020-08-04 10:57:10 +08:00
|
|
|
background-color: var(--primary-low-mid-or-secondary-low);
|
2013-02-06 03:16:51 +08:00
|
|
|
&[href] {
|
2020-08-04 10:57:10 +08:00
|
|
|
color: var(--secondary);
|
2013-02-06 03:16:51 +08:00
|
|
|
}
|
|
|
|
|
2016-05-13 16:47:40 +08:00
|
|
|
&:hover {
|
2020-08-04 10:57:10 +08:00
|
|
|
color: var(--secondary);
|
2016-05-13 16:47:40 +08:00
|
|
|
}
|
|
|
|
|
2021-07-05 14:17:31 +08:00
|
|
|
// Unread posts
|
2013-02-06 03:16:51 +08:00
|
|
|
|
2018-06-08 17:49:31 +08:00
|
|
|
&.unread-posts {
|
2020-08-04 10:57:10 +08:00
|
|
|
background-color: var(--tertiary-med-or-tertiary);
|
|
|
|
color: var(--secondary);
|
2015-08-19 03:28:58 +08:00
|
|
|
font-weight: dark-light-choose(normal, bold);
|
2013-02-06 03:16:51 +08:00
|
|
|
}
|
|
|
|
|
2014-09-04 00:22:18 +08:00
|
|
|
&.new-topic {
|
|
|
|
background-color: transparent;
|
|
|
|
}
|
2014-03-12 05:26:25 +08:00
|
|
|
|
2014-09-04 04:33:56 +08:00
|
|
|
&.new-topic::before {
|
2020-09-23 23:32:19 +08:00
|
|
|
content: "";
|
2022-03-13 19:50:06 +08:00
|
|
|
background: var(--tertiary-med-or-tertiary);
|
2020-09-23 23:32:19 +08:00
|
|
|
display: inline-block;
|
2022-03-13 19:50:06 +08:00
|
|
|
height: 8px;
|
|
|
|
width: 8px;
|
2020-09-23 23:32:19 +08:00
|
|
|
border-radius: 50%;
|
2014-09-04 04:33:56 +08:00
|
|
|
}
|
|
|
|
|
2013-02-06 03:16:51 +08:00
|
|
|
// Click count
|
|
|
|
|
|
|
|
&.clicks {
|
|
|
|
font-weight: normal;
|
2020-08-04 10:57:10 +08:00
|
|
|
background-color: var(--primary-low);
|
2014-03-08 13:55:02 +08:00
|
|
|
top: -1px;
|
2020-08-04 10:57:10 +08:00
|
|
|
color: var(--primary-medium);
|
2013-11-18 11:32:58 +08:00
|
|
|
position: relative;
|
2014-07-26 00:22:55 +08:00
|
|
|
border: none;
|
2013-02-06 03:16:51 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Posts badge
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
.badge-posts {
|
2014-03-16 00:01:17 +08:00
|
|
|
font-weight: normal;
|
2022-10-12 21:31:59 +08:00
|
|
|
font-size: var(--font-0);
|
2022-10-12 22:05:42 +08:00
|
|
|
line-height: var(--line-height-small);
|
2013-02-06 03:16:51 +08:00
|
|
|
&[href] {
|
2020-08-04 10:57:10 +08:00
|
|
|
color: var(--primary-med-or-secondary-med);
|
2013-02-06 03:16:51 +08:00
|
|
|
}
|
2013-05-18 04:09:52 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// Group badge
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
.badge-group {
|
|
|
|
@extend %badge;
|
2018-02-21 01:18:20 +08:00
|
|
|
padding: 2px 5px;
|
2020-08-04 10:57:10 +08:00
|
|
|
color: var(--primary);
|
|
|
|
background-color: var(--primary-low);
|
|
|
|
border-color: var(--primary-low);
|
2022-10-12 21:31:59 +08:00
|
|
|
font-size: var(--font-down-1);
|
2013-05-18 04:09:52 +08:00
|
|
|
}
|