diff --git a/README.md b/README.md index 02d9a31..2a91318 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,70 @@ -# Hackitects +# CampusConnect +Welcome to CampusConnect, your go-to destination for staying in the loop with all the exciting events, announcements, and opportunities buzzing around campus. + +## Table of Contents +- [Introduction](#introduction) +- [Features](#features) +- [Installation](#installation) +- [Usage](#usage) +- [Contributing](#contributing) +- [License](#license) +- [Contact](#contact) + +## Introduction +CampusConnect is a web application designed to keep students, faculty, and staff informed about the latest happenings on campus. Whether it's events, announcements, or opportunities, CampusConnect ensures you never miss out on anything important. + +## Features +- Event Listings: Stay updated with all upcoming events. +- Announcements: Receive important campus announcements in real-time. +- Opportunities: Discover various opportunities available on campus. +- User-Friendly Interface: Easy navigation and intuitive design. + +## Installation +To get a local copy up and running, follow these simple steps: + +### Prerequisites +- Node.js and npm installed on your machine. + +### Clone the Repository +```bash +git clone https://github.com/iamanishsrivastava/CampusConnect.git +``` + +### Install Dependencies +Navigate to the project directory and install the required dependencies: +```bash +cd CampusConnect +npm install +``` + +### Run the Application +Start the development server: +```bash +npm start +``` +Open your browser and navigate to `http://localhost:3000` to see the app in action. + +## Usage +You can access the live version of CampusConnect [here](https://campusconnect-hackitect.vercel.app). + +## Contributing +Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**. + +1. Fork the Project +2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`) +3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`) +4. Push to the Branch (`git push origin feature/AmazingFeature`) +5. Open a Pull Request + +## License +Distributed under the MIT License. See `LICENSE` for more information. + +## Contact +CampusConnect is a team project by: +- [Anagha A Rao](https://github.com/AnaghaARao) (Team Leader) +- [Anish Srivastava](https://github.com/iamanishsrivastava) +- [Anisha Patra](https://github.com/ap766) +- [Arsh Gupta](https://github.com/ArshGupta74) + +GitHub: [CampusConnect](https://github.com/iamanishsrivastava/CampusConnect) diff --git a/frontend/components/images/logo-symbol.png b/components/images/logo-symbol.png similarity index 100% rename from frontend/components/images/logo-symbol.png rename to components/images/logo-symbol.png diff --git a/frontend/components/login.css b/components/login.css similarity index 100% rename from frontend/components/login.css rename to components/login.css diff --git a/frontend/components/login.html b/components/login.html similarity index 97% rename from frontend/components/login.html rename to components/login.html index 4cf0b28..3534308 100644 --- a/frontend/components/login.html +++ b/components/login.html @@ -2,6 +2,7 @@ + Login Register | Campus Connect diff --git a/frontend/components/postform.css b/components/post.css similarity index 94% rename from frontend/components/postform.css rename to components/post.css index 4ff25f0..8a6b3bf 100644 --- a/frontend/components/postform.css +++ b/components/post.css @@ -1,176 +1,176 @@ -/* Google Font Link */ -@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap'); -*{ - margin: 0; - padding: 0; - box-sizing: border-box; - font-family: "Poppins" , sans-serif; -} -body{ - min-height: 100vh; - display: flex; - align-items: center; - justify-content: center; - background: #7FD6C2; - padding: 30px; -} -.container{ - position: relative; - max-width: 850px; - width: 100%; - background: #fff; - padding: 40px 30px; - box-shadow: 0 5px 10px rgba(0,0,0,0.2); - perspective: 2700px; -} - -.container .forms{ - height: 100%; - width: 100%; - background: #fff; -} -.container { - display: flex; - align-items: center; - justify-content: space-between; -} - .login-form, - .signup-form{ - width: calc(100% / 2 - 25px); -} - -.form { - display: flex; - justify-content: space-between; -} - -.forms .title{ - position: relative; - font-size: 24px; - font-weight: 500; - color: #333; -} -.forms .title:before{ - content: ''; - position: absolute; - left: 0; - bottom: 0; - height: 3px; - width: 25px; - background: #7FD6C2; -} -.forms .signup-form .title:before{ - width: 20px; -} - -.title-container { - display: flex; - justify-content: space-between; - width: 770px; -} - -.forms .input-boxes{ - margin-top: 30px; -} -.forms .input-box{ - display: flex; - align-items: center; - height: 50px; - width: 145px; - margin: 10px 0; - position: relative; -} - .input-box input{ - height: 100%; - width: 100%; - outline: none; - border: none; - padding: 0 30px; - font-size: 16px; - font-weight: 500; - border-bottom: 2px solid rgba(0,0,0,0.2); - transition: all 0.3s ease; -} - .input-box input:focus, - .input-box input:valid{ - border-color: #7FD6C2; -} - .input-box i{ - position: absolute; - color: #7FD6C2; - font-size: 17px; -} -.forms .text{ - font-size: 14px; - font-weight: 500; - color: #333; -} -.forms .text a{ - text-decoration: none; -} -.forms .text a:hover{ - text-decoration: underline; -} -.forms .button{ - color: #fff; - margin-top: 40px; -} -.forms .button input{ - color: #fff; - background: #7FD6C2; - border-radius: 6px; - padding: 0; - cursor: pointer; - transition: all 0.4s ease; - width: 150px; -} -.forms .button input:hover{ - background: #333; - scale: 0.95; -} - -.button-container { - display: flex; - justify-content: space-evenly; -} - -.input-box:hover { - transform: scale3d(0.9); - transition-duration: 0.3s; -} - -#post, #tag { - padding: 7px; -} - -.forms label{ - color: #7FD6C2; - cursor: pointer; -} -.forms label:hover{ - text-decoration: underline; -} -.forms .login-text, -.forms .sign-up-text{ - text-align: center; - margin-top: 25px; -} - -@media (max-width: 730px) { - .container .cover{ - display: none; - } - .login-form, - .signup-form{ - width: 100%; - } - .signup-form{ - display: none; - } - .container #flip:checked ~ .forms .signup-form{ - display: block; - } - .container #flip:checked ~ .forms .login-form{ - display: none; - } +/* Google Font Link */ +@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap'); +*{ + margin: 0; + padding: 0; + box-sizing: border-box; + font-family: "Poppins" , sans-serif; +} +body{ + min-height: 100vh; + display: flex; + align-items: center; + justify-content: center; + background: #7FD6C2; + padding: 30px; +} +.container{ + position: relative; + max-width: 850px; + width: 100%; + background: #fff; + padding: 40px 30px; + box-shadow: 0 5px 10px rgba(0,0,0,0.2); + perspective: 2700px; +} + +.container .forms{ + height: 100%; + width: 100%; + background: #fff; +} +.container { + display: flex; + align-items: center; + justify-content: space-between; +} + .login-form, + .signup-form{ + width: calc(100% / 2 - 25px); +} + +.form { + display: flex; + justify-content: space-between; +} + +.forms .title{ + position: relative; + font-size: 24px; + font-weight: 500; + color: #333; +} +.forms .title:before{ + content: ''; + position: absolute; + left: 0; + bottom: 0; + height: 3px; + width: 25px; + background: #7FD6C2; +} +.forms .signup-form .title:before{ + width: 20px; +} + +.title-container { + display: flex; + justify-content: space-between; + width: 770px; +} + +.forms .input-boxes{ + margin-top: 30px; +} +.forms .input-box{ + display: flex; + align-items: center; + height: 50px; + width: 145px; + margin: 10px 0; + position: relative; +} + .input-box input{ + height: 100%; + width: 100%; + outline: none; + border: none; + padding: 0 30px; + font-size: 16px; + font-weight: 500; + border-bottom: 2px solid rgba(0,0,0,0.2); + transition: all 0.3s ease; +} + .input-box input:focus, + .input-box input:valid{ + border-color: #7FD6C2; +} + .input-box i{ + position: absolute; + color: #7FD6C2; + font-size: 17px; +} +.forms .text{ + font-size: 14px; + font-weight: 500; + color: #333; +} +.forms .text a{ + text-decoration: none; +} +.forms .text a:hover{ + text-decoration: underline; +} +.forms .button{ + color: #fff; + margin-top: 40px; +} +.forms .button input{ + color: #fff; + background: #7FD6C2; + border-radius: 6px; + padding: 0; + cursor: pointer; + transition: all 0.4s ease; + width: 150px; +} +.forms .button input:hover{ + background: #333; + scale: 0.95; +} + +.button-container { + display: flex; + justify-content: space-evenly; +} + +.input-box:hover { + transform: scale3d(0.9); + transition-duration: 0.3s; +} + +#post, #tag { + padding: 7px; +} + +.forms label{ + color: #7FD6C2; + cursor: pointer; +} +.forms label:hover{ + text-decoration: underline; +} +.forms .login-text, +.forms .sign-up-text{ + text-align: center; + margin-top: 25px; +} + +@media (max-width: 730px) { + .container .cover{ + display: none; + } + .login-form, + .signup-form{ + width: 100%; + } + .signup-form{ + display: none; + } + .container #flip:checked ~ .forms .signup-form{ + display: block; + } + .container #flip:checked ~ .forms .login-form{ + display: none; + } } \ No newline at end of file diff --git a/frontend/components/postform.html b/components/post.html similarity index 93% rename from frontend/components/postform.html rename to components/post.html index 05ba1f9..4d3383a 100644 --- a/frontend/components/postform.html +++ b/components/post.html @@ -1,79 +1,80 @@ - - - - - Post Info - - - - - - -
-
-
-
Post Information
- -
-
-
-

-
- -
-

-
- -
-
-
-
- -
-
- -
- -
-
- - - - + + + + + + Post | Campus Connect + + + + + + +
+
+
+
Post Information
+ +
+
+
+

+
+ +
+

+
+ +
+
+
+
+ +
+
+ +
+ +
+
+ + + + \ No newline at end of file diff --git a/frontend/imgs/logo.jpg b/frontend/imgs/logo.jpg deleted file mode 100644 index 187df5d..0000000 Binary files a/frontend/imgs/logo.jpg and /dev/null differ diff --git a/frontend/index.html b/frontend/index.html deleted file mode 100644 index 18ada1f..0000000 --- a/frontend/index.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - - - Campus Connect - - - - -
-
-

- Welcome to CampusConnect -

-
-

- your go-to destination for staying in the loop with all the exciting events, announcements, and opportunities buzzing around campus. -

-
-
- board-image -
-
- -
-
-
-
- - - - - - \ No newline at end of file diff --git a/frontend/script.js b/frontend/script.js deleted file mode 100644 index e69de29..0000000 diff --git a/frontend/imgs/board.png b/imgs/board.png similarity index 100% rename from frontend/imgs/board.png rename to imgs/board.png diff --git a/imgs/logo-symbol-light.png b/imgs/logo-symbol-light.png new file mode 100644 index 0000000..f117dc6 Binary files /dev/null and b/imgs/logo-symbol-light.png differ diff --git a/frontend/imgs/logo.png b/imgs/logo.png similarity index 100% rename from frontend/imgs/logo.png rename to imgs/logo.png diff --git a/index.html b/index.html new file mode 100644 index 0000000..ddedf43 --- /dev/null +++ b/index.html @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + Campus Connect + + + + + +
+
+

+ Welcome to CampusConnect +

+
+

+ your go-to destination for staying in the loop with all the exciting events, announcements, and opportunities buzzing around campus. +

+
+
+ board-image +
+
+ +
+
+
+
+ + + + + + \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..c169c89 --- /dev/null +++ b/script.js @@ -0,0 +1,48 @@ +document.addEventListener('DOMContentLoaded', function () { + console.log("hi") + const postListElement = document.getElementsByClassName('notices'); + const postForm = document.querySelector('.post-btn'); + const apiEndpoint = 'http://localhost:4200/api/post'; // Replace with your actual backend endpoint + + // Function to fetch and render posts + function fetchAndRenderPosts() { + fetch(apiEndpoint, { + method: 'GET', + }) + .then(response => response.json()) + .then(data => { + // Clear the existing list + postListElement.innerHTML = ''; + + // Render the fetched data + data.forEach(post => { + const listItem = document.createElement('li'); + + // Create and append the h3 element for post content + const postText = document.createElement('h3'); + postText.textContent = post.postContent; + listItem.appendChild(postText); + + // Create and append the h5 element for post tags + const postTag = document.createElement('h5'); + postTag.textContent = post.postTags || 'No tags'; // Use post.postTags if it exists, otherwise set it to 'No tags' + listItem.appendChild(postTag); + + // Append the entire li to the postListElement + postListElement.appendChild(listItem); + }); + }) + .catch(error => console.error('Error fetching data:', error)); + } + + // Fetch and render posts on page load + fetchAndRenderPosts(); + + // Add an event listener for the form submission + postForm.addEventListener('submit', function (event) { + event.preventDefault(); // Prevent the default form submission + + // Fetch and render posts after submitting the form + fetchAndRenderPosts(); + }); +}); \ No newline at end of file diff --git a/frontend/style.css b/style.css similarity index 56% rename from frontend/style.css rename to style.css index 5f822ac..4dfbc72 100644 --- a/frontend/style.css +++ b/style.css @@ -3,8 +3,13 @@ margin: 0; padding: 0; border-style: border-box; +} + +body { font-size: 14px; background-color: #7FD6C2; + max-width: 100%; + font-family: 'Poppins', sans-serif; } /* Navigation bar */ @@ -12,12 +17,14 @@ nav { display: flex; align-items: center; justify-content: space-between; - margin: 10px 10px auto 21px; + margin: 0 10px auto 21px; + height: 45px; } /* search-bar - Nav */ .search-inp, .search-btn { border-style: none; + border-color: #7FD6C2; } .search-inp { @@ -32,6 +39,11 @@ nav { font-size: 14px; } +.search-inp:hover { + border-style: solid; + border-bottom-color: #333; +} + /* login-post-button - Nav */ .login-post-btn { display: flex; @@ -57,8 +69,9 @@ nav { .login-btn:hover, .post-btn:hover { - transform: scale(0.9); + transform: scale(0.95); cursor: pointer; + transition: all 0.4s ease; } @@ -69,12 +82,12 @@ nav { height: 56vh; align-items: center; justify-content: center; + transition: all 0.2s ease-in; } .intro .text { margin-right: 75px; width: 650px; - font-family: 'Poppins', sans-serif; text-align: center; } @@ -93,17 +106,30 @@ nav { display: flex; flex-direction: column; align-items: center; - width: 100vw; - height: 150vh; + width: 98.9vw; + height: 100vh; background-color: #D1EDE7; margin-top: 15px; + transition: all 0.4s ease-in; } -.notices { - padding: 20px; - background-color: #f8f8f8; +/* heading - post form */ +.notices li{ + text-decoration:none; + width: 78.9vw; + background-color: white; +} + +/* post content (text) - post form */ +.notices h3{ + background-color: white; } +/* tags - post Form */ +.notices h5{ + background-color: white; + margin-bottom: 15px; +} /* Post Forms - Notices Section */ .postForm { @@ -124,22 +150,87 @@ nav { font-size: 15px; } -/* heading - post form */ -#notice1 li{ - text-decoration:none; - width: 80vw; - background-color: white; +/* Footer Section */ +footer { + background-color: #333; + color:whitesmoke; } -/* post content (text) - post form */ -#notice1 h3{ - background-color: white; +.icons { + display: flex; + justify-content: space-between; + align-items: center; } -/* tags - post Form */ -#notice1 h5{ - background-color: white; - margin-bottom: 15px; +.icons p{ + display: flex; + justify-content: center; + width: 307px; +} + +.social-icon{ + display: flex; + align-items: center; + justify-content: space-evenly; + width: 200px; + height: 40px; +} + +.social-icon a i{ + color: whitesmoke; + font-size: 14px; +} + +.social-icon a i:hover{ + scale: 0.9; + transition: all 0.4s ease; + color:#7FD6C2; +} + +footer .container { + display: flex; + align-items: center; + height: 170px; + justify-content: space-evenly; +} + +footer .container .com-name { + width: 180px; +} + +#title { + line-height: 35px; +} + +.com-name #title{ + font-size: 19px; +} + +.lists #title{ + font-size: 19px; +} + +.lists ul li{ + list-style: none; + line-height: 25px; +} + + +.copyright { + display: flex; + align-items: center; + justify-content: center; + height: 40px; +} + +.copyright a{ + font-weight: 700; +} + +.copyright a:hover { + color: #7FD6C2; + scale: 0.95; + transition: all 0.4s ease; } /* default elements style */ @@ -149,4 +240,14 @@ input { button { border-style: none; +} + +a { + text-decoration: none; + color: whitesmoke; +} + +hr { + /* color: grey; */ + background-color: grey; } \ No newline at end of file