From 695164a2660f185d0002bada1bbef2fa278f2c04 Mon Sep 17 00:00:00 2001 From: cydia2001 Date: Wed, 11 Mar 2026 01:51:40 +0000 Subject: [PATCH] fix: stack english homepage footer copy Keep the English homepage contributor and errata footer lines in normal block flow so each sentence stays on its own line instead of being laid out as author-grid columns. --- en_chapters/frontpage.html | 14 +++++++++++++- tests/test_prepare_mdbook.py | 9 +++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/en_chapters/frontpage.html b/en_chapters/frontpage.html index eb357b7..a18cd7f 100644 --- a/en_chapters/frontpage.html +++ b/en_chapters/frontpage.html @@ -60,11 +60,23 @@ h2.toc { align-items: flex-start; row-gap: calc(24px + 1.5em); } -.authors .mdl-cell { +.authors .mdl-cell:not(.author-group-title) { display: flex; align-items: flex-start; justify-content: center; } +.author-group-title { + display: block; + width: 100%; +} +.author-group-title h3, +.author-group-title h4 { + width: 100%; + margin: 0 0 0.75em; +} +.author-group-title h4:last-child { + margin-bottom: 0; +} .authors h4 { width: 100%; } diff --git a/tests/test_prepare_mdbook.py b/tests/test_prepare_mdbook.py index 98d330f..3a5324a 100644 --- a/tests/test_prepare_mdbook.py +++ b/tests/test_prepare_mdbook.py @@ -220,6 +220,15 @@ Reference :cite:`smith2024`. self.assertIn("height: 120px;", frontpage) self.assertIn("object-fit: cover;", frontpage) + def test_english_frontpage_footer_titles_are_stacked_not_flex_columns(self) -> None: + frontpage = (REPO_ROOT / "en_chapters" / "frontpage.html").read_text(encoding="utf-8") + + self.assertIn(".authors .mdl-cell:not(.author-group-title) {", frontpage) + self.assertIn(".author-group-title {", frontpage) + self.assertIn("display: block;", frontpage) + self.assertIn(".author-group-title h3,", frontpage) + self.assertIn("width: 100%;", frontpage) + if __name__ == "__main__": unittest.main()