├── .env_example ├── .eslintrc.cjs ├── .github └── workflows │ ├── greetings.yml │ └── vercel-auto-deploy.yml ├── .gitignore ├── .prettierignore ├── .prettierrc ├── .vscode ├── Cloudinary └── index.mjs ├── Firebase ├── ClientApp.mjs └── Scripts.mjs ├── README.md ├── architecture.jpg ├── contributing.md ├── index.html ├── package-lock.json ├── package.json ├── postcss.config.js ├── prettier.config.js ├── public ├── 2.2_Scales.pdf ├── BackgroundImage.webp ├── Bookmark.svg ├── DarkModeIcon.svg ├── Favicon.webp ├── LightModeIcon.svg ├── blueBlob-cropped.webp ├── close.svg ├── coding.webp ├── cross1.webp ├── dark-mode.webp ├── data-structure.webp ├── ecllipseloading.svg ├── education.webp ├── fileSharing3.webp ├── filter.svg ├── iiitdmj-logo.webp ├── info.png ├── interview.webp ├── loader.gif ├── loginpage-background-image.webp ├── moon.webp ├── overview-image.jpg ├── react.svg ├── search.svg ├── searchIcon.webp ├── sort.svg ├── test.webp ├── underline .svg ├── vite.svg └── yellowBlob-cropped.webp ├── src ├── App.jsx ├── assets │ └── fonts │ │ ├── Monument.css │ │ ├── MonumentExtended-Regular.otf │ │ └── MonumentExtended-Ultrabold.otf ├── components │ ├── DarkMode │ │ ├── DarkMode.module.css │ │ └── index.jsx │ ├── Dashboard │ │ ├── bookmarks.jsx │ │ ├── downloads.jsx │ │ ├── index.jsx │ │ ├── sidepanel.jsx │ │ ├── uploadform.jsx │ │ └── uploads.jsx │ ├── Footer │ │ └── index.jsx │ ├── HeroSection │ │ └── index.jsx │ ├── Modal │ │ └── index.jsx │ ├── NavBar │ │ └── index.jsx │ ├── PDFViewer │ │ └── index.jsx │ ├── SearchBar │ │ └── index.jsx │ ├── backtotop.jsx │ ├── cards │ │ ├── CategoryCards.jsx │ │ ├── MaterialCard.jsx │ │ ├── MaterialIntro.jsx │ │ └── index.mjs │ ├── content.jsx │ └── index.mjs ├── config │ └── CardData.mjs ├── main.jsx ├── pages │ ├── 404page │ │ ├── index.jsx │ │ └── page404.png │ ├── LandingPage │ │ └── index.jsx │ ├── MaterialsPage │ │ └── index.jsx │ ├── OverviewPage │ │ ├── content.jsx │ │ └── index.jsx │ ├── forgotpassword │ │ ├── content.jsx │ │ └── index.jsx │ ├── login │ │ ├── content.jsx │ │ └── index.jsx │ └── signup │ │ ├── content.jsx │ │ └── index.jsx ├── redux │ ├── counterReducer.mjs │ ├── reducers.mjs │ └── store.mjs └── styles │ ├── Monument.css │ ├── fonts.css │ ├── globals.css │ ├── navbar.css │ └── scrollbar.css ├── tailwind.config.js ├── unishare.txt └── vite.config.js /.env_example: -------------------------------------------------------------------------------- 1 | VITE_FIREBASE_AUTH_DOMAIN="" 2 | VITE_FIREBASE_PROJECT_ID="" 3 | VITE_FIREBASE_STORAGE_BUCKET="" 4 | VITE_FIREBASE_MESSAGING_SENDER_ID="" 5 | VITE_FIREBASE_APP_ID="" 6 | VITE_FIREBASE_MEASUREMENT_ID="" -------------------------------------------------------------------------------- /.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { browser: true, es2020: true }, 3 | extends: [ 4 | 'eslint:recommended', 5 | 'plugin:react/recommended', 6 | 'plugin:react/jsx-runtime', 7 | 'plugin:react-hooks/recommended', 8 | "prettier", 9 | 10 | ], 11 | parserOptions: { ecmaVersion: 'latest', sourceType: 'module' }, 12 | settings: { react: { version: '18.2' } }, 13 | plugins: ['react-refresh', 'prettier'], 14 | rules: { 15 | 'react-refresh/only-export-components': 'warn', 16 | "prettier/prettier": "error", 17 | }, 18 | } 19 | -------------------------------------------------------------------------------- /.github/workflows/greetings.yml: -------------------------------------------------------------------------------- 1 | name: Welcome New Contributors 2 | 3 | on: [pull_request_target, issues] 4 | 5 | jobs: 6 | greeting: 7 | runs-on: ubuntu-latest 8 | permissions: 9 | issues: write 10 | pull-requests: write 11 | steps: 12 | - uses: actions/first-interaction@v1 13 | with: 14 | repo-token: ${{ secrets.GITHUB_TOKEN }} 15 | issue-message: "Welcome to ${{ github.repository }}! 😄 Thank you for reporting your first issue. We truly appreciate your contribution. 🙌\n\nPlease check out our [contributors guide](../blob/main/README.md) to get started. It provides detailed instructions on how to contribute to the Resource Sharing project.\n\nIn addition, we recommend going through the guide for a basic setup that will be useful when opening a pull request. This setup will ensure a smooth contribution process.\n\nIf you have any questions or need further assistance, feel free to ask in this issue. Our community is here to help you succeed! 💪" 16 | pr-message: "Welcome to the Resource Sharing Project! 🎉 We're excited to see your first pull request. It's a significant step toward making a positive impact on our project. 😊\n\nPlease follow the guidelines mentioned in our [contributors guide](README.md) for opening a pull request. It contains important information about our development workflow and best practices.\n\nRemember, you're not alone on this journey. If you have any questions or need guidance, don't hesitate to ask. We have a supportive community eager to help you thrive. Happy contributing! 🚀" 17 | -------------------------------------------------------------------------------- /.github/workflows/vercel-auto-deploy.yml: -------------------------------------------------------------------------------- 1 | name: Auto Deploy to Vercel 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | 8 | jobs: 9 | deploy: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - name: Checkout code 14 | uses: actions/checkout@v2 15 | 16 | - name: Set up Node.js 17 | uses: actions/setup-node@v2 18 | with: 19 | node-version: 18 20 | 21 | - name: Install dependencies 22 | run: npm install 23 | 24 | - name: Build 25 | run: npm run build 26 | 27 | - name: Deploy to Vercel 28 | uses: amondnet/vercel-action@v20 29 | with: 30 | vercel-token: ${{ secrets.VERCEL_TOKEN }} 31 | vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} 32 | vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} 33 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | 26 | # env 27 | .env 28 | .env.local 29 | .env.* 30 | 31 | .vercel 32 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | ./dist -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "bracketSpacing": true, 4 | "printWidth": 120 5 | } -------------------------------------------------------------------------------- /.vscode: -------------------------------------------------------------------------------- 1 | { 2 | "editor.formatOnSave": true 3 | } -------------------------------------------------------------------------------- /Cloudinary/index.mjs: -------------------------------------------------------------------------------- 1 | const CloudImageUpload = async (form_data) => { 2 | // Code here ... 3 | } 4 | 5 | export default CloudImageUpload; -------------------------------------------------------------------------------- /Firebase/ClientApp.mjs: -------------------------------------------------------------------------------- 1 | // Import the functions you need from the SDKs you need 2 | import { initializeApp } from "firebase/app"; 3 | import { getAnalytics } from "firebase/analytics"; 4 | import { 5 | getAuth, 6 | } from "firebase/auth"; 7 | import { 8 | getFirestore, 9 | } from "firebase/firestore"; 10 | 11 | const firebaseConfig = { 12 | apiKey: import.meta.env.VITE_FIREBASE_API_KEY, 13 | authDomain: import.meta.env.VITE_FIREBASE_AUTH_DOMAIN, 14 | projectId: import.meta.env.VITE_FIREBASE_PROJECT_ID, 15 | storageBucket: import.meta.env.VITE_FIREBASE_STORAGE_BUCKET, 16 | messagingSenderId: import.meta.env.VITE_FIREBASE_MESSAGING_SENDER_ID, 17 | appId: import.meta.env.VITE_FIREBASE_APP_ID, 18 | measurementId: import.meta.env.VITE_FIREBASE_MEASUREMENT_ID, 19 | }; 20 | 21 | const app = initializeApp(firebaseConfig); 22 | const analytics = getAnalytics(app); 23 | const auth = getAuth(app); 24 | const db = getFirestore(app); 25 | 26 | export { 27 | auth, 28 | db, 29 | firebaseConfig 30 | }; 31 | -------------------------------------------------------------------------------- /Firebase/Scripts.mjs: -------------------------------------------------------------------------------- 1 | import { auth, db,firebaseConfig } from './ClientApp.mjs'; 2 | import React, { useState ,useEffect } from 'react'; 3 | import { initializeApp } from 'firebase/app'; 4 | import { getStorage, ref, uploadBytesResumable, getDownloadURL } from 'firebase/storage'; 5 | import { getFirestore, collection, doc, setDoc,getDoc } from 'firebase/firestore'; 6 | 7 | // Firebase configuration 8 | 9 | 10 | // Initialize Firebase 11 | const firebaseApp = initializeApp(firebaseConfig); 12 | const storage = getStorage(firebaseApp); 13 | const firestore = getFirestore(firebaseApp); 14 | 15 | //uploading pdfs 16 | const UploadDataPdf = () => { 17 | const [selectedFiles, setSelectedFiles] = useState([]); 18 | const [progress, setProgress] = useState([]); 19 | const [uploadedFiles, setUploadedFiles] = useState([]); 20 | const [fileIds, setFileIds] = useState([]); 21 | 22 | const handleFileChange = (event) => { 23 | const files = event.target.files; 24 | setSelectedFiles(Array.from(files)); 25 | setProgress(Array.from(files).map(() => 0)); 26 | }; 27 | 28 | const handleUpload = () => { 29 | const uploadPromises = []; 30 | const ids = []; 31 | 32 | selectedFiles.forEach((file, index) => { 33 | 34 | const fileName = `${file.name}`; 35 | const storageRef = ref(storage, 'Pdfs/' + fileName); 36 | const uploadTask = uploadBytesResumable(storageRef, file); 37 | 38 | uploadTask.on( 39 | 'state_changed', 40 | (snapshot) => { 41 | const uploadProgress = Math.round((snapshot.bytesTransferred / snapshot.totalBytes) * 100); 42 | setProgress((prevProgress) => { 43 | const updatedProgress = [...prevProgress]; 44 | updatedProgress[index] = uploadProgress; 45 | console.log('working'); 46 | return updatedProgress; 47 | }); 48 | }, 49 | (error) => { 50 | console.log('Error uploading file:', error); 51 | }, 52 | async () => { 53 | const downloadURL = await getDownloadURL(uploadTask.snapshot.ref); 54 | const fileId = doc(collection(firestore, 'files')).id; 55 | await setDoc(doc(firestore, 'files', fileId), { 56 | name: file.name, 57 | downloadURL: downloadURL, 58 | dec:"", 59 | mat_type:"", 60 | pages:"" 61 | }); 62 | console.log('working2'); 63 | ids.push(fileId); 64 | setUploadedFiles((prevUploadedFiles) => [...prevUploadedFiles, file]); 65 | setFileIds(ids); 66 | } 67 | ); 68 | 69 | uploadPromises.push(uploadTask); 70 | }); 71 | 72 | Promise.all(uploadPromises) 73 | .then(() => { 74 | console.log('All files uploaded successfully!'); 75 | }) 76 | .catch((error) => { 77 | console.error('Error uploading files:', error); 78 | }); 79 | }; 80 | 81 | 82 | }; 83 | //UPloading images 84 | const UploadDataImage = () => { 85 | const [selectedFiles, setSelectedFiles] = useState([]); 86 | const [progress, setProgress] = useState([]); 87 | const [uploadedFiles, setUploadedFiles] = useState([]); 88 | const [fileIds, setFileIds] = useState([]); 89 | 90 | const handleFileChange = (event) => { 91 | const files = event.target.files; 92 | setSelectedFiles(Array.from(files)); 93 | setProgress(Array.from(files).map(() => 0)); 94 | }; 95 | 96 | const handleUpload = () => { 97 | const uploadPromises = []; 98 | const ids = []; 99 | 100 | selectedFiles.forEach((file, index) => { 101 | 102 | const fileName = `${file.name}`; 103 | const storageRef = ref(storage, 'images/' + fileName); 104 | const uploadTask = uploadBytesResumable(storageRef, file); 105 | 106 | uploadTask.on( 107 | 'state_changed', 108 | (snapshot) => { 109 | const uploadProgress = Math.round((snapshot.bytesTransferred / snapshot.totalBytes) * 100); 110 | setProgress((prevProgress) => { 111 | const updatedProgress = [...prevProgress]; 112 | updatedProgress[index] = uploadProgress; 113 | console.log('working'); 114 | return updatedProgress; 115 | }); 116 | }, 117 | (error) => { 118 | console.log('Error uploading file:', error); 119 | }, 120 | async () => { 121 | const downloadURL = await getDownloadURL(uploadTask.snapshot.ref); 122 | const fileId = doc(collection(firestore, 'files')).id; 123 | await setDoc(doc(firestore, 'files', fileId), { 124 | name: file.name, 125 | downloadURL: downloadURL, 126 | dec:"", 127 | mat_type:"", 128 | pages:"" 129 | }); 130 | console.log('working2'); 131 | ids.push(fileId); 132 | setUploadedFiles((prevUploadedFiles) => [...prevUploadedFiles, file]); 133 | setFileIds(ids); 134 | } 135 | ); 136 | 137 | uploadPromises.push(uploadTask); 138 | }); 139 | 140 | Promise.all(uploadPromises) 141 | .then(() => { 142 | console.log('All files uploaded successfully!'); 143 | }) 144 | .catch((error) => { 145 | console.error('Error uploading files:', error); 146 | }); 147 | }; 148 | 149 | 150 | }; 151 | 152 | 153 | 154 | 155 | 156 | //downloading func 157 | 158 | const FetchItem = ({ itemId }) => { 159 | 160 | const [itemData, setItemData] = useState(null); 161 | const [downloadURL, setDownloadURL] = useState(null); 162 | 163 | useEffect(() => { 164 | const fetchItemData = async () => { 165 | try { 166 | console.log("working3"); 167 | const itemDocRef = doc(firestore, 'files', itemId); 168 | const itemDocSnap = await getDoc(itemDocRef); 169 | 170 | if (itemDocSnap.exists()) { 171 | const itemDetails = itemDocSnap.data(); 172 | setItemData(itemDetails); 173 | 174 | const fileRef = ref(storage, 'files/' + itemDetails.filename); 175 | const url = await getDownloadURL(fileRef); 176 | setDownloadURL(url); 177 | } else { 178 | console.log('Item does not exist.'); 179 | } 180 | } catch (error) { 181 | console.error('Error fetching item:', error); 182 | } 183 | }; 184 | 185 | fetchItemData(); 186 | }, [itemId]); 187 | 188 | if (!itemData) { 189 | return
Loading...
; 190 | } 191 | 192 | 193 | }; 194 | 195 | 196 | 197 | // Write your Firebase Functions here 198 | 199 | export {UploadDataImage,UploadDataPdf,FetchItem } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Resource-Sharing 2 | 3 | Welcome to the College Resource Sharing Website! This platform is designed to facilitate the sharing of educational resources among college students. Whether you need lecture notes, study guides, practice exams, or any other material, this website is here to help you. 4 | 5 | ## Overview 6 | 7 | Every year we require notes and previous year questions to study for our exams and for this we contact many people and sometimes we don't get the resources at the right time. 8 |
9 | So to cope up with that we are building this resource sharing webiste to help the students so that they get the right resources at the right time. 10 |
11 | More deatils of the project our provided at this [Notion Link](https://grey-soybean-258.notion.site/Resource-Sharing-da954660ddf44771895d56321195aae4). 12 | 13 | ## Tech Stack 14 | - It's powered by [React](https://react.dev/), 15 | - It uses [Tailwind](https://tailwindcss.com) CSS framework, 16 | - It is build and deployed with [Vite](https://vitejs.dev/) 17 | 18 | ##### Prerequistes 19 | - Configuration of [Git](https://docs.github.com/en/get-started/quickstart/set-up-git) in your system. 20 | - IDE (recommendation: VSCode) 21 | - Nothing else you are good to go!! 22 | 23 | ## Run Locally 24 | 25 | #### Follow the steps mentioned below to setup the project locally on your computer 26 | 27 | 1. Fork the repository by clicking on `Fork` option on top right of the main repository. 28 | 2. Open Command Prompt/Terminal on your local computer. 29 | 3. Clone the forked repository by adding your own GitHub username in place of ``. 30 | 31 | ```bash 32 | git clone https://github.com//resource-sharing/ 33 | ``` 34 | 4. Navigate to the resource-sharing directory. 35 | 36 | ```bash 37 | cd resource-sharing 38 | ``` 39 | 40 | 5. Install all resource-sharing dependencies. 41 | 42 | ```bash 43 | npm install 44 | ``` 45 | 46 | 6. Run the website locally. 47 | 48 | ```bash 49 | npm run dev 50 | ``` 51 | 52 | 7. Access the live development server at [localhost:5173](http://localhost:5173). 53 | 54 | 55 | 56 | ### Communication 57 | To discuss about the project the you may reach out the maintainers on the discord or any other social channel.
58 | Don't hesistate to ask any doubt 😄 59 | 60 | ### How to Contribute 61 | Try picking up some `good-first-issue` from the issue section and make [pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) for them. 62 | 63 | -------------------------------------------------------------------------------- /architecture.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsoc-bitbyte/resource-sharing/7ba83ed4a4ee3678a567b56cf583cae65a3169ae/architecture.jpg -------------------------------------------------------------------------------- /contributing.md: -------------------------------------------------------------------------------- 1 | 2 | # Contribution Workflow 3 | 4 | The following is a summary of the ideal contribution flow. Please, note that Pull Requests can also be rejected by the maintainers when appropriate. 5 | 6 | ┌───────────────────────┐ 7 | │ │ 8 | │ Open an issue │ 9 | │ (a bug report or a │ 10 | │ feature request) │ 11 | │ │ 12 | └───────────────────────┘ 13 | ⇩ 14 | ┌───────────────────────┐ 15 | │ │ 16 | │ Open a Pull Request │ 17 | │ (only after issue │ 18 | │ is approved) │ 19 | │ │ 20 | └───────────────────────┘ 21 | ⇩ 22 | ┌───────────────────────┐ 23 | │ │ 24 | │ Your changes will │ 25 | │ be merged and │ 26 | │ published on the next │ 27 | │ release │ 28 | │ │ 29 | └───────────────────────┘ 30 | 31 | 32 | 33 | 34 | 35 | 36 | ## How to create an issue 37 | 38 | - Navigate to the repository : 39 | Go to the GitHub website and locate the repository where you want to create the issue. You can search for the repository or use the repository's URL to access it directly. 40 | 41 | - Access the "Issues" tab : 42 | Once you're on the repository page, find the "Issues" tab in the top navigation bar and click on it. This tab will lead you to the issues management page. 43 | 44 | - Click on "New issue" : 45 | On the "Issues" page, you'll find a green button labeled "New issue" on the right-hand side. Click on it to proceed with creating a new issue. 46 | 47 | 48 | ## How to create a pull request 49 | Creating a pull request on GitHub involves the following steps: 50 | 51 | 1.Fork the repository. 52 | 53 | 2.Create a new branch for your changes. 54 | 55 | 3.Make the necessary modifications and test them. 56 | 57 | 4.Commit and push your changes to your forked repository. 58 | 59 | 5.Access the original repository and click on "New pull request". 60 | 61 | 6.Select the appropriate branches for the base and head. 62 | 63 | 7.Review and provide details about your changes. 64 | 65 | 8.Create the pull request. 66 | 67 | 9.Engage in discussion by responding to comments and addressing feedback. 68 | 69 | If you have any doubts feel free to reach out to us on discord or any other social channel.We are happy to help you. 70 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | UniShare 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "unishare", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "husky": { 7 | "hooks": { 8 | "pre-commit": "pretty-quick --staged" 9 | } 10 | }, 11 | "scripts": { 12 | "dev": "vite", 13 | "build": "vite build", 14 | "lint": "eslint src --ext js,jsx --report-unused-disable-directives --max-warnings 0", 15 | "format": "npx prettier --write .", 16 | "preview": "vite preview" 17 | }, 18 | "dependencies": { 19 | "@fontsource/comfortaa": "^5.0.3", 20 | "@heroicons/react": "^2.0.18", 21 | "@react-pdf-viewer/core": "^3.12.0", 22 | "@react-pdf-viewer/default-layout": "^3.12.0", 23 | "@reduxjs/toolkit": "^1.9.5", 24 | "classnames": "^2.3.2", 25 | "firebase": "^9.22.0", 26 | "pdfjs-dist": "^3.8.162", 27 | "prettier": "^2.8.8", 28 | "react": "^18.2.0", 29 | "react-dom": "^18.2.0", 30 | "react-firebase-hooks": "^5.1.1", 31 | "react-pdf": "^7.1.2", 32 | "react-redux": "^8.0.5", 33 | "react-router-dom": "^6.11.2", 34 | "react-scripts": "^5.0.1" 35 | }, 36 | "devDependencies": { 37 | "@types/react": "^18.0.28", 38 | "@types/react-dom": "^18.0.11", 39 | "@vitejs/plugin-react": "^4.0.0", 40 | "autoprefixer": "^10.4.14", 41 | "eslint": "^8.41.0", 42 | "eslint-config-prettier": "^8.8.0", 43 | "eslint-plugin-prettier": "^4.2.1", 44 | "eslint-plugin-react": "^7.32.2", 45 | "eslint-plugin-react-hooks": "^4.6.0", 46 | "eslint-plugin-react-refresh": "^0.3.4", 47 | "husky": "^8.0.3", 48 | "postcss": "^8.4.24", 49 | "pretty-quick": "^3.1.3", 50 | "tailwindcss": "^3.3.2", 51 | "vite": "^4.3.2" 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /prettier.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | tabWidth: 2, 3 | semi: true, 4 | singleQuote: true, 5 | trailingComma: 'es6', 6 | } -------------------------------------------------------------------------------- /public/2.2_Scales.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsoc-bitbyte/resource-sharing/7ba83ed4a4ee3678a567b56cf583cae65a3169ae/public/2.2_Scales.pdf -------------------------------------------------------------------------------- /public/BackgroundImage.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsoc-bitbyte/resource-sharing/7ba83ed4a4ee3678a567b56cf583cae65a3169ae/public/BackgroundImage.webp -------------------------------------------------------------------------------- /public/Bookmark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /public/DarkModeIcon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /public/Favicon.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsoc-bitbyte/resource-sharing/7ba83ed4a4ee3678a567b56cf583cae65a3169ae/public/Favicon.webp -------------------------------------------------------------------------------- /public/LightModeIcon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /public/blueBlob-cropped.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsoc-bitbyte/resource-sharing/7ba83ed4a4ee3678a567b56cf583cae65a3169ae/public/blueBlob-cropped.webp -------------------------------------------------------------------------------- /public/close.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/coding.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsoc-bitbyte/resource-sharing/7ba83ed4a4ee3678a567b56cf583cae65a3169ae/public/coding.webp -------------------------------------------------------------------------------- /public/cross1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsoc-bitbyte/resource-sharing/7ba83ed4a4ee3678a567b56cf583cae65a3169ae/public/cross1.webp -------------------------------------------------------------------------------- /public/dark-mode.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsoc-bitbyte/resource-sharing/7ba83ed4a4ee3678a567b56cf583cae65a3169ae/public/dark-mode.webp -------------------------------------------------------------------------------- /public/data-structure.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsoc-bitbyte/resource-sharing/7ba83ed4a4ee3678a567b56cf583cae65a3169ae/public/data-structure.webp -------------------------------------------------------------------------------- /public/ecllipseloading.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /public/education.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsoc-bitbyte/resource-sharing/7ba83ed4a4ee3678a567b56cf583cae65a3169ae/public/education.webp -------------------------------------------------------------------------------- /public/fileSharing3.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsoc-bitbyte/resource-sharing/7ba83ed4a4ee3678a567b56cf583cae65a3169ae/public/fileSharing3.webp -------------------------------------------------------------------------------- /public/filter.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /public/iiitdmj-logo.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsoc-bitbyte/resource-sharing/7ba83ed4a4ee3678a567b56cf583cae65a3169ae/public/iiitdmj-logo.webp -------------------------------------------------------------------------------- /public/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsoc-bitbyte/resource-sharing/7ba83ed4a4ee3678a567b56cf583cae65a3169ae/public/info.png -------------------------------------------------------------------------------- /public/interview.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsoc-bitbyte/resource-sharing/7ba83ed4a4ee3678a567b56cf583cae65a3169ae/public/interview.webp -------------------------------------------------------------------------------- /public/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsoc-bitbyte/resource-sharing/7ba83ed4a4ee3678a567b56cf583cae65a3169ae/public/loader.gif -------------------------------------------------------------------------------- /public/loginpage-background-image.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsoc-bitbyte/resource-sharing/7ba83ed4a4ee3678a567b56cf583cae65a3169ae/public/loginpage-background-image.webp -------------------------------------------------------------------------------- /public/moon.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsoc-bitbyte/resource-sharing/7ba83ed4a4ee3678a567b56cf583cae65a3169ae/public/moon.webp -------------------------------------------------------------------------------- /public/overview-image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsoc-bitbyte/resource-sharing/7ba83ed4a4ee3678a567b56cf583cae65a3169ae/public/overview-image.jpg -------------------------------------------------------------------------------- /public/react.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/search.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /public/searchIcon.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsoc-bitbyte/resource-sharing/7ba83ed4a4ee3678a567b56cf583cae65a3169ae/public/searchIcon.webp -------------------------------------------------------------------------------- /public/sort.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /public/test.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsoc-bitbyte/resource-sharing/7ba83ed4a4ee3678a567b56cf583cae65a3169ae/public/test.webp -------------------------------------------------------------------------------- /public/underline .svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /public/vite.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/yellowBlob-cropped.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsoc-bitbyte/resource-sharing/7ba83ed4a4ee3678a567b56cf583cae65a3169ae/public/yellowBlob-cropped.webp -------------------------------------------------------------------------------- /src/App.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { BrowserRouter, Routes, Route } from 'react-router-dom'; 3 | import LandingPage from './pages/LandingPage'; 4 | import MaterialsPage from './pages/MaterialsPage'; 5 | import Login from './pages/login'; 6 | import Signup from './pages/signup'; 7 | import Layout from './pages/OverviewPage'; 8 | import PageNoteFound from './pages/404page' 9 | import PDFViewer from './components/PDFViewer'; 10 | import Reset from './pages/forgotpassword' 11 | import Dashboard from './components/Dashboard'; 12 | import Uploads from './components/Dashboard/uploads'; 13 | import Downloads from './components/Dashboard/downloads'; 14 | import Bookmarks from './components/Dashboard/bookmarks'; 15 | import Upload from './components/Dashboard/uploadform'; 16 | const App = () => { 17 | return ( 18 | <> 19 | 20 | 21 | } /> 22 | } /> 23 | }> 24 | }> 25 | }> 26 | }> 27 | }> 28 | }> 29 | }> 30 | }> 31 | }> 32 | }> 33 | 34 | 35 | 36 | 37 | ) 38 | } 39 | 40 | export default App 41 | -------------------------------------------------------------------------------- /src/assets/fonts/Monument.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: Monument; 3 | src: url(../fonts/MonumentExtended-Regular.otf) format('opentype'), url(../fonts/MonumentExtended-Regular.otf) format('opentype'); 4 | font-weight: 400; 5 | font-style: normal; 6 | font-display: block 7 | } 8 | @font-face { 9 | font-family: Monument; 10 | src: url(../fonts/MonumentExtended-Regular.otf) format('opentype'), url(../fonts/MonumentExtended-Regular.otf) format('opentype'); 11 | font-weight: 500; 12 | font-style: normal; 13 | font-display: block 14 | } 15 | @font-face { 16 | font-family: Monument; 17 | src: url(../fonts/MonumentExtended-Regular.otf) format('opentype'), url(../fonts/MonumentExtended-Ultrabold.otf) format('opentype'); 18 | font-weight: 700; 19 | font-style: normal; 20 | font-display: block 21 | } 22 | * { 23 | word-spacing: normal !important 24 | } 25 | 26 | -------------------------------------------------------------------------------- /src/assets/fonts/MonumentExtended-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsoc-bitbyte/resource-sharing/7ba83ed4a4ee3678a567b56cf583cae65a3169ae/src/assets/fonts/MonumentExtended-Regular.otf -------------------------------------------------------------------------------- /src/assets/fonts/MonumentExtended-Ultrabold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsoc-bitbyte/resource-sharing/7ba83ed4a4ee3678a567b56cf583cae65a3169ae/src/assets/fonts/MonumentExtended-Ultrabold.otf -------------------------------------------------------------------------------- /src/components/DarkMode/DarkMode.module.css: -------------------------------------------------------------------------------- 1 | .darkMode { 2 | width: fit-content; 3 | height: fit-content; 4 | cursor: pointer; 5 | transition: all 0.3s; 6 | display: flex; 7 | justify-content: center; 8 | align-items: center; 9 | background-position: center; 10 | background-size: cover; 11 | background-repeat: no-repeat; 12 | box-shadow: 1px 2px 6px var(--box-shadow); 13 | } 14 | 15 | .darkMode:hover { 16 | box-shadow: 0 0 0.5rem var(--box-shadow) !important; 17 | } -------------------------------------------------------------------------------- /src/components/DarkMode/index.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import styles from "./DarkMode.module.css"; 3 | import classNames from "classnames"; 4 | 5 | let prefersDark = false 6 | 7 | const DarkMode = () => { 8 | const [theme, setTheme] = React.useState('light') 9 | 10 | const setDark = () => { 11 | document.documentElement.setAttribute("data-theme", "dark") 12 | } 13 | 14 | const setLight = () => { 15 | document.documentElement.setAttribute("data-theme", "light") 16 | } 17 | 18 | if(typeof window !== 'undefined') { 19 | prefersDark = 20 | window.matchMedia && 21 | window.matchMedia("(prefers-color-scheme: dark)").matches 22 | } 23 | 24 | const defaultDark = 25 | theme === "dark" || (theme === null && prefersDark) 26 | 27 | if (defaultDark) { 28 | setDark(); 29 | } 30 | 31 | const toggleTheme = (event) => { 32 | if (event.currentTarget.dataset.theme === 'light') { 33 | setDark(); 34 | } else { 35 | setLight(); 36 | } 37 | } 38 | 39 | return ( 40 |
{ 47 | setTheme(currentTheme => ((currentTheme === 'light') ? 'dark' : 'light')) 48 | toggleTheme(event) 49 | }} 50 | > 51 | {"switch"} 59 |
60 | ) 61 | }; 62 | 63 | export default DarkMode; -------------------------------------------------------------------------------- /src/components/Dashboard/bookmarks.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import { Link } from "react-router-dom"; 3 | import { NavBar } from '../../components'; 4 | import Sidepanel from "./sidepanel"; 5 | 6 | const Bookmarks = () => { 7 | const [open, setOpen] = useState(false); 8 | return ( 9 |
10 | 11 |
12 | 13 |
14 | 15 |
16 | 17 |
18 |
19 | Bookmarks 20 |
21 |
22 | 23 |
24 |
25 |
26 | BASIC ELECTRONICS 27 |
28 |
29 | 32 |
33 |
34 |
35 |
36 | Labs 37 |
38 |
39 | Midsem 40 |
41 |
42 | Endsem 43 |
44 |
45 | Quiz 46 |
47 |
48 |
49 | 52 | 53 | 56 | 57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 | ) 66 | } 67 | 68 | 69 | export default Bookmarks ; -------------------------------------------------------------------------------- /src/components/Dashboard/downloads.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import { Link } from "react-router-dom"; 3 | import { NavBar } from '../../components'; 4 | import Sidepanel from "./sidepanel"; 5 | 6 | const Downloads = () => { 7 | const [open, setOpen] = useState(false); 8 | return ( 9 |
10 | 11 |
12 | 13 |
14 | 15 |
16 | 17 |
18 |
19 | Downloads 20 |
21 |
22 | 23 |
24 |
25 |
26 | Engineering Graphics 27 |
28 |
29 | 32 |
33 |
34 |
35 |
36 | Lab 37 |
38 |
39 | Midsem 40 |
41 |
42 | DUDES 43 |
44 |
45 | Endsem 46 |
47 |
48 |
49 | 52 | 53 | 56 | 57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 | ) 66 | } 67 | 68 | 69 | export default Downloads ; -------------------------------------------------------------------------------- /src/components/Dashboard/index.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import { Link } from "react-router-dom"; 3 | import { NavBar } from '../../components'; 4 | import Sidepanel from "./sidepanel"; 5 | 6 | const Dashboard = () => { 7 | const [open, setOpen] = useState(false); 8 | return ( 9 |
10 | 11 |
12 | 13 |
14 |
15 |
16 |
17 | Total Bookmarks 18 |
19 |
20 | 12 21 |
22 |
23 |
24 |
25 | Total Uploads 26 |
27 |
28 | 45 29 |
30 |
31 |
32 |
33 | Total Downloads 34 |
35 |
36 | 20 37 |
38 |
39 |
40 |
41 |

42 | Name : Ashish K Kundu 43 |

44 |

45 | Roll No : 201269 46 |

47 |

48 | Batch : 2012 49 |

50 |
51 |
52 |
53 |
54 | ); 55 | } 56 | 57 | 58 | 59 | export default Dashboard; -------------------------------------------------------------------------------- /src/components/Dashboard/sidepanel.jsx: -------------------------------------------------------------------------------- 1 | import { useState } from "react"; 2 | import { Link } from "react-router-dom"; 3 | import Modal from "../Modal"; 4 | import Upload from "./uploadform"; 5 | 6 | 7 | const Sidepanel = ({open, setOpen}) => { 8 | const [isopen, setIsOpen] = useState(false); 9 | return ( 10 |
11 |
13 |
14 | 30 |
31 |
32 |
33 | 34 | 35 |
36 | 37 |
38 | 39 | 44 | } open={isopen} setOpen={setIsOpen}/> 45 | 50 | 55 | 60 |
61 |
62 |
63 |
64 | ) 65 | } 66 | 67 | export default Sidepanel; -------------------------------------------------------------------------------- /src/components/Dashboard/uploadform.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import { Link } from "react-router-dom"; 3 | import { NavBar } from '../../components'; 4 | import Sidepanel from "./sidepanel"; 5 | import classNames from "classnames"; 6 | import Modal from "../Modal"; 7 | 8 | const Upload = ({open, setOpen}) => { 9 | return ( 10 | <> 11 |
12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 31 |
32 |
33 | ) 34 | } 35 | 36 | 37 | export default Upload ; -------------------------------------------------------------------------------- /src/components/Dashboard/uploads.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import { Link } from "react-router-dom"; 3 | import { NavBar } from '../../components'; 4 | import Sidepanel from "./sidepanel"; 5 | import classNames from "classnames"; 6 | 7 | const Uploads = () => { 8 | const [open, setOpen] = useState(false); 9 | return ( 10 |
11 | 12 |
13 | 14 |
15 | 16 |
17 | 18 |
19 |
20 | Uploads 21 |
22 |
23 | 24 |
25 |
26 |
27 | Linear Algebra 28 |
29 |
30 | 33 |
34 |
35 |
36 |
37 | NKM notes 38 |
39 |
40 | Midsems 41 |
42 |
43 | Book 44 |
45 |
46 | Quiz 47 |
48 |
49 |
50 | 53 | 54 | 57 | 58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 | ) 67 | } 68 | 69 | 70 | export default Uploads ; -------------------------------------------------------------------------------- /src/components/Footer/index.jsx: -------------------------------------------------------------------------------- 1 | import classNames from 'classnames'; 2 | import React from 'react'; 3 | import { Link } from "react-router-dom"; 4 | 5 | const socials = [ 6 | { 7 | name: "Github", 8 | svgPath: "M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z", 9 | viewBox: "0 0 24 24", 10 | link: "https://github.com/bsoc-bitbyte/resource-sharing" 11 | }, 12 | { 13 | name: "LinkedIn", 14 | svgPath: "M100.28 448H7.4V148.9h92.88zM53.79 108.1C24.09 108.1 0 83.5 0 53.8a53.79 53.79 0 0 1 107.58 0c0 29.7-24.1 54.3-53.79 54.3zM447.9 448h-92.68V302.4c0-34.7-.7-79.2-48.29-79.2-48.29 0-55.69 37.7-55.69 76.7V448h-92.78V148.9h89.08v40.8h1.3c12.4-23.5 42.69-48.3 87.88-48.3 94 0 111.28 61.9 111.28 142.3V448z", 15 | viewBox: "-80 -50 900 900", 16 | link: "https://www.linkedin.com/company/bitbyte-tpc/", 17 | }, 18 | ] 19 | 20 | const Footer = () => { 21 | let borderColor = "#87CEFA"; 22 | let centerColor = "#B9D9EB"; 23 | return ( 24 |
28 | 29 |
30 | 31 |
38 | UniShare 39 |
40 | 41 | 42 |
43 | 44 |

45 | 46 | 47 | Unishare is a college resource sharing website designed to serve as a dynamic platform for students to collaborate and share resources. Unishare aims to foster an environment where students can easily access and exchange a wide range of educational materials, such as lecture notes, study guides, past exam papers, and more. 48 |

49 | 50 |
51 | {socials.map((social, index) => { 52 | return ( 53 | 64 | 77 | {social.name} 78 | 79 | ) 80 | })} 81 |
82 |
83 |
84 |
85 | ); 86 | } 87 | 88 | export default Footer; -------------------------------------------------------------------------------- /src/components/HeroSection/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import classNames from 'classnames' 3 | 4 | const HeroSection = () => { 5 | const [searchParam, setSearchParam] = React.useState(''); // Search Parameter 6 | return ( 7 |
8 |
9 |
13 | 14 | {"Book 15 | {/* {"blueBlob"} */} 16 | {/* Text ... */} 17 |
28 | {/* Title */} 29 |
32 |

40 | Welcome to UniShare 41 |
47 | 48 | 49 |
50 |

51 |
52 | {/* Subtitle */} 53 |

{"A centralized Portal for Sharing Resources"}

54 | {/* Searchbar */} 55 |
63 | {"Search"} 64 | setSearchParam(e.target.value)} 69 | className={"w-[85%] bg-transparent outline-none text-[#37474f] font-bold text-md capitalize"} 70 | /> 71 | {"Clear setSearchParam('')} 76 | /> 77 |
78 |
79 | 80 | {/* Illustration ... */} 81 |
86 |
92 | {"File 97 |
98 |
99 |
100 |
104 | 105 | 106 | 107 | 108 | 109 |
110 |
111 | ) 112 | } 113 | 114 | export default HeroSection 115 | -------------------------------------------------------------------------------- /src/components/Modal/index.jsx: -------------------------------------------------------------------------------- 1 | import ReactDOM from "react-dom/client"; 2 | import { createPortal } from "react-dom"; 3 | 4 | 5 | const Modal = ({ content, open , setOpen}) => { 6 | if (!open) 7 | { 8 | return null; 9 | } 10 | return createPortal( 11 | <> 12 |
13 |
14 | 17 |
18 | {content} 19 |
20 | 21 | , 22 | document.getElementById('modal') 23 | ) 24 | } 25 | 26 | export default Modal ; -------------------------------------------------------------------------------- /src/components/NavBar/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import classNames from 'classnames'; 3 | import { Link } from "react-router-dom"; 4 | import DarkMode from '../DarkMode'; 5 | import { useAuthState, useSignOut } from 'react-firebase-hooks/auth'; 6 | import { auth } from '../../../Firebase/ClientApp.mjs'; 7 | 8 | const NavBar = () => { 9 | const [user, loading, error] = useAuthState(auth); 10 | const [signout, loadingg, erorr] = useSignOut(auth); 11 | return ( 12 |
17 |
25 | {/* Logo... */} 26 |
33 | UniShare 34 |
35 | 36 | {/* NavItems... */} 37 |
42 | 53 | 64 | 76 | 77 |
78 |
79 |
80 | ) 81 | } 82 | 83 | export default NavBar; 84 | -------------------------------------------------------------------------------- /src/components/PDFViewer/index.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Viewer, Worker, ViewMode, ProgressBar } from "@react-pdf-viewer/core"; 3 | import { defaultLayoutPlugin } from "@react-pdf-viewer/default-layout"; 4 | import '@react-pdf-viewer/core/lib/styles/index.css'; 5 | import '@react-pdf-viewer/default-layout/lib/styles/index.css'; 6 | import NavBar from "../NavBar"; 7 | import pdfFile from "../../../public/2.2_Scales.pdf"; 8 | import classNames from "classnames"; 9 | 10 | export default function PDFViewer(){ 11 | const transform = (slot) => ({ 12 | ...slot, 13 | Open: () => <>, 14 | OpenMenuItem: () => <>, 15 | Print: () => <>, 16 | PrintMenuItem: () => <>, 17 | ShowProperties: () => <>, 18 | ShowPropertiesMenuItem: () => <>, 19 | SwitchTheme: () => <>, 20 | SwitchThemeMenuItem: () => <>, 21 | }); 22 | 23 | const renderToolbar = (Toolbar => ( 24 | {renderDefaultToolbar(transform)} 25 | )); 26 | 27 | const defaultLayoutPluginInstance = defaultLayoutPlugin({ 28 | renderToolbar, 29 | }); 30 | const { renderDefaultToolbar } = defaultLayoutPluginInstance.toolbarPluginInstance; 31 | 32 | return ( 33 | <> 34 | 35 | 36 |
39 |
42 | console.log('error', e)} 50 | renderLoader={(percentages) => ( 51 |
52 | 53 |
54 | )} 55 | /> 56 |
57 |
58 |
59 | 60 | ); 61 | } 62 | -------------------------------------------------------------------------------- /src/components/SearchBar/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import classNames from 'classnames'; 3 | 4 | const SearchBar = () => { 5 | return ( 6 |
7 |
14 |
15 | 16 | 17 |
18 |
23 | 36 | 49 |
50 |
51 |
52 | ) 53 | } 54 | 55 | export default SearchBar; -------------------------------------------------------------------------------- /src/components/backtotop.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { useEffect, useState} from "react"; 3 | import classNames from "classnames"; 4 | 5 | function BackToTop() { 6 | 7 | const scrollup = () => { 8 | console.log("check") 9 | document.body.scrollTo({ 10 | top: 0, 11 | behavior: "smooth", 12 | }); 13 | }; 14 | 15 | return ( 16 |
17 | 36 |
37 | ) 38 | } 39 | 40 | export default BackToTop; -------------------------------------------------------------------------------- /src/components/cards/CategoryCards.jsx: -------------------------------------------------------------------------------- 1 | import { Link } from "react-router-dom"; 2 | import classNames from "classnames"; 3 | 4 | const CategoryCards = (props) => { 5 | return ( 6 |
14 | 15 | 16 |
17 |

20 | {props.card.domain} 21 |

22 |
23 | 24 |
25 | ); 26 | }; 27 | 28 | export default CategoryCards; 29 | -------------------------------------------------------------------------------- /src/components/cards/MaterialCard.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { Link } from 'react-router-dom' 3 | 4 | const MaterialCard = (props) => { 5 | let key=0; 6 | return ( 7 |
8 |
9 | 10 |
11 |
12 |
13 | {props.material.title} 14 |
15 |
16 | 19 |
20 |
21 |
22 | {props.material.fields.map((item, index) => ( 23 |
24 | {item} 25 |
26 | ))} 27 |
28 |
29 | 32 | 33 | 36 | 37 |
38 |
39 |
40 |
41 | ) 42 | } 43 | 44 | export default MaterialCard; -------------------------------------------------------------------------------- /src/components/cards/MaterialIntro.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const MaterialIntro = (props) => { 4 | return ( 5 |
6 |
7 |
8 |
9 | {props.category} 10 |
11 |
12 | {props.length} Resources Found 13 |
14 |
15 |
16 |
17 | ) 18 | } 19 | 20 | export default MaterialIntro; -------------------------------------------------------------------------------- /src/components/cards/index.mjs: -------------------------------------------------------------------------------- 1 | import CategoryCards from './CategoryCards'; 2 | import MaterialCard from './MaterialCard'; 3 | import MaterialIntro from './MaterialIntro'; 4 | 5 | export { CategoryCards, MaterialCard, MaterialIntro }; 6 | -------------------------------------------------------------------------------- /src/components/content.jsx: -------------------------------------------------------------------------------- 1 | import CardData from '../config/CardData.mjs'; 2 | import { CategoryCards } from '../components'; 3 | import classNames from 'classnames'; 4 | import underline from '/underline .svg'; 5 | 6 | const Content = () => { 7 | return ( 8 |
12 | 16 |

22 | Choose Your Topic ! 23 |

24 | underline 25 |
26 |
27 | {CardData.map((value) => { 28 | return ; 29 | })} 30 |
31 |
32 | ); 33 | }; 34 | 35 | export default Content; -------------------------------------------------------------------------------- /src/components/index.mjs: -------------------------------------------------------------------------------- 1 | import NavBar from "./NavBar"; 2 | import Footer from "./Footer"; 3 | import HeroSection from "./HeroSection"; 4 | import SearchBar from "./SearchBar"; 5 | import Dashboard from "./Dashboard"; 6 | import BackToTop from "./backtotop"; 7 | import { CategoryCards, MaterialCard, MaterialIntro } from "./cards"; 8 | 9 | 10 | export { 11 | NavBar, 12 | Footer, 13 | HeroSection, 14 | SearchBar, 15 | Dashboard, 16 | CategoryCards, 17 | MaterialCard, 18 | MaterialIntro, 19 | BackToTop 20 | } -------------------------------------------------------------------------------- /src/config/CardData.mjs: -------------------------------------------------------------------------------- 1 | const cardData = [ 2 | { 3 | id: 1, 4 | image: 'education.webp', 5 | domain: 'Academics', 6 | link: '/materials/academics', 7 | urlparams: 'academics', 8 | background: 'BackgroundImage.webp', 9 | fetchlink: 'https://64870876beba6297278fb836.mockapi.io/materials' 10 | }, 11 | { 12 | id: 2, 13 | image: 'test.webp', 14 | domain: 'Competitive Exams', 15 | link: '/materials/competitive-exam', 16 | urlparams: 'competitive-exam', 17 | background: 'BackgroundImage.webp', 18 | fetchlink: 'https://64870876beba6297278fb836.mockapi.io/materials' 19 | }, 20 | { 21 | id: 3, 22 | image: 'data-structure.webp', 23 | domain: 'CP/DSA', 24 | link: '/materials/cp-dsa', 25 | urlparams: 'cp-dsa', 26 | background: 'BackgroundImage.webp', 27 | fetchlink: 'https://64870876beba6297278fb836.mockapi.io/materials' 28 | }, 29 | { 30 | id: 4, 31 | image: 'coding.webp', 32 | domain: 'Development', 33 | link: '/materials/development', 34 | urlparams: 'development', 35 | background: 'BackgroundImage.webp', 36 | fetchlink: 'https://64870876beba6297278fb836.mockapi.io/materials' 37 | }, 38 | { 39 | id: 5, 40 | image: 'interview.webp', 41 | domain: 'Interview / Placement', 42 | link: '/materials/interview-placement', 43 | urlparams: 'interview-placement', 44 | background: 'BackgroundImage.webp', 45 | fetchlink: 'https://64870876beba6297278fb836.mockapi.io/materials' 46 | }, 47 | ]; 48 | 49 | export default cardData; 50 | -------------------------------------------------------------------------------- /src/main.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom/client'; 3 | import App from './App.jsx'; 4 | import "@fontsource/comfortaa"; 5 | import "@fontsource/comfortaa/400.css"; 6 | import "@fontsource/comfortaa/500.css"; 7 | import "@fontsource/comfortaa/600.css"; 8 | import "@fontsource/comfortaa/700.css"; 9 | import './styles/globals.css'; 10 | 11 | ReactDOM.createRoot(document.getElementById('root')).render( 12 | 13 | 14 | 15 | ); 16 | -------------------------------------------------------------------------------- /src/pages/404page/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Link } from 'react-router-dom'; 3 | import page404Img from './page404.png' 4 | 5 | const PageNoteFound = () => { 6 | 7 | return ( 8 | 9 |
10 |
11 |

Uh-Oh...

12 |

The page you are looking for may have been moved, deleted 13 |
or possibly never existed. 14 |

15 |
16 | painter painting 404 17 | 18 | 19 | 20 |
21 |
22 |
23 | 24 | ); 25 | } 26 | 27 | 28 | export default PageNoteFound; 29 | -------------------------------------------------------------------------------- /src/pages/404page/page404.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bsoc-bitbyte/resource-sharing/7ba83ed4a4ee3678a567b56cf583cae65a3169ae/src/pages/404page/page404.png -------------------------------------------------------------------------------- /src/pages/LandingPage/index.jsx: -------------------------------------------------------------------------------- 1 | import { NavBar, HeroSection, Footer } from '../../components'; 2 | import BackToTop from '../../components/backtotop'; 3 | import Content from '../../components/content'; 4 | 5 | const LandingPage = () => { 6 | return ( 7 | <> 8 | 9 |
10 | 11 | 12 | 13 |
14 |
15 | 16 |
17 | 18 |
19 | 20 | 21 | ); 22 | }; 23 | 24 | export default LandingPage; 25 | -------------------------------------------------------------------------------- /src/pages/MaterialsPage/index.jsx: -------------------------------------------------------------------------------- 1 | import { NavBar, MaterialIntro, MaterialCard, SearchBar, Footer, BackToTop } from '../../components'; 2 | import { useParams } from 'react-router-dom'; 3 | import { useState, useEffect } from 'react'; 4 | import cardData from '../../config/CardData.mjs'; 5 | 6 | 7 | const MaterialsPage = () => { 8 | const [materials, setMaterials] = useState([]); 9 | const {category} = useParams(); 10 | let categoryid = -1; 11 | cardData.map((value) => { 12 | if (value.urlparams == category) 13 | { 14 | categoryid=value.id; 15 | } 16 | }); 17 | if (categoryid != -1) 18 | { 19 | const categoryimage = cardData[categoryid-1].background; 20 | 21 | const fetchmaterials = async () => { 22 | try { 23 | const response = await fetch(cardData[categoryid-1].fetchlink); 24 | const rdata = await response.json(); 25 | setMaterials(rdata); 26 | } catch (error) { 27 | console.log(error); 28 | } 29 | }; 30 | 31 | useEffect(() => { 32 | fetchmaterials(); 33 | }, []); 34 | 35 | return ( 36 | <> 37 |
38 | 39 | 40 | 41 | {materials.slice(0,5).map((material) => 42 | ( 43 | 44 | ))} 45 |