diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 4dcb439..eb32792 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -2,18 +2,18 @@ module.exports = { root: true, env: { browser: true, es2020: true }, extends: [ - 'eslint:recommended', - 'plugin:react/recommended', - 'plugin:react/jsx-runtime', - 'plugin:react-hooks/recommended', + "eslint:recommended", + "plugin:react/recommended", + "plugin:react/jsx-runtime", + "plugin:react-hooks/recommended", ], - ignorePatterns: ['dist', '.eslintrc.cjs'], - parserOptions: { ecmaVersion: 'latest', sourceType: 'module' }, - settings: { react: { version: '18.2' } }, - plugins: ['react-refresh'], + ignorePatterns: ["dist", ".eslintrc.cjs"], + parserOptions: { ecmaVersion: "latest", sourceType: "module" }, + settings: { react: { version: "18.2" } }, + plugins: ["react-refresh"], rules: { - 'react-refresh/only-export-components': [ - 'warn', + "react-refresh/only-export-components": [ + "warn", { allowConstantExport: true }, ], }, diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4192ead..f379e6c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,7 +3,7 @@ name: Deploy to GitHub Pages on: # Runs on pushes targeting the default branch push: - branches: ['main', 'temp'] + branches: ["main", "temp"] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -16,7 +16,7 @@ permissions: # Allow one concurrent deployment concurrency: - group: 'pages' + group: "pages" cancel-in-progress: true jobs: @@ -63,7 +63,7 @@ jobs: uses: actions/upload-pages-artifact@v1 with: # Upload dist repository - path: './dist' + path: "./dist" - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v1 \ No newline at end of file + uses: actions/deploy-pages@v1 diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000..2312dc5 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +npx lint-staged diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..1a0e33f --- /dev/null +++ b/.prettierignore @@ -0,0 +1,26 @@ +dist +build +coverage +.husky +.huskyrc +*.lockb + +*.png +*.jpg +*.jpeg +*.webp +*.ico + +.gitignore +.prettierignore +LICENSE + + +.next +.cache +package-lock.json +public +node_modules +next-env.d.ts +next.config.ts +yarn.lock \ No newline at end of file diff --git a/.prettierrc.yaml b/.prettierrc.yaml new file mode 100644 index 0000000..3170064 --- /dev/null +++ b/.prettierrc.yaml @@ -0,0 +1,14 @@ +bracketSpacing: true +endOfLine: lf +printWidth: 80 +semi: false +singleQuote: false +trailingComma: all + +overrides: + - files: "*.svg" + options: + parser: "html" + - files: "*.xml" + options: + parser: "html" diff --git a/index.html b/index.html index e43b637..92ae016 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,4 @@ - + @@ -9,7 +9,10 @@ href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet" /> - + ALiAS diff --git a/package.json b/package.json index b70e4d8..9fee75e 100644 --- a/package.json +++ b/package.json @@ -6,9 +6,11 @@ "scripts": { "dev": "vite", "build": "vite build", - "upload" : "gh-pages -d dist", "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", - "preview": "vite preview" + "preview": "vite preview", + "check": "prettier --check \"**/*\"", + "format": "prettier --write \"**/*\"", + "prepare": "husky" }, "dependencies": { "gh-pages": "^6.0.0", @@ -23,6 +25,19 @@ "eslint-plugin-react": "^7.32.2", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.3", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-prettier": "^5.1.3", + "husky": "^9.0.11", + "lint-staged": "^15.2.2", + "prettier": "^3.2.5", "vite": "^4.4.5" + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "**/*": "prettier --write --ignore-unknown" } } diff --git a/src/App.jsx b/src/App.jsx index f9a5d48..b35ee84 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,8 +1,7 @@ -import './App.css' -import Home from './pages/Home/Home' +import "./App.css" +import Home from "./pages/Home/Home" function App() { - return ( <> diff --git a/src/components/AboutUs/AboutUs.jsx b/src/components/AboutUs/AboutUs.jsx index eca195f..9aabec2 100644 --- a/src/components/AboutUs/AboutUs.jsx +++ b/src/components/AboutUs/AboutUs.jsx @@ -1,6 +1,6 @@ -import { useState, useEffect } from "react"; -import AboutItem from "../Reusables/AboutItem/AboutItem"; -import styles from "./AboutUs.module.css"; +import { useState, useEffect } from "react" +import AboutItem from "../Reusables/AboutItem/AboutItem" +import styles from "./AboutUs.module.css" /** * Fetches data from "/data/about.json" and sets the fetched data in the component's state. @@ -8,16 +8,16 @@ import styles from "./AboutUs.module.css"; * @return {JSX.Element} The rendered AboutUs component. */ const AboutUs = () => { - const [data, setData] = useState([]); + const [data, setData] = useState([]) - useEffect( () => { - fetchData(); - }, []); + useEffect(() => { + fetchData() + }, []) async function fetchData() { - const response = await fetch("data/about.json"); - const data = await response.json(); - setData(data); + const response = await fetch("data/about.json") + const data = await response.json() + setData(data) } return ( @@ -34,11 +34,11 @@ const AboutUs = () => { title={item.title} description={item.description} /> - ); + ) })} - ); -}; + ) +} -export default AboutUs; +export default AboutUs diff --git a/src/components/AboutUs/AboutUs.module.css b/src/components/AboutUs/AboutUs.module.css index 6bed51d..6b14dfa 100644 --- a/src/components/AboutUs/AboutUs.module.css +++ b/src/components/AboutUs/AboutUs.module.css @@ -27,11 +27,10 @@ .aboutus__container { flex-direction: column; align-items: center; - margin: var(--margin-medium) + margin: var(--margin-medium); } } - @media screen and (max-width: 430px) { .aboutus__container { flex-direction: column; diff --git a/src/components/Alumni/Alumni.jsx b/src/components/Alumni/Alumni.jsx index 40bc510..6255398 100644 --- a/src/components/Alumni/Alumni.jsx +++ b/src/components/Alumni/Alumni.jsx @@ -1,7 +1,7 @@ -import { useState, useEffect } from "react"; -import styles from "./Alumni.module.css"; -import Carousel from "../Reusables/Carousel/Carousel"; -import AlumniItem from "../Reusables/AlumniItem/AlumniItem"; +import { useState, useEffect } from "react" +import styles from "./Alumni.module.css" +import Carousel from "../Reusables/Carousel/Carousel" +import AlumniItem from "../Reusables/AlumniItem/AlumniItem" /** * Fetches data from "/data/alumni.json" and sets the fetched data in the component's state. @@ -9,16 +9,16 @@ import AlumniItem from "../Reusables/AlumniItem/AlumniItem"; * @return {JSX.Element} The rendered Alumni component. */ const Alumni = () => { - const [data, setData] = useState([]); + const [data, setData] = useState([]) useEffect(() => { - fetchData(); - }, []); + fetchData() + }, []) async function fetchData() { - const response = await fetch("data/alumni.json"); - const data = await response.json(); - setData(data); + const response = await fetch("data/alumni.json") + const data = await response.json() + setData(data) } return ( @@ -38,11 +38,11 @@ const Alumni = () => { quote={item.quote} socials={item.social} /> - ); + ) })} /> - ); -}; + ) +} -export default Alumni; +export default Alumni diff --git a/src/components/Alumni/Alumni.module.css b/src/components/Alumni/Alumni.module.css index b69bf72..3aa6d7b 100644 --- a/src/components/Alumni/Alumni.module.css +++ b/src/components/Alumni/Alumni.module.css @@ -6,7 +6,6 @@ --items: 2; } - .alumni__title { color: white; font-weight: 800; @@ -20,14 +19,13 @@ color: transparent; } - @media screen and (max-width: 1400px) { .alumni { --items: 1.8; } } -@media screen and (max-width: 1315px ) { +@media screen and (max-width: 1315px) { .alumni { --items: 1.65; } @@ -49,7 +47,6 @@ .alumni { --items: 1.2; } - } @media screen and (max-width: 1024px) { @@ -57,8 +54,3 @@ --items: 1; } } - - - - - diff --git a/src/components/Community/Community.jsx b/src/components/Community/Community.jsx index 7701b25..2292e7f 100644 --- a/src/components/Community/Community.jsx +++ b/src/components/Community/Community.jsx @@ -1,5 +1,5 @@ -import { useState, useEffect } from "react"; -import styles from "./Community.module.css"; +import { useState, useEffect } from "react" +import styles from "./Community.module.css" /** * @return {JSX.Element} The rendered Community component. @@ -9,7 +9,11 @@ const Community = () => {

Our - Community Partners! + + {" "} + Community + {" "} + Partners!

@@ -32,8 +36,8 @@ const Community = () => { src="assets/images/communities/ilugd.png" alt="India Linux User Group" /> - - + + {
- ); -}; + ) +} -export default Community; +export default Community diff --git a/src/components/Community/Community.module.css b/src/components/Community/Community.module.css index 5f799ee..c017e30 100644 --- a/src/components/Community/Community.module.css +++ b/src/components/Community/Community.module.css @@ -71,4 +71,4 @@ width: 70%; margin: var(--margin-medium) 0; } -} \ No newline at end of file +} diff --git a/src/components/Contact/Contact.jsx b/src/components/Contact/Contact.jsx index 86e031e..ac32ad0 100644 --- a/src/components/Contact/Contact.jsx +++ b/src/components/Contact/Contact.jsx @@ -1,5 +1,5 @@ -import { useState, useEffect } from "react"; -import styles from "./Contact.module.css"; +import { useState, useEffect } from "react" +import styles from "./Contact.module.css" /** * Fetches data from "/data/socials.json" and sets the fetched data in the component's state. @@ -7,16 +7,16 @@ import styles from "./Contact.module.css"; * @return {JSX.Element} The rendered Contact component. */ const Contact = () => { - const [data, setData] = useState([]); + const [data, setData] = useState([]) useEffect(() => { - fetchData(); - }, []); + fetchData() + }, []) async function fetchData() { - const response = await fetch("data/socials.json"); - const data = await response.json(); - setData(data); + const response = await fetch("data/socials.json") + const data = await response.json() + setData(data) } return ( @@ -35,11 +35,15 @@ const Contact = () => { alt={item.id} /> - ); + ) })}
- + {

- forked with {" "} -  ❤  from ALiAS Lucknow + forked with{" "} +  ❤  from{" "} + ALiAS Lucknow

- ); -}; + ) +} -export default Contact; +export default Contact diff --git a/src/components/Contact/Contact.module.css b/src/components/Contact/Contact.module.css index 97f25e5..e47db5f 100644 --- a/src/components/Contact/Contact.module.css +++ b/src/components/Contact/Contact.module.css @@ -66,7 +66,9 @@ .contact__heart { color: red; - text-shadow: 0 0 10px var(--color-accent), 0 0 20px var(--color-accent); + text-shadow: + 0 0 10px var(--color-accent), + 0 0 20px var(--color-accent); } @media screen and (max-width: 768px) { @@ -114,4 +116,4 @@ font-size: var(--font-small); margin: var(--margin-medium) 0; } -} \ No newline at end of file +} diff --git a/src/components/Events/Events.jsx b/src/components/Events/Events.jsx index ee8d4de..774d28c 100644 --- a/src/components/Events/Events.jsx +++ b/src/components/Events/Events.jsx @@ -1,7 +1,7 @@ -import { useState, useEffect } from "react"; -import EventItem from "../Reusables/EventItem/EventItem"; -import styles from "./Events.module.css"; -import Carousel from "../Reusables/Carousel/Carousel"; +import { useState, useEffect } from "react" +import EventItem from "../Reusables/EventItem/EventItem" +import styles from "./Events.module.css" +import Carousel from "../Reusables/Carousel/Carousel" /** * Fetches data from "/data/events.json" and sets the fetched data in the component's state. @@ -9,16 +9,16 @@ import Carousel from "../Reusables/Carousel/Carousel"; * @return {JSX.Element} The rendered Events component. */ const Events = () => { - const [data, setData] = useState([]); + const [data, setData] = useState([]) useEffect(() => { - fetchData(); - }, []); + fetchData() + }, []) async function fetchData() { - const response = await fetch("data/events.json"); - const data = await response.json(); - setData(data); + const response = await fetch("data/events.json") + const data = await response.json() + setData(data) } return ( @@ -42,11 +42,11 @@ const Events = () => { register={item.register} gallery={item.gallery} /> - ); + ) })} /> - ); -}; + ) +} -export default Events; +export default Events diff --git a/src/components/Hero/Hero.jsx b/src/components/Hero/Hero.jsx index a627618..7e1e8f8 100644 --- a/src/components/Hero/Hero.jsx +++ b/src/components/Hero/Hero.jsx @@ -1,5 +1,5 @@ /* eslint-disable react/jsx-no-comment-textnodes */ -import styles from "./Hero.module.css"; +import styles from "./Hero.module.css" /** * Renders the Hero component. @@ -11,11 +11,12 @@ const Hero = () => {

- Where {" "} - Open Source meets people + Where Open Source{" "} + meets people

- </ALiAS is the largest open source community in Amity. We aim to foster and fuel hacker culture across the city/> + </ALiAS is the largest open source community in Amity. We aim to + foster and fuel hacker culture across the city/>

{ />
@@ -38,7 +43,7 @@ const Hero = () => {
- ); -}; + ) +} -export default Hero; +export default Hero diff --git a/src/components/Hero/Hero.module.css b/src/components/Hero/Hero.module.css index 4ad25a8..5df9668 100644 --- a/src/components/Hero/Hero.module.css +++ b/src/components/Hero/Hero.module.css @@ -46,8 +46,12 @@ font-size: var(--font-medium); font-weight: 600; color: var(--color-accent); - text-shadow: 0 0 10px var(--color-accent), 0 0 20px var(--color-accent); - box-shadow: inset 0 0 10px var(--color-accent), 0 0 15px var(--color-accent); + text-shadow: + 0 0 10px var(--color-accent), + 0 0 20px var(--color-accent); + box-shadow: + inset 0 0 10px var(--color-accent), + 0 0 15px var(--color-accent); cursor: pointer; transition: all 0.1s; opacity: 0.8; diff --git a/src/components/Navbar/Navbar.jsx b/src/components/Navbar/Navbar.jsx index 2350c66..09ac40e 100644 --- a/src/components/Navbar/Navbar.jsx +++ b/src/components/Navbar/Navbar.jsx @@ -1,5 +1,5 @@ -import React from "react"; -import styles from "./Navbar.module.css"; +import React from "react" +import styles from "./Navbar.module.css" /** * Renders the Navbar component. @@ -8,21 +8,21 @@ import styles from "./Navbar.module.css"; */ const Navbar = () => { // Set up state to track scrolling - const [scrolling, setScrolling] = React.useState(false); + const [scrolling, setScrolling] = React.useState(false) // Toggle navbar - const [open, setOpen] = React.useState(false); + const [open, setOpen] = React.useState(false) const handleClickScroll = (e) => { - const element = document.getElementById(e); + const element = document.getElementById(e) setOpen(false) if (element) { - element.scrollIntoView({ behavior: "smooth" }); + element.scrollIntoView({ behavior: "smooth" }) } - }; + } const handleNavbarToggle = () => { - setOpen(!open); - }; + setOpen(!open) + } // Add event listener to track scroll position on component mount React.useEffect(() => { @@ -30,25 +30,25 @@ const Navbar = () => { // If the scroll position is greater than 100, set scrolling to true // Otherwise, set scrolling to false if (window.scrollY > 100) { - setScrolling(true); + setScrolling(true) } else { - setScrolling(false); + setScrolling(false) } - }; + } - window.addEventListener("scroll", handleScroll); + window.addEventListener("scroll", handleScroll) if (open) { - document.body.style.overflow = "hidden"; + document.body.style.overflow = "hidden" } else { - document.body.style.overflow = "auto"; + document.body.style.overflow = "auto" } // Remove the event listener on component unmount return () => { - window.removeEventListener("scroll", handleScroll); - }; - }, [open]); + window.removeEventListener("scroll", handleScroll) + } + }, [open]) // Render the Navbar component return ( @@ -87,7 +87,9 @@ const Navbar = () => {
- ); -}; + ) +} -export default Navbar; +export default Navbar diff --git a/src/components/Reusables/AboutItem/AboutItem.jsx b/src/components/Reusables/AboutItem/AboutItem.jsx index 3c4ce9c..693ddd9 100644 --- a/src/components/Reusables/AboutItem/AboutItem.jsx +++ b/src/components/Reusables/AboutItem/AboutItem.jsx @@ -1,5 +1,5 @@ /* eslint-disable react/prop-types */ -import styles from './AboutItem.module.css' +import styles from "./AboutItem.module.css" /** * Renders an about item component. @@ -10,14 +10,14 @@ import styles from './AboutItem.module.css' * @param {string} props.description - The description of the item. * @return {JSX.Element} The about item component. */ -const AboutItem = ({image, title, description}) => { +const AboutItem = ({ image, title, description }) => { return (
- item -

{title}

-

{description}

+ item +

{title}

+

{description}

) } -export default AboutItem \ No newline at end of file +export default AboutItem diff --git a/src/components/Reusables/AboutItem/AboutItem.module.css b/src/components/Reusables/AboutItem/AboutItem.module.css index e425760..d96bae0 100644 --- a/src/components/Reusables/AboutItem/AboutItem.module.css +++ b/src/components/Reusables/AboutItem/AboutItem.module.css @@ -1,53 +1,53 @@ .about_item { - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - margin: var(--margin-medium); - width: 30%; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + margin: var(--margin-medium); + width: 30%; } .about_item__image { - height: 200px; - width: 200px; - border-radius: 50%; + height: 200px; + width: 200px; + border-radius: 50%; } .about_item__title { - font-size: var(--font-medium); - color: white; - font-weight: 700; + font-size: var(--font-medium); + color: white; + font-weight: 700; } .about_item__description { - font-size: var(--font-medium-s); - color: white; - font-weight: 400; - text-align: center; + font-size: var(--font-medium-s); + color: white; + font-weight: 400; + text-align: center; } -@media screen and (max-width: 1024px) { - .about_item { - width: 70%; - margin: var(--margin-medium) 0; - } +@media screen and (max-width: 1024px) { + .about_item { + width: 70%; + margin: var(--margin-medium) 0; + } - .about_item__title { - font-size: var(--font-medium-sm); - } + .about_item__title { + font-size: var(--font-medium-sm); + } - .about_item__description { - font-size: var(--font-small); - } + .about_item__description { + font-size: var(--font-small); + } } @media screen and (max-width: 625px) { - .about_item { - width: 100%; - } - - .about_item__image { - height: 150px; - width: 150px; - } + .about_item { + width: 100%; + } + + .about_item__image { + height: 150px; + width: 150px; + } } diff --git a/src/components/Reusables/AlumniItem/AlumniItem.jsx b/src/components/Reusables/AlumniItem/AlumniItem.jsx index d430783..36a8d02 100644 --- a/src/components/Reusables/AlumniItem/AlumniItem.jsx +++ b/src/components/Reusables/AlumniItem/AlumniItem.jsx @@ -1,6 +1,6 @@ /* eslint-disable react/prop-types */ -import SocialRow from "../SocialRow/SocialRow"; -import styles from "./AlumniItem.module.css"; +import SocialRow from "../SocialRow/SocialRow" +import styles from "./AlumniItem.module.css" /** * Renders an individual alumni item component. @@ -30,7 +30,7 @@ const AlumniItem = ({ image, firstName, lastName, quote, socials }) => { {socials && } - ); -}; + ) +} -export default AlumniItem; +export default AlumniItem diff --git a/src/components/Reusables/AlumniItem/AlumniItem.module.css b/src/components/Reusables/AlumniItem/AlumniItem.module.css index 8fed081..11c1a79 100644 --- a/src/components/Reusables/AlumniItem/AlumniItem.module.css +++ b/src/components/Reusables/AlumniItem/AlumniItem.module.css @@ -17,7 +17,11 @@ width: 18rem; border-radius: 50%; z-index: 1; - background: linear-gradient(180deg, rgb(255, 255, 255) 40%, rgba(0,0,0,1) 100%); + background: linear-gradient( + 180deg, + rgb(255, 255, 255) 40%, + rgba(0, 0, 0, 1) 100% + ); } .alumni_item__img { @@ -60,7 +64,8 @@ height: 10rem; width: 16rem; padding: var(--margin-small); - box-shadow: inset var(--color-accent) 0 0 30px 0, + box-shadow: + inset var(--color-accent) 0 0 30px 0, var(--color-accent) 0px 0px 30px 0px; background-color: #61adfe1c; } diff --git a/src/components/Reusables/Carousel/Carousel.jsx b/src/components/Reusables/Carousel/Carousel.jsx index 8e531ca..987727b 100644 --- a/src/components/Reusables/Carousel/Carousel.jsx +++ b/src/components/Reusables/Carousel/Carousel.jsx @@ -1,5 +1,5 @@ /* eslint-disable react/prop-types */ -import styles from "./Carousel.module.css"; +import styles from "./Carousel.module.css" /** * Renders an individual carousel component. @@ -11,31 +11,35 @@ import styles from "./Carousel.module.css"; */ const Carousel = ({ id, props }) => { const handleClickScrollLeft = (e) => { - const carousel = document.getElementById(e); + const carousel = document.getElementById(e) if (carousel) { carousel.scrollBy({ left: -carousel.offsetWidth, behavior: "smooth", - }); + }) } - }; + } const handleClickScrollRight = (e) => { - const carousel = document.getElementById(e); + const carousel = document.getElementById(e) if (carousel) { carousel.scrollBy({ left: carousel.offsetWidth, behavior: "smooth", - }); + }) } - }; + } return (
{props} @@ -44,10 +48,14 @@ const Carousel = ({ id, props }) => { className={styles.carousel__button__right} onClick={() => handleClickScrollRight(id)} > - arrow + arrow
- ); -}; + ) +} -export default Carousel; +export default Carousel diff --git a/src/components/Reusables/Carousel/Carousel.module.css b/src/components/Reusables/Carousel/Carousel.module.css index 477d331..c0f9990 100644 --- a/src/components/Reusables/Carousel/Carousel.module.css +++ b/src/components/Reusables/Carousel/Carousel.module.css @@ -62,7 +62,6 @@ .carousel__button__right { display: none; } - } @media screen and (max-width: 625px) { @@ -74,7 +73,6 @@ .carousel { margin-left: var(--gap); } - } @media screen and (max-width: 426px) { diff --git a/src/components/Reusables/EventItem/EventItem.jsx b/src/components/Reusables/EventItem/EventItem.jsx index 3f89da8..485d350 100644 --- a/src/components/Reusables/EventItem/EventItem.jsx +++ b/src/components/Reusables/EventItem/EventItem.jsx @@ -1,5 +1,5 @@ /* eslint-disable react/prop-types */ -import styles from "./EventItem.module.css"; +import styles from "./EventItem.module.css" /** * Renders an individual event item component. @@ -14,7 +14,16 @@ import styles from "./EventItem.module.css"; * @param {string} props.register - The link to register for the event. * @returns {JSX.Element} - The rendered event item component. */ -const EventItem = ({ image, title, date, time, venue, about, register, gallery}) => { +const EventItem = ({ + image, + title, + date, + time, + venue, + about, + register, + gallery, +}) => { return (
@@ -63,7 +72,8 @@ const EventItem = ({ image, title, date, time, venue, about, register, gallery}) Register - )}, + )} + , {gallery && (
- ); -}; + ) +} -export default EventItem; +export default EventItem diff --git a/src/components/Reusables/EventItem/EventItem.module.css b/src/components/Reusables/EventItem/EventItem.module.css index 3da10e5..acc1adb 100644 --- a/src/components/Reusables/EventItem/EventItem.module.css +++ b/src/components/Reusables/EventItem/EventItem.module.css @@ -57,7 +57,6 @@ width: 100%; } - .content { height: 100%; width: 100%; @@ -162,7 +161,6 @@ height: 40rem; aspect-ratio: inherit; } - } @media screen and (max-width: 430px) { @@ -199,4 +197,4 @@ padding: 5px; filter: blur(20px); } -} \ No newline at end of file +} diff --git a/src/components/Reusables/SocialRow/SocialRow.jsx b/src/components/Reusables/SocialRow/SocialRow.jsx index 800705b..3b432b0 100644 --- a/src/components/Reusables/SocialRow/SocialRow.jsx +++ b/src/components/Reusables/SocialRow/SocialRow.jsx @@ -1,5 +1,5 @@ /* eslint-disable react/prop-types */ -import styles from "./SocialRow.module.css"; +import styles from "./SocialRow.module.css" /** * Renders an individual social row component. @@ -20,10 +20,10 @@ const SocialRow = ({ socials }) => { alt={item.id} /> - ); + ) })}
- ); -}; + ) +} -export default SocialRow; +export default SocialRow diff --git a/src/components/Reusables/TeamItem/TeamItem.jsx b/src/components/Reusables/TeamItem/TeamItem.jsx index 25e66de..eaf42ca 100644 --- a/src/components/Reusables/TeamItem/TeamItem.jsx +++ b/src/components/Reusables/TeamItem/TeamItem.jsx @@ -1,6 +1,6 @@ /* eslint-disable react/prop-types */ -import SocialRow from "../SocialRow/SocialRow"; -import styles from "./TeamItem.module.css"; +import SocialRow from "../SocialRow/SocialRow" +import styles from "./TeamItem.module.css" /** * Renders an individual team item component. @@ -24,7 +24,7 @@ const TeamItem = ({ image, name, role, socials }) => { - ); -}; + ) +} -export default TeamItem; +export default TeamItem diff --git a/src/components/Reusables/TeamItem/TeamItem.module.css b/src/components/Reusables/TeamItem/TeamItem.module.css index 6d300f8..4b10c05 100644 --- a/src/components/Reusables/TeamItem/TeamItem.module.css +++ b/src/components/Reusables/TeamItem/TeamItem.module.css @@ -68,4 +68,4 @@ .team { height: 25rem; } -} \ No newline at end of file +} diff --git a/src/components/Team/Team.jsx b/src/components/Team/Team.jsx index 0eab965..809112f 100644 --- a/src/components/Team/Team.jsx +++ b/src/components/Team/Team.jsx @@ -1,7 +1,7 @@ -import { useState, useEffect } from "react"; -import styles from "./Team.module.css"; -import Carousel from "../Reusables/Carousel/Carousel"; -import TeamItem from "../Reusables/TeamItem/TeamItem"; +import { useState, useEffect } from "react" +import styles from "./Team.module.css" +import Carousel from "../Reusables/Carousel/Carousel" +import TeamItem from "../Reusables/TeamItem/TeamItem" /** * Fetches data from "/data/members.json" and sets the fetched data in the component's state. @@ -9,16 +9,16 @@ import TeamItem from "../Reusables/TeamItem/TeamItem"; * @return {JSX.Element} The rendered Team component. */ const Team = () => { - const [data, setData] = useState([]); + const [data, setData] = useState([]) useEffect(() => { - fetchData(); - }, []); + fetchData() + }, []) async function fetchData() { - const response = await fetch("data/members.json"); - const data = await response.json(); - setData(data); + const response = await fetch("data/members.json") + const data = await response.json() + setData(data) } return ( @@ -38,11 +38,11 @@ const Team = () => { role={item.role} socials={item.social} /> - ); + ) })} /> - ); -}; + ) +} -export default Team; +export default Team diff --git a/src/index.css b/src/index.css index 662daed..c4c88ca 100644 --- a/src/index.css +++ b/src/index.css @@ -1,7 +1,7 @@ -@import 'variables.css'; +@import "variables.css"; :root { - font-family: 'Montserrat', sans-serif; + font-family: "Montserrat", sans-serif; line-height: 1.5; font-weight: 400; background: url(/assets/images/bg.png) repeat 0 0; @@ -53,7 +53,7 @@ h2 { } button { - font-family: 'Montserrat', sans-serif; + font-family: "Montserrat", sans-serif; } @media screen and (max-width: 1024px) { @@ -75,4 +75,4 @@ button { } @media screen and (max-width: 320px) { -} \ No newline at end of file +} diff --git a/src/main.jsx b/src/main.jsx index 54b39dd..d41af92 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -1,9 +1,9 @@ -import React from 'react' -import ReactDOM from 'react-dom/client' -import App from './App.jsx' -import './index.css' +import React from "react" +import ReactDOM from "react-dom/client" +import App from "./App.jsx" +import "./index.css" -ReactDOM.createRoot(document.getElementById('root')).render( +ReactDOM.createRoot(document.getElementById("root")).render( , diff --git a/src/pages/Home/Home.jsx b/src/pages/Home/Home.jsx index 188b2d7..52167ab 100644 --- a/src/pages/Home/Home.jsx +++ b/src/pages/Home/Home.jsx @@ -1,13 +1,13 @@ -import AboutUs from '../../components/AboutUs/AboutUs' -import Alumni from '../../components/Alumni/Alumni' -import Contact from '../../components/Contact/Contact' -import Events from '../../components/Events/Events' -import Hero from '../../components/Hero/Hero' -import Navbar from '../../components/Navbar/Navbar' -import Team from '../../components/Team/Team' -import Community from '../../components/Community/Community' +import AboutUs from "../../components/AboutUs/AboutUs" +import Alumni from "../../components/Alumni/Alumni" +import Contact from "../../components/Contact/Contact" +import Events from "../../components/Events/Events" +import Hero from "../../components/Hero/Hero" +import Navbar from "../../components/Navbar/Navbar" +import Team from "../../components/Team/Team" +import Community from "../../components/Community/Community" -import styles from './Home.module.css' +import styles from "./Home.module.css" /** * Renders the home page component. @@ -17,16 +17,16 @@ import styles from './Home.module.css' const Home = () => { return (
- - - - - - - - + + + + + + + +
) } -export default Home \ No newline at end of file +export default Home diff --git a/src/pages/Home/Home.module.css b/src/pages/Home/Home.module.css index 49a8008..b9b1b37 100644 --- a/src/pages/Home/Home.module.css +++ b/src/pages/Home/Home.module.css @@ -1,5 +1,5 @@ .home__container { - display: flex; - flex-direction: column; - height: 100vh; -} \ No newline at end of file + display: flex; + flex-direction: column; + height: 100vh; +} diff --git a/src/variables.css b/src/variables.css index 583fcb6..0ed7e25 100644 --- a/src/variables.css +++ b/src/variables.css @@ -1,29 +1,30 @@ :root { - - --color-accent: #61acfe; - --color-gradient:linear-gradient(90deg, + --color-accent: #61acfe; + --color-gradient: linear-gradient( + 90deg, rgba(95, 189, 255, 1) 0%, - rgba(105, 112, 250, 1) 80%); + rgba(105, 112, 250, 1) 80% + ); - --font-large-l: 6rem; - --font-large: 4rem; - --font-medium-lm: 3rem; - --font-medium-large: 2.5rem; - --font-medium: 2rem; - --font-medium-sm: 1.5rem; - --font-medium-s: 1.25rem; - --font-small: 1rem; - --font-small-s: 0.75rem; + --font-large-l: 6rem; + --font-large: 4rem; + --font-medium-lm: 3rem; + --font-medium-large: 2.5rem; + --font-medium: 2rem; + --font-medium-sm: 1.5rem; + --font-medium-s: 1.25rem; + --font-small: 1rem; + --font-small-s: 0.75rem; - --margin-large-xxl: 14rem; - --margin-large-xl: 10rem; - --margin-large-l: 6rem; - --margin-large: 4rem; - --margin-medium-lm: 3rem; - --margin-medium-large: 2.5rem; - --margin-medium: 2rem; - --margin-medium-sm: 1.5rem; - --margin-medium-s: 1.25rem; - --margin-small: 1rem; - --margin-small-s: 0.75rem; - } \ No newline at end of file + --margin-large-xxl: 14rem; + --margin-large-xl: 10rem; + --margin-large-l: 6rem; + --margin-large: 4rem; + --margin-medium-lm: 3rem; + --margin-medium-large: 2.5rem; + --margin-medium: 2rem; + --margin-medium-sm: 1.5rem; + --margin-medium-s: 1.25rem; + --margin-small: 1rem; + --margin-small-s: 0.75rem; +} diff --git a/vite.config.js b/vite.config.js index 861b04b..9078ea5 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,5 +1,5 @@ -import { defineConfig } from 'vite' -import react from '@vitejs/plugin-react-swc' +import { defineConfig } from "vite" +import react from "@vitejs/plugin-react-swc" // https://vitejs.dev/config/ export default defineConfig({