Skip to content

Commit feade37

Browse files
committed
Visual fidelity pass: hero banners, word art, favicon, news fixes
- Add per-page hero banner via _includes/page-hero.html (logo_<slug>.jpg background + icon_<slug>.png teal tab); opt-in with hero_slug frontmatter on research/news/people/publications/resources/contact. - Drop <h1> from page layout in favor of the hero. - Homepage: restore the legacy ornaments — nav_research arrow tab on the banner edge, two decorative gray bars (sliced from nav_banners.png), and word_home.png sprite slices flanking the mission paragraph. - Research: replace plain <h2> headings with the three word_research.png sprite slices (3D puzzles / RNA chemical mapping / Designs). - Resources: replace oversized 16:9 cards with stacked rows; add word_resources.png 'On-line Resources' header. Icons render at natural ~190px width. - Contact: add word_contact.png 'Connect with us' header. - Publications: prefix the PubMed link with the nav_arrow circular icon. - News index: drop the auto-extracted titles; render full post content inline so bold/italic/links survive; switch .news-thumb from object-fit:cover to contain so portraits and banners aren't clipped. - Favicon: square 192x192 generated from logo_das.png by padding to square (preserves the full 'das LAB' mark instead of stretching).
1 parent 5745101 commit feade37

12 files changed

Lines changed: 276 additions & 106 deletions

File tree

_includes/head.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
77
<link href="https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,400;0,500;0,800;1,400;1,500;1,800&display=swap" rel="stylesheet">
88
<link rel="stylesheet" href="{{ '/assets/css/style.css' | relative_url }}">
9-
<link rel="icon" type="image/png" href="{{ '/assets/images/site/logo_das.png' | relative_url }}">
9+
<link rel="icon" type="image/png" href="{{ '/assets/favicon.png' | relative_url }}">

_includes/page-hero.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{% comment %}
2+
Renders the per-page hero banner: logo_<slug>.jpg as a wide background photo,
3+
with icon_<slug>.png (the teal "<page> ::" tab) anchored to the right.
4+
Set `hero_slug` in the page frontmatter (research, news, people, publications,
5+
resources, contact) to opt in.
6+
{% endcomment %}
7+
{% if include.slug or page.hero_slug %}
8+
{% assign slug = include.slug | default: page.hero_slug %}
9+
<div class="page-hero" style="background-image: url('{{ '/assets/images/site/public/logo_' | append: slug | append: '.jpg' | relative_url }}');" role="img" aria-label="{{ page.title | default: slug }}">
10+
<img class="page-hero-tab" src="{{ '/assets/images/site/public/icon_' | append: slug | append: '.png' | relative_url }}" alt="{{ page.title | default: slug }}">
11+
</div>
12+
{% endif %}

_layouts/page.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: default
33
---
4+
{% include page-hero.html %}
45
<article class="page-content">
5-
{% if page.title %}<h1 class="page-title">{{ page.title }}</h1>{% endif %}
66
{{ content }}
77
</article>

assets/css/style.scss

Lines changed: 194 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -159,31 +159,142 @@ hr { border: 0; border-top: 1px dotted $text-faint; margin: 2rem 0; }
159159
margin: 0 auto;
160160
}
161161

162+
/* ---------- per-page hero ---------- */
163+
164+
.page-hero {
165+
position: relative;
166+
max-width: $container;
167+
margin: 1rem auto 2rem;
168+
aspect-ratio: 973 / 221;
169+
background-size: cover;
170+
background-position: center;
171+
background-repeat: no-repeat;
172+
border-radius: 2px;
173+
}
174+
175+
.page-hero-tab {
176+
position: absolute;
177+
right: -1%;
178+
bottom: 8%;
179+
width: 36%;
180+
height: auto;
181+
max-height: 60%;
182+
z-index: 2;
183+
filter: drop-shadow(2px 2px 6px rgba(0,0,0,0.25));
184+
}
185+
186+
/* ---------- sprite word-art (legacy CSS sprites preserved) ---------- */
187+
188+
.word-home-what,
189+
.word-home-strive {
190+
display: inline-block;
191+
background: url("/assets/images/site/public/word_home.png") no-repeat;
192+
flex-shrink: 0;
193+
}
194+
.word-home-what { width: 119px; height: 70px; background-position: 0 0; }
195+
.word-home-strive { width: 207px; height: 95px; background-position: -121px 0; }
196+
197+
.word-research-1,
198+
.word-research-2,
199+
.word-research-3 {
200+
display: inline-block;
201+
background: url("/assets/images/site/public/word_research.png") no-repeat;
202+
flex-shrink: 0;
203+
}
204+
.word-research-1 { width: 138px; height: 68px; background-position: -1px 0; }
205+
.word-research-2 { width: 138px; height: 121px; background-position: 0 -69px; }
206+
.word-research-3 { width: 138px; height: 84px; background-position: 0 -191px; }
207+
208+
.word-resources-online,
209+
.word-resources-resources {
210+
display: inline-block;
211+
background: url("/assets/images/site/public/word_resources.png") no-repeat;
212+
}
213+
.word-resources-online { width: 164px; height: 67px; background-position: 0 0; }
214+
.word-resources-resources { width: 164px; height: 44px; background-position: 0 -67px; }
215+
216+
.word-resources-stack {
217+
display: flex;
218+
flex-direction: column;
219+
align-items: flex-start;
220+
margin-bottom: 1.5rem;
221+
}
222+
223+
.word-contact {
224+
display: block;
225+
width: 184px; height: 62px;
226+
background: url("/assets/images/site/public/word_contact.png") no-repeat;
227+
}
228+
162229
/* ---------- homepage ---------- */
163230

231+
.home-stage {
232+
position: relative;
233+
max-width: 1022px;
234+
margin: 0 auto;
235+
}
236+
164237
.home-banner {
165238
width: 100%;
239+
aspect-ratio: 1022 / 348;
240+
background: url("/assets/images/site/public/logo_home.png") no-repeat center top / 100% auto;
241+
border-radius: 2px;
242+
}
243+
244+
/* Circular teal "research →" tab anchored to the banner's left edge */
245+
.home-research-arrow {
246+
position: absolute;
247+
left: -42px;
248+
top: 28%;
249+
width: 53px;
250+
height: 201px;
251+
background: url("/assets/images/site/public/nav_research.png") no-repeat 0 0;
252+
background-size: 106px 201px;
253+
text-indent: -9999px;
254+
overflow: hidden;
255+
&:hover { background-position: -53px 0; }
256+
}
257+
258+
/* Two horizontal decorative bars (sliced from nav_banners.png) */
259+
.home-divider-bars {
260+
display: flex;
166261
max-width: 1022px;
167262
margin: 1rem auto 1.5rem;
168-
aspect-ratio: 1022 / 348;
169-
background: url("{{ '/assets/images/site/public/logo_home.png' | relative_url }}") no-repeat center top / 100% auto;
170-
border-radius: 4px;
263+
height: 39px;
264+
gap: 8px;
265+
}
266+
.home-divider-bars .bar-dark,
267+
.home-divider-bars .bar-light {
268+
height: 39px;
269+
background: url("/assets/images/site/public/nav_banners.png") no-repeat;
171270
}
271+
.home-divider-bars .bar-dark { flex: 0 0 60%; background-position: 0 -15px; }
272+
.home-divider-bars .bar-light { flex: 1 1 auto; background-position: -514px -55px; }
172273

173-
.home-mission {
174-
max-width: $content;
175-
margin: 2rem auto;
274+
.home-callouts {
275+
display: grid;
276+
grid-template-columns: auto 1fr auto;
277+
gap: 1.5rem;
278+
align-items: start;
279+
max-width: 1022px;
280+
margin: 0 auto 2.5rem;
176281
padding: 0 1rem;
177-
font-size: 1.05rem;
178-
line-height: 1.6;
282+
}
283+
284+
.home-mission {
285+
margin: 0;
286+
padding: 0.5rem 0.5rem 0;
287+
font-size: 0.95rem;
288+
line-height: 1.55;
179289
text-align: justify;
180290
color: $text-muted;
181291
}
182292

183-
.home-divider {
184-
border-top: 1px dotted $text-faint;
185-
max-width: $container;
186-
margin: 2rem auto;
293+
@media (max-width: $bp-tablet) {
294+
.home-research-arrow { display: none; }
295+
.home-callouts { grid-template-columns: 1fr; }
296+
.home-callouts .word-home-what,
297+
.home-callouts .word-home-strive { transform: scale(0.85); transform-origin: top left; }
187298
}
188299

189300
/* ---------- people ---------- */
@@ -256,6 +367,28 @@ hr { border: 0; border-top: 1px dotted $text-faint; margin: 2rem 0; }
256367

257368
/* ---------- publications ---------- */
258369

370+
.pub-search {
371+
margin: 1.5rem 0 2rem;
372+
font-size: 1.1rem;
373+
374+
a {
375+
display: inline-flex;
376+
align-items: center;
377+
gap: 0.6rem;
378+
color: $text;
379+
&:hover { color: $accent-hover; }
380+
}
381+
}
382+
.pub-search-arrow {
383+
display: inline-block;
384+
width: 28px;
385+
height: 28px;
386+
background: url("/assets/images/site/public/nav_arrow.png") no-repeat 0 0;
387+
background-size: 115px 28px;
388+
flex-shrink: 0;
389+
}
390+
.pub-search a:hover .pub-search-arrow { background-position: -29px 0; }
391+
259392
.publications-year {
260393
color: $accent-hover;
261394
font-size: 2rem;
@@ -327,39 +460,44 @@ hr { border: 0; border-top: 1px dotted $text-faint; margin: 2rem 0; }
327460

328461
.news-entry {
329462
display: grid;
330-
grid-template-columns: 200px 1fr;
331-
gap: 1.25rem;
463+
grid-template-columns: 220px 1fr;
464+
gap: 1.5rem;
332465
align-items: start;
333-
padding: 1rem 0;
334-
border-bottom: 1px solid $rule;
466+
padding: 1.25rem 0;
467+
border-bottom: 1px dotted $text-faint;
335468

336469
.news-thumb {
337470
width: 200px;
338-
height: 130px;
339-
object-fit: cover;
340-
background: $accent-bg;
471+
max-height: 200px;
472+
object-fit: contain;
473+
background: transparent;
341474
border-radius: 3px;
475+
align-self: start;
476+
justify-self: end;
342477
}
343478
.news-date {
344-
font-size: 0.85rem;
479+
font-style: italic;
480+
font-size: 0.95rem;
345481
color: $accent-hover;
346-
margin: 0;
482+
margin: 0 0 0.5rem;
347483
font-weight: 500;
348484
}
349-
.news-headline {
350-
margin: 0.2rem 0 0.4rem;
351-
font-size: 1rem;
352-
line-height: 1.4;
353-
color: $text;
354-
font-weight: 800;
355-
a { color: inherit; &:hover { color: $accent-hover; } }
485+
.news-body {
486+
font-size: 0.95rem;
487+
line-height: 1.55;
488+
color: $text-muted;
489+
490+
p { margin: 0 0 0.6rem; }
491+
p:last-child { margin-bottom: 0; }
492+
a { color: $accent-hover; &:hover { color: $text; } }
493+
strong, b { color: $text; }
494+
img { max-width: 100%; height: auto; margin: 0.5rem 0; }
356495
}
357-
.news-excerpt { margin: 0; font-size: 0.92rem; color: $text-muted; line-height: 1.5; }
358496
}
359497

360498
@media (max-width: $bp-phone) {
361499
.news-entry { grid-template-columns: 1fr; }
362-
.news-entry .news-thumb { width: 100%; max-width: 320px; height: auto; aspect-ratio: 200 / 130; }
500+
.news-entry .news-thumb { width: 100%; max-width: 320px; max-height: none; height: auto; }
363501
}
364502

365503
/* News post page */
@@ -396,45 +534,40 @@ details.show-more {
396534
&[open] > summary { margin-bottom: 1rem; }
397535
}
398536

399-
/* ---------- research / resources cards ---------- */
537+
/* ---------- resources rows (small inline icon + text) ---------- */
400538

401-
.cards {
539+
.resource-row {
402540
display: grid;
403-
grid-template-columns: repeat(3, 1fr);
541+
grid-template-columns: 200px 1fr 220px;
404542
gap: 1.5rem;
405-
margin: 1.5rem 0;
406-
}
407-
@media (max-width: $bp-tablet) { .cards { grid-template-columns: 1fr; } }
543+
align-items: center;
544+
padding: 1.25rem 0;
545+
border-bottom: 1px dotted $text-faint;
408546

409-
.card {
410-
display: flex;
411-
flex-direction: column;
412-
border: 1px solid $rule;
413-
border-radius: 6px;
414-
padding: 1.25rem;
415-
background: #fff;
416-
transition: border-color 0.15s;
417-
&:hover { border-color: $accent-hover; }
547+
&:first-of-type { padding-top: 0.5rem; }
548+
&:last-of-type { border-bottom: none; }
418549

419-
.card-image {
420-
width: 100%;
421-
aspect-ratio: 16 / 9;
422-
object-fit: cover;
423-
border-radius: 4px;
424-
margin-bottom: 0.75rem;
425-
background: $accent-bg;
426-
}
427-
.card-title {
428-
margin: 0 0 0.4rem;
429-
font-size: 1.05rem;
430-
color: $accent;
431-
font-weight: 800;
432-
}
433-
.card-body {
550+
.resource-text {
434551
margin: 0;
435-
font-size: 0.9rem;
436552
color: $text-muted;
553+
font-size: 0.95rem;
437554
line-height: 1.55;
555+
grid-column: 2;
556+
}
557+
.resource-icon {
558+
grid-column: 3;
559+
text-align: right;
560+
img { max-width: 200px; height: auto; }
561+
}
562+
/* word_resources sprite anchors the left column for the first row only */
563+
.resource-label { grid-column: 1; align-self: center; }
564+
}
565+
566+
@media (max-width: $bp-tablet) {
567+
.resource-row {
568+
grid-template-columns: 1fr;
569+
.resource-text, .resource-icon, .resource-label { grid-column: 1; }
570+
.resource-icon { text-align: center; }
438571
}
439572
}
440573

assets/favicon.png

13.6 KB
Loading

contact.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,34 @@
22
layout: page
33
title: Contact
44
slug: contact
5+
hero_slug: contact
56
permalink: /contact/
67
---
78

89
<div class="contact-grid">
910
<div>
10-
<h2>Connect with us</h2>
11+
<i class="word-contact" aria-label="Connect with us"></i>
1112

1213
<div class="contact-block">
1314
<p><strong>Rhiju Das</strong> is in <strong>B421A</strong> (office), embedded in our home lab <strong>B419</strong> in the Beckman Center at Stanford University.</p>
1415
</div>
1516

1617
<div class="contact-block">
17-
<h2>Directions</h2>
18-
<p>Take the elevators to the fourth floor of the Beckman Center. Step out and turn left, then turn left again at the first hallway before the water fountain. B419 will be the second to last door to your left at the end of the hallway.</p>
18+
<p><strong>To get to the lab</strong>, take the elevators to the fourth floor of the Beckman Center. Step out and turn left, then turn left again at the first hallway before the water fountain. B419 will be the second to last door to your left at the end of the hallway.</p>
1919
</div>
2020

2121
<div class="contact-block">
22-
<h2>Phone</h2>
23-
<p>Office &nbsp; (650) 723-5976<br>
24-
Admin &nbsp; (650) 498-5118</p>
22+
<p><strong>Office</strong> &nbsp; (650) 723-5976<br>
23+
<strong>Admin</strong> &nbsp; (650) 498-5118</p>
2524
</div>
2625

2726
<div class="contact-block">
28-
<h2>E-mail</h2>
29-
<p>rhiju <em>[at]</em> stanford.edu</p>
27+
<p><strong>E-mail</strong> &nbsp; rhiju <em>[at]</em> stanford.edu</p>
3028
</div>
3129

3230
<div class="contact-block">
33-
<h2>Administrative assistant</h2>
34-
<p>Lisa Sharp lasharp <em>[at]</em> stanford.edu</p>
31+
<p><strong>Administrative assistant:</strong><br>
32+
Lisa Sharp, lasharp <em>[at]</em> stanford.edu</p>
3533
</div>
3634

3735
<p><strong>Interested in working with us?</strong> Reach out to Rhiju Das.</p>

0 commit comments

Comments
 (0)