mirror of
https://github.com/openmlsys/openmlsys-zh.git
synced 2026-04-01 09:50:23 +08:00
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:
@@ -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:
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user