Skip to content

Commit a353c04

Browse files
authored
feat: sign-up page (#110)
* feat: sign-up page * fix: review comments
1 parent 6bf2eee commit a353c04

8 files changed

Lines changed: 273 additions & 140 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { Particles } from "./particles";

apps/web/src/app/auth/login/mouse-position.tsx renamed to apps/web/src/app/auth/components/particles/mouse-position.tsx

File renamed without changes.

apps/web/src/app/auth/login/particles.tsx renamed to apps/web/src/app/auth/components/particles/particles.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ interface ParticlesProps {
1212
rgb?: string;
1313
}
1414

15-
export default function Particles({
15+
export function Particles({
1616
className = "",
1717
quantity = 30,
1818
staticity = 50,

apps/web/src/app/auth/login/page.tsx

Lines changed: 34 additions & 135 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,11 @@
1-
import {
2-
Box,
3-
Button,
4-
Flex,
5-
Paper,
6-
Stack,
7-
Text,
8-
ThemeIcon,
9-
Title,
10-
useMantineColorScheme,
11-
} from "@mantine/core";
1+
import { Button, Flex, Paper, Stack, Text, Title } from "@mantine/core";
122
import { AuthProvider } from "@sweetr/graphql-types/frontend/graphql";
13-
import {
14-
IconBrandGithub,
15-
IconClock,
16-
IconFireExtinguisher,
17-
IconFlame,
18-
IconQuote,
19-
} from "@tabler/icons-react";
203
import { useAuthProviderQuery } from "../../../api/auth.api";
214
import { Logo } from "../../../components/logo";
22-
import { IconDeployment } from "../../../providers/icon.provider";
23-
import { useSearchParams } from "react-router";
24-
import Particles from "./particles";
5+
import { Link, useSearchParams } from "react-router";
6+
import { Particles } from "../components/particles";
257
import classes from "./page.module.css";
268

27-
const ELITE_BENCHMARKS = [
28-
{
29-
icon: IconDeployment,
30-
metric: "Deployment Frequency",
31-
benchmark: "On-demand, multiple deploys per day",
32-
},
33-
{
34-
icon: IconClock,
35-
metric: "Lead Time for Changes",
36-
benchmark: "Less than one hour from commit to production",
37-
},
38-
{
39-
icon: IconFireExtinguisher,
40-
metric: "Time to Restore Service",
41-
benchmark: "Less than one hour to recover from incidents",
42-
},
43-
{
44-
icon: IconFlame,
45-
metric: "Change Failure Rate",
46-
benchmark: "0–15% of changes cause failures",
47-
},
48-
];
49-
509
export const LoginPage = () => {
5110
const [searchParams] = useSearchParams({
5211
redirectTo: "",
@@ -59,8 +18,6 @@ export const LoginPage = () => {
5918
},
6019
});
6120

62-
const { colorScheme } = useMantineColorScheme();
63-
6421
document.body.style.backgroundColor = "#141517";
6522

6623
return (
@@ -76,7 +33,6 @@ export const LoginPage = () => {
7633
radius="lg"
7734
p={48}
7835
maw={960}
79-
w="100%"
8036
pos="relative"
8137
style={{ zIndex: 1 }}
8238
>
@@ -89,29 +45,39 @@ export const LoginPage = () => {
8945
>
9046
<Logo size={96} />
9147
<Stack gap={5} align="center">
92-
<Title order={3}>Get started for free</Title>
48+
<Title order={3}>Sweetr</Title>
9349
<Text size="sm" c="dimmed">
94-
No credit card required
50+
Login or signup with GitHub
9551
</Text>
9652
</Stack>
97-
<Button
98-
component="a"
99-
fullWidth
100-
size="md"
101-
w={280}
102-
href={data?.authProvider.redirectUrl}
103-
loading={isLoading}
104-
leftSection={<IconBrandGithub size={16} />}
105-
bg="green.4"
106-
loaderProps={{ color: "black" }}
107-
c="black"
108-
>
109-
Continue with GitHub
110-
</Button>
111-
<Text size="sm" c="dimmed" ta="center" maw={260} lh={1.5}>
112-
Works for login and signup. New teams will be guided through
113-
setup.
114-
</Text>
53+
54+
<Stack gap={10}>
55+
<Button
56+
component="a"
57+
fullWidth
58+
size="md"
59+
w={280}
60+
href={data?.authProvider.redirectUrl}
61+
loading={isLoading}
62+
bg="green.4"
63+
loaderProps={{ color: "black" }}
64+
c="black"
65+
>
66+
Login with GitHub
67+
</Button>
68+
<Button
69+
component={Link}
70+
fullWidth
71+
size="md"
72+
w={280}
73+
to="/sign-up"
74+
loaderProps={{ color: "black" }}
75+
variant="default"
76+
>
77+
Start 14-day free trial
78+
</Button>
79+
</Stack>
80+
11581
<Text
11682
component="a"
11783
href="/sandbox"
@@ -120,76 +86,9 @@ export const LoginPage = () => {
12086
td="underline"
12187
style={{ textUnderlineOffset: 3 }}
12288
>
123-
Explore the sandbox instead.
89+
Explore the sandbox instead
12490
</Text>
12591
</Stack>
126-
127-
<Box
128-
pl={60}
129-
visibleFrom="md"
130-
style={{
131-
borderLeft: "1px solid var(--mantine-color-dark-4)",
132-
flex: 1,
133-
minWidth: 0,
134-
}}
135-
>
136-
<Title order={2} lh={1.3}>
137-
Is your engineering team elite?
138-
</Title>
139-
<Text size="sm" c="dimmed" mt="xs" mb={36}>
140-
According to the DORA research program, elite teams hit all four
141-
of these benchmarks. Most teams don&apos;t know where they stand.
142-
</Text>
143-
144-
<Stack gap="lg">
145-
{ELITE_BENCHMARKS.map((item) => (
146-
<Flex key={item.metric} gap="md" align="center">
147-
<ThemeIcon
148-
variant="default"
149-
size={42}
150-
radius="md"
151-
style={{ flexShrink: 0 }}
152-
>
153-
<item.icon size={22} />
154-
</ThemeIcon>
155-
<Box style={{ minWidth: 0 }}>
156-
<Text fw={600} size="md">
157-
{item.metric}
158-
</Text>
159-
<Text size="sm" c="dimmed">
160-
{item.benchmark}
161-
</Text>
162-
</Box>
163-
</Flex>
164-
))}
165-
</Stack>
166-
167-
<Text fw={500} size="sm" mt={36}>
168-
Sweetr tracks these metrics automatically from your Git data.
169-
</Text>
170-
171-
<Flex align="center" gap={6} mt={36}>
172-
<IconQuote
173-
size={14}
174-
color="var(--mantine-color-dark-3)"
175-
style={{ flexShrink: 0 }}
176-
/>
177-
<Text
178-
component="a"
179-
href="https://dora.dev/research/2021/dora-report/2021-dora-accelerate-state-of-devops-report.pdf"
180-
target="_blank"
181-
rel="noopener noreferrer"
182-
size="xs"
183-
c="dimmed"
184-
fs="italic"
185-
td="underline"
186-
style={{ textUnderlineOffset: 3 }}
187-
>
188-
Source: 2021 Accelerate State of DevOps Report (DORA / Google
189-
Cloud)
190-
</Text>
191-
</Flex>
192-
</Box>
19392
</Flex>
19493
</Paper>
19594
</Flex>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
.page {
2+
min-height: 100vh;
3+
position: relative;
4+
overflow: hidden;
5+
background:
6+
radial-gradient(
7+
ellipse 600px 400px at 15% 10%,
8+
rgba(64, 192, 87, 0.12) 0%,
9+
transparent 100%
10+
),
11+
radial-gradient(
12+
ellipse 500px 500px at 85% 80%,
13+
rgba(64, 192, 87, 0.08) 0%,
14+
transparent 100%
15+
),
16+
radial-gradient(
17+
ellipse 300px 600px at 50% 50%,
18+
rgba(64, 192, 87, 0.04) 0%,
19+
transparent 100%
20+
),
21+
radial-gradient(
22+
circle 800px at 70% 20%,
23+
rgba(34, 139, 230, 0.04) 0%,
24+
transparent 100%
25+
);
26+
}
27+
28+
.particles {
29+
position: absolute;
30+
inset: 0;
31+
z-index: 0;
32+
}

0 commit comments

Comments
 (0)