From 69658083e8f63e8a16f3de15851b8ca853bd6fe3 Mon Sep 17 00:00:00 2001 From: Mallik vinukonda <158685334+Mallik-vinukonda@users.noreply.github.com> Date: Thu, 31 Oct 2024 13:43:18 +0530 Subject: [PATCH] Added Animations --- .env.sample | 2 +- package-lock.json | 182 ++++++++++-------- package.json | 3 +- src/app/explore/page.tsx | 103 +++++++--- src/app/language/page.tsx | 201 +++++++++++++------- src/app/map/page.tsx | 153 ++++++++------- src/app/page.tsx | 389 +++++++++++++++++++++++++------------- src/app/trekking/page.tsx | 255 ++++++++++++++----------- src/auth.ts | 77 ++++---- src/lib/drizzle.ts | 11 +- 10 files changed, 832 insertions(+), 544 deletions(-) diff --git a/.env.sample b/.env.sample index da3c06c..e78a74e 100644 --- a/.env.sample +++ b/.env.sample @@ -1,4 +1,4 @@ -DATABASE_URL= +DATABASE_URL="postgresql://details_owner:yZSTQ4YbI5lq@ep-rough-glitter-a5iis4y5.us-east-2.aws.neon.tech/details?sslmode=require" NODE_ENV= "development" SENDER_EMAIL= MAIL_SERVER_USER= diff --git a/package-lock.json b/package-lock.json index 92df2ab..c9949d3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,8 @@ "bcryptjs": "^2.4.3", "drizzle-kit": "^0.24.2", "drizzle-orm": "^0.33.0", - "next": "14.2.5", + "framer-motion": "^11.11.10", + "next": "^14.2.16", "next-auth": "^5.0.0-beta.22", "nodemailer": "^6.9.15", "react": "^18", @@ -37,16 +38,15 @@ } }, "node_modules/@auth/core": { - "version": "0.35.3", - "resolved": "https://registry.npmjs.org/@auth/core/-/core-0.35.3.tgz", - "integrity": "sha512-g6qfiqU4OtyvIEZ8J7UoIwAxEnNnLJV0/f/DW41U+4G5nhBlaCrnKhawJIJpU0D3uavXLeDT3B0BkjtiimvMDA==", - "license": "ISC", + "version": "0.37.2", + "resolved": "https://registry.npmjs.org/@auth/core/-/core-0.37.2.tgz", + "integrity": "sha512-kUvzyvkcd6h1vpeMAojK2y7+PAV5H+0Cc9+ZlKYDFhDY31AlvsB+GW5vNO4qE3Y07KeQgvNO9U0QUx/fN62kBw==", "dependencies": { - "@panva/hkdf": "^1.1.1", + "@panva/hkdf": "^1.2.1", "@types/cookie": "0.6.0", - "cookie": "0.6.0", - "jose": "^5.1.3", - "oauth4webapi": "^2.10.4", + "cookie": "0.7.1", + "jose": "^5.9.3", + "oauth4webapi": "^3.0.0", "preact": "10.11.3", "preact-render-to-string": "5.2.3" }, @@ -68,12 +68,11 @@ } }, "node_modules/@auth/drizzle-adapter": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/@auth/drizzle-adapter/-/drizzle-adapter-1.5.3.tgz", - "integrity": "sha512-VNyYb1hiGtorJhCjShtncjN3TKXxtwxOwphYecq8lZSVuFDLIWHhp4ZbdZDjnmkvEk8G66IpFrYW84qpt+WUIg==", - "license": "ISC", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/@auth/drizzle-adapter/-/drizzle-adapter-1.7.2.tgz", + "integrity": "sha512-PrXsbzcOGkw9A/lHr44SIOw0FBdXm9Me5xzmLCC54anPTiMmOq2FnJLjnPPnZZ/IKVOfTkSNOn9w9jtQgl2mCw==", "dependencies": { - "@auth/core": "0.35.3" + "@auth/core": "0.37.2" } }, "node_modules/@drizzle-team/brocli": { @@ -1013,9 +1012,9 @@ } }, "node_modules/@next/env": { - "version": "14.2.5", - "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.5.tgz", - "integrity": "sha512-/zZGkrTOsraVfYjGP8uM0p6r0BDT6xWpkjdVbcz66PJVSpwXX3yNiRycxAuDfBKGWBrZBXRuK/YVlkNgxHGwmA==" + "version": "14.2.16", + "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.16.tgz", + "integrity": "sha512-fLrX5TfJzHCbnZ9YUSnGW63tMV3L4nSfhgOQ0iCcX21Pt+VSTDuaLsSuL8J/2XAiVA5AnzvXDpf6pMs60QxOag==" }, "node_modules/@next/eslint-plugin-next": { "version": "14.2.5", @@ -1027,9 +1026,9 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "14.2.5", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.5.tgz", - "integrity": "sha512-/9zVxJ+K9lrzSGli1///ujyRfon/ZneeZ+v4ptpiPoOU+GKZnm8Wj8ELWU1Pm7GHltYRBklmXMTUqM/DqQ99FQ==", + "version": "14.2.16", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.16.tgz", + "integrity": "sha512-uFT34QojYkf0+nn6MEZ4gIWQ5aqGF11uIZ1HSxG+cSbj+Mg3+tYm8qXYd3dKN5jqKUm5rBVvf1PBRO/MeQ6rxw==", "cpu": [ "arm64" ], @@ -1042,9 +1041,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "14.2.5", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.5.tgz", - "integrity": "sha512-vXHOPCwfDe9qLDuq7U1OYM2wUY+KQ4Ex6ozwsKxp26BlJ6XXbHleOUldenM67JRyBfVjv371oneEvYd3H2gNSA==", + "version": "14.2.16", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.16.tgz", + "integrity": "sha512-mCecsFkYezem0QiZlg2bau3Xul77VxUD38b/auAjohMA22G9KTJneUYMv78vWoCCFkleFAhY1NIvbyjj1ncG9g==", "cpu": [ "x64" ], @@ -1057,9 +1056,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "14.2.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.5.tgz", - "integrity": "sha512-vlhB8wI+lj8q1ExFW8lbWutA4M2ZazQNvMWuEDqZcuJJc78iUnLdPPunBPX8rC4IgT6lIx/adB+Cwrl99MzNaA==", + "version": "14.2.16", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.16.tgz", + "integrity": "sha512-yhkNA36+ECTC91KSyZcgWgKrYIyDnXZj8PqtJ+c2pMvj45xf7y/HrgI17hLdrcYamLfVt7pBaJUMxADtPaczHA==", "cpu": [ "arm64" ], @@ -1072,9 +1071,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "14.2.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.5.tgz", - "integrity": "sha512-NpDB9NUR2t0hXzJJwQSGu1IAOYybsfeB+LxpGsXrRIb7QOrYmidJz3shzY8cM6+rO4Aojuef0N/PEaX18pi9OA==", + "version": "14.2.16", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.16.tgz", + "integrity": "sha512-X2YSyu5RMys8R2lA0yLMCOCtqFOoLxrq2YbazFvcPOE4i/isubYjkh+JCpRmqYfEuCVltvlo+oGfj/b5T2pKUA==", "cpu": [ "arm64" ], @@ -1087,9 +1086,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "14.2.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.5.tgz", - "integrity": "sha512-8XFikMSxWleYNryWIjiCX+gU201YS+erTUidKdyOVYi5qUQo/gRxv/3N1oZFCgqpesN6FPeqGM72Zve+nReVXQ==", + "version": "14.2.16", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.16.tgz", + "integrity": "sha512-9AGcX7VAkGbc5zTSa+bjQ757tkjr6C/pKS7OK8cX7QEiK6MHIIezBLcQ7gQqbDW2k5yaqba2aDtaBeyyZh1i6Q==", "cpu": [ "x64" ], @@ -1102,9 +1101,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "14.2.5", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.5.tgz", - "integrity": "sha512-6QLwi7RaYiQDcRDSU/os40r5o06b5ue7Jsk5JgdRBGGp8l37RZEh9JsLSM8QF0YDsgcosSeHjglgqi25+m04IQ==", + "version": "14.2.16", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.16.tgz", + "integrity": "sha512-Klgeagrdun4WWDaOizdbtIIm8khUDQJ/5cRzdpXHfkbY91LxBXeejL4kbZBrpR/nmgRrQvmz4l3OtttNVkz2Sg==", "cpu": [ "x64" ], @@ -1117,9 +1116,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "14.2.5", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.5.tgz", - "integrity": "sha512-1GpG2VhbspO+aYoMOQPQiqc/tG3LzmsdBH0LhnDS3JrtDx2QmzXe0B6mSZZiN3Bq7IOMXxv1nlsjzoS1+9mzZw==", + "version": "14.2.16", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.16.tgz", + "integrity": "sha512-PwW8A1UC1Y0xIm83G3yFGPiOBftJK4zukTmk7DI1CebyMOoaVpd8aSy7K6GhobzhkjYvqS/QmzcfsWG2Dwizdg==", "cpu": [ "arm64" ], @@ -1132,9 +1131,9 @@ } }, "node_modules/@next/swc-win32-ia32-msvc": { - "version": "14.2.5", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.5.tgz", - "integrity": "sha512-Igh9ZlxwvCDsu6438FXlQTHlRno4gFpJzqPjSIBZooD22tKeI4fE/YMRoHVJHmrQ2P5YL1DoZ0qaOKkbeFWeMg==", + "version": "14.2.16", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.16.tgz", + "integrity": "sha512-jhPl3nN0oKEshJBNDAo0etGMzv0j3q3VYorTSFqH1o3rwv1MQRdor27u1zhkgsHPNeY1jxcgyx1ZsCkDD1IHgg==", "cpu": [ "ia32" ], @@ -1147,9 +1146,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "14.2.5", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.5.tgz", - "integrity": "sha512-tEQ7oinq1/CjSG9uSTerca3v4AZ+dFa+4Yu6ihaG8Ud8ddqLQgFGcnwYls13H5X5CPDPZJdYxyeMui6muOLd4g==", + "version": "14.2.16", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.16.tgz", + "integrity": "sha512-OA7NtfxgirCjfqt+02BqxC3MIgM/JaGjw9tOe4fyZgPsqfseNiMPnCRP44Pfs+Gpo9zPN+SXaFsgP6vk8d571A==", "cpu": [ "x64" ], @@ -1200,7 +1199,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/@panva/hkdf/-/hkdf-1.2.1.tgz", "integrity": "sha512-6oclG6Y3PiDFcoyk8srjLfVKyMfVCKJ27JwNPViuXziFpmdz+MZnZN/aKY0JGXgYuO/VghU0jcOAZgWXZ1Dmrw==", - "license": "MIT", "funding": { "url": "https://github.com/sponsors/panva" } @@ -1245,8 +1243,7 @@ "node_modules/@types/cookie": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz", - "integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==", - "license": "MIT" + "integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==" }, "node_modules/@types/json5": { "version": "0.0.29", @@ -1894,10 +1891,9 @@ "dev": true }, "node_modules/cookie": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", - "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", - "license": "MIT", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", "engines": { "node": ">= 0.6" } @@ -3044,6 +3040,30 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/framer-motion": { + "version": "11.11.10", + "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-11.11.10.tgz", + "integrity": "sha512-061Bt1jL/vIm+diYIiA4dP/Yld7vD47ROextS7ESBW5hr4wQFhxB5D5T5zAc3c/5me3cOa+iO5LqhA38WDln/A==", + "dependencies": { + "tslib": "^2.4.0" + }, + "peerDependencies": { + "@emotion/is-prop-valid": "*", + "react": "^18.0.0", + "react-dom": "^18.0.0" + }, + "peerDependenciesMeta": { + "@emotion/is-prop-valid": { + "optional": true + }, + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -3829,10 +3849,9 @@ } }, "node_modules/jose": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/jose/-/jose-5.9.3.tgz", - "integrity": "sha512-egLIoYSpcd+QUF+UHgobt5YzI2Pkw/H39ou9suW687MY6PmCwPmkNV/4TNjn1p2tX5xO3j0d0sq5hiYE24bSlg==", - "license": "MIT", + "version": "5.9.6", + "resolved": "https://registry.npmjs.org/jose/-/jose-5.9.6.tgz", + "integrity": "sha512-AMlnetc9+CV9asI19zHmrgS/WYsWUwCn2R7RzlbJWD7F9eWYUTGyBmU9o6PxngtLGOiDGPRu+Uc4fhKzbpteZQ==", "funding": { "url": "https://github.com/sponsors/panva" } @@ -3987,9 +4006,9 @@ } }, "node_modules/micromatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", - "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, "dependencies": { "braces": "^3.0.3", @@ -4058,11 +4077,11 @@ "dev": true }, "node_modules/next": { - "version": "14.2.5", - "resolved": "https://registry.npmjs.org/next/-/next-14.2.5.tgz", - "integrity": "sha512-0f8aRfBVL+mpzfBjYfQuLWh2WyAwtJXCRfkPF4UJ5qd2YwrHczsrSzXU4tRMV0OAxR8ZJZWPFn6uhSC56UTsLA==", + "version": "14.2.16", + "resolved": "https://registry.npmjs.org/next/-/next-14.2.16.tgz", + "integrity": "sha512-LcO7WnFu6lYSvCzZoo1dB+IO0xXz5uEv52HF1IUN0IqVTUIZGHuuR10I5efiLadGt+4oZqTcNZyVVEem/TM5nA==", "dependencies": { - "@next/env": "14.2.5", + "@next/env": "14.2.16", "@swc/helpers": "0.5.5", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001579", @@ -4077,15 +4096,15 @@ "node": ">=18.17.0" }, "optionalDependencies": { - "@next/swc-darwin-arm64": "14.2.5", - "@next/swc-darwin-x64": "14.2.5", - "@next/swc-linux-arm64-gnu": "14.2.5", - "@next/swc-linux-arm64-musl": "14.2.5", - "@next/swc-linux-x64-gnu": "14.2.5", - "@next/swc-linux-x64-musl": "14.2.5", - "@next/swc-win32-arm64-msvc": "14.2.5", - "@next/swc-win32-ia32-msvc": "14.2.5", - "@next/swc-win32-x64-msvc": "14.2.5" + "@next/swc-darwin-arm64": "14.2.16", + "@next/swc-darwin-x64": "14.2.16", + "@next/swc-linux-arm64-gnu": "14.2.16", + "@next/swc-linux-arm64-musl": "14.2.16", + "@next/swc-linux-x64-gnu": "14.2.16", + "@next/swc-linux-x64-musl": "14.2.16", + "@next/swc-win32-arm64-msvc": "14.2.16", + "@next/swc-win32-ia32-msvc": "14.2.16", + "@next/swc-win32-x64-msvc": "14.2.16" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", @@ -4107,12 +4126,11 @@ } }, "node_modules/next-auth": { - "version": "5.0.0-beta.22", - "resolved": "https://registry.npmjs.org/next-auth/-/next-auth-5.0.0-beta.22.tgz", - "integrity": "sha512-QGBo9HGOjmnJBHGXvtFztl0tM5tL0porDlk74HVoCCzXd986ApOlIW3EmiCuho7YzEopgkFiwwmcXpoCrHAtYw==", - "license": "ISC", + "version": "5.0.0-beta.25", + "resolved": "https://registry.npmjs.org/next-auth/-/next-auth-5.0.0-beta.25.tgz", + "integrity": "sha512-2dJJw1sHQl2qxCrRk+KTQbeH+izFbGFPuJj5eGgBZFYyiYYtvlrBeUw1E/OJJxTRjuxbSYGnCTkUIRsIIW0bog==", "dependencies": { - "@auth/core": "0.35.3" + "@auth/core": "0.37.2" }, "peerDependencies": { "@simplewebauthn/browser": "^9.0.1", @@ -4143,10 +4161,9 @@ } }, "node_modules/oauth4webapi": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/oauth4webapi/-/oauth4webapi-2.17.0.tgz", - "integrity": "sha512-lbC0Z7uzAFNFyzEYRIC+pkSVvDHJTbEW+dYlSBAlCYDe6RxUkJ26bClhk8ocBZip1wfI9uKTe0fm4Ib4RHn6uQ==", - "license": "MIT", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/oauth4webapi/-/oauth4webapi-3.1.2.tgz", + "integrity": "sha512-KQZkNU+xn02lWrFu5Vjqg9E81yPtDSxUZorRHlLWVoojD+H/0GFbH59kcnz5Thdjj7c4/mYMBPj/mhvGe/kKXA==", "funding": { "url": "https://github.com/sponsors/panva" } @@ -4554,7 +4571,6 @@ "version": "10.11.3", "resolved": "https://registry.npmjs.org/preact/-/preact-10.11.3.tgz", "integrity": "sha512-eY93IVpod/zG3uMF22Unl8h9KkrcKIRs2EGar8hwLZZDU1lkjph303V9HZBwufh2s736U6VXuhD109LYqPoffg==", - "license": "MIT", "funding": { "type": "opencollective", "url": "https://opencollective.com/preact" @@ -4564,7 +4580,6 @@ "version": "5.2.3", "resolved": "https://registry.npmjs.org/preact-render-to-string/-/preact-render-to-string-5.2.3.tgz", "integrity": "sha512-aPDxUn5o3GhWdtJtW0svRC2SS/l8D9MAgo2+AWml+BhDImb27ALf04Q2d+AHqUUOc6RdSXFIBVa2gxzgMKgtZA==", - "license": "MIT", "dependencies": { "pretty-format": "^3.8.0" }, @@ -4584,8 +4599,7 @@ "node_modules/pretty-format": { "version": "3.8.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-3.8.0.tgz", - "integrity": "sha512-WuxUnVtlWL1OfZFQFuqvnvs6MiAGk9UNsBostyBOB0Is9wb5uRESevA6rnl/rkksXaGX3GzZhPup5d6Vp1nFew==", - "license": "MIT" + "integrity": "sha512-WuxUnVtlWL1OfZFQFuqvnvs6MiAGk9UNsBostyBOB0Is9wb5uRESevA6rnl/rkksXaGX3GzZhPup5d6Vp1nFew==" }, "node_modules/prop-types": { "version": "15.8.1", diff --git a/package.json b/package.json index 62d64e3..9f9dcfe 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,8 @@ "bcryptjs": "^2.4.3", "drizzle-kit": "^0.24.2", "drizzle-orm": "^0.33.0", - "next": "14.2.5", + "framer-motion": "^11.11.10", + "next": "^14.2.16", "next-auth": "^5.0.0-beta.22", "nodemailer": "^6.9.15", "react": "^18", diff --git a/src/app/explore/page.tsx b/src/app/explore/page.tsx index 897f4da..273772d 100644 --- a/src/app/explore/page.tsx +++ b/src/app/explore/page.tsx @@ -1,38 +1,83 @@ -import styles from "./page.module.css" +"use client"; +import styles from "./page.module.css"; import SectionCard from "@/components/ui/SectionCard"; import Image from "next/image"; -import Mountain from '/public/mountain.svg'; +import Mountain from "/public/mountain.svg"; import Bagwal from "/public/bagwal.jpg"; +import { motion } from "framer-motion"; export default function Explore() { - return ( - <> -
-

Explore Uttarakhand

- {"Mountain -
+ return ( + <> + {/* Page Header Animation */} + +

Explore Uttarakhand

+ Mountain Image +
+ {/* Section 1: Trekking in Uttarakhand */} + + + - + {/* Section 2: Uttarakhand Language */} + + + - - -
- -
-

We’re currently building this page…

- -

In the meantime, check out the pages we’ve already completed - below:

-
-
- - - ); + {/* Under Construction Section */} + +
+

We’re currently building this page…

+

+ In the meantime, check out the pages we’ve already completed below: +

+
+
+ + ); } diff --git a/src/app/language/page.tsx b/src/app/language/page.tsx index 77b300c..ceb125b 100644 --- a/src/app/language/page.tsx +++ b/src/app/language/page.tsx @@ -1,79 +1,148 @@ +"use client"; import styles from "@/app/language/page.module.css"; import Image from "next/image"; import LanguageHeroImage from "/public/languageHeroImage.webp"; import InfoItem from "@/components/ui/InfoItem"; import Card from "@/components/ui/Card"; +import { motion } from "framer-motion"; export default function Language() { - return ( - <> -
-
-

Language

-

The soul of Uttarakhand resides in its languages Kumaoni, Garhwali, and Jaunsari - let's - keep them breathing

-
-
- Language Map -
-
+ return ( + <> + {/* Hero Section */} + +
+

Language

+

+ The soul of Uttarakhand resides in its languages Kumaoni, Garhwali, + and Jaunsari - let's keep them breathing +

+
+ + Language Map + +
-
-
-

Why speaking in mother tongue is important at home ?

-
-
- + {/* Importance of Language Section */} + +
+

Why speaking in mother tongue is important at home?

+
+
+ {/* Info Items */} + + + + + + + + +
+
- + {/* Uttarakhand Language Title */} + +

UTTARAKHAND LANGUAGE

+
- + {/* Language Cards Section */} + + {/* Language Cards with Hover Animation */} + + + - + + + - - - - - - - -
-
- - -
-

UTTARAKHAND LANGUAGE

-
- - -
- - - - - -
- - ); + + + + + + ); } diff --git a/src/app/map/page.tsx b/src/app/map/page.tsx index 9c1c6ea..e93c2c3 100644 --- a/src/app/map/page.tsx +++ b/src/app/map/page.tsx @@ -1,86 +1,99 @@ "use client"; -import {useRef} from 'react'; +import { useRef, useEffect } from "react"; import map from "/public/mapUk.svg"; import styles from "./page.module.css"; import Image from "next/image"; const Map = () => { - console.log("Map.tsx"); + console.log("Map.tsx"); - const zoomLevelRef = useRef(1); - const marginLeftLevelRef = useRef(0); - const marginTopLevelRef = useRef(0); - const mapImageRef = useRef(null); - const mapBoxHeightRef = useRef(null); - const increaseMapBoxHeightRef = useRef(6930); - const animationFrameIdRef = useRef(null); + const zoomLevelRef = useRef(1); + const marginLeftLevelRef = useRef(0); + const marginTopLevelRef = useRef(0); + const mapImageRef = useRef(null); + const mapBoxHeightRef = useRef(null); + const increaseMapBoxHeightRef = useRef(6930); + const animationFrameIdRef = useRef(null); - const updateMapStyle = () => { - if (mapImageRef.current) { - mapImageRef.current.style.transform = `scale(${zoomLevelRef.current})`; - mapImageRef.current.style.marginTop = `${marginTopLevelRef.current}vw`; - mapImageRef.current.style.marginLeft = `${marginLeftLevelRef.current}vw`; - } - }; + useEffect(() => { + return () => { + if (animationFrameIdRef.current) { + cancelAnimationFrame(animationFrameIdRef.current); + } + }; + }, []); - const triggerUpdateMapStyle = () => { - if (animationFrameIdRef.current) { - cancelAnimationFrame(animationFrameIdRef.current); - } - animationFrameIdRef.current = requestAnimationFrame(() => { - updateMapStyle(); - }); - }; + const updateMapStyle = () => { + if (mapImageRef.current) { + mapImageRef.current.style.transform = `scale(${zoomLevelRef.current})`; + mapImageRef.current.style.marginTop = `${marginTopLevelRef.current}vw`; + mapImageRef.current.style.marginLeft = `${marginLeftLevelRef.current}vw`; + } + }; - const handleZoomIn = () => { - if (mapBoxHeightRef.current) { - mapBoxHeightRef.current.style.aspectRatio = `10800/${increaseMapBoxHeightRef.current += 3000}`; - } - zoomLevelRef.current += 1; - marginLeftLevelRef.current += 46.2; - marginTopLevelRef.current += 29; - triggerUpdateMapStyle(); - }; + const triggerUpdateMapStyle = () => { + if (animationFrameIdRef.current) { + cancelAnimationFrame(animationFrameIdRef.current); + } + animationFrameIdRef.current = requestAnimationFrame(() => { + updateMapStyle(); + }); + }; - const handleZoomOut = () => { - if (increaseMapBoxHeightRef.current > 6930 && mapBoxHeightRef.current) { - mapBoxHeightRef.current.style.aspectRatio = `10800/${increaseMapBoxHeightRef.current -= 3000}`; - } - if (zoomLevelRef.current > 1) { - zoomLevelRef.current -= 1; - marginLeftLevelRef.current -= 46.2; - marginTopLevelRef.current -= 29; - triggerUpdateMapStyle(); - } - }; + const handleZoomIn = () => { + if (mapBoxHeightRef.current) { + mapBoxHeightRef.current.style.aspectRatio = `10800/${(increaseMapBoxHeightRef.current += 3000)}`; + } + zoomLevelRef.current += 1; + marginLeftLevelRef.current += 46.2; + marginTopLevelRef.current += 29; + triggerUpdateMapStyle(); + }; - return ( - <> - {/*
*/} - {/* {""}*/} - {/*
*/} - -
-
-

Map of Uttarakhand

-

Detailed map of Uttarakhand

-
- Important Map of Uttarakhand -
-
-

+

-

-

-
-

Zoom to view Map

-
-
- - ) - ; + const handleZoomOut = () => { + if (increaseMapBoxHeightRef.current > 6930 && mapBoxHeightRef.current) { + mapBoxHeightRef.current.style.aspectRatio = `10800/${(increaseMapBoxHeightRef.current -= 3000)}`; + } + if (zoomLevelRef.current > 1) { + zoomLevelRef.current -= 1; + marginLeftLevelRef.current -= 46.2; + marginTopLevelRef.current -= 29; + triggerUpdateMapStyle(); + } + }; + + return ( +
+
+

+ Map of Uttarakhand +

+

Detailed map of Uttarakhand

+
+ Important Map of Uttarakhand +
+
+

+ + +

+

+ - +

+
+

Zoom to view Map

+
+
+ ); }; export default Map; - diff --git a/src/app/page.tsx b/src/app/page.tsx index 753bd90..87cf6b6 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,156 +1,273 @@ -"use client" +"use client"; import Image from "next/image"; import styles from "./page.module.css"; import Link from "next/link"; -import HeroMap from "/public/heroMapImage.webp" -import Srinagar from "/public/Srinagar.webp" -import GoriGanga from "/public/goriGanga.webp" +import HeroMap from "/public/heroMapImage.webp"; +import Srinagar from "/public/Srinagar.webp"; +import GoriGanga from "/public/goriGanga.webp"; import SectionCard from "@/components/ui/SectionCard"; import GheeSankranti from "/public/Ghee_Sankranti.jpeg"; -import Bagwal from "/public/bagwal.jpg"; import Nanda_Sunanda from "/public/Nanda-Sunanda.webp"; -import Notify_Banner from "/public/notify-early-banner.jpg" -import PahadiWomen from "/public/bhotiaWoman.webp" -import Screen from "@/components/Screen"; -import Festivals from "@/components/Festivals"; +import Notify_Banner from "/public/notify-early-banner.jpg"; +import PahadiWomen from "/public/bhotiaWoman.webp"; import Faq from "@/components/Faq"; -export default function Home() { - return ( - <> -
- - {/* Header Images */} -
-
- {"Image -
-
- {"Image -
-
- {"Image -
-
- -
-

We love Uttarakhand and the people

-

who preserve it.

-

EXPERIENCE THE SOUL OF UTTARAKHAND

- Start Your Journey -
- -
- - {/**/} - +import { motion } from "framer-motion"; -
- - -
-
- TREKKING -

A Painting of a Rope bridge across Alaknanda - River, - Srinagar, in the times of Garhwal Kingdom, 1784-94. Photo Src: British Library

-
-
-

WHY WE BUILD IT

-

A concerning trend is emerging in - Uttarakhand, where the younger generation is gradually - forgetting their cultural heritage and traditional rituals. This decline in cultural - knowledge is evident across generations, with each successive generation possessing less - knowledge than the previous one. For instance, the amount of cultural knowledge possessed by - grandparents is significantly more than that of their children, and the cultural knowledge - of today's youth is likely to be even less than that of their parents. If this trend - continues, there is a risk that the cultural heritage of Uttarakhand may eventually - disappear from the society. This loss would not only erase the region's rich cultural - identity but also deprive future generations of their cultural roots and traditions.

-
-
- -
-

Explore, Learn and Discover the Beauty of Uttarakhand's Culture

- -
- -
-

EXPLORE UTTARAKHAND

-

To address this problem, we have - come up with a solution to digitize this cultural - knowledge. Since today's generation is more comfortable with technology, we aim to - provide a platform where they can learn about their cultural heritage using their - devices, from anywhere in the world. By doing so, we hope to make cultural knowledge - more accessible and engaging for the younger generation, and thus help preserve the rich - cultural heritage of Uttarakhand.

- Start Your Journey -
+export default function Home() { + return ( + <> + {/* Header Section */} +
+
+ + {"Image + -
- TREKKING -

Water-colour painting of the River Gori - in Uttar Pradesh by James Manson (1791-1862), c.1826.

-
-
-
+ + {"Image + -
+ + {"Image + + + +

+ We love Uttarakhand and + the people +

+

+ who preserve it. +

+

EXPERIENCE THE SOUL OF UTTARAKHAND

+ + Start Your Journey + +
+ - {/* UPCOMING FESTIVAL */} - + {/* Why Built Section */} +
+ + + TREKKING +

+ A Painting of a Rope bridge across Alaknanda River, Srinagar, in + the times of Garhwal Kingdom, 1784-94. Photo Src: British Library +

+
+ +

WHY WE BUILD IT

+

+ A concerning trend is emerging in Uttarakhand, where the younger + generation is gradually forgetting their cultural heritage and + traditional rituals. This decline in cultural knowledge is evident + across generations, with each successive generation possessing + less knowledge than the previous one. For instance, the amount of + cultural knowledge possessed by grandparents is significantly more + than that of their children, and the cultural knowledge of + today's youth is likely to be even less than that of their + parents. If this trend continues, there is a risk that the + cultural heritage of Uttarakhand may eventually disappear from + society. This loss would not only erase the region's rich + cultural identity but also deprive future generations of their + cultural roots and traditions. +

+
+
- {/* UPCOMING FAIR */} - + {/* Journey Section */} +
+ + Explore, Learn and Discover the Beauty of Uttarakhand's Culture + +
+ +

EXPLORE UTTARAKHAND

+

+ To address this problem, we have come up with a solution to + digitize this cultural knowledge. Since today's generation + is more comfortable with technology, we aim to provide a + platform where they can learn about their cultural heritage + using their devices, from anywhere in the world. By doing so, we + hope to make cultural knowledge more accessible and engaging for + the younger generation, and thus help preserve the rich cultural + heritage of Uttarakhand. +

+ Start Your Journey +
-
-
-
- {"notify-early-banner-image"} -
+ + TREKKING +

+ Water-colour painting of the River Gori in Uttar Pradesh by + James Manson (1791-1862), c.1826. +

+
+
+
+
-
-

GET NOTIFIED EARLY

-

Get Upcoming - Uttarakhand Festival & Fair Alerts!

-
-

Sign up Today!

-
-
+ {/* Upcoming Festival Card */} + + + - - {/**/} + + + - {/* FAQ */} - - {/* FAQ */} + {/* Notify Banner */} + +
+
+ notify-early-banner-image +
+
+

+ GET NOTIFIED EARLY +

+

+ Get Upcoming Uttarakhand{" "} + Festival &{" "} + Fair Alerts! +

+
+

Sign up Today!

+
+
+
- - ); -} \ No newline at end of file + {/* FAQ Section */} + + + + + ); +} diff --git a/src/app/trekking/page.tsx b/src/app/trekking/page.tsx index 70bcfff..36890bb 100644 --- a/src/app/trekking/page.tsx +++ b/src/app/trekking/page.tsx @@ -3,125 +3,160 @@ import styles from "./page.module.css"; import Image from "next/image"; import TrekCard from "@/components/ui/TrekCard"; import TrekkingHeroImage from "/public/heroImage.png"; -import { trekDetails } from './location-detail'; -import { useState } from "react"; +import { trekDetails } from "./location-detail"; +import { useState, useEffect, ChangeEvent } from "react"; +import { motion } from "framer-motion"; export default function Trekking() { - const [difficultyLevel, setDifficultyLevel] = useState(""); - const [district, setDistrict] = useState(""); - const [altitude, setAltitude] = useState(""); + const [difficultyLevel, setDifficultyLevel] = useState(""); + const [district, setDistrict] = useState(""); + const [altitude, setAltitude] = useState(""); - const handleFilterChange = (e: React.ChangeEvent, filterType: string) => { - const value = e.target.value; - if (filterType === "difficulty") setDifficultyLevel(value); - else if (filterType === "district") setDistrict(value); - else if (filterType === "altitude") setAltitude(value); - }; + const handleFilterChange = ( + e: ChangeEvent, + filterType: string + ) => { + const value = e.target.value; + if (filterType === "difficulty") setDifficultyLevel(value); + else if (filterType === "district") setDistrict(value); + else if (filterType === "altitude") setAltitude(value); + }; - // Extract unique districts from trekDetails - const districts = Array.from(new Set(trekDetails.map(trek => trek.district))); + const districts = Array.from( + new Set(trekDetails.map((trek) => trek.district)) + ); - const filterTreks = trekDetails.filter(trek => { - const matchesDifficulty = difficultyLevel === "" || trek.difficultyLevel.toLowerCase() === difficultyLevel.toLowerCase(); - const matchesDistrict = district === "" || trek.district.toLowerCase() === district.toLowerCase(); - - let matchesAltitude = true; // Default to true (not filtering) - if (altitude) { - // Define altitude ranges for filtering - if (altitude === "Low") { - matchesAltitude = trek.altitude < 3500; // Altitude below 3500m - } else if (altitude === "Moderate") { - matchesAltitude = trek.altitude >= 3500 && trek.altitude <= 4000; // Altitude between 3500m and 4000m - } else if (altitude === "High") { - matchesAltitude = trek.altitude > 4000; // Altitude above 4000m - } - } + const filterTreks = trekDetails.filter((trek) => { + const matchesDifficulty = + difficultyLevel === "" || + trek.difficultyLevel.toLowerCase() === difficultyLevel.toLowerCase(); + const matchesDistrict = + district === "" || trek.district.toLowerCase() === district.toLowerCase(); - return matchesDifficulty && matchesDistrict && matchesAltitude; - }); + let matchesAltitude = true; + if (altitude) { + if (altitude === "Low") { + matchesAltitude = trek.altitude < 3500; + } else if (altitude === "Moderate") { + matchesAltitude = trek.altitude >= 3500 && trek.altitude <= 4000; + } else if (altitude === "High") { + matchesAltitude = trek.altitude > 4000; + } + } - return ( - <> -
-
-
-

Trekking

-

EXPLORE HIDDEN PLACES IN UTTARAKHAND

-
-
- TREKKING -
-
-
+ return matchesDifficulty && matchesDistrict && matchesAltitude; + }); -
-
-
-
+ return ( + +
+
+
+

Trekking

+

EXPLORE HIDDEN PLACES IN UTTARAKHAND

+
+
+ TREKKING +
+
+
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+ {filterTreks.length > 0 ? ( + filterTreks.map((trek, index) => ( + + )) + ) : ( + +

+ No treks available based on your filters. Please adjust your + selections. +

+
+ )} +
-
- {filterTreks.length > 0 ? ( - filterTreks.map((trek, index) => ( - - )) - ) : ( -
-

No treks available based on your filters. Please adjust your selections.

-
- )} -
- - ); + + + ); } diff --git a/src/auth.ts b/src/auth.ts index 0ef73d0..4cde7e9 100644 --- a/src/auth.ts +++ b/src/auth.ts @@ -1,43 +1,38 @@ -import NextAuth from "next-auth" -import { DrizzleAdapter } from "@auth/drizzle-adapter" -import { db } from "./lib/drizzle" -import { accounts, sessions, users, verificationTokens } from "./lib/schema" -import authConfig from "./auth.config" - +import NextAuth from "next-auth"; +import { DrizzleAdapter } from "@auth/drizzle-adapter"; +import { db } from "./lib/drizzle"; +import { accounts, sessions, users, verificationTokens } from "./lib/schema"; +import authConfig from "./auth.config"; export const { handlers, auth, signIn, signOut } = NextAuth({ - adapter: DrizzleAdapter(db, { - usersTable: users, - accountsTable: accounts, - sessionsTable: sessions, - verificationTokensTable: verificationTokens, - }), - callbacks: { - async jwt({ token }) { - if (!token.sub) return token; - const user = await db.query.users.findFirst({ - where: (users, { eq }) => eq(users.id, token.sub!) - }) - - if (!user) return token; - // User is available during sign-in - token.id = user.id; - token.emailVerified = user.emailVerified; - - return token; - }, - session({ session, token }) { - session.user.id = token.id as string; - session.user.emailVerified = token.emailVerified as Date; - - return session; - }, - - - } - , - - debug: process.env.NODE_ENV === "development", - session: { strategy: "jwt" }, - ...authConfig, -}) \ No newline at end of file + adapter: DrizzleAdapter(db, { + usersTable: users, + accountsTable: accounts, + sessionsTable: sessions, + verificationTokensTable: verificationTokens, + }), + callbacks: { + async jwt({ token }) { + if (!token.sub) return token; + const user = await db.query.users.findFirst({ + where: (users, { eq }) => eq(users.id, token.sub!), + }); + + if (!user) return token; + // User is available during sign-in + token.id = user.id; + token.emailVerified = user.emailVerified; + + return token; + }, + session({ session, token }) { + session.user.id = token.id as string; + session.user.emailVerified = token.emailVerified as Date; + + return session; + }, + }, + debug: process.env.NODE_ENV === "development", + session: { strategy: "jwt" }, + ...authConfig, +}); diff --git a/src/lib/drizzle.ts b/src/lib/drizzle.ts index ac45f98..6df1321 100644 --- a/src/lib/drizzle.ts +++ b/src/lib/drizzle.ts @@ -1,10 +1,9 @@ - -import { drizzle } from 'drizzle-orm/neon-http'; -import * as schema from '@/lib/schema' -import { neon } from '@neondatabase/serverless'; +import { drizzle } from "drizzle-orm/neon-http"; +import * as schema from "@/lib/schema"; +import { neon } from "@neondatabase/serverless"; const connectionString = process.env.DATABASE_URL!; -const pool = neon(connectionString) +const pool = neon(connectionString); -export const db = drizzle(pool, { schema }) \ No newline at end of file +export const db = drizzle(pool, { schema });