mirror of
https://github.com/openmlsys/openmlsys-zh.git
synced 2026-04-02 10:20:20 +08:00
fix: widen centered homepage container
Keep the homepage frontpage wrapper centered while ensuring it uses at least 80% of the available content area, without changing normal body page layout.
This commit is contained in:
@@ -192,7 +192,7 @@ 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("width: min(100%, max(80%, var(--content-max-width)));", rewritten)
|
||||
self.assertIn("margin-inline: auto;", rewritten)
|
||||
|
||||
def test_regular_page_does_not_render_frontpage_switch(self) -> None:
|
||||
|
||||
@@ -25,8 +25,7 @@ FRONTPAGE_SWITCH_PLACEHOLDER = "<!-- OPENMLSYS_LANGUAGE_SWITCH -->"
|
||||
FRONTPAGE_LAYOUT_CSS = """
|
||||
<style>
|
||||
.openmlsys-frontpage {
|
||||
width: 100%;
|
||||
max-width: var(--content-max-width);
|
||||
width: min(100%, max(80%, var(--content-max-width)));
|
||||
margin: 0 auto 3rem;
|
||||
margin-inline: auto;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user