Skip to content

Commit

Permalink
inverted direction, actual names
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaKGoldberg committed Sep 5, 2024
1 parent f813f1d commit 4c4edd4
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 16 deletions.
32 changes: 26 additions & 6 deletions src/components/DeepBlueSea.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,22 @@ import SquiggleWavesBackdrop from "./SquiggleWavesBackdrop.astro";
interface Props {
class?: string;
light?: "bottom" | "top";
unmasked?: boolean;
}
const { class: className, unmasked, ...rest } = Astro.props;
const { class: className, light, unmasked, ...rest } = Astro.props;
---

<div class:list={["deepBlueSea", className]} id="home" {...rest}>
<div
class:list={[
"deep-blue-sea",
light === "top" ? "deep-blue-sea-top" : "deep-blue-sea-bottom",
className,
]}
id="home"
{...rest}
>
<slot name="toggle" />
<div class:list={["squiggles", unmasked && "squiggles-unmasked"]}>
<SquiggleWavesBackdrop />
Expand All @@ -19,15 +28,26 @@ const { class: className, unmasked, ...rest } = Astro.props;
</div>

<style>
.deepBlueSea {
.deep-blue-sea {
overflow: hidden;
position: relative;
text-align: center;
}

.deep-blue-sea-bottom {
background: linear-gradient(
180deg,
var(--colorHeroShadow) 0%,
#156283 100%
);
overflow: hidden;
position: relative;
text-align: center;
}

.deep-blue-sea-top {
background: linear-gradient(
180deg,
#156283 0%,
var(--colorHeroShadow) 100%
);
}

.squiggles {
Expand Down
6 changes: 1 addition & 5 deletions src/layouts/BadgeLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,13 @@ import "@fontsource/urbanist";
import "./base.css";
import "./normalize.css";
interface Props {
unmasked?: boolean;
}
---

<html lang="en">
<Head />
<body>
<main class="badge">
<DeepBlueSea class="deep-blue-badge" unmasked={Astro.props.unmasked}>
<DeepBlueSea class="deep-blue-badge" light="top" unmasked>
<slot />
</DeepBlueSea>
</main>
Expand Down
34 changes: 29 additions & 5 deletions src/pages/badge/front.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,24 @@ import HeroNameHeading from "~/components/HeroNameHeading.astro";
import "~/layouts/base.css";
import "~/layouts/normalize.css";
import Heading from "~/components/Heading.astro";
const name = Astro.url.searchParams.get("name");
const role = Astro.url.searchParams.get("role");
const position = Astro.url.searchParams.get("position");
---

<BadgeLayout unmasked>
<BadgeLayout>
<div class="contents">
<div class="top">
<HeroNameHeading align="center" color="inverted" level="h2" />
<HeroNameDetails align="center" color="inverted" />
</div>
<div class="white-area"></div>
<Heading class="role" level="h2">Attendee</Heading>
<!-- {showWhiteArea ? <div class="white-area" /> : <div></div>} -->
<div class="texts">
<Heading class="name" level="h2">{name}</Heading>
<Heading class="position" level="h3">{position}</Heading>
<Heading class="role" level="h3">{role}</Heading>
</div>
</div>
</BadgeLayout>

Expand All @@ -29,17 +37,33 @@ import Heading from "~/components/Heading.astro";
display: flex;
align-items: center;
flex-direction: column;
padding: 4.5rem 2.5rem;
padding: 4.5rem 2.5rem 3.5rem;
text-shadow: 0 3px 7px var(--colorTextShadow);
width: 100%;
}

.top {
flex-grow: 999;
}

.role {
.texts {
color: var(--colorOffWhite);
display: flex;
flex-direction: column;
gap: 1rem;
}

.name {
font-size: 3.5rem;
}

.position {
font-size: 2.5rem;
}

.role {
font-size: 3rem;
margin-top: 3rem;
}

.white-area {
Expand Down

0 comments on commit 4c4edd4

Please sign in to comment.