From 1c410e8555f7d86109fe19ef7e12cfe243c6d64b Mon Sep 17 00:00:00 2001 From: Dhrutinandan Swain Date: Sun, 20 Oct 2024 13:58:39 +0530 Subject: [PATCH 1/3] refactor: minor ui update --- src/components/EventsSection/Header.jsx/SubHeader.jsx | 4 ++-- .../EventsSection/eventCardComponents/EventCard.jsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/EventsSection/Header.jsx/SubHeader.jsx b/src/components/EventsSection/Header.jsx/SubHeader.jsx index fb7d3283..21844531 100644 --- a/src/components/EventsSection/Header.jsx/SubHeader.jsx +++ b/src/components/EventsSection/Header.jsx/SubHeader.jsx @@ -22,13 +22,13 @@ export const SubHeader = () => { }, 23); const daysInterval = setInterval(() => { - if (daysStart < 43) { + if (daysStart < 3) { daysStart += 1; setDaysCount(daysStart); } else { clearInterval(daysInterval); } - }, 40); + }, 150); return () => { clearInterval(eventsInterval); diff --git a/src/components/EventsSection/eventCardComponents/EventCard.jsx b/src/components/EventsSection/eventCardComponents/EventCard.jsx index 6272c542..c3f4653d 100644 --- a/src/components/EventsSection/eventCardComponents/EventCard.jsx +++ b/src/components/EventsSection/eventCardComponents/EventCard.jsx @@ -13,7 +13,7 @@ export const EventCard = ({ label, isTranslatedUp }) => { }} className=' w-[270px] xxsm:w-[310px] xsm:w-[347px] h-[416px] flex justify-center items-center text-[24px] font-spaceX leading-[37px] break-words text-center rounded-3xl' > - alt + alt ); From 34250dee827096576eb0110820f616df67f3e5e3 Mon Sep 17 00:00:00 2001 From: Dhrutinandan Swain Date: Sun, 20 Oct 2024 16:42:57 +0530 Subject: [PATCH 2/3] feat: add modals for terms&conditions and code of conduct --- src/components/Marginals/Footer/Footer.jsx | 43 +++++++++++++---- .../ModalComponents/CodeOfConductModal.jsx | 47 +++++++++++++++++++ .../Footer/{ => ModalComponents}/MapModal.jsx | 2 +- .../PaymentPolicyModel.jsx | 2 +- .../TermAndConditionsModal.jsx | 47 +++++++++++++++++++ src/config/content/Footer.js | 36 ++++++++++++++ 6 files changed, 167 insertions(+), 10 deletions(-) create mode 100644 src/components/Marginals/Footer/ModalComponents/CodeOfConductModal.jsx rename src/components/Marginals/Footer/{ => ModalComponents}/MapModal.jsx (96%) rename src/components/Marginals/Footer/{ => ModalComponents}/PaymentPolicyModel.jsx (96%) create mode 100644 src/components/Marginals/Footer/ModalComponents/TermAndConditionsModal.jsx diff --git a/src/components/Marginals/Footer/Footer.jsx b/src/components/Marginals/Footer/Footer.jsx index 6f6feb47..c995c352 100644 --- a/src/components/Marginals/Footer/Footer.jsx +++ b/src/components/Marginals/Footer/Footer.jsx @@ -1,7 +1,7 @@ import Image from 'next/image'; import { socials, secondcol, thirdcol, footerBottom, firstcol } from '@/config/content/Footer'; import Link from 'next/link'; -import MapModal from './MapModal'; +import MapModal from './ModalComponents/MapModal'; import { List, SmallList } from '../../shared/Typography/Lists'; import { @@ -27,13 +27,25 @@ import { SocialImageContainer, } from './styles'; import { LogoText2 } from '../../shared/Typography/Headings'; -import { PaymentPolicyModal } from './PaymentPolicyModel'; +import { PaymentPolicyModal } from './ModalComponents/PaymentPolicyModel'; +import { CodeOfConductModal } from './ModalComponents/CodeOfConductModal'; +import { TermAndConditionModal } from './ModalComponents/TermAndConditionsModal'; import { useState } from 'react'; export const Footer = () => { - const [isRegisterModalOpen, setIsRegisterModalOpen] = useState(false); - const handleRegisterModalOpen = () => setIsRegisterModalOpen(true); - const handleRegisterModalClose = () => setIsRegisterModalOpen(false); + const [isCodeOfConductModalOpen, setIsCodeOfConductModalOpen] = useState(false); + const [isPaymentPolicyModalOpen, setIsPaymentPolicyModalOpen] = useState(false); + const [isTermsAndConditionsModalOpen, setIsTermsAndConditionsModalOpen] = useState(false); + + const handleCodeOfConductModalOpen = () => setIsCodeOfConductModalOpen(true); + const handleCodeOfConductModalClose = () => setIsCodeOfConductModalOpen(false); + + const handlePaymentPolicyModalOpen = () => setIsPaymentPolicyModalOpen(true); + const handlePaymentPolicyModalClose = () => setIsPaymentPolicyModalOpen(false); + + const handleTermsAndConditionsModalOpen = () => setIsTermsAndConditionsModalOpen(true); + const handleTermsAndConditionsModalClose = () => setIsTermsAndConditionsModalOpen(false); + return ( <> @@ -96,8 +108,12 @@ export const Footer = () => { {footerBottom.map((item) => ( - {item.id === 4 ? ( - + {item.id === 2 ? ( + + ) : item.id === 3 ? ( + + ) : item.id === 4 ? ( + ) : ( {item.title} @@ -109,7 +125,18 @@ export const Footer = () => { - + + + ); }; diff --git a/src/components/Marginals/Footer/ModalComponents/CodeOfConductModal.jsx b/src/components/Marginals/Footer/ModalComponents/CodeOfConductModal.jsx new file mode 100644 index 00000000..83efab8c --- /dev/null +++ b/src/components/Marginals/Footer/ModalComponents/CodeOfConductModal.jsx @@ -0,0 +1,47 @@ +import { Modal, ModalContent, ModalBody, Button } from '@nextui-org/react'; +import { Fragment } from 'react'; +import { closeIcon, CodeOfConductModalData } from '@/config/content/Footer'; +import Image from 'next/image'; +import { ModalText, Para } from '../styles'; + +export const CodeOfConductModal = ({ isOpen, onClose }) => { + return ( + + + + + {CodeOfConductModalData.map((items, index) => ( +
+ {items.title} + + {items.description.split('•').map((part, index) => ( + + {part} + {index < items.description.split('•').length - 1 &&
} + {index < items.description.split('•').length - 1 && '•'} +
+ ))} +
+
+ ))} +
+
+
+ ); +}; diff --git a/src/components/Marginals/Footer/MapModal.jsx b/src/components/Marginals/Footer/ModalComponents/MapModal.jsx similarity index 96% rename from src/components/Marginals/Footer/MapModal.jsx rename to src/components/Marginals/Footer/ModalComponents/MapModal.jsx index e1c11c21..ae428c74 100644 --- a/src/components/Marginals/Footer/MapModal.jsx +++ b/src/components/Marginals/Footer/ModalComponents/MapModal.jsx @@ -1,7 +1,7 @@ import { useState } from 'react'; import { Modal, ModalContent, ModalBody, Button } from '@nextui-org/react'; import Image from 'next/image'; -import { List } from '../../shared/Typography/Lists'; +import { List } from '../../../shared/Typography/Lists'; import { closeIcon, mapSize } from '@/config/content/Footer'; export default function MapModal() { diff --git a/src/components/Marginals/Footer/PaymentPolicyModel.jsx b/src/components/Marginals/Footer/ModalComponents/PaymentPolicyModel.jsx similarity index 96% rename from src/components/Marginals/Footer/PaymentPolicyModel.jsx rename to src/components/Marginals/Footer/ModalComponents/PaymentPolicyModel.jsx index 9736ded7..bd066d16 100644 --- a/src/components/Marginals/Footer/PaymentPolicyModel.jsx +++ b/src/components/Marginals/Footer/ModalComponents/PaymentPolicyModel.jsx @@ -1,7 +1,7 @@ import { Modal, ModalContent, ModalBody, Button } from '@nextui-org/react'; import { closeIcon, PaymentPolicyModalData } from '@/config/content/Footer'; import Image from 'next/image'; -import { ModalText, Para } from './styles'; +import { ModalText, Para } from '.././styles'; export const PaymentPolicyModal = ({ isOpen, onClose }) => { return ( diff --git a/src/components/Marginals/Footer/ModalComponents/TermAndConditionsModal.jsx b/src/components/Marginals/Footer/ModalComponents/TermAndConditionsModal.jsx new file mode 100644 index 00000000..c9986d68 --- /dev/null +++ b/src/components/Marginals/Footer/ModalComponents/TermAndConditionsModal.jsx @@ -0,0 +1,47 @@ +import { Modal, ModalContent, ModalBody, Button } from '@nextui-org/react'; +import { closeIcon, TermsAndConditionsModalData } from '@/config/content/Footer'; +import { Fragment } from 'react'; +import Image from 'next/image'; +import { ModalText, Para } from '../styles'; + +export const TermAndConditionModal = ({ isOpen, onClose }) => { + return ( + + + + + {TermsAndConditionsModalData.map((items, index) => ( +
+ {items.title} + + {items.description.split('●').map((part, index) => ( + + {part} + {index < items.description.split('●').length - 1 &&
} + {index < items.description.split('●').length - 1 && '●'} +
+ ))} +
+
+ ))} +
+
+
+ ); +}; diff --git a/src/config/content/Footer.js b/src/config/content/Footer.js index ce9044c9..96121d26 100644 --- a/src/config/content/Footer.js +++ b/src/config/content/Footer.js @@ -111,3 +111,39 @@ export const PaymentPolicyModalData = [ 'There will be no refund of the registration fees under any circumstances unless the fest is cancelled by team Innovision.', }, ]; + +export const CodeOfConductModalData = [ + { + title: 'CODE OF CONDUCT FOR INNOVISION 2024', + description: + '• Participants must comply with the event schedule and rules. • Consumption of alcohol or any narcotic substance is strictly prohibited. • All attendees are expected to behave respectfully and professionally. Any instance of a misdemeanour will not be tolerated.• If the actions of any individual are found destructive to property or any individual, rightful action would be taken. • All the participants must carry an ID card and necessary identification documents. • Any disrespectful remark or abuse would be liable to severe punishment. • The conference must not be used as a platform for promotion or any event unless determined by the fest organisers. • Buying and selling of things, equipment, or substances is prohibited. If any participant is found not complying with any of the aforementioned points, they will be subject to action according to the guidelines of NIT Rourkela.', + }, + { + title: 'CANCELLATION AND REFUNDS', + description: + '• The event organisers reserve the right to cancel or reschedule any event.• All the monetary transactions are non-refundable at all points in time.', + }, + { + title: 'CHANGES TO TERMS AND CONDITIONS', + description: + 'The event organisers may modify these terms and conditions at their discretion. Attendees will be notified of any changes.', + }, +]; + +export const TermsAndConditionsModalData = [ + { + title: 'Welcome to Innovision 2024!', + description: + 'The website linked gives you the outline of our protocols. If you agree to the set of terms and conditions you are welcomed as an entrant and will be redirected to proceed further.', + }, + { + title: 'Licence', + description: + 'Unless otherwise stated, Innovision and/or its licensors own the intellectual property rights for all material on Innovision 2024. All intellectual property rights are reserved. You may access this from Innovision 2024 for your personal use subject to restrictions set in these terms and conditions.You must not: ● Copy or republish material from Innovision 2024 ● Sell, rent, or sub-license material from Innovision 2024 ● Reproduce, duplicate or copy material from Innovision 2024 ● Redistribute content from Innovision 2024.This Agreement shall begin on the date hereof.', + }, + { + title: 'Disclaimer', + description: + 'To the maximum permitted visitors conduct, nothing in this disclaimer will: limit or exclude our or your liability for death or personal injury; limit or exclude our or your liability for fraud or fraudulent misrepresentation; limit any of our or your liabilities in any way that is not permitted under applicable law; or exclude any of our or your liabilities that may not be excluded under applicable law. The limitations and prohibitions of liability set in this section and elsewhere in this disclaimer: (a) are subject to the preceding paragraph; and (b) govern all liabilities arising under the disclaimer, including liabilities arising in contract, in tort, and for breach of statutory duty. As the website can be accessed by all verified visitors, we shall not uphold any liability for any damage.', + }, +]; From 4b716f261ee0cfe8a983fffdf4fc2fb6092439e5 Mon Sep 17 00:00:00 2001 From: Dhrutinandan Swain Date: Sun, 20 Oct 2024 18:18:49 +0530 Subject: [PATCH 3/3] refactor: add responivesness to events card in events page --- .../EventsPage/CardComponents/DetailsCard/DetailsCard.jsx | 6 ++++-- .../EventsPage/CardComponents/PreviewCard/PreviewCard.jsx | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/EventsPage/CardComponents/DetailsCard/DetailsCard.jsx b/src/components/EventsPage/CardComponents/DetailsCard/DetailsCard.jsx index f657d6e2..b5bc33ef 100644 --- a/src/components/EventsPage/CardComponents/DetailsCard/DetailsCard.jsx +++ b/src/components/EventsPage/CardComponents/DetailsCard/DetailsCard.jsx @@ -25,12 +25,13 @@ function DetailsCard({ ImageURL, Heading, Description, Location, Date, Time, Pri
-
+
img
{Location}
@@ -40,6 +41,7 @@ function DetailsCard({ ImageURL, Heading, Description, Location, Date, Time, Pri alt='img' width={60} height={60} + className='w-8 h-8 sm:w-14 sm:h-14 md:w-[60px] md:h-[60px]' />
{Prizes}
@@ -49,7 +51,7 @@ function DetailsCard({ ImageURL, Heading, Description, Location, Date, Time, Pri alt='img' width={60} height={60} - className='w-[48px] h-[48px] xsm:w-[60px] xsm:h-[60px]' + className='w-8 h-8 sm:w-14 sm:h-14 md:w-[60px] md:h-[60px]' />
{Date}
diff --git a/src/components/EventsPage/CardComponents/PreviewCard/PreviewCard.jsx b/src/components/EventsPage/CardComponents/PreviewCard/PreviewCard.jsx index 8fb90614..722a8838 100644 --- a/src/components/EventsPage/CardComponents/PreviewCard/PreviewCard.jsx +++ b/src/components/EventsPage/CardComponents/PreviewCard/PreviewCard.jsx @@ -21,7 +21,7 @@ function PreviewCard({ ImageURL, PreviewDescription = '' }) { className='rounded-[17.82px] h-[170px] xxs:h-[180px] 2xs:h-[190px] xsm:h-[199px] ssm:h-[214px] sm:h-[235px] md:h-[260px] w-full md:w-[305px] lg:w-[338px] lg:h-[240px] ' /> {truncatedDescription} -
+
{/* Reduced gap for symmetry */} Rulebook Register