Skip to content

Commit

Permalink
Merge branch 'main' into Content-Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Shurtu-gal committed Oct 14, 2023
2 parents 6e2a9ea + 7a6aaa0 commit b8ab7ed
Show file tree
Hide file tree
Showing 30 changed files with 460 additions and 210 deletions.
103 changes: 48 additions & 55 deletions config/content/FAQ.js
Original file line number Diff line number Diff line change
@@ -1,59 +1,52 @@
const FAQContent = {
FAQS: [
{
id: 1,
question: 'What is INNOVISION? ',
answer:
'Innovision is one of the biggest ' +
'techno management fest organised by students of NITR,' +
' with participation from all over India ',
},
{
id: 2,
question: 'Who are we?',
answer:
'Organised by students of NIT Rourkela, INNOVISION is the annual techno management.' +
'With our unrivalled ability to host such technical fests ' +
"we were recognised as Odisha's top student chapter",
},
{
id: 3,
question: 'Who can participate?',
answer:
'All science and technology enthusiasts currently ' +
'studying in college are invited to participate.',
},
{
id: 4,
question: 'Will it be conducted online?',
answer: 'No the event will be conducted in offline mode.',
},
{
id: 5,
question: 'What is the goal of the fest? ',
answer:
'The major purpose of the fest is to bring together people ' +
'who share a passion for technology in order ' +
'to showcase their skills and give attendees' +
' a fantastic chance to broaden their technical understandings.',
},
{
id: 6,
question: 'How could I know if I got selected for any event? ',
answer: "If you're chosen, we'll send you an email.",
},
{
id: 7,
question: 'Cost of registration? ',
answer:
'The cost of registration, including accommodation is Rs. 950,' +
' and without accommodation, it is Rs. 750.',
},
],
export const FAQS = [
{
id: 1,
question: 'When would Innovision happen?',
answer:
'INNOVISION is the largest ' +
'techno-management fest of Eastern India lorem ipsum dolor ' +
'ipsum dolor somethin lorem ipsum dolor somethin lorem ipsum dolor somethin',
},
{
id: 2,
question: 'What is INNOVISION?',
answer: 'INNOVISION is the largest techno-management fest of Eastern India',
},
{
id: 3,
question: 'What is INNOVISION?',
answer: 'INNOVISION is the largest techno-management fest of Eastern India',
},
{
id: 4,
question: 'What is INNOVISION?',
answer: 'INNOVISION is the largest techno-management fest of Eastern India',
},
{
id: 5,
question: 'What is INNOVISION?',
answer: 'INNOVISION is the largest techno-management fest of Eastern India',
},
{
id: 6,
question: 'What is INNOVISION?',
answer: 'INNOVISION is the largest techno-management fest of Eastern India',
},
{
id: 7,
question: 'What is INNOVISION?',
answer: 'INNOVISION is the largest techno-management fest of Eastern India',
},
{
id: 8,
question: 'What is INNOVISION?',
answer: 'INNOVISION is the largest techno-management fest of Eastern India',
},
];

export const FAQContent = Object.freeze({
title: 'Frequently Asked Questions',
footer: 'Still have questions? Feel free to contact us',
footerLink: 'contact-us',
id: 'faq',
};

export default FAQContent;
});
2 changes: 1 addition & 1 deletion config/content/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export { default as nav } from './Navigation';
export { default as footer } from './Footer';
export { default as faq } from './FAQ';
export * from './FAQ';
export { default as success } from './Success';
export { default as pageNotFound } from './PageNotFound';
export { default as _sponsor } from './sponsors';
Expand Down
3 changes: 2 additions & 1 deletion config/content/payment.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const PaymentDetails = ({ email, name, mobile }) => {
return {
purpose: 'INNOVISION 2023 | Registration Fee',
date: date.toDateString(),
amount: 1000,
amount: 750,
email,
buyerName: name,
phone: mobile,
Expand All @@ -17,6 +17,7 @@ export const PaymentContent = {
warning: 'Note: Registration fee is non-refundable.',
info: 'Check your details before proceeding to payment.',
endNote: 'For any queries, contact us at: +91 1234567890',
caption: 'Early Bird Registration Fee',
proceed: 'Proceed to Payment',
cancel: 'Cancel',
termsLink: 'https://www.google.com/',
Expand Down
55 changes: 0 additions & 55 deletions gatsby-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,61 +8,6 @@ import { Layout } from './src/components';

const queryClient = new QueryClient();

// Get fonts on initial load of the app
export const onRenderBody = ({ setHeadComponents }) => {
// @import url('fonts/Roslindale/font.css');
setHeadComponents([
<link
rel='preload'
href='/fonts/Roslindale/fonts/RoslindaleText-BoldItalic-Testing.woff'
as='font'
type='font/woff'
crossOrigin='anonymous'
key='Roslindale'
/>,
<link
rel='preload'
href='/fonts/Roslindale/fonts/RoslindaleText-Bold-Testing.woff2'
as='font'
type='font/woff2'
crossOrigin='anonymous'
key='Roslindale2'
/>,
<link
rel='preload'
href='/fonts/Roslindale/fonts/RoslindaleText-MediumItalic-Testing.woff'
as='font'
type='font/woff'
crossOrigin='anonymous'
key='Roslindale3'
/>,
<link
rel='preload'
href='/fonts/Roslindale/fonts/RoslindaleText-MediumItalic-Testing.woff2'
as='font'
type='font/woff2'
crossOrigin='anonymous'
key='Roslindale4'
/>,
<link
rel='preload'
href='/fonts/Roslindale/fonts/RoslindaleDeckNarrow-SemiBoldItalic-Testing.woff'
as='font'
type='font/woff'
crossOrigin='anonymous'
key='Roslindale5'
/>,
<link
rel='preload'
href='/fonts/Roslindale/fonts/RoslindaleDeckNarrow-SemiBoldItalic-Testing.woff2'
as='font'
type='font/woff2'
crossOrigin='anonymous'
key='Roslindale6'
/>,
]);
};

export const wrapPageElement = ({ element, props }) => (
// eslint-disable-next-line react/jsx-props-no-spreading
<Layout {...props}>{element}</Layout>
Expand Down
3 changes: 3 additions & 0 deletions images/Arrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions images/HeroBtnBelow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions images/HeroBtnTop.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"@fortawesome/free-regular-svg-icons": "^6.4.2",
"@fortawesome/free-solid-svg-icons": "^6.4.2",
"@fortawesome/react-fontawesome": "^0.2.0",
"@reach/router": "^1.3.4",
"@tanstack/react-query": "^4.35.3",
"add": "^2.0.6",
"axios": "^1.5.0",
Expand Down
9 changes: 7 additions & 2 deletions src/components/EventCard/Card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ const EventCard = ({ event, registered }) => {
const { authenticated, userData, token } = useContext(AuthContext);
const [disabled, setDisabled] = useState(false);

const bookingAllowed =
authenticated && (userData?.rollNumber || userData?.festID?.includes('innovision-2023'));

const api = Api.getInstance();

const handleClick = () => {
Expand Down Expand Up @@ -92,7 +95,8 @@ const EventCard = ({ event, registered }) => {
variant='outline'
text={registered ? 'Registered' : 'Register For Event'}
onClick={registered ? null : handleClick}
disabled={disabled || !authenticated || registered}
disabled={disabled || !bookingAllowed || registered}
tooltip={!bookingAllowed ? 'Kindly register for the fest first' : ''}
/>
</CardButtonContainer>
</Front>
Expand Down Expand Up @@ -121,7 +125,8 @@ const EventCard = ({ event, registered }) => {
variant='outline'
text={registered ? 'Registered' : 'Register For Event'}
onClick={registered ? null : handleClick}
disabled={disabled || !authenticated || registered}
disabled={disabled || !bookingAllowed || registered}
tooltip={!bookingAllowed ? 'Kindly register for the fest first' : ''}
/>
</CardButtonContainer>
</Back>
Expand Down
2 changes: 1 addition & 1 deletion src/components/EventSection/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import useEvents from '../../utils/useEvents';
import { _event } from '../../../config/content';

const EventSection = () => {
const { events } = useEvents('Technical');
const { events } = useEvents();

return (
<SectionLayout
Expand Down
9 changes: 4 additions & 5 deletions src/components/FAQSection/FAQSection.jsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import React from 'react';
import AccordionItem from './AccordionItem';
import FAQContent from '../../../config/content/FAQ';
import { FAQSectionContainer, FAQGrid, FAQFirstHalf, FAQSecondHalf } from './styles';
import { SectionLayout } from '../shared';
import { FAQContent, FAQS } from '../../../config/content';

const FAQSection = () => {
const FAQ = FAQContent.FAQS;
const middleIndex = Math.ceil(FAQ.length / 2);
const middleIndex = Math.ceil(FAQS.length / 2);

const firstHalf = FAQ.splice(0, middleIndex);
const secondHalf = FAQ.splice(-middleIndex);
const firstHalf = FAQS.splice(0, middleIndex);
const secondHalf = FAQS.splice(-middleIndex);

return (
<SectionLayout
Expand Down
72 changes: 72 additions & 0 deletions src/components/HeroSection/HeroButton.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
import React from 'react';
import styled from 'styled-components';
import Arrow from '../../../images/Arrow.svg';
import HeroBtnTop from '../../../images/HeroBtnTop.svg';
import HeroBtnBelow from '../../../images/HeroBtnBelow.svg';

const ButtonTop = styled.div`
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
transition: transform 0.2s ease-in-out;
`;

const ButtonBelow = styled.div`
transition: transform 0.2s ease-in-out;
`;

const ButtonContainer = styled.button`
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
padding: 12px;
border: none;
background: none;
width: 320px;
cursor: pointer;
&:hover {
${ButtonTop} {
transform: translateY(6px);
}
${ButtonBelow} {
transform: scaleY(0.3);
}
}
@media (min-width: 576px) {
max-width: 60%;
width: 100%;
}
`;

const ButtonText = styled.div`
position: absolute;
display: flex;
gap: 12px;
font-size: 14px;
font-weight: 500;
@media (min-width: 768px) {
font-size: 20px;
}
`;

function HeroButton() {
return (
<ButtonContainer type='submit'>
<ButtonTop>
<ButtonText>
REGISTER NOW
<img src={Arrow} alt='arrow' className='md:w-[16px]' />
</ButtonText>
<img src={HeroBtnTop} alt='Hero-Btn' />
</ButtonTop>
<ButtonBelow>
<img src={HeroBtnBelow} alt='Hero-Btn' />
</ButtonBelow>
</ButtonContainer>
);
}

export default HeroButton;
20 changes: 20 additions & 0 deletions src/components/HeroSection/HeroContent.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import React from 'react';
import { HeroContainer, HeroTitle, Year, Dates, DatesDiv, Line } from './styles';
import HeroButton from './HeroButton';

function HeroContent() {
return (
<HeroContainer>
<HeroTitle>INNOVISION</HeroTitle>
<Year>2K23</Year>
<DatesDiv>
<Line />
<Dates>3rd-5th November 2023</Dates>
<Line />
</DatesDiv>
<HeroButton />
</HeroContainer>
);
}

export default HeroContent;
Loading

0 comments on commit b8ab7ed

Please sign in to comment.