Skip to content

Commit 68f26d3

Browse files
committed
Mobile home: left-aligned bg with cut-off; separate teal tab overlay
Restored the previous mobile home-banner treatment (height 200px, background-size: auto 200% to show only the top carousel pane, background-position: 0 0 so the photo is left-aligned and the right side is cropped at the viewport edge — analogous to research/). Added .home-banner-tab as a separate <img> overlay (icon_home.png, cropped from logo_home.png at x=465-1000, y=70-280 → 535x210). It's hidden on desktop (the teal text is already baked into the bg there) and shown on mobile, anchored right with height: 45% so it scales proportionally and the source's 535:210 aspect is preserved. Covers the bg's leaked teal portion that bleeds into the visible viewport on widths > ~440px.
1 parent 95a7e4c commit 68f26d3

4 files changed

Lines changed: 28 additions & 9 deletions

File tree

assets/css/style.scss

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,13 @@ hr { border: 0; border-top: 1px dotted $text-faint; margin: 2rem 0; }
288288
border-radius: 2px;
289289
}
290290

291+
/* Teal "RNA fold & function from scratch" tab — only used on mobile,
292+
where the home banner is treated like other-page heroes (photo on
293+
the left, fixed height, right cut off, separate teal tab overlay
294+
on the right). On desktop the tab text is already part of the
295+
logo_home.png background, so this overlay is hidden. */
296+
.home-banner-tab { display: none; }
297+
291298
/* Circular teal "research →" tab anchored to the banner's left edge */
292299
.home-research-arrow {
293300
position: absolute;
@@ -905,17 +912,28 @@ details.show-more {
905912
edge of logo_home.png anchored to the right of the viewport — matches
906913
the .page-hero approach used on interior pages. */
907914
.home-banner {
908-
/* Show only the first carousel pane (1022x348) and let it span the
909-
full viewport width so nothing in the artwork — including the
910-
'RNA fold & function from scratch' tab on the right — gets clipped
911-
at narrow phone widths. The container's height tracks the pane's
912-
aspect ratio so it stays proportional, and background-size 100% 200%
913-
puts the top pane in the visible window. */
914-
aspect-ratio: 1022 / 348;
915-
height: auto;
916-
background-size: 100% 200%;
915+
/* Mobile: same treatment as the interior page-heros. Fixed 200px
916+
height, image scaled to fill height and aligned left so the photo
917+
(Crystal / Prediction RNA) stays in view; the right side of the
918+
source (gray block + baked-in teal tab) is cropped off the right
919+
edge of the viewport. The teal tab is rendered separately as
920+
.home-banner-tab below — anchored right, scaled to fit. */
921+
aspect-ratio: auto;
922+
height: 200px;
923+
background-size: auto 200%;
917924
background-position: 0 0;
918925
}
926+
927+
.home-banner-tab {
928+
display: block;
929+
position: absolute;
930+
right: -2%;
931+
bottom: 15%;
932+
height: 45%;
933+
width: auto;
934+
z-index: 2;
935+
filter: drop-shadow(2px 2px 6px rgba(0,0,0,0.25));
936+
}
919937
/* Drop the desktop 5% breakout — at narrow viewports it caused horizontal
920938
overflow / scroll. */
921939
.home-stage,
65.3 KB
Loading
284 KB
Loading

index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ slug: home
77
<div class="home-stage">
88
<a class="home-research-arrow" href="{{ '/research/' | relative_url }}" aria-label="Research">research</a>
99
<div class="home-banner" role="img" aria-label="Das Lab — RNA fold and function from scratch"></div>
10+
<img class="home-banner-tab" src="{{ '/assets/images/site/public/icon_home.png' | relative_url }}" alt="RNA fold and function from scratch">
1011
</div>
1112

1213
<div class="home-divider-bars">

0 commit comments

Comments
 (0)