Files
wordpress-theme-aksrt/assets/css/frontend/widget-batch5.css
T
kate522 d479723814 feat(forum): multi-tab topic widget lazy REST load
SSR first tab; other tabs fetch /forum/frontend/widgets/topics
on switch, with shared list markup and styles.
2026-07-19 02:27:18 +08:00

779 lines
21 KiB
CSS

/**
* Batch5: user card guest/login depth, main posts, term aggregation.
*/
.aksrt-user-card {
border-radius: 12px;
overflow: hidden;
border: 1px solid var(--color-line, #e5e7eb);
background: var(--surface-1, #fff);
text-align: center;
margin-bottom: 12px;
}
.aksrt-user-card__cover {
height: 90px;
background: linear-gradient(135deg, #93c5fd, #c4b5fd) center/cover no-repeat;
}
.aksrt-user-card__cover.is-empty {
background: linear-gradient(135deg, #e2e8f0, #f8fafc);
}
.aksrt-user-card__body { padding: 0 14px 16px; position: relative; }
.aksrt-user-card__checkin {
position: absolute;
right: 10px;
top: 8px;
z-index: 2;
max-width: 48%;
}
.aksrt-user-card__checkin .but {
padding: 4px 8px !important;
font-size: 12px !important;
line-height: 1.2;
}
.aksrt-user-card__checkin .aksrt-header-checkin-details { display: none; }
.aksrt-user-card__avatar {
display: inline-block;
margin-top: -36px;
width: 72px;
height: 72px;
border-radius: 50%;
overflow: hidden;
border: 3px solid var(--surface-1, #fff);
background: var(--surface-2, #eee);
}
.aksrt-user-card__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.aksrt-user-card__name {
margin: 10px 0 0;
font-size: 16px;
font-weight: 700;
}
.aksrt-user-card__name a { color: inherit; text-decoration: none; }
.aksrt-user-card__bio,
.aksrt-user-card__guest-title {
margin: 8px 0 0;
font-size: 12px;
color: var(--muted-2-color, #888);
line-height: 1.5;
}
.aksrt-user-card__guest-title { font-size: 14px; font-weight: 600; color: inherit; }
.aksrt-user-card__stats {
display: flex;
justify-content: center;
gap: 18px;
margin-top: 12px;
}
.aksrt-user-card__stat-value {
display: block;
font-size: 16px;
font-weight: 700;
}
.aksrt-user-card__stat-label {
font-size: 11px;
color: var(--muted-2-color, #999);
}
.aksrt-user-card__actions {
display: flex;
justify-content: center;
flex-wrap: wrap;
gap: 8px;
margin-top: 14px;
}
.aksrt-user-card__btn {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 96px;
padding: 7px 14px;
border-radius: 999px;
font-size: 13px;
text-decoration: none;
font-weight: 600;
}
.aksrt-user-card__btn--primary {
background: var(--color-primary, #3b82f6);
color: #fff !important;
}
.aksrt-user-card__btn--ghost {
background: var(--surface-2, #f3f4f6);
color: inherit !important;
}
/* Main posts */
.aksrt-main-posts { display: flex; flex-direction: column; gap: 10px; }
.aksrt-main-posts.style-card {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 12px;
}
@media (max-width: 575.98px) {
.aksrt-main-posts.style-card { grid-template-columns: 1fr; }
}
.aksrt-main-posts__card {
display: block;
border-radius: 12px;
overflow: hidden;
border: 1px solid var(--color-line, #e5e7eb);
background: var(--surface-1, #fff);
text-decoration: none;
color: inherit;
}
.aksrt-main-posts__thumb {
height: 110px;
background: var(--surface-2, #f3f4f6);
overflow: hidden;
}
.aksrt-main-posts__thumb.mini {
width: 56px;
height: 56px;
border-radius: 8px;
flex-shrink: 0;
}
.aksrt-main-posts__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.aksrt-main-posts__thumb.is-empty { background: linear-gradient(135deg, #e2e8f0, #f8fafc); }
.aksrt-main-posts__body { padding: 10px 12px 12px; min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.aksrt-main-posts__title {
font-size: 13px;
font-weight: 600;
line-height: 1.4;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.aksrt-main-posts__meta {
display: flex;
gap: 10px;
font-size: 11px;
color: var(--muted-2-color, #999);
}
.aksrt-main-posts__row {
display: flex;
align-items: center;
gap: 10px;
text-decoration: none;
color: inherit;
padding: 4px 0;
border-bottom: 1px dashed var(--color-line, #e5e7eb);
}
.aksrt-main-posts__row:last-child { border-bottom: 0; }
.aksrt-main-posts__num {
width: 20px;
flex-shrink: 0;
font-size: 12px;
font-weight: 700;
color: var(--color-primary, #3b82f6);
text-align: center;
}
/* Term aggregation */
.aksrt-term-agg {
display: grid;
grid-template-columns: repeat(var(--aksrt-ta-cols, 1), minmax(0, 1fr));
gap: 12px;
}
.aksrt-term-agg__card {
border: 1px solid var(--color-line, #e5e7eb);
border-radius: 12px;
overflow: hidden;
background: var(--surface-1, #fff);
}
.aksrt-term-agg__head {
display: block;
text-decoration: none;
color: inherit;
position: relative;
}
.aksrt-term-agg__cover {
height: 96px;
background: var(--surface-2, #f3f4f6) center/cover no-repeat;
}
.aksrt-term-agg__cover.is-empty {
background: linear-gradient(135deg, #dbeafe, #eff6ff);
}
.aksrt-term-agg__name {
position: absolute;
left: 12px;
bottom: 10px;
font-weight: 700;
color: #fff;
text-shadow: 0 1px 3px rgba(0,0,0,.45);
}
.aksrt-term-agg__count {
position: absolute;
right: 10px;
top: 10px;
font-size: 11px;
padding: 2px 8px;
border-radius: 999px;
background: rgba(0,0,0,.45);
color: #fff;
}
.aksrt-term-agg__posts {
list-style: none;
margin: 0;
padding: 8px 12px 10px;
}
.aksrt-term-agg__posts li {
padding: 6px 0;
border-bottom: 1px dashed var(--color-line, #eee);
}
.aksrt-term-agg__posts li:last-child { border-bottom: 0; }
.aksrt-term-agg__posts a {
color: inherit;
text-decoration: none;
font-size: 13px;
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* Icon cover cards */
.aksrt-icon-cover {
display: grid;
grid-template-columns: repeat(var(--aksrt-icc-pc, 2), minmax(0, 1fr));
gap: 10px;
--aksrt-icc-icon: 25px;
}
@media (max-width: 575.98px) {
.aksrt-icon-cover {
grid-template-columns: repeat(var(--aksrt-icc-m, 1), minmax(0, 1fr));
}
}
.aksrt-icon-cover__item {
display: flex;
align-items: center;
gap: 10px;
padding: 12px;
border-radius: 12px;
border: 1px solid var(--color-line, #e5e7eb);
background: var(--surface-1, #fff);
text-decoration: none;
color: inherit;
}
.aksrt-icon-cover__icon {
width: calc(var(--aksrt-icc-icon) + 18px);
height: calc(var(--aksrt-icc-icon) + 18px);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: var(--aksrt-icc-icon);
color: var(--color-primary, #3b82f6);
background: var(--surface-2, #f3f4f6);
flex-shrink: 0;
overflow: hidden;
}
.aksrt-icon-cover.is-radius .aksrt-icon-cover__icon { border-radius: 10px; }
.aksrt-icon-cover__icon img { width: 70%; height: 70%; object-fit: contain; }
.aksrt-icon-cover__title { font-weight: 700; font-size: 14px; }
.aksrt-icon-cover__desc { font-size: 12px; color: var(--muted-2-color, #888); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Bookmark links */
.aksrt-bookmark-links {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 10px;
}
.aksrt-bookmark-links.has-box {
padding: 10px;
border: 1px solid var(--color-line, #e5e7eb);
border-radius: 12px;
}
.aksrt-bookmark-links.style-simple {
grid-template-columns: 1fr;
}
.aksrt-bookmark-links__item {
display: flex;
align-items: center;
gap: 10px;
padding: 8px;
border-radius: 10px;
background: var(--surface-2, #f8fafc);
text-decoration: none;
color: inherit;
min-width: 0;
}
.aksrt-bookmark-links__img {
width: 36px;
height: 36px;
border-radius: 8px;
object-fit: cover;
flex-shrink: 0;
}
.aksrt-bookmark-links__text { min-width: 0; display: flex; flex-direction: column; }
.aksrt-bookmark-links__name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aksrt-bookmark-links__desc { font-size: 11px; color: var(--muted-2-color, #999); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Search keywords + history */
.aksrt-search-widget__keywords,
.aksrt-search-widget__history { margin-top: 10px; }
.aksrt-search-widget__kw-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
margin-bottom: 6px;
}
.aksrt-search-widget__kw-title {
font-size: 12px;
color: var(--muted-2-color, #888);
margin-bottom: 6px;
}
.aksrt-search-widget__kw-head .aksrt-search-widget__kw-title { margin-bottom: 0; }
.aksrt-search-widget__history-clear {
border: 0;
background: transparent;
color: var(--muted-2-color, #999);
font-size: 12px;
cursor: pointer;
padding: 0;
}
.aksrt-search-widget__history-clear:hover { color: var(--color-primary, #3b82f6); }
.aksrt-search-widget__kw-list,
.aksrt-search-widget__history-list { display: flex; flex-wrap: wrap; gap: 6px; }
.aksrt-search-widget__kw,
.aksrt-search-widget__history-item {
display: inline-block;
padding: 3px 10px;
border-radius: 999px;
background: var(--surface-2, #f3f4f6);
color: inherit;
text-decoration: none;
font-size: 12px;
}
.aksrt-search-widget__history-empty {
font-size: 12px;
color: var(--muted-2-color, #999);
}
.aksrt-search-widget__more { margin-top: 8px; text-align: right; font-size: 12px; }
.aksrt-search-widget__more a { color: var(--color-primary, #3b82f6); text-decoration: none; }
/* Product list widgets (batch6) */
.aksrt-product-widget { margin-bottom: 8px; }
.aksrt-product-widget__grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 10px;
}
.aksrt-product-widget--list .aksrt-product-widget__grid,
.aksrt-product-widget--mini .aksrt-product-widget__grid {
grid-template-columns: 1fr;
}
.aksrt-product-widget--oneline .aksrt-product-widget__grid {
display: flex;
overflow-x: auto;
gap: 10px;
scroll-snap-type: x mandatory;
-webkit-overflow-scrolling: touch;
padding-bottom: 4px;
}
.aksrt-product-widget--oneline .aksrt-product-widget__item,
.aksrt-product-widget--oneline .aksrt-product-card {
flex: 0 0 42%;
min-width: 140px;
scroll-snap-align: start;
}
.aksrt-product-widget__item,
.aksrt-product-widget .aksrt-product-card {
border: 1px solid var(--color-line, #e5e7eb);
border-radius: 10px;
overflow: hidden;
background: var(--surface-1, #fff);
}
.aksrt-product-widget__thumb,
.aksrt-product-widget .aksrt-product-card__image {
display: block;
aspect-ratio: 1 / 1;
background: var(--surface-2, #f3f4f6);
overflow: hidden;
}
.aksrt-product-widget__thumb img,
.aksrt-product-widget .aksrt-product-card__image img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.aksrt-product-widget__info,
.aksrt-product-widget .aksrt-product-card__body { padding: 8px 10px 10px; }
.aksrt-product-widget__title,
.aksrt-product-widget .aksrt-product-card__title {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
font-size: 13px;
font-weight: 600;
line-height: 1.35;
color: inherit;
text-decoration: none;
}
.aksrt-product-widget__meta {
display: flex;
justify-content: space-between;
gap: 6px;
margin-top: 6px;
font-size: 12px;
}
.aksrt-product-widget__price,
.aksrt-product-widget .aksrt-product-card__price {
color: var(--color-primary, #ef4444);
font-weight: 700;
}
.aksrt-product-widget__sales { color: var(--muted-2-color, #999); font-size: 11px; }
.aksrt-product-widget__empty { font-size: 13px; color: var(--muted-2-color, #999); padding: 12px 0; }
.aksrt-product-widget .ajax-pag { margin-top: 12px; text-align: center; }
.aksrt-product-tab__headers {
display: flex;
gap: 6px;
overflow-x: auto;
margin-bottom: 12px;
-webkit-overflow-scrolling: touch;
}
.aksrt-product-tab__header {
flex: 0 0 auto;
border: 0;
background: var(--surface-2, #f3f4f6);
border-radius: 999px;
padding: 6px 12px;
font-size: 13px;
cursor: pointer;
color: inherit;
}
.aksrt-product-tab__header.is-active {
background: var(--color-primary, #3b82f6);
color: #fff;
}
/* Scroll notice */
.aksrt-scroll-notice {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 14px;
border-radius: 10px;
background: #eff6ff;
color: #1d4ed8;
margin-bottom: 8px;
overflow: hidden;
}
.aksrt-scroll-notice.is-radius { border-radius: 999px; }
.aksrt-scroll-notice.color-c-green { background: #ecfdf5; color: #047857; }
.aksrt-scroll-notice.color-c-yellow { background: #fffbeb; color: #b45309; }
.aksrt-scroll-notice.color-c-red { background: #fef2f2; color: #b91c1c; }
.aksrt-scroll-notice.color-c-purple { background: #f5f3ff; color: #6d28d9; }
.aksrt-scroll-notice__icon { flex-shrink: 0; }
.aksrt-scroll-notice__viewport { position: relative; flex: 1; min-width: 0; height: 1.4em; }
.aksrt-scroll-notice__item {
position: absolute;
inset: 0;
opacity: 0;
transform: translateY(8px);
transition: opacity .35s ease, transform .35s ease;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 13px;
line-height: 1.4;
}
.aksrt-scroll-notice__item.is-active {
opacity: 1;
transform: translateY(0);
}
.aksrt-scroll-notice__item a {
color: inherit;
text-decoration: none;
}
.aksrt-scroll-notice__item i { margin-right: 6px; opacity: .85; }
.hot-post-item { display: flex; align-items: center; gap: 10px; }
.hot-post-item__thumb {
width: 48px; height: 48px; border-radius: 8px; overflow: hidden; flex-shrink: 0;
background: var(--surface-2, #eee);
}
.hot-post-item__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.aksrt-cover-card__bg.is-video video {
width: 100%; height: 100%; object-fit: cover; display: block;
}
.widget-buttons {
display: flex;
flex-wrap: wrap;
gap: var(--btn-gap, 10px);
margin-bottom: 8px;
}
.widget-buttons--vertical { flex-direction: column; }
.widget-buttons.align-center { justify-content: center; }
.widget-buttons.align-left { justify-content: flex-start; }
.widget-buttons.align-right { justify-content: flex-end; }
.widget-buttons__btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
padding: 8px 16px;
border-radius: 8px;
text-decoration: none;
font-size: 13px;
font-weight: 600;
background: var(--color-primary, #3b82f6);
color: #fff !important;
}
.widget-buttons.is-radius .widget-buttons__btn { border-radius: 999px; }
.widget-buttons.is-hollow .widget-buttons__btn {
background: transparent;
color: var(--color-primary, #3b82f6) !important;
border: 1px solid currentColor;
}
.widget-buttons__btn--secondary { background: #64748b; }
.widget-buttons__btn--outline {
background: transparent;
color: inherit !important;
border: 1px solid var(--color-line, #ddd);
}
.widget-buttons__btn--text {
background: transparent;
color: var(--color-primary, #3b82f6) !important;
padding-left: 0;
padding-right: 0;
}
.widget-buttons__btn--pink { background: #ec4899; }
.widget-buttons__btn--blue { background: #3b82f6; }
.widget-buttons__btn--green { background: #22c55e; }
.aksrt-video-widget {
position: relative;
width: 100%;
height: 0;
border-radius: 8px;
overflow: hidden;
background: #111;
margin-bottom: 10px;
}
.aksrt-video-widget iframe,
.aksrt-video-widget video {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
border: 0;
object-fit: cover;
}
.aksrt-video-widget.controller-hide video::-webkit-media-controls {
display: none !important;
}
.widget-recent-comments__post {
margin-top: 2px;
font-size: 11px;
}
.widget-recent-comments__post a {
color: var(--muted-2-color, #999);
text-decoration: none;
}
.widget-icon-cards {
display: grid;
grid-template-columns: repeat(var(--ic-columns, 2), minmax(0, 1fr));
gap: 10px;
}
@media (max-width: 575.98px) {
.widget-icon-cards {
grid-template-columns: repeat(var(--ic-m-columns, 2), minmax(0, 1fr));
}
}
.widget-icon-cards.is-bare .widget-icon-cards__item {
background: transparent;
border: 0;
box-shadow: none;
}
.widget-icon-cards__item.is-vertical {
flex-direction: column;
text-align: center;
padding: 16px 10px;
}
.widget-icon-cards__item.is-vertical .widget-icon-cards__icon {
margin: 0 auto 10px;
width: calc(var(--ic-icon, 28px) + 20px);
height: calc(var(--ic-icon, 28px) + 20px);
font-size: var(--ic-icon, 28px);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
background: var(--surface-2, #f3f4f6);
color: var(--color-primary, #3b82f6);
}
.aksrt-tag-cloud.tag-cloud {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.aksrt-tag-cloud .but {
display: inline-flex;
align-items: center;
padding: 4px 10px;
border-radius: 999px;
background: var(--surface-2, #f3f4f6);
color: inherit;
text-decoration: none;
font-size: 12px;
}
.aksrt-tag-cloud .c-blue { background: #dbeafe; color: #1d4ed8; }
.aksrt-tag-cloud .c-green { background: #dcfce7; color: #15803d; }
.aksrt-tag-cloud .c-yellow { background: #fef3c7; color: #b45309; }
.aksrt-tag-cloud .c-purple { background: #ede9fe; color: #6d28d9; }
.aksrt-tag-cloud .c-red { background: #fee2e2; color: #b91c1c; }
.aksrt-tag-cloud.fixed-width a { min-width: 72px; justify-content: center; }
.aksrt-cat-list .count {
float: right;
color: var(--muted-2-color, #999);
font-size: 12px;
}
.aksrt-user-card__oauth {
margin-top: 14px;
padding-top: 12px;
border-top: 1px dashed var(--color-line, #e5e7eb);
}
.aksrt-user-card__oauth .social-login-divider {
font-size: 12px;
color: var(--muted-2-color, #999);
margin-bottom: 8px;
}
.aksrt-user-card__oauth .social-login-item,
.aksrt-user-card__oauth a {
margin: 0 4px;
}
.aksrt-author-card__follow {
border: 0;
cursor: pointer;
margin-right: 6px;
background: #ef4444;
color: #fff !important;
}
.aksrt-author-card__follow.is-following {
background: var(--surface-2, #e5e7eb);
color: inherit !important;
}
.aksrt-author-card__badge {
display: inline-flex;
align-items: center;
gap: 4px;
margin-top: 8px;
padding: 2px 10px;
border-radius: 999px;
font-size: 12px;
background: #fef3c7;
color: #b45309;
}
.aksrt-author-card__badge img { border-radius: 50%; }
/* Badge remote modal (batch6) */
.aksrt-badge-modal { padding: 8px 4px 12px; }
.aksrt-badge-modal__head {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 12px;
position: relative;
padding-right: 28px;
}
.aksrt-badge-modal__avatar {
width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
}
.aksrt-badge-modal__title { font-weight: 700; font-size: 15px; flex: 1; min-width: 0; }
.aksrt-badge-modal__wear-tag {
display: inline-block;
margin-left: 6px;
font-size: 12px;
font-weight: 500;
color: var(--color-primary, #3b82f6);
}
.aksrt-badge-modal__list { max-height: 50vh; overflow: auto; }
.aksrt-badge-modal__item {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 4px;
border-bottom: 1px solid var(--color-line, #eee);
}
.aksrt-badge-modal__item:last-child { border-bottom: 0; }
.aksrt-badge-modal__item .medal-icon { width: 40px; height: 40px; object-fit: contain; }
.aksrt-badge-modal__icon-fa {
width: 40px; height: 40px; border-radius: 50%;
display: inline-flex; align-items: center; justify-content: center;
background: var(--surface-2, #f3f4f6); color: #f59e0b;
}
.aksrt-badge-modal__icon-fa.lg { width: 72px; height: 72px; font-size: 28px; }
.aksrt-badge-modal__meta { flex: 1; min-width: 0; }
.aksrt-badge-modal__name { font-weight: 600; font-size: 14px; }
.aksrt-badge-modal__empty { text-align: center; color: var(--muted-2-color, #999); padding: 24px 0; }
.aksrt-badge-modal--single { text-align: center; padding: 16px 8px 20px; }
.aksrt-badge-modal__card { padding: 12px 8px 8px; }
.aksrt-badge-modal__actions { margin-top: 12px; }
.aksrt-author-hero__badges { margin-top: 8px; }
/* Forum tab topics (batch6) */
.aksrt-ftab__nav {
display: flex;
gap: 6px;
list-style: none;
margin: 0 0 10px;
padding: 0;
overflow-x: auto;
}
.aksrt-ftab__btn {
border: 0;
background: var(--surface-2, #f3f4f6);
border-radius: 999px;
padding: 5px 12px;
font-size: 13px;
cursor: pointer;
color: inherit;
}
.aksrt-ftab__btn.is-active {
background: var(--color-primary, #3b82f6);
color: #fff;
}
.aksrt-ftab__panel { display: none; }
.aksrt-ftab__panel.is-active { display: block; }
.aksrt-ftab__empty { font-size: 13px; color: var(--muted-2-color, #999); padding: 8px 0; }
.aksrt-ftopic-list { list-style: none; margin: 0; padding: 0; }
.aksrt-ftopic-list__item {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
padding: 7px 0;
border-bottom: 1px dashed var(--color-line, #eee);
font-size: 13px;
}
.aksrt-ftopic-list__item:last-child { border-bottom: 0; }
.aksrt-ftopic-list__link {
color: inherit;
text-decoration: none;
flex: 1;
min-width: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.aksrt-ftopic-list__views { color: var(--muted-2-color, #999); font-size: 12px; flex-shrink: 0; }
.aksrt-ftopic-list__meta {
display: flex;
gap: 8px;
font-size: 11px;
color: var(--muted-2-color, #999);
margin-top: 4px;
}
.aksrt-ftopic-list.is-detail .aksrt-ftopic-list__item {
flex-direction: column;
align-items: flex-start;
}