Skip to content

Commit 38061c0

Browse files
Fix chingu-voyages#82: Fix the styling of the landing page
1 parent d7ecb0f commit 38061c0

File tree

8 files changed

+141
-79
lines changed

8 files changed

+141
-79
lines changed

next.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,8 @@
22
const nextConfig = {};
33

44
module.exports = nextConfig;
5+
module.exports = {
6+
images: {
7+
domains: ['drive.google.com'],
8+
},
9+
};

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

+11-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1-
import React from "react";
1+
import React from 'react';
22

3-
import LoginForm from "@/components/LoginForm/LoginForm";
3+
import LoginForm from '@/components/LoginForm/LoginForm';
4+
import Navbar from '@/components/Navbar/Navbar';
5+
import Footer from '@/components/Footer/Footer';
46

57
const LoginPage = () => {
68
return (
7-
<main className="w-full h-fit min-h-screen flex items-center justify-start overflow-y-auto flex-col py-32 bg-[#FAFAFA]">
8-
<LoginForm />
9-
10-
</main>
9+
<>
10+
<Navbar />
11+
<main className="w-full h-fit min-h-screen flex items-center justify-start overflow-y-auto flex-col py-10 bg-[#FAFAFA]">
12+
<LoginForm />
13+
</main>
14+
<Footer />
15+
</>
1116
);
1217
};
1318

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

+11-7
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1-
import RegistrationForm from "@/components/RegistrationForm/RegistrationForm";
1+
import Footer from '@/components/Footer/Footer';
2+
import Navbar from '@/components/Navbar/Navbar';
3+
import RegistrationForm from '@/components/RegistrationForm/RegistrationForm';
24

3-
import React from "react";
5+
import React from 'react';
46

57
const RegistrationPage = () => {
68
return (
7-
<main className="w-full h-fit min-h-screen flex items-center justify-start overflow-y-auto flex-col py-32 bg-[#FAFAFA]">
8-
<RegistrationForm />
9-
10-
</main>
9+
<>
10+
<Navbar />
11+
<main className="w-full h-fit min-h-screen flex items-center justify-start overflow-y-auto flex-col py-10 bg-[#FAFAFA]">
12+
<RegistrationForm />
13+
</main>
14+
<Footer />
15+
</>
1116
);
1217
};
1318

1419
export default RegistrationPage;
15-

src/app/globals.css

+3-3
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@
6262
margin-left: 1910px;
6363
}
6464

65-
.home-img {
65+
/* .home-img {
6666
/* TODO: Fix error*/
67-
background-image: url('/assets/images/background.jpg');
67+
/* background-image: url('/assets/images/background.jpg');
6868
background-size: cover;
69-
}
69+
} */

src/app/page.tsx

+6-5
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
import { signIn, signOut, useSession } from 'next-auth/react';
44
import LandingPage from '@/components/LandingPage/LandingPage';
55
import Navbar from '@/components/Navbar/Navbar';
6-
import Footer from "@/components/Footer/Footer";
6+
import Footer from '@/components/Footer/Footer';
77

88
export default function Home() {
99
const { data: session } = useSession();
1010

1111
return (
1212
<div>
13-
<Navbar />
14-
<main className="home-img">
15-
{session ? (
13+
<Navbar />
14+
<main className="home-img overflow-x-hidden">
15+
{/* {session ? (
1616
<div>
1717
<span>
1818
<h2>Welcome! {session?.user?.name ?? session?.user?.email ?? 'friend'}</h2>
@@ -24,7 +24,8 @@ export default function Home() {
2424
)}
2525
<div>
2626
<LandingPage />
27-
</div>
27+
</div> */}
28+
<LandingPage />
2829
</main>
2930
<Footer />
3031
</div>
+29-11
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,35 @@
1-
import Feed from "@/components/Feed/Feed";
1+
import Feed from '@/components/Feed/Feed';
2+
import Image from 'next/image';
3+
import Link from 'next/link';
24

35
const LandingPage = () => {
46
return (
5-
<div className="flex flex-col min-h-screen">
6-
<section className="flex-grow pb-4">
7-
<div>
8-
<h1 className="text-center font-extrabold text-2xl text-white">Discover the easiest way to save and organize your favorite URLs with our intuitive bookmarking app</h1>
9-
<p className="text-center font-semibold text-lg text-white">Capture, Categorize, and Share with Ease</p>
10-
<Feed />
11-
</div>
12-
</section>
13-
</div>
7+
<section className="relative h-screen w-screen flex flex-col justify-center items-center">
8+
<Image
9+
className="h-screen w-full absolute inset-0 object-cover object-center"
10+
width={3000}
11+
height={2000}
12+
src="https://drive.google.com/uc?id=1ELKF9ujWbkq8kZOP9BBUGS-qvPbIBpf1"
13+
alt="Landing page bakground image"
14+
/>
15+
<div className="h-screen w-screen absolute inset-0 bg-gradient-to-r from-[#2d2d2d] to-[#0000001A]" />
16+
<div className="z-[1] h-fit max-w-5xl flex flex-col gap-5 px-[5%]">
17+
<h1 className="text-center font-extrabold text-3xl md:text-6xl text-white tracking-wider leading-tight">
18+
Discover the easiest way to save and organize your <span className="text-[#633CFF]">favorite</span> URLs with
19+
our intuitive bookmarking app
20+
</h1>
21+
<p className="text-center font-semibold text-xs md:text-lg text-white mb-10">
22+
Capture, Categorize, and Share with Ease
23+
</p>
24+
<Link
25+
className="h-fit w-fit py-5 px-10 text-white font-bold text-md bg-[#633CFF] rounded-md self-center hover:bg-slate-50 hover:text-[#633CFF] transition-all duration-500"
26+
href="/register"
27+
>
28+
Get Started
29+
</Link>
30+
</div>
31+
</section>
1432
);
15-
}
33+
};
1634

1735
export default LandingPage;

src/components/LoginForm/LoginForm.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const LoginForm = () => {
2828
const [password, setPassword] = useState('');
2929

3030
return (
31-
<form onSubmit={validateLogin} className="h-fit w-fit bg-transparent">
31+
<form onSubmit={validateLogin} className="h-fit w-fit bg-transparent dark:bg-black">
3232
<div className="w-full h-fit flex flex-col justify-center items-center pb-10">
3333
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="62" fill="none">
3434
<path
@@ -84,10 +84,10 @@ const LoginForm = () => {
8484
type="submit"
8585
value="Login"
8686
/>
87-
<fieldset className="grid grid-cols-1 md:grid-cols-4 lg:grid-cols-4 xl:grid-cols-4">
88-
<div className="h-[1px] w-full bg-black flex self-center"></div>
89-
<h5 className="text-black w-full text-center col-span-2">OR CONTINUE WITH</h5>
90-
<div className="h-[1px] w-full bg-black flex self-center"></div>
87+
<fieldset className="grid grid-cols-1 md:grid-cols-4 lg:grid-cols-4 xl:grid-cols-4 place-items-center">
88+
<div className="h-[1px] w-2/5 md:w-full lg:w-full xl:w-full bg-[#D9D9D9] flex self-center"></div>
89+
<h5 className="text-[#737373] w-full text-center col-span-2">OR CONTINUE WITH</h5>
90+
<div className="h-[1px] w-1/5 md:w-full lg:w-full xl:w-full bg-[#D9D9D9] flex self-center"></div>
9191
</fieldset>
9292
<OAuthButtons />
9393
<p className="text-[#737373] text-center">

src/components/Navbar/Navbar.tsx

+71-42
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
"use client";
2-
import { useState } from "react";
3-
import { signOut } from "next-auth/react";
4-
import { BsFillMoonStarsFill } from "react-icons/bs";
1+
'use client';
2+
import { useState } from 'react';
3+
import { signOut } from 'next-auth/react';
4+
import { BsFillMoonStarsFill } from 'react-icons/bs';
5+
import Link from 'next/link';
56

67
function Navbar() {
78
const [isDropdownOpen, setIsDropdownOpen] = useState(false);
@@ -16,60 +17,88 @@ function Navbar() {
1617
};
1718

1819
return (
19-
<div className={darkMode ? "dark" : ""}>
20-
<nav className="border-gray-200 bg-gray-50 dark:bg-gray-800 dark:border-gray-700">
21-
<div className="max-w-screen-xl flex flex-wrap items-center justify-between mx-auto p-4">
22-
<a href="#" className="flex items-center">
23-
<img src="/assets/images/pagepocket-logo.jpg" className="h-8 mr-3" alt="Page Pocket Logo" />
24-
<span className="self-center text-2xl font-semibold whitespace-nowrap dark:text-white">Page Pocket</span>
25-
</a>
26-
<div className="flex items-center"> {/* Container for icons */}
27-
<button
28-
data-collapse-toggle="navbar-hamburger"
29-
type="button"
30-
className="inline-flex items-center justify-center p-2 w-10 h-10 ml-3 text-sm text-gray-500 rounded-lg hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:text-gray-400 dark:hover-bg-gray-700 dark:focus:ring-gray-600"
31-
aria-controls="navbar-hamburger"
32-
aria-expanded={isDropdownOpen}
33-
onClick={toggleDropdown}
34-
>
35-
<span className="sr-only">Open main menu</span>
36-
<svg
37-
className="w-5 h-5"
38-
aria-hidden="true"
39-
xmlns="http://www.w3.org/2000/svg"
40-
fill="none"
41-
viewBox="0 0 17 14"
20+
<div className={darkMode ? 'dark' : ''}>
21+
<nav className="border-gray-200 bg-gray-50 dark:bg-gray-800 dark:border-gray-700">
22+
<div className="max-w-screen-xl flex flex-wrap items-center justify-between mx-auto p-4">
23+
<a href="/" className="flex items-center">
24+
<img src="/assets/images/pagepocket-logo.jpg" className="h-8 mr-3" alt="Page Pocket Logo" />
25+
<span className="self-center text-2xl font-semibold whitespace-nowrap dark:text-white">Page Pocket</span>
26+
</a>
27+
<div className="flex items-center gap-5">
28+
{' '}
29+
{/* Container for icons */}
30+
<button
31+
data-collapse-toggle="navbar-hamburger"
32+
type="button"
33+
className="inline-flex items-center justify-center p-2 w-10 h-10 ml-3 text-sm text-gray-500 rounded-lg hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:text-gray-400 dark:hover-bg-gray-700 dark:focus:ring-gray-600"
34+
aria-controls="navbar-hamburger"
35+
aria-expanded={isDropdownOpen}
36+
onClick={toggleDropdown}
4237
>
43-
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M1 1h15M1 7h15M1 13h15"/>
44-
</svg>
45-
</button>
46-
<BsFillMoonStarsFill
47-
onClick={() => setDarkMode(!darkMode)}
48-
className="cursor-pointer text-2xl ml-3" // Add margin for spacing
49-
/>
50-
</div>
38+
<span className="sr-only">Open main menu</span>
39+
<svg
40+
className="w-5 h-5"
41+
aria-hidden="true"
42+
xmlns="http://www.w3.org/2000/svg"
43+
fill="none"
44+
viewBox="0 0 17 14"
45+
>
46+
<path
47+
stroke="currentColor"
48+
strokeLinecap="round"
49+
strokeLinejoin="round"
50+
strokeWidth="2"
51+
d="M1 1h15M1 7h15M1 13h15"
52+
/>
53+
</svg>
54+
</button>
55+
<BsFillMoonStarsFill
56+
onClick={() => setDarkMode(!darkMode)}
57+
className="cursor-pointer text-2xl ml-3" // Add margin for spacing
58+
/>
59+
<Link className=" font-bold dark:text-white dark:hover:text-[#633CFF] hover:text-[#633CFF]" href="/login">
60+
Login
61+
</Link>
62+
</div>
5163
<div className={`w-full ${isDropdownOpen ? 'block' : 'hidden'}`} id="navbar-hamburger">
5264
<ul className="flex flex-col font-medium mt-4 rounded-lg bg-gray-50 dark:bg-gray-800 dark:border-gray-700">
5365
<li>
54-
<a href="/profile" className="block py-2 pl-3 pr-4 text-white bg-blue-700 rounded dark:bg-blue-600" aria-current="page" onClick={closeDropdown}>
66+
<a
67+
href="/profile"
68+
className="block py-2 pl-3 pr-4 text-white bg-blue-700 rounded dark:bg-blue-600"
69+
aria-current="page"
70+
onClick={closeDropdown}
71+
>
5572
Profile
5673
</a>
5774
</li>
5875
<li>
59-
<a href="/register" className="block py-2 pl-3 pr-4 text-gray-900 rounded hover:bg-gray-100 dark:text-gray-400 dark:hover-bg-gray-700 dark:hover:text-white" onClick={closeDropdown}>
76+
<a
77+
href="/register"
78+
className="block py-2 pl-3 pr-4 text-gray-900 rounded hover:bg-gray-100 dark:text-gray-400 dark:hover-bg-gray-700 dark:hover:text-white"
79+
onClick={closeDropdown}
80+
>
6081
Sign Up
6182
</a>
6283
</li>
6384
<li>
64-
<a href="/login" className="block py-2 pl-3 pr-4 text-gray-900 rounded hover:bg-gray-100 dark:text-gray-400 md:dark:hover-text-white dark:hover-bg-gray-700 dark:hover:text-white" onClick={closeDropdown}>
85+
<a
86+
href="/login"
87+
className="block py-2 pl-3 pr-4 text-gray-900 rounded hover:bg-gray-100 dark:text-gray-400 md:dark:hover-text-white dark:hover-bg-gray-700 dark:hover:text-white"
88+
onClick={closeDropdown}
89+
>
6590
Login
6691
</a>
6792
</li>
6893
<li>
69-
<a href="#" className="block py-2 pl-3 pr-4 text-gray-900 rounded hover-bg-gray-100 dark:text-gray-400 dark:hover-bg-gray-700 dark:hover:text-white" onClick={() => {
70-
closeDropdown();
71-
signOut();
72-
}}>
94+
<a
95+
href="#"
96+
className="block py-2 pl-3 pr-4 text-gray-900 rounded hover-bg-gray-100 dark:text-gray-400 dark:hover-bg-gray-700 dark:hover:text-white"
97+
onClick={() => {
98+
closeDropdown();
99+
signOut();
100+
}}
101+
>
73102
Sign Out
74103
</a>
75104
</li>

0 commit comments

Comments
 (0)