fix: center homepage content container

Align the English and Chinese homepage frontpage wrapper with the main content container so homepage content is centered like normal body content.
This commit is contained in:
cydia2001
2026-03-11 01:49:07 +00:00
parent 4bcdd9f107
commit dcb31df2ca
2 changed files with 5 additions and 7 deletions

View File

@@ -192,6 +192,8 @@ Reference :cite:`smith2024`.
self.assertIn("padding: 0 !important;", rewritten)
self.assertIn("border-radius: 6px;", rewritten)
self.assertIn("background: #f6f8fa;", rewritten)
self.assertIn("max-width: var(--content-max-width);", rewritten)
self.assertIn("margin-inline: auto;", rewritten)
def test_regular_page_does_not_render_frontpage_switch(self) -> None:
with tempfile.TemporaryDirectory() as tmpdir:

View File

@@ -26,7 +26,9 @@ FRONTPAGE_LAYOUT_CSS = """
<style>
.openmlsys-frontpage {
width: 100%;
max-width: var(--content-max-width);
margin: 0 auto 3rem;
margin-inline: auto;
}
.openmlsys-frontpage-switch-row {
margin: 12px 0 0;
@@ -95,16 +97,10 @@ FRONTPAGE_LAYOUT_CSS = """
background: transparent !important;
padding: 0 !important;
}
#content,
.content {
max-width: min(1440px, calc(100vw - 48px));
}
.content main {
max-width: 75%;
}
.openmlsys-frontpage + ul,
.openmlsys-frontpage + ul ul {
max-width: 960px;
margin-inline: auto;
}
@media (max-width: 1000px) {
.openmlsys-frontpage .mdl-cell,