-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
80e0af3
commit f141d30
Showing
22 changed files
with
4,149 additions
and
286 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Attach", | ||
"port": 9229, | ||
"request": "attach", | ||
"skipFiles": [ | ||
"<node_internals>/**" | ||
], | ||
"type": "node" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import { | ||
Preview, // A preview text that will be displayed in the inbox of the recipient before they open the email | ||
Tailwind, // A React component to wrap emails with Tailwind CSS | ||
Html, // <html> tag | ||
Head, // <head> tag | ||
Body, // <body> tag | ||
Container, // <table>, <tbody>, and <tr> tags with align="center" and max-width: 37.5em | ||
Row, // <table>, <tbody>, and <tr> tags | ||
Section, // <table>, <tbody>, <tr>, and <td> tags | ||
//Column, // <td> tag | ||
//Heading, // <h1> - <h6> tags | ||
Hr, // <hr> tag | ||
//Img, // <img> tag | ||
// Note: All email clients can display .png, .gif, and .jpg images. Unfortunately, .svg images are not well supported, regardless of how they’re referenced, so avoid using these. See Can I Email for more information. | ||
Link, // <a> tag, needs href and optional target | ||
//Button, // A link that is styled to look like a button. | ||
// Semantics: Quite often in the email world we talk about buttons, when actually we mean links. Behind the scenes this is a <a> tag, that is styled like a <button> tag. | ||
Text, // <p> tag | ||
} from '@react-email/components' | ||
import { type ReactNode } from 'react' | ||
|
||
export const EmailRoot = ({ subjectLine, previewText, children }: { subjectLine: string; previewText: string; children: ReactNode }) => { | ||
return ( | ||
<Html lang="en" dir="ltr"> | ||
<Head> | ||
<title>{subjectLine}</title> | ||
<Preview>{previewText}</Preview> | ||
</Head> | ||
<Tailwind> | ||
<Body className="bg-white py-4 font-sans text-base"> | ||
<Container> | ||
{children} | ||
<Hr className="mt-14" /> | ||
<Section className="mt-14"> | ||
<Row> | ||
<Link href="https://andrecasal.com" target="_blank" className="relative -m-3 block rounded-md p-3 text-4xl font-semibold text-gray-900"> | ||
André Casal | ||
</Link> | ||
</Row> | ||
<Row> | ||
<Text className="mb-10 mt-2 text-lg leading-8 text-gray-600">Modern full-stack web development.</Text> | ||
</Row> | ||
<Row> | ||
<Link href="https://twitter.com/theandrecasal" target="_blank" className="mr-4 text-[#ca8b04]"> | ||
</Link> | ||
<Link href="https://github.com/andrecasal" target="_blank" className="mx-4 text-[#ca8b04]"> | ||
GitHub | ||
</Link> | ||
<Link href="https://www.youtube.com/@andrecasal" target="_blank" className="ml-4 text-[#ca8b04]"> | ||
YouTube | ||
</Link> | ||
</Row> | ||
</Section> | ||
</Container> | ||
</Body> | ||
</Tailwind> | ||
</Html> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import type { HTMLAttributes, PropsWithChildren } from 'react' | ||
import spicy from '../images/pickled-stardust.jpg' | ||
import { cn } from '~/utils/misc.ts' | ||
|
||
const BackgroundSpicy = ({ className, children, ...props }: PropsWithChildren<HTMLAttributes<HTMLDivElement>>) => { | ||
return ( | ||
<div className={cn('relative isolate', className)} {...props}> | ||
<img src={spicy} alt="Spicy" className="absolute inset-0 -z-10 h-full w-full object-cover" aria-hidden="true" /> | ||
{children} | ||
</div> | ||
) | ||
} | ||
|
||
export default BackgroundSpicy |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { | ||
//Row, // <table>, <tbody>, and <tr> tags | ||
Section, // <table>, <tbody>, <tr>, and <td> tags | ||
//Column, // <td> tag | ||
Heading, // <h1> - <h6> tags | ||
//Hr, // <hr> tag | ||
//Img, // <img> tag | ||
// Note: All email clients can display .png, .gif, and .jpg images. Unfortunately, .svg images are not well supported, regardless of how they’re referenced, so avoid using these. See Can I Email for more information. | ||
Link, // <a> tag | ||
Button, // A link that is styled to look like a button. | ||
// Semantics: Quite often in the email world we talk about buttons, when actually we mean links. Behind the scenes this is a <a> tag, that is styled like a <button> tag. | ||
Text, // <p> tag | ||
} from '@react-email/components' | ||
import { EmailRoot } from '~/components/email-root.tsx' | ||
|
||
export const VerifyNewsletterSubscriptionEmail = ({ name, onboardingUrl, otp }: { name: string; onboardingUrl: string; otp: string }) => { | ||
return ( | ||
<EmailRoot subjectLine="Confirm your subscription" previewText="This is a test"> | ||
<Section> | ||
<Heading as="h1" className="my-14 text-3xl font-bold"> | ||
Confirm your subscription | ||
</Heading> | ||
<Text className="text-base">Hi {name},</Text> | ||
<Button href={onboardingUrl} className="mt-2 rounded bg-[#ca8b04] px-8 py-4 text-center text-xl leading-5 text-white hover:bg-[#ca8b04]/90"> | ||
Confirm your subscription | ||
</Button> | ||
<Text className="mt-20 text-sm text-gray-400">If that doesn't work, copy and paste this code into the page:</Text> | ||
<Text className="mt-6 text-lg font-bold text-gray-400">{otp}</Text> | ||
<Text className="mt-20 text-xs text-gray-400"> | ||
If you didn't subscribe to{' '} | ||
<Link href="https://andrecasal.com/newsletter" target="_blank" className="font-semibold text-[#ca8b04]"> | ||
André Casal's newsletter | ||
</Link> | ||
, just delete this email and everything will go back to the way it was. | ||
</Text> | ||
</Section> | ||
</EmailRoot> | ||
) | ||
} |
Oops, something went wrong.