fix: widen homepage main content area

Apply a homepage-only override so mdbook-content > main uses at least 80% of the available content width while keeping normal body pages on the default layout.
This commit is contained in:
cydia2001
2026-03-11 02:06:36 +00:00
parent b23ea90d90
commit ac747b0026
2 changed files with 8 additions and 2 deletions

View File

@@ -192,7 +192,10 @@ Reference :cite:`smith2024`.
self.assertIn("padding: 0 !important;", rewritten)
self.assertIn("border-radius: 6px;", rewritten)
self.assertIn("background: #f6f8fa;", rewritten)
self.assertIn("width: min(100%, max(80%, var(--content-max-width)));", rewritten)
self.assertIn(".content main {", rewritten)
self.assertIn("max-width: min(100%, max(80%, var(--content-max-width)));", rewritten)
self.assertIn(".openmlsys-frontpage {", rewritten)
self.assertIn("width: 100%;", rewritten)
self.assertIn("margin-inline: auto;", rewritten)
def test_regular_page_does_not_render_frontpage_switch(self) -> None:

View File

@@ -25,7 +25,7 @@ FRONTPAGE_SWITCH_PLACEHOLDER = "<!-- OPENMLSYS_LANGUAGE_SWITCH -->"
FRONTPAGE_LAYOUT_CSS = """
<style>
.openmlsys-frontpage {
width: min(100%, max(80%, var(--content-max-width)));
width: 100%;
margin: 0 auto 3rem;
margin-inline: auto;
}
@@ -101,6 +101,9 @@ FRONTPAGE_LAYOUT_CSS = """
max-width: 960px;
margin-inline: auto;
}
.content main {
max-width: min(100%, max(80%, var(--content-max-width)));
}
@media (max-width: 1000px) {
.openmlsys-frontpage .mdl-cell,
.openmlsys-frontpage .mdl-cell--1-col,