generated from muhtadeetaron/nextjs-template
fixed sliding gallery, fixed styling
This commit is contained in:
@ -76,7 +76,7 @@ const page = () => {
|
|||||||
{error && <DestructibleAlert text={error} extraStyles="" />}
|
{error && <DestructibleAlert text={error} extraStyles="" />}
|
||||||
|
|
||||||
<button
|
<button
|
||||||
onClick={() => router.push("/home")}
|
onClick={loginUser}
|
||||||
disabled={isLoading}
|
disabled={isLoading}
|
||||||
className="w-full h-14 flex justify-center items-center border border-[#113768] rounded-full bg-transparent hover:bg-[#113768] hover:text-white transition-colors duration-200 disabled:opacity-50 disabled:cursor-not-allowed"
|
className="w-full h-14 flex justify-center items-center border border-[#113768] rounded-full bg-transparent hover:bg-[#113768] hover:text-white transition-colors duration-200 disabled:opacity-50 disabled:cursor-not-allowed"
|
||||||
>
|
>
|
||||||
|
|||||||
@ -89,57 +89,52 @@ export default function RegisterPage() {
|
|||||||
<FormField
|
<FormField
|
||||||
title="Full name"
|
title="Full name"
|
||||||
value={form.name}
|
value={form.name}
|
||||||
handleChangeText={(e) =>
|
handleChangeText={(value) => setForm({ ...form, name: value })}
|
||||||
setForm({ ...form, name: e.target.value })
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<FormField
|
<FormField
|
||||||
title="Institution"
|
title="Institution"
|
||||||
placeholder="Enter a institution"
|
|
||||||
value={form.institution}
|
value={form.institution}
|
||||||
handleChangeText={(e) =>
|
handleChangeText={(value) =>
|
||||||
setForm({ ...form, institution: e.target.value })
|
setForm({ ...form, institution: value })
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<FormField
|
<FormField
|
||||||
title="SSC Roll No."
|
title="SSC Roll No."
|
||||||
placeholder="Enter your SSC Roll No."
|
|
||||||
value={form.sscRoll}
|
value={form.sscRoll}
|
||||||
handleChangeText={(e) =>
|
handleChangeText={(value) =>
|
||||||
setForm({ ...form, sscRoll: e.target.value })
|
setForm({ ...form, sscRoll: value })
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<FormField
|
<FormField
|
||||||
title="HSC Roll No."
|
title="HSC Roll No."
|
||||||
placeholder="Enter your HSC Roll No."
|
|
||||||
value={form.hscRoll}
|
value={form.hscRoll}
|
||||||
handleChangeText={(e) =>
|
handleChangeText={(value) =>
|
||||||
setForm({ ...form, hscRoll: e.target.value })
|
setForm({ ...form, hscRoll: value })
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<FormField
|
<FormField
|
||||||
title="Email Address"
|
title="Email Address"
|
||||||
placeholder="Enter your email address..."
|
|
||||||
value={form.email}
|
value={form.email}
|
||||||
handleChangeText={(e) =>
|
handleChangeText={(value) => setForm({ ...form, email: value })}
|
||||||
setForm({ ...form, email: e.target.value })
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<FormField
|
<FormField
|
||||||
title="Phone Number"
|
title="Phone Number"
|
||||||
placeholder="Enter your phone number.."
|
|
||||||
value={form.phone}
|
value={form.phone}
|
||||||
handleChangeText={(e) =>
|
handleChangeText={(value) => setForm({ ...form, phone: value })}
|
||||||
setForm({ ...form, phone: e.target.value })
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<FormField
|
<FormField
|
||||||
title="Password"
|
title="Password"
|
||||||
placeholder="Enter a password"
|
|
||||||
value={form.password}
|
value={form.password}
|
||||||
handleChangeText={(e) =>
|
handleChangeText={(value) =>
|
||||||
setForm({ ...form, password: e.target.value })
|
setForm({ ...form, password: value })
|
||||||
}
|
}
|
||||||
|
placeholder={undefined}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -92,8 +92,8 @@ const page = () => {
|
|||||||
<Image
|
<Image
|
||||||
src="/images/icons/topic-test.png"
|
src="/images/icons/topic-test.png"
|
||||||
alt="Topic Test"
|
alt="Topic Test"
|
||||||
width={70}
|
width={85}
|
||||||
height={70}
|
height={85}
|
||||||
/>
|
/>
|
||||||
<span className={styles.categoryButtonText}>
|
<span className={styles.categoryButtonText}>
|
||||||
Topic Test
|
Topic Test
|
||||||
@ -106,8 +106,8 @@ const page = () => {
|
|||||||
<Image
|
<Image
|
||||||
src="/images/icons/mock-test.png"
|
src="/images/icons/mock-test.png"
|
||||||
alt="Mock Test"
|
alt="Mock Test"
|
||||||
width={70}
|
width={85}
|
||||||
height={70}
|
height={85}
|
||||||
/>
|
/>
|
||||||
<span className={styles.categoryButtonText}>
|
<span className={styles.categoryButtonText}>
|
||||||
Mock Test
|
Mock Test
|
||||||
@ -122,8 +122,8 @@ const page = () => {
|
|||||||
<Image
|
<Image
|
||||||
src="/images/icons/past-paper.png"
|
src="/images/icons/past-paper.png"
|
||||||
alt="Past Papers"
|
alt="Past Papers"
|
||||||
width={62}
|
width={68}
|
||||||
height={62}
|
height={68}
|
||||||
/>
|
/>
|
||||||
<span className={styles.categoryButtonText}>
|
<span className={styles.categoryButtonText}>
|
||||||
Past Papers
|
Past Papers
|
||||||
@ -136,8 +136,8 @@ const page = () => {
|
|||||||
<Image
|
<Image
|
||||||
src="/images/icons/subject-test.png"
|
src="/images/icons/subject-test.png"
|
||||||
alt="Subject Test"
|
alt="Subject Test"
|
||||||
width={70}
|
width={80}
|
||||||
height={70}
|
height={80}
|
||||||
/>
|
/>
|
||||||
<span className={styles.categoryButtonText}>
|
<span className={styles.categoryButtonText}>
|
||||||
Subject Test
|
Subject Test
|
||||||
|
|||||||
@ -5,11 +5,13 @@ import Link from "next/link";
|
|||||||
import { ReactNode } from "react";
|
import { ReactNode } from "react";
|
||||||
import { usePathname } from "next/navigation";
|
import { usePathname } from "next/navigation";
|
||||||
import clsx from "clsx";
|
import clsx from "clsx";
|
||||||
|
import { House, LayoutGrid, Bookmark, CircleUser } from "lucide-react";
|
||||||
|
|
||||||
const tabs = [
|
const tabs = [
|
||||||
{ name: "Home", href: "/tabs/home" },
|
{ name: "Home", href: "/home", component: <House size={30} /> },
|
||||||
{ name: "Profile", href: "/tabs/profile" },
|
{ name: "Unit", href: "/unit", component: <LayoutGrid size={30} /> },
|
||||||
{ name: "Leaderboard", href: "/tabs/leaderboard" },
|
{ name: "Bookmark", href: "/bookmark", component: <Bookmark size={30} /> },
|
||||||
|
{ name: "Profile", href: "/profile", component: <CircleUser size={30} /> },
|
||||||
];
|
];
|
||||||
|
|
||||||
export default function TabsLayout({ children }: { children: ReactNode }) {
|
export default function TabsLayout({ children }: { children: ReactNode }) {
|
||||||
@ -19,7 +21,7 @@ export default function TabsLayout({ children }: { children: ReactNode }) {
|
|||||||
<div className="min-h-screen flex flex-col">
|
<div className="min-h-screen flex flex-col">
|
||||||
<main className="flex-1">{children}</main>
|
<main className="flex-1">{children}</main>
|
||||||
|
|
||||||
<nav className="flex justify-around border-t p-4 bg-white">
|
<nav className="h-[70px] flex justify-around items-center border-t border-t-neutral-400 p-4 rounded-t-4xl bg-white">
|
||||||
{tabs.map((tab) => (
|
{tabs.map((tab) => (
|
||||||
<Link
|
<Link
|
||||||
key={tab.name}
|
key={tab.name}
|
||||||
@ -29,7 +31,7 @@ export default function TabsLayout({ children }: { children: ReactNode }) {
|
|||||||
pathname === tab.href ? "text-blue-600" : "text-gray-500"
|
pathname === tab.href ? "text-blue-600" : "text-gray-500"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{tab.name}
|
{tab.component}
|
||||||
</Link>
|
</Link>
|
||||||
))}
|
))}
|
||||||
</nav>
|
</nav>
|
||||||
|
|||||||
@ -28,10 +28,6 @@ export default function Home() {
|
|||||||
return () => window.removeEventListener("resize", handleResize);
|
return () => window.removeEventListener("resize", handleResize);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const handleLogin = () => {
|
|
||||||
router.push("/login");
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BackgroundWrapper>
|
<BackgroundWrapper>
|
||||||
<div className="mx-10 h-screen">
|
<div className="mx-10 h-screen">
|
||||||
@ -62,7 +58,7 @@ export default function Home() {
|
|||||||
{/* Action Buttons */}
|
{/* Action Buttons */}
|
||||||
<div className="flex flex-col gap-4">
|
<div className="flex flex-col gap-4">
|
||||||
<button
|
<button
|
||||||
onClick={handleLogin}
|
onClick={() => router.push("/login")}
|
||||||
className="w-full h-[60px] flex justify-center items-center border border-[#113768] rounded-full bg-transparent hover:bg-[#113768] hover:text-white transition-colors duration-200"
|
className="w-full h-[60px] flex justify-center items-center border border-[#113768] rounded-full bg-transparent hover:bg-[#113768] hover:text-white transition-colors duration-200"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
|
|||||||
@ -28,6 +28,54 @@ const views = [
|
|||||||
</Link>
|
</Link>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: "2",
|
||||||
|
content: (
|
||||||
|
<Link
|
||||||
|
href="https://www.facebook.com/share/g/15jdqESvWV/?mibextid=wwXIfr"
|
||||||
|
className={styles.link}
|
||||||
|
>
|
||||||
|
<div className={styles.facebook}>
|
||||||
|
<div className={styles.textView}>
|
||||||
|
<h3 className={styles.facebookOne}>Meet, Share, and Learn!</h3>
|
||||||
|
<p className={styles.facebookTwo}>Join Facebook Community</p>
|
||||||
|
</div>
|
||||||
|
<div className={styles.logoView}>
|
||||||
|
<Image
|
||||||
|
src="/images/static/facebook-logo.png"
|
||||||
|
alt="Facebook Logo"
|
||||||
|
width={120}
|
||||||
|
height={120}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Link>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "3",
|
||||||
|
content: (
|
||||||
|
<Link
|
||||||
|
href="https://www.facebook.com/share/g/15jdqESvWV/?mibextid=wwXIfr"
|
||||||
|
className={styles.link}
|
||||||
|
>
|
||||||
|
<div className={styles.facebook}>
|
||||||
|
<div className={styles.textView}>
|
||||||
|
<h3 className={styles.facebookOne}>Meet, Share, and Learn!</h3>
|
||||||
|
<p className={styles.facebookTwo}>Join Facebook Community</p>
|
||||||
|
</div>
|
||||||
|
<div className={styles.logoView}>
|
||||||
|
<Image
|
||||||
|
src="/images/static/facebook-logo.png"
|
||||||
|
alt="Facebook Logo"
|
||||||
|
width={120}
|
||||||
|
height={120}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Link>
|
||||||
|
),
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const SlidingGallery = () => {
|
const SlidingGallery = () => {
|
||||||
|
|||||||
@ -29,7 +29,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
font-size: 24px;
|
font-size: 20px ;
|
||||||
font-family: 'Montserrat', sans-serif;
|
font-family: 'Montserrat', sans-serif;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
@ -133,14 +133,14 @@
|
|||||||
|
|
||||||
@media (max-width: 480px) {
|
@media (max-width: 480px) {
|
||||||
.header {
|
.header {
|
||||||
height: 80px;
|
height: 100px;
|
||||||
padding-top: 15px;
|
padding-top: 15px;
|
||||||
padding-left: 15px;
|
padding-left: 15px;
|
||||||
padding-right: 15px;
|
padding-right: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
font-size: 14px;
|
font-size: 17px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.profile {
|
.profile {
|
||||||
@ -148,8 +148,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.profileImg {
|
.profileImg {
|
||||||
width: 30px;
|
width: 40px;
|
||||||
height: 30px;
|
height: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.timer {
|
.timer {
|
||||||
|
|||||||
@ -70,6 +70,7 @@
|
|||||||
.categoriesContainer {
|
.categoriesContainer {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
justify-content: space-evenly;
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
padding-top: 25px;
|
padding-top: 25px;
|
||||||
}
|
}
|
||||||
@ -228,7 +229,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.categoryButtonText {
|
.categoryButtonText {
|
||||||
font-size: 12px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.categoryRow {
|
.categoryRow {
|
||||||
@ -246,11 +247,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.sectionTitle {
|
.sectionTitle {
|
||||||
font-size: 18px;
|
font-size: 22px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.categoryButton {
|
.categoryButton {
|
||||||
height: 100px;
|
height: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mainContent {
|
.mainContent {
|
||||||
@ -258,7 +259,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.categoryRow {
|
.categoryRow {
|
||||||
flex-direction: column;
|
flex-direction: row;
|
||||||
}
|
}
|
||||||
|
|
||||||
.categoryButton {
|
.categoryButton {
|
||||||
|
|||||||
@ -22,14 +22,16 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.slide {
|
.slide {
|
||||||
min-width: calc(100% - 72px);
|
min-width: 100%;
|
||||||
|
flex-shrink: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
scroll-snap-align: start;
|
scroll-snap-align: start;
|
||||||
padding: 0 36px;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.link {
|
.link {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
@ -37,14 +39,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.facebook {
|
.facebook {
|
||||||
flex: 1;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-evenly;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
padding: 20px;
|
padding: 40px 40px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
33
package.json
33
package.json
@ -1,36 +1,3 @@
|
|||||||
{
|
|
||||||
"name": "nextjs-template-shadcn",
|
|
||||||
"version": "0.1.0",
|
|
||||||
"private": true,
|
|
||||||
"scripts": {
|
|
||||||
"dev": "next dev --turbopack",
|
|
||||||
"build": "next build",
|
|
||||||
"start": "next start",
|
|
||||||
"lint": "next lint"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"class-variance-authority": "^0.7.1",
|
|
||||||
"clsx": "^2.1.1",
|
|
||||||
"lucide-react": "^0.525.0",
|
|
||||||
"next": "15.3.4",
|
|
||||||
"postcss": "^8.5.6",
|
|
||||||
"react": "^19.0.0",
|
|
||||||
"react-dom": "^19.0.0",
|
|
||||||
"tailwind-merge": "^3.3.1"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@eslint/eslintrc": "^3",
|
|
||||||
"@tailwindcss/postcss": "^4.1.11",
|
|
||||||
"@types/node": "^20",
|
|
||||||
"@types/react": "^19",
|
|
||||||
"@types/react-dom": "^19",
|
|
||||||
"eslint": "^9",
|
|
||||||
"eslint-config-next": "15.3.4",
|
|
||||||
"tailwindcss": "^4.1.11",
|
|
||||||
"tw-animate-css": "^1.3.4",
|
|
||||||
"typescript": "^5"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
"name": "examjam-frontend",
|
"name": "examjam-frontend",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Reference in New Issue
Block a user