Skip to content

Commit a0ccaf2

Browse files
committed
Footer bars: extract standalone slices, shrink Stanford Medicine logo
The legacy nav_banners.png sprite was leaking content (the 'Group Member Site' header and institutional-logo strip) past the right edge of each bar at container widths > the slice's natural width. Cropped two clean PNGs from the sprite — footer_bar_dark.png (599x39) and footer_bar_teal.png (205x39) — and use background-size: 100% 100% to stretch them to the flex container's width. Same fix applied to .home-divider-bars on the home page. Stanford Medicine combined logo shrunk from height 80 -> 40 (50% smaller) to balance against the smaller HHMI mark.
1 parent 238c1da commit a0ccaf2

4 files changed

Lines changed: 23 additions & 10 deletions

File tree

_includes/footer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</div>
66
<div class="institutional-logos">
77
<a href="https://med.stanford.edu/" target="_blank" rel="noopener noreferrer external">
8-
<img src="{{ '/assets/images/site/public/nav_logo_stanford_medicine.png' | relative_url }}" alt="Stanford Medicine" height="80">
8+
<img src="{{ '/assets/images/site/public/nav_logo_stanford_medicine.png' | relative_url }}" alt="Stanford Medicine" height="40">
99
</a>
1010
<a href="https://www.hhmi.org/scientists/rhiju-das" target="_blank" rel="noopener noreferrer external">
1111
<img src="{{ '/assets/images/site/public/nav_logo_hhmi.jpg' | relative_url }}" alt="Howard Hughes Medical Institute" height="60">

assets/css/style.scss

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -282,10 +282,17 @@ hr { border: 0; border-top: 1px dotted $text-faint; margin: 2rem 0; }
282282
.home-divider-bars .bar-dark,
283283
.home-divider-bars .bar-light {
284284
height: 39px;
285-
background: url("{{ '/assets/images/site/public/nav_banners.png' | relative_url }}") no-repeat;
285+
background-repeat: no-repeat;
286+
background-size: 100% 100%;
287+
}
288+
.home-divider-bars .bar-dark {
289+
flex: 0 0 60%;
290+
background-image: url("{{ '/assets/images/site/public/footer_bar_dark.png' | relative_url }}");
291+
}
292+
.home-divider-bars .bar-light {
293+
flex: 1 1 auto;
294+
background-color: #ccc;
286295
}
287-
.home-divider-bars .bar-dark { flex: 0 0 60%; background-position: 0 -15px; }
288-
.home-divider-bars .bar-light { flex: 1 1 auto; background-position: -514px -55px; }
289296

290297
.home-callouts {
291298
display: grid;
@@ -720,14 +727,20 @@ details.show-more {
720727
.footer-bar-dark,
721728
.footer-bar-teal {
722729
height: 39px;
723-
background-image: url("{{ '/assets/images/site/public/nav_banners.png' | relative_url }}");
724730
background-repeat: no-repeat;
731+
background-size: 100% 100%;
732+
}
733+
/* Standalone slices extracted from nav_banners.png so each bar is just its
734+
own clean image (no leakage of the 'Group Member Site' header or the
735+
institutional-logo strip from the source sprite). */
736+
.footer-bar-dark {
737+
flex: 0 0 70%;
738+
background-image: url("{{ '/assets/images/site/public/footer_bar_dark.png' | relative_url }}");
739+
}
740+
.footer-bar-teal {
741+
flex: 1 1 auto;
742+
background-image: url("{{ '/assets/images/site/public/footer_bar_teal.png' | relative_url }}");
725743
}
726-
/* Sprite slices from nav_banners.png. The dark gradient (footer_left) lives at
727-
y=15-54, teal block (footer_right) at x=0-256, y=55-94. Ratio ~70/30 to
728-
align with the hero banner's photo/tab split. */
729-
.footer-bar-dark { flex: 0 0 70%; background-position: 0 -15px; background-size: auto 39px; }
730-
.footer-bar-teal { flex: 1 1 auto; background-position: 0 -55px; background-size: auto 39px; }
731744

732745
/* Home page already has decorative bars between hero and content; suppress the
733746
footer pair so the home doesn't look top-heavy with bars. */
3.36 KB
Loading
1.16 KB
Loading

0 commit comments

Comments
 (0)