Skip to content

Commit 0b531b4

Browse files
kevinten10claude
andcommitted
fix: 修复首页全宽布局 — 消除两侧白边和 Docsy 容器间距
移除 Bootstrap container-fluid 的左右 padding、Docsy td-block-padding 对 section 的额外间距,以及 td-main 的上下 padding, 使所有 section 无缝连接、边到边全宽显示。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 613f9d9 commit 0b531b4

1 file changed

Lines changed: 27 additions & 2 deletions

File tree

layouts/partials/hooks/head-end.html

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,36 @@
2626
}
2727

2828
/* ---------- Resets ---------- */
29-
.td-home .td-main { padding-top: 0 !important; }
29+
/* Remove Docsy/Bootstrap container padding to allow full-bleed sections */
30+
body.td-home .container-fluid.td-outer {
31+
padding-left: 0 !important;
32+
padding-right: 0 !important;
33+
max-width: 100% !important;
34+
}
35+
body.td-home .td-main {
36+
padding-top: 0 !important;
37+
padding-bottom: 0 !important;
38+
}
39+
body.td-home .td-main main {
40+
padding-top: 0 !important;
41+
padding-bottom: 0 !important;
42+
}
43+
/* Remove Docsy's td-block-padding and first-section padding from homepage sections */
44+
body.td-home .td-default main > section:first-of-type {
45+
padding-top: 0 !important;
46+
}
47+
body.td-home .td-default main section {
48+
padding-top: 0 !important;
49+
padding-bottom: 0 !important;
50+
}
3051
body.td-home .td-outer { padding-top: 0 !important; }
3152
body.td-home .td-cover-block { display: none !important; }
3253
body.td-home {
3354
font-family: var(--apple-font);
3455
-webkit-font-smoothing: antialiased;
3556
-moz-osx-font-smoothing: grayscale;
3657
color: var(--apple-black);
58+
background: var(--apple-dark);
3759
}
3860

3961
/* ---------- Navbar ---------- */
@@ -660,9 +682,12 @@
660682
}
661683

662684
/* ---------- Footer ---------- */
663-
footer.td-footer {
685+
body.td-home footer.td-footer {
664686
background: var(--apple-dark) !important;
665687
border-top: 0.5px solid #424245;
688+
margin: 0 !important;
689+
padding-left: 24px;
690+
padding-right: 24px;
666691
}
667692

668693
/* ---------- Animations ---------- */

0 commit comments

Comments
 (0)