fix: 帖行评论数勿贴右缘,手机 SSR 顶栏/页脚与 React 同构

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-01 08:06:57 +08:00
parent 37d14a22d5
commit 6048d71759
4 changed files with 46 additions and 14 deletions

View File

@@ -520,10 +520,10 @@ export default function MainLayout() {
<div className="app-frame">
<header className="app-header">
<div className="header-inner">
{isMobile && !isCompose && (
{!isCompose && (
<button
type="button"
className="header-icon-btn"
className="header-icon-btn header-menu-btn"
onClick={openSidebar}
aria-label="打开导航菜单"
aria-expanded={sidebarOpen}
@@ -536,7 +536,7 @@ export default function MainLayout() {
{/* 任意页点 Logo回首页并强制刷新不展示会话缓存 */}
<button type="button" className="header-brand" onClick={() => navigateFeed(nav, '/', { refresh: true })}>
<SiteBrandMark branding={branding} className="header-logo-mark" />
{!isMobile && <span className="header-logo-text">{branding.name}</span>}
<span className="header-logo-text">{branding.name}</span>
</button>
{!isCompose && isMobile && (
@@ -621,7 +621,7 @@ export default function MainLayout() {
aria-label="发帖"
>
<Plus size={16} aria-hidden />
{!isMobile && <span></span>}
<span className="header-compose-btn__label"></span>
</button>
)}
@@ -641,17 +641,15 @@ export default function MainLayout() {
</button>
)}
{!isMobile && (
<button
<button
type="button"
className="header-icon-btn"
className="header-icon-btn header-theme-btn"
onClick={toggle}
aria-label={theme === 'light' ? '切换暗色模式' : '切换亮色模式'}
title={theme === 'light' ? '切换暗色模式' : '切换亮色模式'}
>
{theme === 'light' ? <Moon size={18} aria-hidden /> : <Sun size={18} aria-hidden />}
</button>
)}
{authLoading ? (
<span className="header-auth-slot header-auth-slot--loading" aria-hidden />

View File

@@ -345,6 +345,16 @@ html.dark .top-progress {
}
}
@media (min-width: 769px) {
/* 桌面:只保留壳层贴底页脚,隐藏列表内流入页脚 */
.post-list-scroll > .site-footer {
display: none;
}
.header-menu-btn {
display: none;
}
}
.admin-brand-sections > .admin-settings-section {
margin-top: 20px;
padding-top: 16px;
@@ -1974,10 +1984,17 @@ html.dark .ssr-theme-icon--sun {
.sidebar { display: none; }
.header-inner { padding: 0 12px; gap: 8px; }
.header-brand { flex-shrink: 0; }
.header-logo-text { display: none; }
.header-menu-btn { display: inline-flex; }
.header-theme-btn { display: none; }
.header-compose-btn__label { display: none; }
.header-search-wrap { max-width: none; }
.header-compose-btn { width: 34px; padding: 0; justify-content: center; }
.header-action-group { gap: 4px; }
/* 手机:藏壳层贴底页脚(列表内 InFlow 负责) */
.app-frame > .site-footer { display: none; }
.post-search-field__input {
font-size: 16px;
}
@@ -3144,7 +3161,7 @@ a.post-row {
.post-row--v2 .post-meta {
display: flex;
align-items: center;
justify-content: space-between;
justify-content: flex-start;
flex-wrap: nowrap;
gap: 8px;
min-width: 0;
@@ -3158,7 +3175,7 @@ a.post-row {
flex-wrap: nowrap;
gap: 0;
min-width: 0;
flex: 1;
flex: 0 1 auto;
overflow: hidden;
}
@@ -3354,6 +3371,8 @@ a.post-row {
.post-row--v2 .post-stats {
gap: 8px;
flex-shrink: 0;
margin-left: 0;
}
.post-row--v2 .post-stat {