Skip to content

Commit e5f5417

Browse files
committed
minimum homepage hero image height
1 parent b368edc commit e5f5417

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

src/components/PageHeader/HomePage.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const { config } = Astro.props;
1616
</p>
1717
<Icon
1818
kind="asterisk-thick"
19-
className="col-span-1 motion-safe:animate-spin-slow text-logo-color h-full max-w-full"
19+
className="col-span-1 motion-safe:animate-spin-slow text-logo-color h-full max-w-full max-h-[200px]"
2020
/>
2121
</div>
2222
{
@@ -33,7 +33,7 @@ const { config } = Astro.props;
3333
{
3434
config.data.heroImages.map((im, i) => (
3535
<img
36-
class={`hero-image full-bleed-image ${i > 0 ? "hidden" : ""}`}
36+
class={`hero-image ${i > 0 ? "hidden" : ""}`}
3737
src={im.image.src}
3838
alt={im.altText}
3939
loading={i > 0 ? "lazy" : "eager"}

src/layouts/BaseLayout.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ const headerTopic = topic
7272
<div class="top-layout-grid">
7373
<Nav />
7474
<Settings hideSearch={variant === "search"} />
75-
<header class={homepageConfig && "h-[100vh]"}>
75+
<header class={homepageConfig && "h-[100vh] md:min-h-[calc(378px+50vh)]"}>
7676
{
7777
variant === "root" ? (
7878
<RootPageHeader

styles/global.scss

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,12 +338,12 @@ pre.code-box {
338338
max-height: calc(50vh - var(--spacing-5xl) - 43px);
339339

340340
@media (min-width: $breakpoint-tablet) {
341-
height: 50vh;
341+
height: calc(50vh - var(--spacing-5xl));
342342
max-height: calc(50vh - var(--spacing-5xl));
343+
min-height: 300px;
343344
}
344345

345346
@media (min-width: $breakpoint-laptop) {
346-
height: 50vh;
347347
max-height: calc(50vh - var(--spacing-3xl));
348348
}
349349
}
@@ -403,7 +403,7 @@ th {
403403
padding: var(--spacing-xs);
404404
}
405405

406-
.full-bleed-image {
406+
.hero-image {
407407
left: -2.5rem;
408408
width: calc(100% + 5rem);
409409
max-width: calc(100% + 5rem);
@@ -418,6 +418,7 @@ th {
418418
left: calc(-1 * var(--spacing-lg));
419419
width: calc(100% + var(--spacing-lg) * 2);
420420
max-width: calc(100% + var(--spacing-lg) * 2);
421+
min-height: 250px;
421422
}
422423
}
423424

0 commit comments

Comments
 (0)