diff --git a/frontend/src/layouts/MainLayout.tsx b/frontend/src/layouts/MainLayout.tsx index fa2ffab..90f1de1 100644 --- a/frontend/src/layouts/MainLayout.tsx +++ b/frontend/src/layouts/MainLayout.tsx @@ -520,10 +520,10 @@ export default function MainLayout() {
- {isMobile && !isCompose && ( + {!isCompose && ( {!isCompose && isMobile && ( @@ -621,7 +621,7 @@ export default function MainLayout() { aria-label="发帖" > - {!isMobile && 发帖} + 发帖 )} @@ -641,17 +641,15 @@ export default function MainLayout() { )} - {!isMobile && ( - - )} {authLoading ? ( diff --git a/frontend/src/styles/global.css b/frontend/src/styles/global.css index 0c884c6..16bc698 100644 --- a/frontend/src/styles/global.css +++ b/frontend/src/styles/global.css @@ -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 { diff --git a/handler/ssr_home.go b/handler/ssr_home.go index 82088ff..929a03d 100644 --- a/handler/ssr_home.go +++ b/handler/ssr_home.go @@ -342,6 +342,10 @@ func renderHomeSSRHTML(data *homeSSRData) string { b.WriteString(`
`) b.WriteString(`
`) + // 手机端汉堡:桌面 CSS 隐藏;hydrate 后由 React 接管点击 + b.WriteString(``) b.WriteString(``) if logo := strings.TrimSpace(boot.Branding.Logo); logo != "" { b.WriteString(``) @@ -366,11 +370,11 @@ func renderHomeSSRHTML(data *homeSSRData) string { } b.WriteString(``) b.WriteString(ssrIconPlus()) - b.WriteString(`发帖`) + b.WriteString(`发帖`) b.WriteString(`
`) - // 主题:双图标 + CSS,配合 documentElement.dark - b.WriteString(``) @@ -593,7 +597,10 @@ func writeSSRFeed(b *strings.Builder, boot homeBootPayload, meta homeSSRMeta) { writeSSRPostRow(b, &boot.Posts[i], boot.BoardID, meta.permalink, boot.Sort, titleOnly, needExcerpt, needThumb) } } - b.WriteString(`
`) + b.WriteString(`
`) + // 手机端流入页脚(桌面 CSS 隐藏);壳层贴底页脚见 writeSSRFooter + writeSSRFooter(b, boot, meta) + b.WriteString(`
`) } func ssrFilterQuery(boot homeBootPayload) url.Values { diff --git a/handler/ssr_icons.go b/handler/ssr_icons.go index 49cd204..62ca7b6 100644 --- a/handler/ssr_icons.go +++ b/handler/ssr_icons.go @@ -60,6 +60,14 @@ func ssrIconPlus() string { ) } +func ssrIconMenu() string { + return ssrSVG(18, + ``, + ``, + ``, + ) +} + func ssrIconMoon() string { return ssrSVG(18, ``,