Skip to content

Commit 5f115ad

Browse files
committedNov 23, 2021
feat: Make sure design is responsive
1 parent b3f08ff commit 5f115ad

File tree

6 files changed

+20
-20
lines changed

6 files changed

+20
-20
lines changed
 

‎emails/confirm-email.html

+1-4
Original file line numberDiff line numberDiff line change
@@ -346,10 +346,7 @@
346346
>
347347
<tr>
348348
<td class="email-masthead">
349-
<a
350-
href="http://localhost:3000"
351-
class="f-fallback email-masthead_name"
352-
>
349+
<a href="{{base_url}}" class="f-fallback email-masthead_name">
353350
⚡ Magic NextAuth
354351
</a>
355352
</td>

‎emails/welcome.html

+1-4
Original file line numberDiff line numberDiff line change
@@ -349,10 +349,7 @@
349349
>
350350
<tr>
351351
<td class="email-masthead">
352-
<a
353-
href="https://localhost:3000"
354-
class="f-fallback email-masthead_name"
355-
>
352+
<a href="{{base_url}}" class="f-fallback email-masthead_name">
356353
⚡ Magic NextAuth
357354
</a>
358355
</td>

‎pages/api/auth/[...nextauth].js

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const sendVerificationRequest = ({ identifier, url }) => {
3434
to: identifier,
3535
subject: 'Your sign-in link for Magic NextAuth',
3636
html: emailTemplate({
37+
base_url: process.env.NEXTAUTH_URL,
3738
signin_url: url,
3839
email: identifier,
3940
}),
@@ -53,6 +54,7 @@ const sendWelcomeEmail = async user => {
5354
to: email,
5455
subject: 'Welcome to Magic NextAuth! 🎉',
5556
html: emailTemplate({
57+
base_url: process.env.NEXTAUTH_URL,
5658
support_email: 'support@alterclass.io',
5759
}),
5860
});

‎pages/auth/confirm-request.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,14 @@ const ConfirmRequest = () => {
1919
<p>Redirecting...</p>
2020
) : (
2121
<>
22-
<CheckCircleIcon className="w-16 h-16 text-blue-600 flex-shrink-0" />
23-
<h1 className="text-4xl font-bold mt-6">You&apos;re logged in!</h1>
24-
<p className="text-2xl mt-4">Go back to your original tab.</p>
25-
<p className="text-gray-500 text-lg mt-6">
22+
<CheckCircleIcon className="w-14 h-14 sm:w-16 sm:h-16 text-blue-600 flex-shrink-0" />
23+
<h1 className="text-2xl sm:text-4xl font-bold mt-4">
24+
You&apos;re logged in!
25+
</h1>
26+
<p className="text-lg sm:text-2xl mt-4">
27+
Go back to your original tab.
28+
</p>
29+
<p className="text-normal sm:text-lg text-gray-500 mt-6">
2630
You can close this window or click{' '}
2731
<Link href="/">
2832
<a className="text-blue-500 hover:underline hover:text-blue-600">

‎pages/auth/signin.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,14 @@ const SignIn = () => {
7878

7979
return (
8080
<>
81-
<div className="min-h-screen flex flex-col items-center justify-center">
82-
<LightningBoltIcon className="flex-shrink-0 w-16 h-16 text-blue-500" />
83-
<h1 className="mt-2 text-4xl text-center font-bold">
81+
<div className="min-h-screen flex flex-col items-center justify-center px-4 py-12">
82+
<LightningBoltIcon className="flex-shrink-0 w-14 h-14 sm:w-16 sm:h-16 text-blue-500" />
83+
<h1 className="mt-2 text-2xl sm:text-4xl text-center font-bold">
8484
Sign in to your account
8585
</h1>
8686
<form
8787
onSubmit={handleSignIn}
88-
className="mt-8 rounded-lg shadow-md bg-white p-8 space-y-6 w-full max-w-md"
88+
className="mt-8 rounded-lg shadow-md bg-white px-4 py-6 sm:px-8 sm:py-8 space-y-6 w-full max-w-md"
8989
>
9090
<div className="flex flex-col space-y-1">
9191
<label htmlFor="email" className="text-gray-500 text-sm">

‎pages/index.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ export default function Home() {
99
return (
1010
<div className="min-h-screen flex flex-col">
1111
<main className="flex-1 container mx-auto px-6 py-12 flex flex-col items-center justify-center">
12-
<h1 className="inline-flex items-center space-x-2">
13-
<LightningBoltIcon className="flex-shrink-0 w-16 h-16 text-blue-500" />
14-
<span className="h-16 text-6xl font-extrabold text-transparent bg-clip-text bg-gradient-to-br from-blue-400 to-blue-700">
12+
<h1 className="inline-flex flex-col sm:flex-row items-center space-y-2 sm:space-y-0 sm:space-x-2">
13+
<LightningBoltIcon className="flex-shrink-0 w-14 h-14 sm:w-16 sm:h-16 text-blue-500" />
14+
<span className="sm:h-16 text-4xl sm:text-6xl font-extrabold text-transparent bg-clip-text bg-gradient-to-br from-blue-400 to-blue-700 text-center">
1515
Magic NextAuth
1616
</span>
1717
</h1>
18-
<p className="mt-4 text-gray-500 text-2xl">
18+
<p className="mt-4 text-gray-500 text-xl sm:text-2xl text-center">
1919
Magic Link Authentication in Next.js with NextAuth and Fauna
2020
</p>
2121
<div className="mt-8">

1 commit comments

Comments
 (1)
Please sign in to comment.