fix(ajax): show the reference skeleton on every load-more surface
Clicking 加载更多 in the 多栏目文章 widget showed no skeleton at all — the
list simply stayed still until the response arrived, then the new cards
appeared. The homepage stream, archives and comments already had a working
skeleton; the widget's AJAX load goes through a different client and never
found its loader.
Root cause was DOM placement, not visibility: ContentRenderer emitted
.post_ajax_loader as a *sibling* of .widget-ajaxpager, while the widget REST
client resolves it with container.querySelector('.post_ajax_loader'). The
node existed but could never match, so .is-loading was never added and the
skeleton stayed display:none. Inactive tab panes had the same shape, and the
direct-load branch of ajaxpager() emitted no loader at all.
Changes, all following the reference theme's post_ajax() contract in
zibll/js/main.js (beforeSend anchors the loader to the end of the list;
success only hides it, never removes it):
- ContentRenderer: nest the loader inside .widget-ajaxpager for both the
direct-load and inactive-tab branches, and drop the sibling append.
- widgets/frontend.js: anchorLoader() moves the loader to the end of the
list before .ajax-pag on every request; appended cards are inserted before
it; a replace preserves the node instead of wiping it with innerHTML; a
fallback loader is created when the DOM has none; loadItems() now returns
its promise; drop the unreachable is-loading auto-load branch.
- Message centre, user-home panels and the search page switch from spinner /
opacity feedback to the same .posts-item-shaped skeleton, so all AJAX
surfaces share one loading contract.
- Remove the second, never-wired skeleton system (.aksrt-skeleton-* in
core-ui.css) and the dead spinner stylesheets/rules (skeleton.css,
ajax-spinner.css, .load-more__*, --skeleton-base/--skeleton-shine) plus the
unregistered assets/js/waterfall.js.
- Extend the widget, message-centre, user-home and asset-ledger contract
tests to pin the loader inside the container, the class-only visibility
switch, and the absence of the deleted dead code.
Verified: 470 node tests, 136 PHP widget assertions, admin-contract and
widget-system audits all green; rebuilt public assets after the CSS/JS
removals.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+5
-384
@@ -166,10 +166,6 @@ Full admin panel preserved (settings, OAuth, content tools, etc).
|
||||
--card-gap: 16px;
|
||||
--card-gap-lg: 20px;
|
||||
|
||||
/* ===== Skeleton loader ===== */
|
||||
--skeleton-base: var(--surface-2);
|
||||
--skeleton-shine: var(--surface-1);
|
||||
|
||||
/* ===== Extended tokens (used by components) ===== */
|
||||
--color-primary-light: var(--color-primary-soft);
|
||||
--color-surface: var(--surface-1);
|
||||
@@ -397,9 +393,6 @@ body.dark-theme {
|
||||
--footer-color: var(--color-ink-4);
|
||||
--shadow-md: var(--shadow);
|
||||
|
||||
--skeleton-base: #3a3b3e;
|
||||
--skeleton-shine: #444548;
|
||||
|
||||
/* Multi-color palette — dark mode: same hue, softer tint backgrounds */
|
||||
--aksrt-rose-soft: rgba(244, 63, 94, 0.18);
|
||||
--aksrt-blue-soft: rgba(59, 130, 246, 0.18);
|
||||
@@ -5105,8 +5098,11 @@ body:has(.modal.in) .float-right.position-center,
|
||||
/**
|
||||
* AKSRT Enhancements — 全局 UI 增强
|
||||
*
|
||||
* 包含:骨架屏、悬停动效、暗色过渡、滚动感知
|
||||
* 包含:悬停动效、暗色过渡、滚动感知
|
||||
* 所有选择器使用 aksrt- 前缀避免冲突
|
||||
*
|
||||
* 骨架屏不在此文件:唯一契约是 .placeholder 块 + .post_ajax_loader 容器
|
||||
* (inc/helpers/posts-renderer/markup.php 的 aksrt_render_placeholder)。
|
||||
*/
|
||||
|
||||
@keyframes aksrt-spin {
|
||||
@@ -5115,79 +5111,7 @@ body:has(.modal.in) .float-right.position-center,
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
* 1. 骨架屏加载动画
|
||||
* ============================================================ */
|
||||
.aksrt-skeleton {
|
||||
background: linear-gradient(
|
||||
90deg,
|
||||
rgba(121, 121, 121, 0.08) 25%,
|
||||
rgba(121, 121, 121, 0.15) 37%,
|
||||
rgba(121, 121, 121, 0.08) 63%
|
||||
);
|
||||
background-size: 400% 100%;
|
||||
animation: aksrt-skeleton-shimmer 1.5s ease infinite;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.aksrt-skeleton--image {
|
||||
height: 0;
|
||||
padding-bottom: 66.67%; /* 3:2 aspect ratio */
|
||||
}
|
||||
|
||||
.aksrt-skeleton--avatar {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.aksrt-skeleton--title {
|
||||
height: 22px;
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.aksrt-skeleton--text {
|
||||
height: 16px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.aksrt-skeleton--text-short {
|
||||
height: 16px;
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
.aksrt-skeleton--button {
|
||||
height: 36px;
|
||||
width: 100px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
@keyframes aksrt-skeleton-shimmer {
|
||||
0% { background-position: 100% 50%; }
|
||||
100% { background-position: 0 50%; }
|
||||
}
|
||||
|
||||
/* 骨架屏组合:文章卡片骨架 */
|
||||
.aksrt-skeleton-card {
|
||||
background: var(--surface-1, #fff);
|
||||
border: 1px solid var(--color-line);
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.aksrt-skeleton-card .aksrt-skeleton--image {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.aksrt-skeleton-card__body {
|
||||
padding: 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
* 2. 悬停交互动效
|
||||
* 1. 悬停交互动效
|
||||
* ============================================================ */
|
||||
|
||||
/* 卡片放大 */
|
||||
@@ -5916,149 +5840,6 @@ body.aksrt-body-scroll .aksrt-show-on-scroll {
|
||||
color: var(--color-ink-4, #8A8F98);
|
||||
}
|
||||
|
||||
/* source: assets/css/frontend/skeleton.css */
|
||||
/* ========== 骨架屏加载 — 对齐 legacy skeleton loading ========== */
|
||||
.skeleton {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: var(--surface-2, #eee);
|
||||
border-radius: var(--radius, 8px);
|
||||
}
|
||||
|
||||
.skeleton::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: linear-gradient(
|
||||
90deg,
|
||||
transparent 0%,
|
||||
rgba(255, 255, 255, 0.4) 50%,
|
||||
transparent 100%
|
||||
);
|
||||
animation: skeleton-shimmer 1.5s infinite;
|
||||
}
|
||||
|
||||
@keyframes skeleton-shimmer {
|
||||
0% { transform: translateX(-100%); }
|
||||
100% { transform: translateX(100%); }
|
||||
}
|
||||
|
||||
/* 骨架屏变体 */
|
||||
.skeleton-text {
|
||||
height: 14px;
|
||||
border-radius: 4px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.skeleton-text--title {
|
||||
height: 20px;
|
||||
width: 60%;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.skeleton-text--short {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.skeleton-text--medium {
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
.skeleton-avatar {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
border-radius: 50%;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.skeleton-avatar--sm {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.skeleton-avatar--lg {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
}
|
||||
|
||||
.skeleton-thumb {
|
||||
width: 100%;
|
||||
aspect-ratio: 16 / 9;
|
||||
border-radius: var(--radius, 8px);
|
||||
}
|
||||
|
||||
.skeleton-thumb--square {
|
||||
aspect-ratio: 1;
|
||||
}
|
||||
|
||||
.skeleton-thumb--card {
|
||||
aspect-ratio: 16 / 10;
|
||||
border-radius: var(--radius, 8px) var(--radius, 8px) 0 0;
|
||||
}
|
||||
|
||||
/* 卡片骨架屏 */
|
||||
.skeleton-card {
|
||||
background: var(--surface-1, #fff);
|
||||
border-radius: var(--radius, 8px);
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.skeleton-card__thumb {
|
||||
width: 100%;
|
||||
aspect-ratio: 16 / 10;
|
||||
}
|
||||
|
||||
.skeleton-card__body {
|
||||
padding: 14px 16px;
|
||||
}
|
||||
|
||||
.skeleton-card__meta {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
/* 评论骨架屏 */
|
||||
.skeleton-comment {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
padding: 16px 0;
|
||||
border-bottom: 1px solid var(--color-line-soft, rgba(0, 0, 0, 0.03));
|
||||
}
|
||||
|
||||
.skeleton-comment__body {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.skeleton-comment__header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/* 通用骨架屏容器 */
|
||||
.skeleton-list .skeleton-item {
|
||||
padding: 12px 0;
|
||||
border-bottom: 1px solid var(--color-line-soft, rgba(0, 0, 0, 0.03));
|
||||
}
|
||||
|
||||
.skeleton-list .skeleton-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
/* 减弱动画偏好 */
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.skeleton::after {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* source: assets/css/frontend/empty-state.css */
|
||||
/* ========== 空状态 — 对齐 legacy empty state ========== */
|
||||
.empty-state {
|
||||
@@ -6320,50 +6101,6 @@ body.aksrt-body-scroll .aksrt-show-on-scroll {
|
||||
border-color: var(--color-primary, #f04494);
|
||||
}
|
||||
|
||||
/* AJAX 加载更多 */
|
||||
.load-more {
|
||||
text-align: center;
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
.load-more__btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 10px 24px;
|
||||
font-size: 13px;
|
||||
color: var(--color-ink-2, #4e5358);
|
||||
background: var(--surface-1, #fff);
|
||||
border: 1px solid var(--color-line, rgba(50, 50, 50, 0.06));
|
||||
border-radius: 20px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.load-more__btn:hover {
|
||||
color: var(--color-primary, #f04494);
|
||||
border-color: var(--color-primary, #f04494);
|
||||
}
|
||||
|
||||
.load-more__btn:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.load-more__spinner {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border: 2px solid var(--surface-3, #e8e8e8);
|
||||
border-top-color: var(--color-primary, #f04494);
|
||||
border-radius: 50%;
|
||||
animation: spin 0.6s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
/* 移动端 */
|
||||
@media (max-width: 767px) {
|
||||
.pagination a,
|
||||
@@ -6397,122 +6134,6 @@ body.aksrt-body-scroll .aksrt-show-on-scroll {
|
||||
}
|
||||
}
|
||||
|
||||
/* source: assets/css/frontend/ajax-spinner.css */
|
||||
/* ========== AJAX 加载指示器 — 对齐 legacy loading spinner ========== */
|
||||
.aksrt-loading {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 40px 20px;
|
||||
color: var(--color-ink-4, #999);
|
||||
font-size: 13px;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.aksrt-loading__spinner {
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border: 2px solid var(--surface-3, #e8e8e8);
|
||||
border-top-color: var(--color-primary, #f04494);
|
||||
border-radius: 50%;
|
||||
animation: aksrt-spin 0.6s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes aksrt-spin {
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
/* 全屏加载遮罩 */
|
||||
.aksrt-loading-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(255, 255, 255, 0.8);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 9999;
|
||||
backdrop-filter: blur(2px);
|
||||
}
|
||||
|
||||
.aksrt-loading-overlay__content {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.aksrt-loading-overlay__spinner {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border: 3px solid var(--surface-3, #e8e8e8);
|
||||
border-top-color: var(--color-primary, #f04494);
|
||||
border-radius: 50%;
|
||||
animation: aksrt-spin 0.6s linear infinite;
|
||||
margin: 0 auto 12px;
|
||||
}
|
||||
|
||||
.aksrt-loading-overlay__text {
|
||||
font-size: 13px;
|
||||
color: var(--color-ink-3, #777);
|
||||
}
|
||||
|
||||
/* 行内加载(替换内容时) */
|
||||
.aksrt-loading-inline {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 20px;
|
||||
color: var(--color-ink-4, #999);
|
||||
font-size: 12px;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.aksrt-loading-inline__dot {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
background: var(--color-primary, #f04494);
|
||||
border-radius: 50%;
|
||||
animation: aksrt-dot-pulse 1.2s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.aksrt-loading-inline__dot:nth-child(2) {
|
||||
animation-delay: 0.2s;
|
||||
}
|
||||
|
||||
.aksrt-loading-inline__dot:nth-child(3) {
|
||||
animation-delay: 0.4s;
|
||||
}
|
||||
|
||||
@keyframes aksrt-dot-pulse {
|
||||
0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
|
||||
40% { opacity: 1; transform: scale(1); }
|
||||
}
|
||||
|
||||
/* 页面加载进度条 */
|
||||
.aksrt-progress-bar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 2px;
|
||||
background: var(--color-primary, #f04494);
|
||||
z-index: 10000;
|
||||
transition: width 0.3s ease;
|
||||
}
|
||||
|
||||
/* 减弱动画偏好 */
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.aksrt-loading__spinner,
|
||||
.aksrt-loading-overlay__spinner {
|
||||
animation-duration: 1.5s;
|
||||
}
|
||||
|
||||
.aksrt-loading-inline__dot {
|
||||
animation: none;
|
||||
opacity: 0.6;
|
||||
}
|
||||
}
|
||||
|
||||
/* source: assets/css/frontend/modal-runtime.css */
|
||||
/**
|
||||
* Modal runtime + ajax list primitives (shared).
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -141,10 +141,6 @@
|
||||
--card-gap: 16px;
|
||||
--card-gap-lg: 20px;
|
||||
|
||||
/* ===== Skeleton loader ===== */
|
||||
--skeleton-base: var(--surface-2);
|
||||
--skeleton-shine: var(--surface-1);
|
||||
|
||||
/* ===== Extended tokens (used by components) ===== */
|
||||
--color-primary-light: var(--color-primary-soft);
|
||||
--color-surface: var(--surface-1);
|
||||
@@ -372,9 +368,6 @@ body.dark-theme {
|
||||
--footer-color: var(--color-ink-4);
|
||||
--shadow-md: var(--shadow);
|
||||
|
||||
--skeleton-base: #3a3b3e;
|
||||
--skeleton-shine: #444548;
|
||||
|
||||
/* Multi-color palette — dark mode: same hue, softer tint backgrounds */
|
||||
--aksrt-rose-soft: rgba(244, 63, 94, 0.18);
|
||||
--aksrt-blue-soft: rgba(59, 130, 246, 0.18);
|
||||
|
||||
@@ -1,114 +0,0 @@
|
||||
/* ========== AJAX 加载指示器 — 对齐 legacy loading spinner ========== */
|
||||
.aksrt-loading {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 40px 20px;
|
||||
color: var(--color-ink-4, #999);
|
||||
font-size: 13px;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.aksrt-loading__spinner {
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border: 2px solid var(--surface-3, #e8e8e8);
|
||||
border-top-color: var(--color-primary, #f04494);
|
||||
border-radius: 50%;
|
||||
animation: aksrt-spin 0.6s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes aksrt-spin {
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
/* 全屏加载遮罩 */
|
||||
.aksrt-loading-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(255, 255, 255, 0.8);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 9999;
|
||||
backdrop-filter: blur(2px);
|
||||
}
|
||||
|
||||
.aksrt-loading-overlay__content {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.aksrt-loading-overlay__spinner {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border: 3px solid var(--surface-3, #e8e8e8);
|
||||
border-top-color: var(--color-primary, #f04494);
|
||||
border-radius: 50%;
|
||||
animation: aksrt-spin 0.6s linear infinite;
|
||||
margin: 0 auto 12px;
|
||||
}
|
||||
|
||||
.aksrt-loading-overlay__text {
|
||||
font-size: 13px;
|
||||
color: var(--color-ink-3, #777);
|
||||
}
|
||||
|
||||
/* 行内加载(替换内容时) */
|
||||
.aksrt-loading-inline {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 20px;
|
||||
color: var(--color-ink-4, #999);
|
||||
font-size: 12px;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.aksrt-loading-inline__dot {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
background: var(--color-primary, #f04494);
|
||||
border-radius: 50%;
|
||||
animation: aksrt-dot-pulse 1.2s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.aksrt-loading-inline__dot:nth-child(2) {
|
||||
animation-delay: 0.2s;
|
||||
}
|
||||
|
||||
.aksrt-loading-inline__dot:nth-child(3) {
|
||||
animation-delay: 0.4s;
|
||||
}
|
||||
|
||||
@keyframes aksrt-dot-pulse {
|
||||
0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
|
||||
40% { opacity: 1; transform: scale(1); }
|
||||
}
|
||||
|
||||
/* 页面加载进度条 */
|
||||
.aksrt-progress-bar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 2px;
|
||||
background: var(--color-primary, #f04494);
|
||||
z-index: 10000;
|
||||
transition: width 0.3s ease;
|
||||
}
|
||||
|
||||
/* 减弱动画偏好 */
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.aksrt-loading__spinner,
|
||||
.aksrt-loading-overlay__spinner {
|
||||
animation-duration: 1.5s;
|
||||
}
|
||||
|
||||
.aksrt-loading-inline__dot {
|
||||
animation: none;
|
||||
opacity: 0.6;
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,11 @@
|
||||
/**
|
||||
* AKSRT Enhancements — 全局 UI 增强
|
||||
*
|
||||
* 包含:骨架屏、悬停动效、暗色过渡、滚动感知
|
||||
* 包含:悬停动效、暗色过渡、滚动感知
|
||||
* 所有选择器使用 aksrt- 前缀避免冲突
|
||||
*
|
||||
* 骨架屏不在此文件:唯一契约是 .placeholder 块 + .post_ajax_loader 容器
|
||||
* (inc/helpers/posts-renderer/markup.php 的 aksrt_render_placeholder)。
|
||||
*/
|
||||
|
||||
@keyframes aksrt-spin {
|
||||
@@ -11,79 +14,7 @@
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
* 1. 骨架屏加载动画
|
||||
* ============================================================ */
|
||||
.aksrt-skeleton {
|
||||
background: linear-gradient(
|
||||
90deg,
|
||||
rgba(121, 121, 121, 0.08) 25%,
|
||||
rgba(121, 121, 121, 0.15) 37%,
|
||||
rgba(121, 121, 121, 0.08) 63%
|
||||
);
|
||||
background-size: 400% 100%;
|
||||
animation: aksrt-skeleton-shimmer 1.5s ease infinite;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.aksrt-skeleton--image {
|
||||
height: 0;
|
||||
padding-bottom: 66.67%; /* 3:2 aspect ratio */
|
||||
}
|
||||
|
||||
.aksrt-skeleton--avatar {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.aksrt-skeleton--title {
|
||||
height: 22px;
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.aksrt-skeleton--text {
|
||||
height: 16px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.aksrt-skeleton--text-short {
|
||||
height: 16px;
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
.aksrt-skeleton--button {
|
||||
height: 36px;
|
||||
width: 100px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
@keyframes aksrt-skeleton-shimmer {
|
||||
0% { background-position: 100% 50%; }
|
||||
100% { background-position: 0 50%; }
|
||||
}
|
||||
|
||||
/* 骨架屏组合:文章卡片骨架 */
|
||||
.aksrt-skeleton-card {
|
||||
background: var(--surface-1, #fff);
|
||||
border: 1px solid var(--color-line);
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.aksrt-skeleton-card .aksrt-skeleton--image {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.aksrt-skeleton-card__body {
|
||||
padding: 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
* 2. 悬停交互动效
|
||||
* 1. 悬停交互动效
|
||||
* ============================================================ */
|
||||
|
||||
/* 卡片放大 */
|
||||
|
||||
@@ -106,10 +106,20 @@
|
||||
}
|
||||
|
||||
.messages-center.is-loading .messages-center__content {
|
||||
opacity: 0.55;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* 加载态由消息骨架承担(与文章列表 .post_ajax_loader 同一契约),
|
||||
不再让按钮 spinner 与内容透明度抢反馈。 */
|
||||
.messages-list > .post_ajax_loader {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.messages-list > .post_ajax_loader.is-loading {
|
||||
display: block;
|
||||
animation: aksrtFadeIn 0.2s ease both;
|
||||
}
|
||||
|
||||
.messages-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -455,22 +465,36 @@ html.dark .message-detail {
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.messages-center.is-loading .messages-pagination__more span::before {
|
||||
display: inline-block;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
margin-right: 7px;
|
||||
border: 2px solid currentColor;
|
||||
border-right-color: transparent;
|
||||
border-radius: 50%;
|
||||
content: "";
|
||||
vertical-align: -2px;
|
||||
animation: messages-pagination-spin 0.7s linear infinite;
|
||||
/* 消息骨架:复用真实 .message-item 结构与 .placeholder 动画契约,
|
||||
只把内容换成灰块(参考主题 post_ajax loader 的同构思路)。 */
|
||||
.messages-list > .post_ajax_loader .message-item--placeholder {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
@keyframes messages-pagination-spin {
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
.messages-list > .post_ajax_loader .message-item--placeholder .message-item__icon {
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
.messages-list > .post_ajax_loader .message-item--placeholder .message-item__body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.messages-list > .post_ajax_loader .message-item--placeholder .placeholder {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.messages-list > .post_ajax_loader .message-item--placeholder .placeholder.s1 {
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
.messages-list > .post_ajax_loader .message-item--placeholder .message-item__actions {
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.messages-list > .post_ajax_loader .placeholder {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -479,10 +503,6 @@ html.dark .message-detail {
|
||||
.messages-pagination__more {
|
||||
transition: none;
|
||||
}
|
||||
|
||||
.messages-center.is-loading .messages-pagination__more span::before {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* ---- 响应式 ---- */
|
||||
|
||||
@@ -155,50 +155,6 @@
|
||||
border-color: var(--color-primary, #f04494);
|
||||
}
|
||||
|
||||
/* AJAX 加载更多 */
|
||||
.load-more {
|
||||
text-align: center;
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
.load-more__btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 10px 24px;
|
||||
font-size: 13px;
|
||||
color: var(--color-ink-2, #4e5358);
|
||||
background: var(--surface-1, #fff);
|
||||
border: 1px solid var(--color-line, rgba(50, 50, 50, 0.06));
|
||||
border-radius: 20px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.load-more__btn:hover {
|
||||
color: var(--color-primary, #f04494);
|
||||
border-color: var(--color-primary, #f04494);
|
||||
}
|
||||
|
||||
.load-more__btn:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.load-more__spinner {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border: 2px solid var(--surface-3, #e8e8e8);
|
||||
border-top-color: var(--color-primary, #f04494);
|
||||
border-radius: 50%;
|
||||
animation: spin 0.6s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
/* 移动端 */
|
||||
@media (max-width: 767px) {
|
||||
.pagination a,
|
||||
|
||||
Vendored
-141
@@ -1,141 +0,0 @@
|
||||
/* ========== 骨架屏加载 — 对齐 legacy skeleton loading ========== */
|
||||
.skeleton {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: var(--surface-2, #eee);
|
||||
border-radius: var(--radius, 8px);
|
||||
}
|
||||
|
||||
.skeleton::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: linear-gradient(
|
||||
90deg,
|
||||
transparent 0%,
|
||||
rgba(255, 255, 255, 0.4) 50%,
|
||||
transparent 100%
|
||||
);
|
||||
animation: skeleton-shimmer 1.5s infinite;
|
||||
}
|
||||
|
||||
@keyframes skeleton-shimmer {
|
||||
0% { transform: translateX(-100%); }
|
||||
100% { transform: translateX(100%); }
|
||||
}
|
||||
|
||||
/* 骨架屏变体 */
|
||||
.skeleton-text {
|
||||
height: 14px;
|
||||
border-radius: 4px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.skeleton-text--title {
|
||||
height: 20px;
|
||||
width: 60%;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.skeleton-text--short {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.skeleton-text--medium {
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
.skeleton-avatar {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
border-radius: 50%;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.skeleton-avatar--sm {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.skeleton-avatar--lg {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
}
|
||||
|
||||
.skeleton-thumb {
|
||||
width: 100%;
|
||||
aspect-ratio: 16 / 9;
|
||||
border-radius: var(--radius, 8px);
|
||||
}
|
||||
|
||||
.skeleton-thumb--square {
|
||||
aspect-ratio: 1;
|
||||
}
|
||||
|
||||
.skeleton-thumb--card {
|
||||
aspect-ratio: 16 / 10;
|
||||
border-radius: var(--radius, 8px) var(--radius, 8px) 0 0;
|
||||
}
|
||||
|
||||
/* 卡片骨架屏 */
|
||||
.skeleton-card {
|
||||
background: var(--surface-1, #fff);
|
||||
border-radius: var(--radius, 8px);
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.skeleton-card__thumb {
|
||||
width: 100%;
|
||||
aspect-ratio: 16 / 10;
|
||||
}
|
||||
|
||||
.skeleton-card__body {
|
||||
padding: 14px 16px;
|
||||
}
|
||||
|
||||
.skeleton-card__meta {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
/* 评论骨架屏 */
|
||||
.skeleton-comment {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
padding: 16px 0;
|
||||
border-bottom: 1px solid var(--color-line-soft, rgba(0, 0, 0, 0.03));
|
||||
}
|
||||
|
||||
.skeleton-comment__body {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.skeleton-comment__header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/* 通用骨架屏容器 */
|
||||
.skeleton-list .skeleton-item {
|
||||
padding: 12px 0;
|
||||
border-bottom: 1px solid var(--color-line-soft, rgba(0, 0, 0, 0.03));
|
||||
}
|
||||
|
||||
.skeleton-list .skeleton-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
/* 减弱动画偏好 */
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.skeleton::after {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
@@ -548,7 +548,21 @@
|
||||
}
|
||||
|
||||
.aksrt-user-home .dashboard-panel.is-loading {
|
||||
opacity: .6;
|
||||
transition: opacity var(--dur-fast, .15s) var(--ease, ease);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* 面板翻页的加载态由列表骨架承担(与文章列表 .post_ajax_loader 同一契约)。 */
|
||||
.aksrt-user-home .dashboard-panel .post_ajax_loader {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.aksrt-user-home .dashboard-panel.is-loading .post_ajax_loader {
|
||||
display: block;
|
||||
animation: aksrtFadeIn 0.2s ease both;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.aksrt-user-home .dashboard-panel .post_ajax_loader .placeholder {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user