Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/admin/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ const AdminLayout: React.FC<AdminLayoutProps> = ({ children }) => {
setUserRole(role);
} else {
setIsAuthenticated(false);
router.push('/auth/Login');
router.push('/login');
}
} else {
setIsAuthenticated(false);
router.push('/auth/Login');
router.push('/login');
}
} else {
setIsAuthenticated(false);
router.push('/auth/Login');
router.push('/login');
}
setLoading(false);
});
Expand Down
2 changes: 2 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import BottomNavBar from "@/components/bottomNavbar";

const geistSans = Geist({
variable: "--font-geist-sans",
Expand Down Expand Up @@ -28,6 +29,7 @@ export default function RootLayout({
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
{children}
<BottomNavBar/>
</body>
</html>
);
Expand Down
4 changes: 1 addition & 3 deletions app/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,7 @@ export default function AuthPage() {
<p className="text-center text-blue-500 text-sm mt-6 font-medium">
Secure authentication powered by Google
</p>
<p className="text-center text-orange-500 text-sm mt-6 font-medium">
Sign in with pkd skp mail
</p>

</div>
</div>
);
Expand Down
56 changes: 40 additions & 16 deletions components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Link from "next/link";
import { onAuthStateChanged } from "@/lib/firebase/auth";
import { signOut, getAuth, User } from "firebase/auth";
import { useRouter } from "next/navigation";
import { ArrowLeftIcon } from "lucide-react";

const Navbar = () => {
const [user, setUser] = useState<User | null>(null);
Expand All @@ -31,32 +32,55 @@ const Navbar = () => {
return (
<nav className="bg-white border-b border-gray-200 shadow-sm sticky top-0 z-50">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4 flex justify-between items-center">
{/* Logo */}
<Link href="/">
<h1 className="text-2xl font-bold text-gray-900 tracking-tight hover:opacity-90 transition-opacity">
Project Archive
</h1>
</Link>

{/* Left */}
<div className="flex items-center gap-4">
<button
className="border text-black border-gray-400 rounded-full p-2"
onClick={() => router.push("https://gecian-hub.netlify.app/")}
>
<ArrowLeftIcon className="w-5 h-5" />
</button>

{/* Right Section */}
<Link href="/">
<h1 className="text-2xl font-bold text-gray-900 tracking-tight hover:opacity-90 transition-opacity">
Gecian_Collab
</h1>
</Link>
</div>

{/* Right */}
<div className="flex items-center space-x-4">
{user ? (
<Link href="/profile" className="flex items-center space-x-2 group">
<div className="w-10 h-10 bg-blue-600 text-white rounded-full flex items-center justify-center text-lg font-bold">
{(user.displayName || user.email || "U")[0].toUpperCase()}
</div>
<span className="hidden sm:inline text-sm font-medium text-gray-700 group-hover:text-blue-600 transition">
{user.displayName || user.email || "User"}
</span>
</Link>
<div className="flex items-center space-x-4">
<Link
href="/profile"
className="flex items-center space-x-2 group"
>
<div className="w-10 h-10 bg-blue-600 text-white rounded-full flex items-center justify-center text-lg font-bold">
{(user.displayName || user.email || "U")[0].toUpperCase()}
</div>
<span className="hidden sm:inline text-sm font-medium text-gray-700 group-hover:text-blue-600 transition">
{user.displayName || user.email || "User"}
</span>
</Link>

<button
onClick={handleLogout}
className="px-5 py-2 rounded-full bg-red-600 text-white font-medium text-sm hover:bg-red-700 transition shadow-md"
>
Logout
</button>
</div>
) : (
<Link href="/login">
<button className="px-5 py-2 rounded-full bg-black text-white font-medium text-sm hover:bg-gray-800 transition shadow-md hover:shadow-lg">
<button className="px-5 py-2 rounded-full bg-black text-white font-medium text-sm hover:bg-gray-800 transition shadow-md">
Login
</button>
</Link>
)}
</div>

</div>
</nav>
);
Expand Down
52 changes: 52 additions & 0 deletions components/bottomNavbar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
"use client";

import Link from "next/link";
import { useState } from "react";
import { bottomTabs } from "@/data/nav";

const BottomNavBar = () => {
const [activeTab, setActiveTab] = useState("home");
const [hoveredTab, setHoveredTab] = useState<string | null>(null);

return (
<nav className="fixed left-6 right-6 bottom-8 border-t border-gray-300 bg-[#17c6fa] max-w-[800px] mx-auto text-[#171717] rounded-2xl">
<ul className="flex items-center justify-around py-2">
{bottomTabs.map(({ name, icon: Icon, href, label }) => (
<li key={name} className="flex flex-col items-center">
<button
type="button"
className="focus:outline-none"
onClick={() => setActiveTab(name)}
onMouseEnter={() => setHoveredTab(name)}
onMouseLeave={() => setHoveredTab(null)}
>
<Link href={href}>
<div
className={`${
activeTab === name
? "bg-black w-full flex text-blue-400 text-center items-center gap-2 p-[4px] px-2 font-bold rounded-xl transition-all duration-300"
: "overflow-hidden transition-all duration-300 hover:bg-black hover:text-blue-400 text-center items-center gap-2 p-[4px] px-2 font-bold rounded-xl"
}`}
>
<Icon
color={
activeTab === name || hoveredTab === name
? "#17c6fa"
: "black"
}
size="32"
/>
<span className="hidden md:inline">
{activeTab === name ? label : ""}
</span>
</div>
</Link>
</button>
</li>
))}
</ul>
</nav>
);
};

export default BottomNavBar;
6 changes: 3 additions & 3 deletions components/loadingScrenn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,22 @@ const LoadingScreen = () => {
secAnim ? "move-left" : " "
}`}
>
Project
Gecian
</span>
{" "}
<span
className={`inline-block bg-gradient-to-r from-blue-500 to-orange-400 bg-clip-text text-transparent ${
secAnim ? "move-right" : " "
}`}
>
Archi
H
<span className={`rect-i ${secAnim ? "move-right-i" : ""}`}>
<span
className="dot-i"
onAnimationEnd={handleJumpAnimation}
></span>
</span>
ve
ub
</span>
<span className={`dot-2 ${secAnim? "bounce":" "}`}></span>
</h1>
Expand Down
9 changes: 9 additions & 0 deletions data/nav.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Book, Calendar2, Calendar, Home2, Money } from "iconsax-react";

export const bottomTabs = [
{ name: "home", icon: Home2, href: "https://gecian-hub.netlify.app/", label: "Home" },
{ name: "studymaterial", icon: Book, href: "https://www.ktunotes.in/", label: "Study" },
{ name: "attendance", icon: Calendar2, href: "https://gecian-hub.netlify.app/attendance/calendar", label: "Attendance" },
{ name: "finance", icon: Money, href: "https://gecian-hub.netlify.app/expense", label: "Finance" },
{ name: "event", icon: Calendar, href: "https://gecian-hub.netlify.app/events", label: "Event" },
];
51 changes: 0 additions & 51 deletions drizzle/migrations/0000_initial_schema.sql

This file was deleted.

50 changes: 50 additions & 0 deletions drizzle/migrations/0000_square_hemingway.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
CREATE TABLE "categories" (
"category_id" serial PRIMARY KEY NOT NULL,
"category" varchar(100) NOT NULL
);
--> statement-breakpoint
CREATE TABLE "category_option_values" (
"option_id" serial PRIMARY KEY NOT NULL,
"option_name" varchar(255) NOT NULL,
"category_id" integer
);
--> statement-breakpoint
CREATE TABLE "project_options" (
"id" serial PRIMARY KEY NOT NULL,
"project_id" integer,
"category_id" integer,
"option_id" integer
);
--> statement-breakpoint
CREATE TABLE "projects" (
"project_id" serial PRIMARY KEY NOT NULL,
"project_name" varchar(255) NOT NULL,
"project_description" text,
"project_link" varchar(255),
"created_at" timestamp DEFAULT now(),
"created_by_uid" varchar(255),
"custom_domain" varchar(255),
"contact_instagram" varchar(255),
"contact_linkedin" varchar(255),
"contact_email" varchar(255),
"contact_whatsapp" varchar(255)
);
--> statement-breakpoint
CREATE TABLE "team_members" (
"member_id" serial PRIMARY KEY NOT NULL,
"project_id" integer,
"name" varchar(100),
"linkedin" varchar(255)
);
--> statement-breakpoint
CREATE TABLE "users" (
"uid" varchar(255) PRIMARY KEY NOT NULL,
"user_role" varchar(50) NOT NULL
);
--> statement-breakpoint
ALTER TABLE "category_option_values" ADD CONSTRAINT "category_option_values_category_id_categories_category_id_fk" FOREIGN KEY ("category_id") REFERENCES "public"."categories"("category_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "project_options" ADD CONSTRAINT "project_options_project_id_projects_project_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."projects"("project_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "project_options" ADD CONSTRAINT "project_options_category_id_categories_category_id_fk" FOREIGN KEY ("category_id") REFERENCES "public"."categories"("category_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "project_options" ADD CONSTRAINT "project_options_option_id_category_option_values_option_id_fk" FOREIGN KEY ("option_id") REFERENCES "public"."category_option_values"("option_id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "projects" ADD CONSTRAINT "projects_created_by_uid_users_uid_fk" FOREIGN KEY ("created_by_uid") REFERENCES "public"."users"("uid") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "team_members" ADD CONSTRAINT "team_members_project_id_projects_project_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."projects"("project_id") ON DELETE no action ON UPDATE no action;
9 changes: 0 additions & 9 deletions drizzle/migrations/0001_initial_schema.sql

This file was deleted.

14 changes: 0 additions & 14 deletions drizzle/migrations/0002_seed_data.ts

This file was deleted.

7 changes: 0 additions & 7 deletions drizzle/migrations/0002_steady_ricochet.sql

This file was deleted.

16 changes: 0 additions & 16 deletions drizzle/migrations/0003_fixed_warpath.sql

This file was deleted.

1 change: 0 additions & 1 deletion drizzle/migrations/0004_opposite_avengers.sql

This file was deleted.

5 changes: 0 additions & 5 deletions drizzle/migrations/0005_add_project_contact_fields.sql

This file was deleted.

10 changes: 0 additions & 10 deletions drizzle/migrations/0005_slow_excalibur.sql

This file was deleted.

Loading