Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions content/podcast/cover.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 37 additions & 4 deletions sass/_podcast.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,24 @@
}

.podcast-hero {
padding-block: clamp(3rem, 7vw, 6rem) clamp(3rem, 6vw, 5rem);
padding-block: 0;
padding-inline: max(1.25rem, calc((100% - 1200px) / 2));
}

.podcast-hero-inner {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
grid-template-areas: "art copy";
align-items: center;
gap: 2rem;
}

.podcast-hero-copy {
grid-area: copy;
padding-top: clamp(3rem, 7vw, 6rem);
padding-bottom: clamp(3rem, 6vw, 5rem);
}

.podcast-hero h1 {
font-family: $fontHero;
font-size: clamp(2.5rem, 5.5vw, 4rem);
Expand Down Expand Up @@ -90,13 +97,34 @@
}

.podcast-hero-art {
grid-area: art;
align-self: stretch;
justify-self: end;
display: flex;
flex-direction: column;
width: 100%;
max-width: 32rem;

img {
display: block;
flex: none;
width: 100%;
height: auto;
}
}

// Stretch only the straight cables, leaving the illustration's proportions intact.
.podcast-hero-cables {
display: block;
flex: 1 0 0;
width: 100%;
height: auto;
min-height: clamp(3rem, 7vw, 6rem);
height: 0;
}

// Overlay the artwork with the actual section edge rather than a separate clip.
.podcast-listening {
margin-top: 1.5rem;
margin-top: 0;
padding: 3rem 1.25rem;
background-color: $brightBgrdScnd;
text-align: center;
Expand Down Expand Up @@ -350,6 +378,11 @@
@media (max-width: 700px) {
.podcast-hero-inner {
grid-template-columns: minmax(0, 1fr);
grid-template-areas: "copy";
}

.podcast-hero-copy {
padding-bottom: 3rem;
}

.podcast-hero-art {
Expand Down
9 changes: 7 additions & 2 deletions templates/podcast.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"name": "Rust in Production",
"description": {{ section.description | json_encode | safe }},
"url": "https://corrode.dev/podcast/",
"image": "https://corrode.dev/podcast/social.png",
"image": "https://corrode.dev/podcast/cover.svg",
"inLanguage": "en",
"isAccessibleForFree": true,
"publisher": {
Expand Down Expand Up @@ -39,6 +39,12 @@
<article class="podcast-page" aria-labelledby="podcast-title">
<header class="podcast-hero" id="podcast-top">
<div class="podcast-hero-inner">
<div class="podcast-hero-art">
<svg class="podcast-hero-cables" viewBox="0 0 1224 1" preserveAspectRatio="none" aria-hidden="true" focusable="false">
<path fill="#1a1613" d="M61.83 0h3.69v1h-3.69zM78.44 0h3.69v1h-3.69zM331.48 0h4.92v1h-4.92zM434.42 0h4.92v1h-4.92z" />
</svg>
<img src="/podcast/cover.svg" alt="A foundry pouring molten metal into a Rust gear" width="1224" height="1500" fetchpriority="high" />
</div>
<div class="podcast-hero-copy">
<h1 id="podcast-title">
<span class="highlight">Rust in</span>
Expand All @@ -64,7 +70,6 @@ <h1 id="podcast-title">
</li>
</ul>
</div>
<img class="podcast-hero-art" src="/podcast/hero.svg" alt="" width="310" height="268" fetchpriority="high" />
</div>
</header>

Expand Down
Loading