Skip to content

Commit b8a67d6

Browse files
committed
Home banner mobile: right-align bg, drop overlay; bars seam -5%; visible flag
Mobile / iPhone-mini home banner: - Drop the .home-banner-tab overlay (was duplicating the teal tab that is already baked into logo_home.png), and remove the cropped icon_home.png + logo_home_top.png assets it depended on. - Mobile .home-banner now uses aspect-ratio: 1.96/1 with background-size: auto 200%; background-position: 100% 0. Shows the right ~2/3 of the source on any phone width (math: container width = (2/3) * 2.94 * container height -> aspect 1.96), so iPhone mini portrait sees the gray block + the 'RNA fold & function from scratch' tab + a sliver of the photo on the left edge. - New @media (max-width: 480px) and (orientation: portrait) shrinks callouts + divider bars + institutional logos by ~50% (mission text kept at ~75% to stay readable) so the page feels proportional to the smaller banner. Home divider bars: - .home-divider-bars .bar-dark: flex-basis 70.45% -> 65.45%. Per user's screenshot, the bar seam was sitting ~5% past the photo/gray seam in the rendered banner; this aligns them. Hide-without-archive support: - Add 'visible: false' frontmatter flag for _people/*.md. people.md filters both current and alumni with where_exp: 'p.visible != false' so people without the field stay visible (default true), and anyone with visible: false drops out without needing to be moved to status: alumnus. - CONTRIBUTING.md: documented under 'Hiding someone temporarily' and added to the optional-fields list.
1 parent d39604b commit b8a67d6

6 files changed

Lines changed: 49 additions & 31 deletions

File tree

CONTRIBUTING.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,20 @@ The `last_name` is used for sorting (alphabetical, case-insensitive) — write i
4444
- `cv_url:` — link to a CV (e.g., a Dropbox link)
4545
- `profile_url:` — link to a Stanford profile page
4646
- `pi: true` — pins this person to the end of the current-members list. Only the principal investigator should have this.
47+
- `visible: false` — temporarily hides this person from the people page without deleting the file or moving them to alumni. Useful for, e.g., a rotation student who hasn't decided whether to stay long-term. Remove the line (or set to `true`) to show them again.
4748

4849
---
4950

51+
## Hiding someone temporarily (without making them alumni)
52+
53+
If you need to hide someone from the people page but they're not alumni — say a rotation student who hasn't decided whether to stay — open their `_people/<name>.md` file and add this line to the frontmatter:
54+
55+
```yaml
56+
visible: false
57+
```
58+
59+
The page will leave them out on the next rebuild. To bring them back, delete that line (or change to `visible: true`). This works for both current members and alumni.
60+
5061
## Moving someone to alumni
5162

5263
When a lab member leaves, you only edit one file — no need to move it between folders.

assets/css/style.scss

Lines changed: 36 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -288,13 +288,6 @@ 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-
298291
/* Circular teal "research →" tab anchored to the banner's left edge */
299292
.home-research-arrow {
300293
position: absolute;
@@ -320,7 +313,10 @@ hr { border: 0; border-top: 1px dotted $text-faint; margin: 2rem 0; }
320313
max-width: none;
321314
height: 39px;
322315
}
323-
.home-divider-bars .bar-dark { flex: 0 0 70.45%; }
316+
/* The dark/light seam sits ~5% to the left of where the photo/gray seam
317+
actually lands in the rendered banner — set to 65.45% so the bar
318+
seam visually aligns with the banner seam. */
319+
.home-divider-bars .bar-dark { flex: 0 0 65.45%; }
324320
.home-divider-bars .bar-light { flex: 1 1 auto; }
325321
.home-divider-bars .bar-dark,
326322
.home-divider-bars .bar-light {
@@ -368,6 +364,28 @@ hr { border: 0; border-top: 1px dotted $text-faint; margin: 2rem 0; }
368364
.callout-break { display: none; }
369365
}
370366

367+
/* Small-phone portrait: the home banner is much smaller proportionally,
368+
so shrink the elements directly underneath it (callouts + bars +
369+
institutional logos) to keep the overall page feeling balanced.
370+
Mission paragraph kept at ~75% (full 50% would be unreadable). */
371+
@media (max-width: 480px) and (orientation: portrait) {
372+
.home-callout-left { font-size: 1.3rem; }
373+
.home-callout-right { font-size: 0.75rem; }
374+
.home-mission { font-size: 0.7rem; }
375+
376+
.home-divider-bars,
377+
.home-divider-bars .bar-dark,
378+
.home-divider-bars .bar-light {
379+
height: 20px;
380+
}
381+
382+
.institutional-logos .logo-stanford-university,
383+
.institutional-logos .logo-stanford-medicine,
384+
.institutional-logos .logo-hhmi {
385+
height: 22px;
386+
}
387+
}
388+
371389
/* ---------- people ---------- */
372390

373391
.people-grid {
@@ -912,27 +930,17 @@ details.show-more {
912930
edge of logo_home.png anchored to the right of the viewport — matches
913931
the .page-hero approach used on interior pages. */
914932
.home-banner {
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;
933+
/* Mobile: right-align the source image so the gray block + the
934+
baked-in 'RNA fold & function from scratch' teal tab stay visible;
935+
the left side of the photo is cropped at the viewport edge.
936+
aspect-ratio 1.96/1 + background-size auto 200% means the visible
937+
viewport equals exactly 2/3 of the rendered image width — so on
938+
any phone width (including iPhone mini at 375px) the right ~2/3
939+
of the source is in view. */
940+
aspect-ratio: 1.96 / 1;
941+
height: auto;
923942
background-size: auto 200%;
924-
background-position: 0 0;
925-
}
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));
943+
background-position: 100% 0;
936944
}
937945
/* Drop the desktop 5% breakout — at narrow viewports it caused horizontal
938946
overflow / scroll. */
-65.3 KB
Binary file not shown.
-284 KB
Binary file not shown.

index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ 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">
1110
</div>
1211

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

people.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ hero_slug: people
66
permalink: /people/
77
---
88

9-
{% assign all_current = site.people | where: "status", "current" %}
9+
{% assign all_current = site.people | where: "status", "current" | where_exp: "p", "p.visible != false" %}
1010
{% assign non_pi = all_current | where_exp: "p", "p.pi != true" | sort_natural: "last_name" %}
1111
{% assign pi = all_current | where: "pi", true %}
1212
{% assign current = non_pi | concat: pi %}
@@ -16,7 +16,7 @@ permalink: /people/
1616
within each year. Liquid's sort isn't reliably stable, so we group by
1717
year explicitly and concat in order.
1818
{% endcomment %}
19-
{% assign all_alumni = site.people | where: "status", "alumnus" %}
19+
{% assign all_alumni = site.people | where: "status", "alumnus" | where_exp: "a", "a.visible != false" %}
2020
{% assign years = all_alumni | map: "end_year" | uniq | compact | sort | reverse %}
2121
{% assign alumni = "" | split: "" %}
2222
{% for y in years %}

0 commit comments

Comments
 (0)