Skip to content

Commit

Permalink
feat: New brand purple (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
evadecker authored May 28, 2024
1 parent 2f6180c commit b2fc797
Show file tree
Hide file tree
Showing 14 changed files with 153 additions and 147 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"@astrojs/react": "^3.4.0",
"@astrojs/sitemap": "^3.1.5",
"@axe-core/playwright": "^4.9.1",
"@radix-ui/colors": "^3.0.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"astro": "^4.9.2",
Expand Down
7 changes: 0 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/favicon-192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/favicon-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/favicon.ico
Binary file not shown.
2 changes: 1 addition & 1 deletion public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
110 changes: 55 additions & 55 deletions public/speckles-black.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
104 changes: 52 additions & 52 deletions public/speckles-purple.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/layouts/BaseLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ const pageTitle = Astro.url.pathname === "/" ? title : `${title} · Namesake`;
<meta name="generator" content={Astro.generator} />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="color-scheme" content="light" />
<link rel="icon" href="/favicon.ico?v2" sizes="32x32" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg?v2" />
<link rel="icon" href="/favicon.ico?v3" sizes="32x32" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg?v3" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<link rel="manifest" href="/manifest.webmanifest" />
<link rel="canonical" href={canonicalURL} />
Expand Down
Binary file added src/pages/form-snail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 29 additions & 13 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
import { Image } from "astro:assets";
import BaseLayout from "../layouts/BaseLayout.astro";
import { RiArrowRightLine } from "react-icons/ri";
import image from "./namesake-form.png";
import illustration from "./namesake-form.png";
import formIllustration from "./form-snail.png";
import Header from "../components/Header.astro";
import Footer from "../components/Footer.astro";
---
Expand All @@ -15,7 +16,7 @@ import Footer from "../components/Footer.astro";
<main>
<Image
class="illustration"
src={image}
src={illustration}
alt="Some snails and flowers on top of a court order document"
width={600}
densities={[1, 2]}
Expand Down Expand Up @@ -50,6 +51,13 @@ import Footer from "../components/Footer.astro";
</p>
</div>
<form>
<Image
class="form-illustration"
src={formIllustration}
alt="A snail moving to the left"
width={240}
densities={[1, 2]}
/>
<strong>Get notified when we launch:</strong>
<div class="input-group">
<input type="email" name="email" placeholder="Your email" required />
Expand Down Expand Up @@ -91,7 +99,7 @@ import Footer from "../components/Footer.astro";
main {
flex: 1;
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
grid-template-columns: minmax(460px, 1fr) minmax(0, 1fr);
gap: var(--space-2xl);
padding: var(--space-2xl) var(--space-l);
min-width: 0;
Expand Down Expand Up @@ -126,7 +134,7 @@ import Footer from "../components/Footer.astro";
}

.who-you-are {
color: var(--background);
color: var(--bg-purple);
}

.subhead {
Expand All @@ -138,14 +146,22 @@ import Footer from "../components/Footer.astro";
}

form {
color: var(--background);
background-color: var(--gray-12);
margin-block-start: var(--space-xl);
color: var(--bg-purple);
background-color: var(--text);
margin-block-start: var(--space-3xl);
padding: var(--space-l) var(--space-m);
position: relative;

@media (width < 540px) {
width: 100%;
}

.form-illustration {
width: 120px;
position: absolute;
bottom: calc(100% - 4px);
right: 20px;
}
}

.input-group {
Expand All @@ -158,21 +174,21 @@ import Footer from "../components/Footer.astro";
input,
button {
border: none;
background: var(--background);
background: var(--bg-purple);
border-radius: var(--radius-s);
color: var(--gray-12);
color: var(--text);
padding: var(--space-s) var(--space-s);
}

input {
flex: 1;

&::placeholder {
color: var(--gray-a9);
color: var(--text-placeholder);
}

&:focus {
background-color: var(--white-a12);
background-color: var(--white);
}
}

Expand All @@ -187,12 +203,12 @@ import Footer from "../components/Footer.astro";

@media (hover: hover) {
&:hover {
background: var(--white-a12);
background: var(--white);
}
}

&:focus-visible {
background: var(--white-a12);
background: var(--white);
}
}
</style>
18 changes: 9 additions & 9 deletions src/styles/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ html {
}

body {
color: var(--gray-12);
background-color: var(--background);
color: var(--text);
background-color: var(--bg-purple);
background-image: url('/speckles-black.svg');
background-position: center;
background-position: center top;
display: flex;
min-height: 100dvh;
position: relative;
Expand All @@ -26,14 +26,14 @@ body::after {
position: absolute;
inset: 0;
background-image: url('/speckles-purple.svg');
background-position: center;
background-position: center top;
pointer-events: none;
z-index: 10;
}

::selection {
background: var(--gray-12);
color: var(--background);
background: var(--text);
color: var(--bg-purple);
}

h1, h2, h3 {
Expand Down Expand Up @@ -75,7 +75,7 @@ small {

a {
text-decoration: underline;
text-decoration-color: var(--gray-a11);
text-decoration-color: var(--text);
text-underline-offset: max(0.1em, 2.5px);
transition:
text-decoration-color 0.2s ease-in-out,
Expand All @@ -85,7 +85,7 @@ a {
@media (hover: hover) {
a:hover,
a:focus {
text-decoration-color: var(--gray-12);
text-decoration-color: var(--text);
}
}

Expand All @@ -94,6 +94,6 @@ a {
}

:focus-visible {
outline: 2px solid var(--white-a12);
outline: 2px solid var(--white);
outline-offset: 2px;
}
12 changes: 5 additions & 7 deletions src/styles/theme.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
@import "@radix-ui/colors/gray.css";
@import "@radix-ui/colors/gray-alpha.css";
@import "@radix-ui/colors/violet.css";
@import "@radix-ui/colors/white-alpha.css";

:root {
/* @link https://utopia.fyi/type/calculator?c=320,18,1.2,1240,22,1.25,6,1,&s=0.75|0.5|0.25,1.5|2|3|4|6,s-l&g=s,l,xl,12 */
--step--1: clamp(0.9375rem, 0.881rem + 0.2826vi, 1.1rem);
Expand Down Expand Up @@ -40,6 +35,9 @@
--radius-m: var(--space-m);
--radius-l: var(--space-l);

/* Background */
--background: var(--violet-7);
/* Colors */
--bg-purple: #CDA5EF;
--text: #111111;
--text-placeholder: rgba(0, 0, 0, 0.5);
--white: #FFFFFF;
}

0 comments on commit b2fc797

Please sign in to comment.