diff --git a/README.md b/README.md index 7a9e38c..e1e2024 100644 Binary files a/README.md and b/README.md differ diff --git a/package-lock.json b/package-lock.json index ca75351..1d11d5a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,6 +7,7 @@ "": { "name": "starter", "version": "0.1.0", + "hasInstallScript": true, "dependencies": { "@auth/prisma-adapter": "^2.4.2", "@prisma/client": "^5.19.1", @@ -17,11 +18,16 @@ "firebase": "^10.13.1", "next": "^14.2.11", "next-auth": "^4.24.7", + "quill": "^2.0.2", "react": "18.2.0", "react-dom": "18.2.0", + "react-error-boundary": "^4.0.13", "react-icons": "^5.3.0", "react-quill": "^2.0.0", "remixicon": "^4.3.0", + "slate": "^0.103.0", + "slate-history": "^0.109.0", + "slate-react": "^0.110.1", "sweetalert2": "^11.14.1", "swr": "^2.2.5" }, @@ -2523,6 +2529,11 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@juggle/resize-observer": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@juggle/resize-observer/-/resize-observer-3.4.0.tgz", + "integrity": "sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==" + }, "node_modules/@next/env": { "version": "14.2.11", "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.11.tgz", @@ -3578,6 +3589,11 @@ "integrity": "sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==", "dev": true }, + "node_modules/compute-scroll-into-view": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-3.1.0.tgz", + "integrity": "sha512-rj8l8pD4bJ1nx+dAkMhV1xB5RuZEyVysfxJqB1pRchh1KVvwOv9b7CGB8ZfjTImVv2oF+sYMUkMZq6Na5Ftmbg==" + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -3771,6 +3787,18 @@ "node": ">=8" } }, + "node_modules/direction": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/direction/-/direction-1.0.4.tgz", + "integrity": "sha512-GYqKi1aH7PJXxdhTeZBFrg8vUBeKXi+cNprXsC1kpJcbcVnV9wBsrOu1cQEdG0WeQwlfHiy3XvnKfIrJ2R0NzQ==", + "bin": { + "direction": "cli.js" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -4463,9 +4491,9 @@ } }, "node_modules/eventemitter3": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-2.0.3.tgz", - "integrity": "sha512-jLN68Dx5kyFHaePoXWPsCGW5qdyZQtLYHkxkg02/Mz6g0kYpDx4FyP6XfArhQdlOC4b8Mv+EMxPo/8La7Tzghg==" + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==" }, "node_modules/extend": { "version": "3.0.2", @@ -4478,9 +4506,9 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "node_modules/fast-diff": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.1.2.tgz", - "integrity": "sha512-KaJUt+M9t1qaIteSvjc6P3RbMdXsNhK61GRftR6SNxqmhthcd9MGIi4T+o0jD8LUSpSnSKXE20nLtJ3fOHxQig==" + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==" }, "node_modules/fast-glob": { "version": "3.3.2", @@ -4958,6 +4986,15 @@ "node": ">= 4" } }, + "node_modules/immer": { + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/immer/-/immer-10.1.1.tgz", + "integrity": "sha512-s2MPrmjovJcoMaHtx6K11Ra7oD05NT97w1IC5zpMkT6Atjr7H8LjaDd81iIxUYpMKSRRNMJE703M1Fhr/TctHw==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/immer" + } + }, "node_modules/import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", @@ -5203,6 +5240,11 @@ "node": ">=0.10.0" } }, + "node_modules/is-hotkey": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/is-hotkey/-/is-hotkey-0.2.0.tgz", + "integrity": "sha512-UknnZK4RakDmTgz4PI1wIph5yxSs/mvChWs9ifnlXsKuXgWmOkY/hAE0H/k2MIqH0RlRye0i1oC07MCRSD28Mw==" + }, "node_modules/is-map": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", @@ -5255,6 +5297,14 @@ "node": ">=8" } }, + "node_modules/is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-regex": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", @@ -5528,16 +5578,31 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, + "node_modules/lodash-es": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", + "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==" + }, "node_modules/lodash.camelcase": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" }, + "node_modules/lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==" + }, "node_modules/lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==" }, + "node_modules/lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==" + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -6288,68 +6353,36 @@ ] }, "node_modules/quill": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/quill/-/quill-1.3.7.tgz", - "integrity": "sha512-hG/DVzh/TiknWtE6QmWAF/pxoZKYxfe3J/d/+ShUWkDvvkZQVTPeVmUJVu1uE6DDooC4fWTiCLh84ul89oNz5g==", - "dependencies": { - "clone": "^2.1.1", - "deep-equal": "^1.0.1", - "eventemitter3": "^2.0.3", - "extend": "^3.0.2", - "parchment": "^1.1.4", - "quill-delta": "^3.6.2" - } - }, - "node_modules/quill-delta": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/quill-delta/-/quill-delta-3.6.3.tgz", - "integrity": "sha512-wdIGBlcX13tCHOXGMVnnTVFtGRLoP0imqxM696fIPwIf5ODIYUHIvHbZcyvGlZFiFhK5XzDC2lpjbxRhnM05Tg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/quill/-/quill-2.0.2.tgz", + "integrity": "sha512-QfazNrhMakEdRG57IoYFwffUIr04LWJxbS/ZkidRFXYCQt63c1gK6Z7IHUXMx/Vh25WgPBU42oBaNzQ0K1R/xw==", "dependencies": { - "deep-equal": "^1.0.1", - "extend": "^3.0.2", - "fast-diff": "1.1.2" + "eventemitter3": "^5.0.1", + "lodash-es": "^4.17.21", + "parchment": "^3.0.0", + "quill-delta": "^5.1.0" }, "engines": { - "node": ">=0.10" + "npm": ">=8.2.3" } }, - "node_modules/quill-delta/node_modules/deep-equal": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.2.tgz", - "integrity": "sha512-5tdhKF6DbU7iIzrIOa1AOUt39ZRm13cmL1cGEh//aqR8x9+tNfbywRf0n5FD/18OKMdo7DNEtrX2t22ZAkI+eg==", + "node_modules/quill-delta": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/quill-delta/-/quill-delta-5.1.0.tgz", + "integrity": "sha512-X74oCeRI4/p0ucjb5Ma8adTXd9Scumz367kkMK5V/IatcX6A0vlgLgKbzXWy5nZmCGeNJm2oQX0d2Eqj+ZIlCA==", "dependencies": { - "is-arguments": "^1.1.1", - "is-date-object": "^1.0.5", - "is-regex": "^1.1.4", - "object-is": "^1.1.5", - "object-keys": "^1.1.1", - "regexp.prototype.flags": "^1.5.1" + "fast-diff": "^1.3.0", + "lodash.clonedeep": "^4.5.0", + "lodash.isequal": "^4.5.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 12.0.0" } }, - "node_modules/quill/node_modules/deep-equal": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.2.tgz", - "integrity": "sha512-5tdhKF6DbU7iIzrIOa1AOUt39ZRm13cmL1cGEh//aqR8x9+tNfbywRf0n5FD/18OKMdo7DNEtrX2t22ZAkI+eg==", - "dependencies": { - "is-arguments": "^1.1.1", - "is-date-object": "^1.0.5", - "is-regex": "^1.1.4", - "object-is": "^1.1.5", - "object-keys": "^1.1.1", - "regexp.prototype.flags": "^1.5.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "node_modules/quill/node_modules/parchment": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/parchment/-/parchment-3.0.0.tgz", + "integrity": "sha512-HUrJFQ/StvgmXRcQ1ftY6VEZUq3jA2t9ncFN4F84J/vN0/FPpQF+8FKXb3l6fLces6q0uOHj6NJn+2xvZnxO6A==" }, "node_modules/react": { "version": "18.2.0", @@ -6374,6 +6407,17 @@ "react": "^18.2.0" } }, + "node_modules/react-error-boundary": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/react-error-boundary/-/react-error-boundary-4.0.13.tgz", + "integrity": "sha512-b6PwbdSv8XeOSYvjt8LpgpKrZ0yGdtZokYwkwV2wlcZbxgopHX/hgPl5VgpnoVOWd868n1hktM8Qm4b+02MiLQ==", + "dependencies": { + "@babel/runtime": "^7.12.5" + }, + "peerDependencies": { + "react": ">=16.13.1" + } + }, "node_modules/react-icons": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-5.3.0.tgz", @@ -6401,6 +6445,61 @@ "react-dom": "^16 || ^17 || ^18" } }, + "node_modules/react-quill/node_modules/deep-equal": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.2.tgz", + "integrity": "sha512-5tdhKF6DbU7iIzrIOa1AOUt39ZRm13cmL1cGEh//aqR8x9+tNfbywRf0n5FD/18OKMdo7DNEtrX2t22ZAkI+eg==", + "dependencies": { + "is-arguments": "^1.1.1", + "is-date-object": "^1.0.5", + "is-regex": "^1.1.4", + "object-is": "^1.1.5", + "object-keys": "^1.1.1", + "regexp.prototype.flags": "^1.5.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/react-quill/node_modules/eventemitter3": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-2.0.3.tgz", + "integrity": "sha512-jLN68Dx5kyFHaePoXWPsCGW5qdyZQtLYHkxkg02/Mz6g0kYpDx4FyP6XfArhQdlOC4b8Mv+EMxPo/8La7Tzghg==" + }, + "node_modules/react-quill/node_modules/fast-diff": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.1.2.tgz", + "integrity": "sha512-KaJUt+M9t1qaIteSvjc6P3RbMdXsNhK61GRftR6SNxqmhthcd9MGIi4T+o0jD8LUSpSnSKXE20nLtJ3fOHxQig==" + }, + "node_modules/react-quill/node_modules/quill": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/quill/-/quill-1.3.7.tgz", + "integrity": "sha512-hG/DVzh/TiknWtE6QmWAF/pxoZKYxfe3J/d/+ShUWkDvvkZQVTPeVmUJVu1uE6DDooC4fWTiCLh84ul89oNz5g==", + "dependencies": { + "clone": "^2.1.1", + "deep-equal": "^1.0.1", + "eventemitter3": "^2.0.3", + "extend": "^3.0.2", + "parchment": "^1.1.4", + "quill-delta": "^3.6.2" + } + }, + "node_modules/react-quill/node_modules/quill-delta": { + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/quill-delta/-/quill-delta-3.6.3.tgz", + "integrity": "sha512-wdIGBlcX13tCHOXGMVnnTVFtGRLoP0imqxM696fIPwIf5ODIYUHIvHbZcyvGlZFiFhK5XzDC2lpjbxRhnM05Tg==", + "dependencies": { + "deep-equal": "^1.0.1", + "extend": "^3.0.2", + "fast-diff": "1.1.2" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/reflect.getprototypeof": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz", @@ -6709,6 +6808,14 @@ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true }, + "node_modules/scroll-into-view-if-needed": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/scroll-into-view-if-needed/-/scroll-into-view-if-needed-3.1.0.tgz", + "integrity": "sha512-49oNpRjWRvnU8NyGVmUaYG4jtTkNonFZI86MmGRDqBphEK2EXT9gdEUoQPZhuBM8yWHxCWbobltqYO5M4XrUvQ==", + "dependencies": { + "compute-scroll-into-view": "^3.0.2" + } + }, "node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -6791,6 +6898,46 @@ "node": ">=8" } }, + "node_modules/slate": { + "version": "0.103.0", + "resolved": "https://registry.npmjs.org/slate/-/slate-0.103.0.tgz", + "integrity": "sha512-eCUOVqUpADYMZ59O37QQvUdnFG+8rin0OGQAXNHvHbQeVJ67Bu0spQbcy621vtf8GQUXTEQBlk6OP9atwwob4w==", + "dependencies": { + "immer": "^10.0.3", + "is-plain-object": "^5.0.0", + "tiny-warning": "^1.0.3" + } + }, + "node_modules/slate-history": { + "version": "0.109.0", + "resolved": "https://registry.npmjs.org/slate-history/-/slate-history-0.109.0.tgz", + "integrity": "sha512-DHavPwrTTAEAV66eAocB3iQHEj65N6IVtbRK98ZuqGT0S44T3zXlhzY+5SZ7EPxRcoOYVt1dioRxXYM/+PmCiQ==", + "dependencies": { + "is-plain-object": "^5.0.0" + }, + "peerDependencies": { + "slate": ">=0.65.3" + } + }, + "node_modules/slate-react": { + "version": "0.110.1", + "resolved": "https://registry.npmjs.org/slate-react/-/slate-react-0.110.1.tgz", + "integrity": "sha512-bx6J0PkY9A50O4w78k4NPqNOXGo49fmSbCRgr8OBDWKKo4BeSt9y3vGXCkQ/Mm4lQ8riyRKr3TrJXzqMY7lRZg==", + "dependencies": { + "@juggle/resize-observer": "^3.4.0", + "direction": "^1.0.4", + "is-hotkey": "^0.2.0", + "is-plain-object": "^5.0.0", + "lodash": "^4.17.21", + "scroll-into-view-if-needed": "^3.1.0", + "tiny-invariant": "1.3.1" + }, + "peerDependencies": { + "react": ">=18.2.0", + "react-dom": ">=18.2.0", + "slate": ">=0.99.0" + } + }, "node_modules/source-map-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", @@ -7034,6 +7181,16 @@ "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==" }, + "node_modules/tiny-invariant": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.1.tgz", + "integrity": "sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw==" + }, + "node_modules/tiny-warning": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz", + "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==" + }, "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", diff --git a/package.json b/package.json index dad8da4..2ce15b5 100644 --- a/package.json +++ b/package.json @@ -3,8 +3,9 @@ "version": "0.1.0", "private": true, "scripts": { + "postinstall": "prisma generate", "dev": "next dev", - "build": "next build", + "build": "prisma generate && next build", "start": "next start", "lint": "next lint" }, @@ -18,11 +19,16 @@ "firebase": "^10.13.1", "next": "^14.2.11", "next-auth": "^4.24.7", + "quill": "^2.0.2", "react": "18.2.0", "react-dom": "18.2.0", + "react-error-boundary": "^4.0.13", "react-icons": "^5.3.0", "react-quill": "^2.0.0", "remixicon": "^4.3.0", + "slate": "^0.103.0", + "slate-history": "^0.109.0", + "slate-react": "^0.110.1", "sweetalert2": "^11.14.1", "swr": "^2.2.5" }, diff --git a/public/fashion.jpg b/public/fashion.jpg new file mode 100644 index 0000000..220279c Binary files /dev/null and b/public/fashion.jpg differ diff --git a/public/mainfeature.webp b/public/mainfeature.webp new file mode 100644 index 0000000..db56692 Binary files /dev/null and b/public/mainfeature.webp differ diff --git a/src/app/about/aboutpage.module.css b/src/app/about/aboutpage.module.css index 8f25ae2..7604314 100644 --- a/src/app/about/aboutpage.module.css +++ b/src/app/about/aboutpage.module.css @@ -46,34 +46,39 @@ @media screen and (max-width:1025px) { - .title{ - font-size: 25px; - } - - .rightimg{ - height:300px; + .imgContainer{ + width: 100%; + } + .img{ + height:600px; } } @media screen and (max-width:756px){ - .rightimg{ - height: 200px; + .img{ + height: 500px; + } + .description{ + font-size: 18px; } } @media screen and (max-width:640px) { - .container{ - flex-direction: column; + .title{ + font-size: 30px; + } + .img{ + height: 400px; } - .rightimg{ - height: 350px; + .description{ + font-size: 15px; } } @media screen and (max-width:455px) { - .rightimg{ - height: 250px; + .img{ + height: 300px; } } \ No newline at end of file diff --git a/src/app/about/page.jsx b/src/app/about/page.jsx index e91e68f..a38f3b4 100644 --- a/src/app/about/page.jsx +++ b/src/app/about/page.jsx @@ -1,8 +1,8 @@ -import Image from 'next/image' -import React from 'react' +import Image from 'next/image'; +import React from 'react'; import styles from "./aboutpage.module.css" -import Link from 'next/link' +import Link from 'next/link'; const page = () => { @@ -19,25 +19,25 @@ const page = () => { Welcome to BlogHub - A World of Stories, Insights, and Ideas at Your Fingertips!

- At BlogHub, we believe that everyone has a story to tell, a perspective to share, and an idea that can inspire others. Whether you're an experienced blogger, a curious reader, or someone looking to dive into writing for the first time, BlogHub is your digital home for insightful, engaging, and thought-provoking content.
+ At BlogHub, we believe that everyone has a story to tell, a perspective to share, and an idea that can inspire others. Whether you're an experienced blogger, a curious reader, or someone looking to dive into writing for the first time, BlogHub is your digital home for insightful, engaging, and thought-provoking content.

Why BlogHub?


- BlogHub is more than just a blogging platform—it's a community-driven space where passion meets purpose. We're committed to creating a vibrant ecosystem for writers and readers alike, fostering meaningful conversations across a variety of interests. From personal experiences to professional advice, trending topics to timeless tales, our platform is designed to bring diverse voices together in one place.
+ BlogHub is more than just a blogging platform—it's a community-driven space where passion meets purpose. We're committed to creating a vibrant ecosystem for writers and readers alike, fostering meaningful conversations across a variety of interests. From personal experiences to professional advice, trending topics to timeless tales, our platform is designed to bring diverse voices together in one place.

-

What You'll Find Here:


+

What You'll Find Here:


- Diverse Range of Topics: Whether you're passionate about coding, fashion, culture, travel, food, or Style, BlogHub offers a vast array of topics to explore. Our writers come from all walks of life, sharing their unique perspectives and expertise on the subjects that matter most to them—and to you.
+ Diverse Range of Topics: Whether you're passionate about coding, fashion, culture, travel, food, or Style, BlogHub offers a vast array of topics to explore. Our writers come from all walks of life, sharing their unique perspectives and expertise on the subjects that matter most to them—and to you.

- Quality Content: We prioritize well-researched, thought-out, and engaging content. Whether it's an in-depth tutorial, a heartfelt narrative, or a trending topic analysis, you'll find articles that are both informative and enjoyable to read.
+ Quality Content: We prioritize well-researched, thought-out, and engaging content. Whether it's an in-depth tutorial, a heartfelt narrative, or a trending topic analysis, you'll find articles that are both informative and enjoyable to read.

Engaging and Interactive: BlogHub is all about interaction and engagement. You can comment on posts, join discussions, and even reach out to your favorite bloggers directly. Our platform encourages the exchange of ideas, fostering a sense of community among readers and writers.

A Platform for Writers: For aspiring bloggers or seasoned writers looking to grow their audience, BlogHub provides the perfect stage. Publish your content, connect with readers, and build your personal brand. Our user-friendly interface makes it easy to create beautiful, well-organized posts that captivate your audience.

- Stay Inspired and Informed: With fresh content uploaded regularly, BlogHub keeps you inspired with new ideas and perspectives. Whether you’re learning a new skill, seeking advice, or simply browsing for inspiration, there's always something new to discover.
+ Stay Inspired and Informed: With fresh content uploaded regularly, BlogHub keeps you inspired with new ideas and perspectives. Whether you're learning a new skill, seeking advice, or simply browsing for inspiration, there's always something new to discover.

Our Mission:


@@ -45,13 +45,13 @@ const page = () => {

Join Our Community:


- BlogHub is more than just a place to read or write—it's a place to belong. When you join BlogHub, you're not just a reader or a writer; you become part of a global community of thinkers, creators, and learners. Whether you're sharing your latest travel adventure, offering advice on personal growth, or simply exploring what others have to say, you're contributing to a bigger conversation.
+ BlogHub is more than just a place to read or write—it's a place to belong. When you join BlogHub, you're not just a reader or a writer; you become part of a global community of thinkers, creators, and learners. Whether you're sharing your latest travel adventure, offering advice on personal growth, or simply exploring what others have to say, you're contributing to a bigger conversation.

Ready to Start Your Blogging Journey?


- If you're ready to dive into a world of content that educates, entertains, and connects, BlogHub is the place for you. Sign up today to start reading, writing, and interacting with a growing community of bloggers and readers. Whatever your passion, there's a place for it on BlogHub.
+ If you're ready to dive into a world of content that educates, entertains, and connects, BlogHub is the place for you. Sign up today to start reading, writing, and interacting with a growing community of bloggers and readers. Whatever your passion, there's a place for it on BlogHub.

- So, whether you're here to read or to write, to learn or to share, welcome to BlogHub—the home of inspired content, meaningful conversations, and stories that matter.
+ So, whether you're here to read or to write, to learn or to share, welcome to BlogHub—the home of inspired content, meaningful conversations, and stories that matter.

diff --git a/src/app/blog/blogPage.module.css b/src/app/blog/blogPage.module.css index 5998f84..ad89e91 100644 --- a/src/app/blog/blogPage.module.css +++ b/src/app/blog/blogPage.module.css @@ -1,12 +1,38 @@ .title{ -background-color: coral; -color: white; +color: orangered; padding: 5px 10px; -text-align: center; +text-align: start; text-transform: capitalize; +font-size: 80px; } .content{ display: flex; gap: 50px; -} \ No newline at end of file +} + +@media screen and (max-width:1280px) { + + .title { + font-size: 72px; + } +} + +@media screen and (max-width:1024px) { + + .title { + font-size: 65px; + } +} + +@media screen and (max-width:768px) { + .title{ + font-size: 54px; + } +} + +@media screen and (max-width:640px) { + .title{ + font-size: 44px; + } +} diff --git a/src/app/contact/page.jsx b/src/app/contact/page.jsx index 83e036b..4f3b161 100644 --- a/src/app/contact/page.jsx +++ b/src/app/contact/page.jsx @@ -57,7 +57,7 @@ const ContactPage = () => {

Reach out to us !

- If you're experiencing any difficulties while using our platform, don't hesitate to reach out. Below are some common issues we can assist you with:
+ If you are experiencing any difficulties while using our platform, do not hesitate to reach out. Below are some common issues we can assist you with:

Account & Functionality Issues:
@@ -75,7 +75,7 @@ const ContactPage = () => { We take user experience seriously and are committed to ensuring a safe and smooth environment for all. Let us know how we can help resolve your issue.

- Contact us today, and we'll get back to you promptly! + Contact us today, and we'll get back to you promptly!

diff --git a/src/app/login/page.jsx b/src/app/login/page.jsx index e353ddc..df552e0 100644 --- a/src/app/login/page.jsx +++ b/src/app/login/page.jsx @@ -7,7 +7,7 @@ import {FaFacebookF } from "react-icons/fa"; import { useRouter } from 'next/navigation'; import Facebook from "next-auth/providers/facebook"; -const page = () => { +const Page = () => { const {data,status} = useSession() @@ -24,12 +24,12 @@ const page = () => { return (
-
signIn("google")}> Sign in with Google
-
signIn("github")}> Sign in with Github
+
signIn("google")}> google Sign in with Google
+
signIn("github")}>google Sign in with Github
signIn("facebook")}> Sign in with Facebook
) } -export default page +export default Page; diff --git a/src/app/posts/[slug]/page.jsx b/src/app/posts/[slug]/page.jsx index 49a6772..87f844a 100644 --- a/src/app/posts/[slug]/page.jsx +++ b/src/app/posts/[slug]/page.jsx @@ -1,66 +1,66 @@ -// import Menu from "@/components/Menu/Menu"; -// import styles from "./singlePage.module.css"; -// import Image from "next/image"; -// import Comments from "@/components/comments/Comments"; +import Menu from "@/components/Menu/Menu"; +import styles from "./singlePage.module.css"; +import Image from "next/image"; +import Comments from "@/components/comments/Comments"; -// const getData = async (slug) => { -// const res = await fetch(`http://localhost:3000/api/posts/${slug}`, { -// cache: "no-store", -// }); +const getData = async (slug) => { + const res = await fetch(`https://hub-blog.vercel.app/api/posts/${slug}`, { + cache: "no-store", + }); -// if (!res.ok) { -// throw new Error("Failed"); -// } + if (!res.ok) { + throw new Error("Failed"); + } -// return res.json(); -// }; + return res.json(); +}; -// const SinglePage = async ({ params }) => { -// const { slug } = params; +const SinglePage = async ({ params }) => { + const { slug } = params; -// const data = await getData(slug); + const data = await getData(slug); -// return ( -//
-//
-//
-//

{data?.title}

-//
-// {data?.user?.image && ( -//
-// -//
-// )} -//
-// {data?.user.name} -// {data?.createdAt.substring(0,10)} -//
-//
-//
-// {data?.img && ( -//
-// -//
-// )} -//
-//
-//
-//
-//
-// -//
-//
-// -//
-//
-// ); -// }; + return ( +
+
+
+

{data?.title}

+
+ {data?.user?.image && ( +
+ +
+ )} +
+ {data?.user.name} + {data?.createdAt.substring(0,10)} +
+
+
+ {data?.img && ( +
+ +
+ )} +
+
+
+
+
+ +
+
+ +
+
+ ); +}; -// export default SinglePage; +export default SinglePage; diff --git a/src/app/posts/[slug]/singlePage.module.css b/src/app/posts/[slug]/singlePage.module.css index b474bd8..8d7b408 100644 --- a/src/app/posts/[slug]/singlePage.module.css +++ b/src/app/posts/[slug]/singlePage.module.css @@ -71,26 +71,70 @@ @media screen and (max-width:1536px) { - .title{ + .title { font-size: 54px; } } + @media screen and (max-width:1280px) { - .title{ + .title { font-size: 48px; } } + @media screen and (max-width:1024px) { - .imageContainer{ - display: none; + .title { + font-size: 40px; + } + + .imageContainer { + height: 300px; + } +} + +@media screen and (max-width:768px) { + .title { + font-size: 30px; + } + + .imageContainer { + height: 250px; + } + + .description p { + font-size: 16px; } } -@media screen and (max-width:640px) { - .title{ + +@media screen and (max-width: 640px) { + .infoContainer { + flex: 1; + height: auto; + flex-direction: column; + } + + .imageContainer { + height: 600px; + width: 100%; + } + + .image { + width: 100%; + height: 600px; + } + + .title { font-size: 36px; } - .description p{ + + .description p { font-size: 18px; } } + +@media screen and (max-width: 420px) { + .description p { + font-size: 15px; + } +} \ No newline at end of file diff --git a/src/app/write/page.jsx b/src/app/write/page.jsx index 96fe5f5..4efe9c0 100644 --- a/src/app/write/page.jsx +++ b/src/app/write/page.jsx @@ -6,20 +6,16 @@ import { useEffect, useState } from "react"; import "react-quill/dist/quill.bubble.css"; import { useRouter } from "next/navigation"; import { useSession } from "next-auth/react"; -import { - getStorage, - ref, - uploadBytesResumable, - getDownloadURL, -} from "firebase/storage"; +import { getStorage, ref, uploadBytesResumable, getDownloadURL } from "firebase/storage"; import { app } from "@/utils/firebase"; -import ReactQuill from "react-quill"; +import dynamic from "next/dynamic"; +const ReactQuill = dynamic(() => import('react-quill'), { ssr: false }); const WritePage = () => { const { status } = useSession(); const router = useRouter(); - + const [open, setOpen] = useState(false); const [file, setFile] = useState(null); const [media, setMedia] = useState(""); @@ -28,48 +24,48 @@ const WritePage = () => { const [catSlug, setCatSlug] = useState(""); useEffect(() => { - const storage = getStorage(app); - const upload = () => { - const name = new Date().getTime() + file.name; - const storageRef = ref(storage, name); + if (!file) return; - const uploadTask = uploadBytesResumable(storageRef, file); + const storage = getStorage(app); + const name = new Date().getTime() + file.name; + const storageRef = ref(storage, name); + const uploadTask = uploadBytesResumable(storageRef, file); - uploadTask.on( - "state_changed", - (snapshot) => { - const progress = - (snapshot.bytesTransferred / snapshot.totalBytes) * 100; - console.log("Upload is " + progress + "% done"); - switch (snapshot.state) { - case "paused": - console.log("Upload is paused"); - break; - case "running": - console.log("Upload is running"); - break; - } - }, - (error) => {}, - () => { - getDownloadURL(uploadTask.snapshot.ref).then((downloadURL) => { - setMedia(downloadURL); - }); + uploadTask.on( + "state_changed", + (snapshot) => { + const progress = (snapshot.bytesTransferred / snapshot.totalBytes) * 100; + console.log("Upload is " + progress + "% done"); + switch (snapshot.state) { + case "paused": + console.log("Upload is paused"); + break; + case "running": + console.log("Upload is running"); + break; } - ); - }; - - file && upload(); + }, + (error) => { + console.error("Upload failed:", error); + }, + () => { + getDownloadURL(uploadTask.snapshot.ref).then((downloadURL) => { + setMedia(downloadURL); + }); + } + ); }, [file]); + useEffect(() => { + if (status === "unauthenticated") { + router.push("/"); + } + }, [status, router]); + if (status === "loading") { return
Loading...
; } - if (status === "unauthenticated") { - router.push("/"); - } - const slugify = (str) => str .toLowerCase() @@ -78,9 +74,8 @@ const WritePage = () => { .replace(/[\s_-]+/g, "-") .replace(/^-+|-+$/g, ""); - const handleSubmit = async () => { - const res = await fetch("/api/posts", { + const res = await fetch("https://hub-blog.vercel.app/api/posts", { method: "POST", body: JSON.stringify({ title, @@ -106,8 +101,8 @@ const WritePage = () => { className={styles.input} onChange={(e) => setTitle(e.target.value)} /> - setCatSlug(e.target.value)}> + @@ -155,4 +150,4 @@ const WritePage = () => { ); }; -export default WritePage; \ No newline at end of file +export default WritePage; diff --git a/src/components/authLinks/AuthLinks.jsx b/src/components/authLinks/AuthLinks.jsx index b1b4ac3..968f9ff 100644 --- a/src/components/authLinks/AuthLinks.jsx +++ b/src/components/authLinks/AuthLinks.jsx @@ -36,8 +36,8 @@ const AuthLinks = () => { {open && (
Homepage - About - Contact + About + Contact {status === "unauthenticated" ? ( Login ) : ( diff --git a/src/components/card/Card.jsx b/src/components/card/Card.jsx index a26290a..cefb7d7 100644 --- a/src/components/card/Card.jsx +++ b/src/components/card/Card.jsx @@ -20,10 +20,12 @@ const Card = ({ key, item }) => { {item.catSlug}
-

{item.title}

+

{item.title}

{/*

{item.desc.substring(0, 60)}

*/} -
+ +
+ Read More diff --git a/src/components/card/card.module.css b/src/components/card/card.module.css index 40008c5..5a6d383 100644 --- a/src/components/card/card.module.css +++ b/src/components/card/card.module.css @@ -15,7 +15,7 @@ .image { object-fit: cover; } - + .textContainer { flex: 1; display: flex; @@ -51,6 +51,55 @@ @media screen and (max-width: 1280px) { .imageContainer { + height: 280px; + } + } + + @media screen and (max-width: 1024px) { + .container{ + background-color: var(--softBg); + border-radius: 8px; + margin: 6px; + margin-bottom: 50px; + } + .desc{ + font-size: 15px; + } + .title{ + font-size: 25px; + } + } + + @media screen and (max-width:769px) { + .container{ + gap: 25px; + margin-bottom: 15px; + } + .title{ + font-size: 22px; + } + .desc{ + font-size: 12px; + } + .imageContainer{ + height: 300px; + } + } + + @media screen and (max-width:640px) { + .textContainer{ + margin: 10px; + } + .imageContainer{ display: none; } + + .title{ + font-size: 18px; + justify-content: center; + align-items: center; + } + .desc{ + font-size: 15px; + } } \ No newline at end of file diff --git a/src/components/cardList/CardList.jsx b/src/components/cardList/CardList.jsx index a519f46..8fb9d6a 100644 --- a/src/components/cardList/CardList.jsx +++ b/src/components/cardList/CardList.jsx @@ -1,50 +1,50 @@ -// import React from "react"; -// import styles from "./cardList.module.css"; -// import Pagination from "../pagination/Pagination"; -// import Image from "next/image"; -// import Card from "../card/Card"; +import React from "react"; +import styles from "./cardList.module.css"; +import Pagination from "../pagination/Pagination"; +import Image from "next/image"; +import Card from "../card/Card"; -// const getData = async (page, cat) => { -// const res = await fetch( -// `http://localhost:3000/api/posts?page=${page}&cat=${cat || ""}`, -// { -// cache: "no-store", -// } -// ); +const getData = async (page, cat) => { + const res = await fetch( + `https://hub-blog.vercel.app/api/posts?page=${page}&cat=${cat || ""}`, + { + cache: "no-store", + } + ); -// if (!res.ok) { -// throw new Error("Failed"); -// } + if (!res.ok) { + throw new Error("Failed"); + } -// return res.json(); -// }; -// const CardList = async ({ page, cat }) => { + return res.json(); +}; +const CardList = async ({ page, cat }) => { -// const { posts, count } = await getData(page, cat); + const { posts, count } = await getData(page, cat); -// const POST_PER_PAGE = 4; + const POST_PER_PAGE = 4; -// const hasPrev = POST_PER_PAGE * (page - 1) > 0; -// const hasNext = POST_PER_PAGE * (page - 1) + POST_PER_PAGE < count; + const hasPrev = POST_PER_PAGE * (page - 1) > 0; + const hasNext = POST_PER_PAGE * (page - 1) + POST_PER_PAGE < count; -// return ( -// <> -//
-//

Recent Posts

-//
-// {posts?.map((item) => ( -// -// ))} -//
-// -//
+ return ( + <> +
+

Recent Posts

+
+ {posts?.map((item) => ( + + ))} +
+ +
-// -// ); -// }; + + ); +}; -// export default CardList; +export default CardList; diff --git a/src/components/categoryList/CategoryList.jsx b/src/components/categoryList/CategoryList.jsx index 750ee58..c870286 100644 --- a/src/components/categoryList/CategoryList.jsx +++ b/src/components/categoryList/CategoryList.jsx @@ -1,47 +1,47 @@ -// import React from "react"; -// import styles from "./categoryList.module.css"; -// import Link from "next/link"; -// import Image from "next/image"; +import React from "react"; +import styles from "./categoryList.module.css"; +import Link from "next/link"; +import Image from "next/image"; -// const getData = async () => { -// const res = await fetch("http://localhost:3000/api/categories", { -// cache: "no-store", -// }); +const getData = async () => { + const res = await fetch("https://hub-blog.vercel.app/api/categories", { + cache: "no-store", + }); -// if (!res.ok) { -// throw new Error("Failed"); -// } + if (!res.ok) { + throw new Error("Failed"); + } -// return res.json(); -// }; + return res.json(); +}; -// const CategoryList = async () => { -// const data = await getData(); -// return ( -//
-//

Popular Categories 🔥

-//
-// {data?.map((item) => ( -// -// {item.img && ( -// -// )} -// {item.title} -// -// ))} -//
-//
-// ); -// }; +const CategoryList = async () => { + const data = await getData(); + return ( +
+

Popular Categories 🔥

+
+ {data?.map((item) => ( + + {item.img && ( + + )} + {item.title} + + ))} +
+
+ ); +}; -// export default CategoryList; \ No newline at end of file +export default CategoryList; \ No newline at end of file diff --git a/src/components/categoryList/categoryList.module.css b/src/components/categoryList/categoryList.module.css index ade8c79..5246652 100644 --- a/src/components/categoryList/categoryList.module.css +++ b/src/components/categoryList/categoryList.module.css @@ -93,4 +93,9 @@ .category{ width: 100%; } +} +@media screen and (max-width:432px) { + .title{ + font-size: 28px; + } } \ No newline at end of file diff --git a/src/components/comments/Comments.jsx b/src/components/comments/Comments.jsx index 39bb001..0484bdd 100644 --- a/src/components/comments/Comments.jsx +++ b/src/components/comments/Comments.jsx @@ -46,7 +46,7 @@ const {status} = useSession(); (