Skip to content

Commit 09b1bb8

Browse files
authored
fix: login page reponsiveness (#22)
* fix: login page responsiveness * fix: login-redirect on extra small screen
1 parent 6522c15 commit 09b1bb8

File tree

2 files changed

+39
-39
lines changed

2 files changed

+39
-39
lines changed

src/app/(auth)/login/page.tsx

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ export const metadata: Metadata = {
1616
export default async function Page() {
1717
return (
1818
<div className="grid min-h-dvh md:grid-cols-2">
19-
<div className="bg-card/50 hidden place-items-center border-r px-6 md:grid lg:px-0">
19+
<div className="bg-card/50 hidden place-items-center border-r px-8 md:grid lg:px-0">
2020
<div className="flex w-full max-w-100 flex-col gap-4">
2121
<ShieldCheck className="text-muted-foreground size-15 stroke-1" />
22-
<h4 className="text-4xl font-black">Your data is yours.</h4>
22+
<h4 className="text-3xl font-black lg:text-4xl">Your data is yours.</h4>
2323
<div className="text-muted-foreground flex gap-2 text-sm">
2424
<Box className="size-5 shrink-0" />
2525
<span>Gitloom is decentralized and doesn&apos;t rely on any cetralized database.</span>
@@ -38,44 +38,44 @@ export default async function Page() {
3838
</div>
3939
</div>
4040
</div>
41-
<div className="mx-auto flex w-full max-w-75 flex-col items-center justify-center gap-4">
42-
<div className="flex items-center gap-4">
41+
<div className="grid place-items-center px-4 lg:px-0">
42+
<div className="flex w-full max-w-75 flex-col items-center justify-center gap-4">
4343
<GitloomIcon className="size-7" />
4444
<GitloomTextIcon className="h-5 w-auto" />
45-
</div>
46-
<span className="text-muted-foreground text-center text-sm">
47-
The Git-native CMS for modern content workflows.
48-
</span>
49-
<div className="flex w-full flex-col gap-4">
50-
<form
51-
onSubmit={async () => {
52-
'use server';
53-
await signIn('github', {
54-
redirectTo: '/login/success',
55-
});
56-
}}
57-
>
58-
<Button type="submit" size={'default'} className="w-full">
59-
<GithubIcon className="size-5" />
60-
Sign in with Github
45+
<span className="text-muted-foreground text-center text-sm">
46+
The Git-native CMS for modern content workflows.
47+
</span>
48+
<div className="flex w-full flex-col gap-4">
49+
<form
50+
onSubmit={async () => {
51+
'use server';
52+
await signIn('github', {
53+
redirectTo: '/login/success',
54+
});
55+
}}
56+
>
57+
<Button type="submit" size={'default'} className="w-full">
58+
<GithubIcon className="size-5" />
59+
Sign in with Github
60+
</Button>
61+
</form>
62+
<Button size={'default'} variant={'secondary'} disabled>
63+
<GitlabIcon className="fill-foreground size-5" />
64+
Sign in with Gitlab
6165
</Button>
62-
</form>
63-
<Button size={'default'} variant={'secondary'} disabled>
64-
<GitlabIcon className="fill-foreground size-5" />
65-
Sign in with Gitlab
66-
</Button>
66+
</div>
67+
<span className="text-muted-foreground mt-4 text-center text-sm">
68+
By signing in, you agree to our <br />
69+
<Link href={'/legal/terms-of-service'} className="hover:underline">
70+
terms of service
71+
</Link>{' '}
72+
and{' '}
73+
<Link href={'/legal/privacy-policy'} className="hover:underline">
74+
privacy policy
75+
</Link>
76+
.
77+
</span>
6778
</div>
68-
<span className="text-muted-foreground mt-4 text-center text-sm">
69-
By signing in, you agree to our <br />
70-
<Link href={'/legal/terms-of-service'} className="hover:underline">
71-
terms of service
72-
</Link>{' '}
73-
and{' '}
74-
<Link href={'/legal/privacy-policy'} className="hover:underline">
75-
privacy policy
76-
</Link>
77-
.
78-
</span>
7979
</div>
8080
</div>
8181
);

src/app/(auth)/login/success/login-redirect.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ export default function LoginRedirect() {
6767
value={value}
6868
gaugePrimaryColor="var(--color-muted-foreground)"
6969
gaugeSecondaryColor="var(--color-muted)"
70-
className="size-30 stroke-1 [&>span[data-current-value]]:hidden"
70+
className="size-20 sm:size-30 [&>span[data-current-value]]:hidden"
7171
/>
72-
<GitloomIcon className="absolute size-10" />
72+
<GitloomIcon className="absolute size-7 sm:size-10" />
7373
</div>
74-
<div className="relative text-sm [&>span]:whitespace-nowrap">
74+
<div className="relative text-xs sm:text-sm [&>span]:whitespace-nowrap">
7575
{tasks.map((task, idx) => (
7676
<span
7777
key={idx}

0 commit comments

Comments
 (0)