Skip to content

Commit bda81af

Browse files
committed
Merge feat/site-live-stars: compact mobile announcement bar
2 parents 3101ed1 + b4b14e6 commit bda81af

2 files changed

Lines changed: 40 additions & 3 deletions

File tree

shared/styles/style-site.scss

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,38 @@
3737
// as an "alert". On promotional site pages we want chrome, not alarm: a soft
3838
// off-white surface (same family as the white navbar) with a thin crimson
3939
// left border so the brand still signals importance without screaming.
40+
// ---------------------------------------------------------------------------
41+
// Announcement bar line control
42+
// ---------------------------------------------------------------------------
43+
// The bar sits above the landing page's scroll-snap container, so it stays on
44+
// screen for the whole visit rather than scrolling away. At 390px its three
45+
// dense lines measured 201px, a quarter of the viewport, which pushed the
46+
// page's own content below the fold.
47+
//
48+
// Lines are blocks rather than <br>-separated text because partials/_mobile
49+
// hides <br> on small screens, which merged the three labelled lines into one
50+
// run-on paragraph that wrapped to ten lines: taller AND harder to scan.
51+
.mls-ann-line {
52+
display: block;
53+
}
54+
55+
@media (max-width: 600px) {
56+
// Drop the sibling-projects line on phones. It is the longest of the three,
57+
// and TinyTorch, Kits, MLSys-im, Labs and StaffML are all reachable from the
58+
// navbar, so nothing becomes unreachable.
59+
.mls-ann-siblings {
60+
display: none;
61+
}
62+
63+
.alert-primary,
64+
.quarto-announcement,
65+
.announcement {
66+
font-size: 0.8rem !important;
67+
line-height: 1.45;
68+
padding: 0.6rem 0.75rem !important;
69+
}
70+
}
71+
4072
.alert-primary,
4173
.quarto-announcement,
4274
.announcement {

site/config/announcement.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ website:
1919
dismissable: true
2020
type: primary
2121
position: below-navbar
22+
# Each line is wrapped so the stylesheet can address it. On a phone the
23+
# bar is pinned above a scroll-snap container, so it never scrolls away;
24+
# at three dense lines it held 26% of a 390px screen permanently. The
25+
# sibling-projects line is hidden below 600px because it is the longest
26+
# and every destination on it also sits in the navbar.
2227
content: |
23-
📖 **ML Systems** — an open-access textbook on the engineering of intelligent systems. [Vol I: Foundations →](https://mlsysbook.ai/vol1/) · [Vol II: At Scale →](https://mlsysbook.ai/vol2/)<br>
24-
🛠️ **Alongside the book:** [TinyTorch](https://mlsysbook.ai/tinytorch/) (build) · [Hardware Kits](https://mlsysbook.ai/kits/) (deploy) · [MLSys·im](https://mlsysbook.ai/mlsysim/) (model) · [Labs](https://mlsysbook.ai/labs/) (explore) · [StaffML](https://mlsysbook.ai/staffml/) (practice)<br>
25-
📬 **Newsletter:** ML Systems insights & updates — [Subscribe →](https://mlsysbook.ai/newsletter/)
28+
<span class="mls-ann-line">📖 **ML Systems** — an open-access textbook on the engineering of intelligent systems. [Vol I: Foundations →](https://mlsysbook.ai/vol1/) · [Vol II: At Scale →](https://mlsysbook.ai/vol2/)</span>
29+
<span class="mls-ann-line mls-ann-siblings">🛠️ **Alongside the book:** [TinyTorch](https://mlsysbook.ai/tinytorch/) (build) · [Hardware Kits](https://mlsysbook.ai/kits/) (deploy) · [MLSys·im](https://mlsysbook.ai/mlsysim/) (model) · [Labs](https://mlsysbook.ai/labs/) (explore) · [StaffML](https://mlsysbook.ai/staffml/) (practice)</span>
30+
<span class="mls-ann-line">📬 **Newsletter:** ML Systems insights & updates — [Subscribe →](https://mlsysbook.ai/newsletter/)</span>

0 commit comments

Comments
 (0)