diff --git a/assets/css/routes/profile/lists.css b/assets/css/routes/profile/lists.css index 34cae6df..4a984035 100644 --- a/assets/css/routes/profile/lists.css +++ b/assets/css/routes/profile/lists.css @@ -658,3 +658,86 @@ color: var(--color-ink-4); } +/* Zibll-style user tabs: one panel outside, flat rows inside. */ +.dashboard--public .profile-list, +.dashboard--public .profile-comment-list, +.uc-content #panel-posts .profile-list, +.uc-content #panel-favorites .profile-list, +.uc-content #panel-comments .profile-comment-list { + gap: 0; +} + +.dashboard--public .profile-list-item, +.dashboard--public .profile-comment-item, +.uc-content #panel-posts .profile-list-item, +.uc-content #panel-favorites .profile-list-item, +.uc-content #panel-favorites .profile-list[data-list="favorites"] .profile-list-item, +.uc-content #panel-comments .profile-comment-item { + padding: 16px 0; + background: transparent; + border: 0; + border-bottom: 1px solid var(--color-line-soft, rgba(0,0,0,0.06)); + border-radius: 0; + box-shadow: none; +} + +.dashboard--public .profile-list-item:hover, +.dashboard--public .profile-comment-item:hover, +.uc-content #panel-posts .profile-list-item:hover, +.uc-content #panel-favorites .profile-list-item:hover, +.uc-content #panel-favorites .profile-list[data-list="favorites"] .profile-list-item:hover, +.uc-content #panel-comments .profile-comment-item:hover { + background: transparent; + border-color: var(--color-line-soft, rgba(0,0,0,0.06)); + box-shadow: none; +} + +.dashboard--public .profile-list-item:first-child, +.dashboard--public .profile-comment-item:first-child, +.uc-content #panel-posts .profile-list-item:first-child, +.uc-content #panel-favorites .profile-list-item:first-child, +.uc-content #panel-comments .profile-comment-item:first-child { + padding-top: 0; +} + +.dashboard--public .profile-list-item:last-child, +.dashboard--public .profile-comment-item:last-child, +.uc-content #panel-posts .profile-list-item:last-child, +.uc-content #panel-favorites .profile-list-item:last-child, +.uc-content #panel-comments .profile-comment-item:last-child { + padding-bottom: 0; + border-bottom: 0; +} + +.dashboard--public .profile-list[data-list="favorites"] .profile-list-item, +.dashboard--public .profile-list[data-list="favorites"] .profile-list-item:hover { + background: transparent; + border-color: var(--color-line-soft, rgba(0,0,0,0.06)); + box-shadow: none; +} + +@media (max-width: 640px) { + .dashboard--public .profile-list-item, + .dashboard--public .profile-comment-item, + .uc-content #panel-posts .profile-list-item, + .uc-content #panel-favorites .profile-list-item, + .uc-content #panel-comments .profile-comment-item { + padding: 14px 0; + } + + .dashboard--public .profile-list-item:first-child, + .dashboard--public .profile-comment-item:first-child, + .uc-content #panel-posts .profile-list-item:first-child, + .uc-content #panel-favorites .profile-list-item:first-child, + .uc-content #panel-comments .profile-comment-item:first-child { + padding-top: 0; + } + + .dashboard--public .profile-list-item:last-child, + .dashboard--public .profile-comment-item:last-child, + .uc-content #panel-posts .profile-list-item:last-child, + .uc-content #panel-favorites .profile-list-item:last-child, + .uc-content #panel-comments .profile-comment-item:last-child { + padding-bottom: 0; + } +} diff --git a/assets/css/routes/profile/modals.css b/assets/css/routes/profile/modals.css index 9a04f1e1..c67878fb 100644 --- a/assets/css/routes/profile/modals.css +++ b/assets/css/routes/profile/modals.css @@ -224,382 +224,24 @@ border-top: 1px solid var(--color-line); } -/* ==================== 响应式 ==================== */ -@media (max-width: 720px) { - .profile-public-left { - flex: 0 0 180px; - } - .profile-list-item { - padding: 14px; - } - .profile-comment-item { - padding: 14px; - } -} +/* Modal mobile */ @media (max-width: 640px) { - .profile-public-header { - flex-direction: column; - align-items: center; - gap: 24px; - } - .profile-public-left { - flex: none; - width: 100%; - } - .profile-public-right { - width: 100%; - text-align: center; - } - .profile-list-header { - flex-direction: column; - align-items: flex-start; - gap: 8px; - } - .profile-status-filter { - width: 100%; - overflow-x: auto; - flex-wrap: nowrap; - scrollbar-width: none; - padding-bottom: 4px; - } - .profile-status-filter::-webkit-scrollbar { - display: none; - } - .profile-status-chip { - flex-shrink: 0; - } - .profile-list-item__head { - flex-direction: column; - gap: 4px; - } - .profile-list-item__date { - font-size: 11px; - } - .profile-list-item__title { - font-size: var(--text-base, 1rem); - } - .profile-list-item__meta { - gap: 6px; - } - .profile-list-item__action { - margin-left: 0; - width: 100%; - justify-content: center; - } - .profile-list-item__meta-spacer { - display: none; - } - .profile-comment-item__meta { - margin-left: 0; - } -} -@media (max-width: 480px) { - .contact-row { flex-wrap: wrap; } - .contact-row .contact-name { flex: 1 1 100%; } - .contact-icon { flex: 0 0 100%; } .aksrt-modal__box { - max-width: 96%; - border-radius: 12px; + width: 96%; + max-height: 92vh; + border-radius: 14px; } - .aksrt-modal__header { padding: 14px 16px; } - .aksrt-modal__box form { padding: 16px; } - .security-action-item { + .aksrt-modal__footer { + flex-direction: column-reverse; + } + .aksrt-modal__footer .btn, + .aksrt-modal__footer button { + width: 100%; + } + .code-input-group { flex-direction: column; - align-items: flex-start; - gap: 12px; - } - .security-action-item > button { - align-self: flex-end; } .code-send-btn { - min-width: 94px; - font-size: 12px; - } - .profile-pagination .page-numbers { - min-width: 30px; - height: 30px; - font-size: 12px; - padding: 0 8px; - } -} - -/* ============================================================ - * v4.0 Zibll-Inspired 用户中心增强 - * ============================================================ */ - -/* 用户统计卡片 */ -.user-stats-grid { - display: grid; - grid-template-columns: repeat(4, 1fr); - gap: 12px; - margin-bottom: 20px; -} - -.user-stat-card { - text-align: center; - padding: 16px 8px; - border-radius: 8px; - background: var(--surface-3); - transition: transform 0.2s ease; -} - -.user-stat-card:hover { - transform: translateY(-2px); -} - -.user-stat-card__value { - font-size: 1.25rem; - font-weight: 700; - color: var(--color-primary); - line-height: 1; - margin-bottom: 4px; -} - -.user-stat-card__label { - font-size: 11px; - color: var(--color-ink-4); -} - -/* 签到面板 */ -.signin-panel { - background: var(--surface-page); - border: 1px solid var(--color-line); - border-radius: 8px; - padding: 20px; - margin-bottom: 20px; -} - -.signin-panel__header { - display: flex; - align-items: center; - justify-content: space-between; - margin-bottom: 12px; -} - -.signin-panel__title { - font-size: 0.9375rem; - font-weight: 700; - display: flex; - align-items: center; - gap: 6px; -} - -.signin-panel__title i { - color: var(--color-primary); -} - -.signin-panel__streak { - font-size: 12px; - color: var(--color-ink-4); -} - -.signin-panel__streak strong { - color: var(--color-primary); -} - -.signin-panel__btn { - display: inline-flex; - align-items: center; - gap: 6px; - padding: 8px 20px; - border-radius: 50px; - border: none; - background: var(--color-primary); - color: #fff; - font-size: 14px; - font-weight: 600; - cursor: pointer; - transition: opacity 0.2s ease, transform 0.2s ease; - width: 100%; - justify-content: center; -} - -.signin-panel__btn:hover { - opacity: 0.9; - transform: translateY(-1px); -} - -.signin-panel__btn:disabled, -.signin-panel__btn.is-signed { - background: var(--surface-3); - color: var(--color-ink-4); - cursor: not-allowed; - transform: none; -} - -.signin-panel__btn.is-signed i { - color: var(--color-success, #34a853); -} - -.signin-panel__reward { - text-align: center; - font-size: 12px; - color: var(--color-ink-4); - margin-top: 8px; -} - -/* 签到日历(简化版) */ -.signin-calendar { - display: grid; - grid-template-columns: repeat(7, 1fr); - gap: 4px; - margin-top: 12px; -} - -.signin-calendar__day { - width: 100%; - aspect-ratio: 1; - border-radius: 4px; - display: flex; - align-items: center; - justify-content: center; - font-size: 11px; - color: var(--color-ink-4); - background: var(--surface-3); -} - -.signin-calendar__day.is-signed { - background: var(--color-primary-soft, rgba(240, 68, 148, 0.15)); - color: var(--color-primary); - font-weight: 600; -} - -.signin-calendar__day.is-today { - border: 2px solid var(--color-primary); -} - -/* 用户等级进度条 */ -.user-level-bar { - margin-bottom: 16px; -} - -.user-level-bar__header { - display: flex; - justify-content: space-between; - align-items: center; - margin-bottom: 6px; - font-size: 12px; -} - -.user-level-bar__label { - font-weight: 600; - color: var(--color-ink); -} - -.user-level-bar__exp { - color: var(--color-ink-4); -} - -.user-level-bar__track { - height: 6px; - border-radius: 3px; - background: var(--surface-3); - overflow: hidden; -} - -.user-level-bar__fill { - height: 100%; - border-radius: 3px; - background: linear-gradient(90deg, var(--color-primary), #667eea); - transition: width 0.5s ease; -} - -/* 移动端适配 */ -@media (max-width: 640px) { - .user-stats-grid { - grid-template-columns: repeat(2, 1fr); - gap: 8px; - } - - .user-stat-card { - padding: 12px 6px; - } - - .user-stat-card__value { - font-size: 1rem; - } -} - -/* Zibll-style user tabs: one panel outside, flat rows inside. */ -.dashboard--public .profile-list, -.dashboard--public .profile-comment-list, -.uc-content #panel-posts .profile-list, -.uc-content #panel-favorites .profile-list, -.uc-content #panel-comments .profile-comment-list { - gap: 0; -} - -.dashboard--public .profile-list-item, -.dashboard--public .profile-comment-item, -.uc-content #panel-posts .profile-list-item, -.uc-content #panel-favorites .profile-list-item, -.uc-content #panel-favorites .profile-list[data-list="favorites"] .profile-list-item, -.uc-content #panel-comments .profile-comment-item { - padding: 16px 0; - background: transparent; - border: 0; - border-bottom: 1px solid var(--color-line-soft, rgba(0,0,0,0.06)); - border-radius: 0; - box-shadow: none; -} - -.dashboard--public .profile-list-item:hover, -.dashboard--public .profile-comment-item:hover, -.uc-content #panel-posts .profile-list-item:hover, -.uc-content #panel-favorites .profile-list-item:hover, -.uc-content #panel-favorites .profile-list[data-list="favorites"] .profile-list-item:hover, -.uc-content #panel-comments .profile-comment-item:hover { - background: transparent; - border-color: var(--color-line-soft, rgba(0,0,0,0.06)); - box-shadow: none; -} - -.dashboard--public .profile-list-item:first-child, -.dashboard--public .profile-comment-item:first-child, -.uc-content #panel-posts .profile-list-item:first-child, -.uc-content #panel-favorites .profile-list-item:first-child, -.uc-content #panel-comments .profile-comment-item:first-child { - padding-top: 0; -} - -.dashboard--public .profile-list-item:last-child, -.dashboard--public .profile-comment-item:last-child, -.uc-content #panel-posts .profile-list-item:last-child, -.uc-content #panel-favorites .profile-list-item:last-child, -.uc-content #panel-comments .profile-comment-item:last-child { - padding-bottom: 0; - border-bottom: 0; -} - -.dashboard--public .profile-list[data-list="favorites"] .profile-list-item, -.dashboard--public .profile-list[data-list="favorites"] .profile-list-item:hover { - background: transparent; - border-color: var(--color-line-soft, rgba(0,0,0,0.06)); - box-shadow: none; -} - -@media (max-width: 640px) { - .dashboard--public .profile-list-item, - .dashboard--public .profile-comment-item, - .uc-content #panel-posts .profile-list-item, - .uc-content #panel-favorites .profile-list-item, - .uc-content #panel-comments .profile-comment-item { - padding: 14px 0; - } - - .dashboard--public .profile-list-item:first-child, - .dashboard--public .profile-comment-item:first-child, - .uc-content #panel-posts .profile-list-item:first-child, - .uc-content #panel-favorites .profile-list-item:first-child, - .uc-content #panel-comments .profile-comment-item:first-child { - padding-top: 0; - } - - .dashboard--public .profile-list-item:last-child, - .dashboard--public .profile-comment-item:last-child, - .uc-content #panel-posts .profile-list-item:last-child, - .uc-content #panel-favorites .profile-list-item:last-child, - .uc-content #panel-comments .profile-comment-item:last-child { - padding-bottom: 0; + width: 100%; } } diff --git a/assets/css/routes/user-home.css b/assets/css/routes/user-home.css index b93879e8..b9673f48 100644 --- a/assets/css/routes/user-home.css +++ b/assets/css/routes/user-home.css @@ -243,149 +243,6 @@ } } -/* ============================================================ - * Author Archive Page — /author/{nicename}/ - * ============================================================ */ -.aksrt-author-page__layout { - align-items: start; -} - -.aksrt-author-page__content { - padding: 24px; -} - -.aksrt-author-page__content-header { - margin-bottom: 20px; - padding-bottom: 12px; - border-bottom: 2px solid var(--color-line-soft); -} - -.aksrt-author-page__section-title { - display: flex; - align-items: center; - gap: 8px; - margin: 0; - font-size: 16px; - font-weight: 700; - color: var(--color-ink); -} - -.aksrt-author-page__section-title i { - color: var(--color-primary); - font-size: 14px; -} - -.aksrt-author-page__posts { - display: flex; - flex-direction: column; - gap: 0; -} - -.aksrt-author-page__posts .profile-list-item { - padding: 16px 0; - background: transparent; - border: 0; - border-bottom: 1px solid var(--color-line-soft); - border-radius: 0; - box-shadow: none; -} - -.aksrt-author-page__posts .profile-list-item:last-child { - border-bottom: 0; - padding-bottom: 0; -} - -.aksrt-author-page__posts .profile-list-item:first-child { - padding-top: 0; -} - -.aksrt-author-page__posts .profile-list-item:hover { - background: transparent; - border-color: var(--color-line-soft); - box-shadow: none; -} - -.aksrt-author-page__pagination { - display: flex; - justify-content: center; - margin-top: 24px; - padding-top: 16px; - border-top: 1px solid var(--color-line-soft); -} - -.aksrt-author-page__pagination .page-numbers { - display: inline-flex; - align-items: center; - justify-content: center; - min-width: 36px; - height: 36px; - padding: 0 10px; - font-size: 13px; - font-weight: 500; - color: var(--color-ink-3); - background: var(--surface-1); - border: 1px solid var(--color-line); - border-radius: var(--radius); - text-decoration: none; - transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); - margin: 0 2px; -} - -.aksrt-author-page__pagination a.page-numbers:hover { - color: var(--color-primary); - border-color: var(--color-primary); -} - -.aksrt-author-page__pagination .page-numbers.current { - color: var(--color-on-primary); - background: var(--color-primary); - border-color: var(--color-primary); -} - -.aksrt-author-page__empty { - display: flex; - flex-direction: column; - align-items: center; - padding: 48px 20px; - text-align: center; -} - -.aksrt-author-page__empty-icon { - width: 56px; - height: 56px; - margin-bottom: 14px; - border-radius: var(--radius-pill); - background: var(--color-primary-soft); - color: var(--color-primary); - display: flex; - align-items: center; - justify-content: center; -} - -.aksrt-author-page__empty-title { - margin: 0 0 6px; - font-size: 1rem; - font-weight: 700; - color: var(--color-ink); -} - -.aksrt-author-page__empty-desc { - margin: 0; - font-size: 13px; - color: var(--color-ink-3); -} - -.aksrt-author-page__aside { - display: flex; - flex-direction: column; - gap: 18px; -} - -.aksrt-author-page__aside-default { - display: flex; - flex-direction: column; - gap: 18px; -} .aksrt-user-home .aksrt-user-home__layout { diff --git a/templates/parts/user-home/README.md b/templates/parts/user-home/README.md index 2af84b0d..5c15557e 100644 --- a/templates/parts/user-home/README.md +++ b/templates/parts/user-home/README.md @@ -7,12 +7,22 @@ - 内容面板:panels-core.php / panel-forum.php / panel-follow.php - 侧栏:sidebar.php - 列表项:templates/parts/content-profile-*.php -- 样式:assets/css/routes/user-home.css(含 uh-forum)+ shared profile.css -- 脚本:assets/js/author.js(公开主页 tab / cover;author 归档 301 到 /user/) + +样式归属: +- assets/css/routes/user-home.css — 公开主页壳层 / author-hero / dashboard tabs / uh-forum +- assets/css/routes/profile.css + - layout.css — 本人中心头区/壳层/共享 chrome + - lists.css — 共享列表/评论/空态 + public/private 扁平列表覆写 + - modals.css — 账号弹窗与安全表单 +- assets/css/routes/user-center/* — 本人中心侧栏/余额/抽屉 + +脚本归属: +- assets/js/author.js — 公开主页 tab / cover +- assets/js/routes/user-center.js — 本人中心 +- assets/js/routes/user-home.js — 废弃 no-op 作者归档: -- author.php 仅作 301 回退到 /user/{nicename}/ -- 不再维护独立作者页 UI +- author.php 仅 301 到 /user/{nicename}/ 旧 uh-* 草稿 partial 已删除,勿再引入。 -->