Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Mobile h1 wrapping, mobile illustration location #25

Merged
merged 1 commit into from
May 27, 2024
Merged
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
37 changes: 31 additions & 6 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,26 @@ import Footer from "../components/Footer.astro";
<Header />
<main>
<Image
class="desktop-illustration"
src={image}
alt="A blurred photo of a beach"
alt="Some snails and flowers on top of a court order document"
width={600}
densities={[1, 2]}
/>
<div class="content">
<h1>Be seen for <span class="who-you-are">who you are.</span></h1>
<h1>
<span>Be seen for</span><br /><span class="who-you-are"
>who you are.</span
>
</h1>
<div class="subhead">
<Image
class="mobile-illustration"
src={image}
alt="Some snails and flowers on top of a court order document"
width={400}
densities={[1, 2]}
/>
<p>
<strong>Legally changing name and gender is a challenge.</strong> You have
to navigate the courts, fill out dense paperwork, and tackle steps in a
Expand Down Expand Up @@ -93,14 +105,24 @@ import Footer from "../components/Footer.astro";
width: 100%;
max-width: 1200px;
margin-inline: auto;
// overflow: hidden;

@media (width < 900px) {
.mobile-illustration {
display: none;
}

@media (width < 800px) {
display: block;

img {
.desktop-illustration {
display: none;
}

.mobile-illustration {
display: block;
float: right;
max-width: 50%;
margin-left: var(--space-m);
margin-bottom: var(--space-m);
}
}
}
Expand All @@ -114,10 +136,13 @@ import Footer from "../components/Footer.astro";

h1 {
margin-block-end: var(--space-xl);

span {
white-space: nowrap;
}
}

.who-you-are {
white-space: nowrap;
color: var(--pink-7);
}

Expand Down