diff --git a/components/Faq/faq.js b/components/Faq/faq.js new file mode 100644 index 00000000..66b47937 --- /dev/null +++ b/components/Faq/faq.js @@ -0,0 +1,42 @@ +import React, { useState } from 'react'; +import faqsData from '../../config/faq-lists.json'; + +const FaqPage = () => { + const [faqs, setFaqs] = useState(faqsData.faqs); + + const toggleFAQ = (index) => { + setFaqs( + faqs.map((faq, i) => { + if (i === index) { + // Toggle the 'open' property + return { ...faq, open: !faq.open }; + } else { + return { ...faq, open: false }; + } + }) + ); + }; + + return ( +
+

Do you have questions ?

+
+ {faqs.map((faq, index) => ( +
+ + {faq.open &&

{faq.answer}

} +
+ ))} +
+

Any other questions? Contact us at asyncapi@gmail.com

+
+ ); + }; + + export default FaqPage; \ No newline at end of file diff --git a/components/Gallery/gallery.js b/components/Gallery/gallery.js new file mode 100644 index 00000000..66bb489a --- /dev/null +++ b/components/Gallery/gallery.js @@ -0,0 +1,27 @@ +import React from 'react'; +import Masonry from 'react-masonry-css'; + +const breakpointColumnsObj = { + default: 4, + 1100: 3, + 700: 2, + 500: 1 +}; + +const MasonryGallery = ({ images }) => { + return ( + + {images.map((image, index) => ( +
+ {image.alt} +
+ ))} +
+ ); +}; + +export default MasonryGallery; \ No newline at end of file diff --git a/config/faq-lists.json b/config/faq-lists.json new file mode 100644 index 00000000..29275cb7 --- /dev/null +++ b/config/faq-lists.json @@ -0,0 +1,37 @@ +{ + "faqs": [ + { + "question": "When and where is the event taking place?", + "answer": "The event will take place on [date] at [location]." + }, + { + "question": "How can I register for the event?", + "answer": "You can register for the event by visiting our website and filling out the registration form. Alternatively, you can register in person on the day of the event." + }, + { + "question": "Is there a registration fee?", + "answer": "Yes, there is a registration fee of [amount]." + }, + { + "question": "What is included in the registration fee?", + "answer": "The registration fee includes access to all event sessions, workshops, networking opportunities, and meals." + }, + { + "question": "Can I cancel my registration?", + "answer": "Yes, you can cancel your registration up to [number] days before the event for a full refund. After that, refunds will not be issued." + }, + { + "question": "Will there be parking available at the venue?", + "answer": "Yes, there will be parking available at the venue. Additional details about parking will be provided closer to the event date." + }, + { + "question": "Are there accommodations available for out-of-town attendees?", + "answer": "Yes, we have negotiated special rates with nearby hotels for event attendees. Information on how to book accommodations will be provided upon registration." + }, + { + "question": "Can I bring a guest to the event?", + "answer": "Guests are welcome to attend certain portions of the event, but they must register separately and pay the registration fee." + } + ] + } + \ No newline at end of file diff --git a/config/links.json b/config/links.json index cf23c125..902576ac 100644 --- a/config/links.json +++ b/config/links.json @@ -28,6 +28,10 @@ { "title": "Sponsors", "ref": "/#sponsors" + }, + { + "title": "FAQs", + "ref": "/faq" } ] diff --git a/package-lock.json b/package-lock.json index a227c0b4..fd66ae16 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,6 +19,7 @@ "react-globe.gl": "^2.24.2", "react-gtm-module": "^2.0.11", "react-hot-toast": "^2.4.1", + "react-masonry-css": "^1.0.16", "react-responsive": "^9.0.0", "react-select": "^5.7.5", "react-slick": "^0.29.0", @@ -4673,6 +4674,14 @@ "react": ">=16.13.1" } }, + "node_modules/react-masonry-css": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/react-masonry-css/-/react-masonry-css-1.0.16.tgz", + "integrity": "sha512-KSW0hR2VQmltt/qAa3eXOctQDyOu7+ZBevtKgpNDSzT7k5LA/0XntNa9z9HKCdz3QlxmJHglTZ18e4sX4V8zZQ==", + "peerDependencies": { + "react": ">=16.0.0" + } + }, "node_modules/react-responsive": { "version": "9.0.2", "resolved": "https://registry.npmjs.org/react-responsive/-/react-responsive-9.0.2.tgz", diff --git a/package.json b/package.json index a7dc0577..c0a09c41 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "react-globe.gl": "^2.24.2", "react-gtm-module": "^2.0.11", "react-hot-toast": "^2.4.1", + "react-masonry-css": "^1.0.16", "react-responsive": "^9.0.0", "react-select": "^5.7.5", "react-slick": "^0.29.0", diff --git a/pages/faq.js b/pages/faq.js new file mode 100644 index 00000000..59cae6fc --- /dev/null +++ b/pages/faq.js @@ -0,0 +1,8 @@ +// pages/faq.js +import FaqPage from '../components/Faq/faq'; + +const Faq = () => { + return ; +}; + +export default Faq; diff --git a/pages/index.js b/pages/index.js index be4cdc2a..901c02cb 100644 --- a/pages/index.js +++ b/pages/index.js @@ -10,6 +10,44 @@ import About from '../components/About/about'; import TicketCards from '../components/Cards/ticketCards'; import Heading from '../components/Typography/heading'; import Paragraph from '../components/Typography/paragraph'; +import MasonryGallery from '../components/Gallery/gallery'; + +const images = [ + + { + src: "https://source.unsplash.com/rxpThOwuVgE/800x599", + alt: "1" + }, + { + src: "https://source.unsplash.com/73_kRzs9sqo/800x799", + alt: "2" + }, + { + src: "https://source.unsplash.com/bzdhc5b3Bxs/600x799", + alt: "3" + }, + { + src: "https://source.unsplash.com/w_zE6qlkQKA/600x799", + alt: "4" + }, + { + src: "https://source.unsplash.com/MxVkWPiJALs/600x799", + alt: "5" + }, + + { + src: "https://source.unsplash.com/DOu3JJ3eLQc/600x799", + alt: "6" + }, + { + src: "https://source.unsplash.com/cw-cj_nFa14/800x599", + alt: "7" + }, + { + src: "https://source.unsplash.com/UCbMZ0S-w28/800x799", + alt: "8" + }, + ]; export default function Home() { return ( @@ -46,6 +84,9 @@ export default function Home() {
+ ); -} +} \ No newline at end of file diff --git a/styles/globals.css b/styles/globals.css index 6d1d8e73..d08d1ab8 100644 --- a/styles/globals.css +++ b/styles/globals.css @@ -207,4 +207,22 @@ mix-blend-mode: lighten; .hoverEffect:hover { transform: scale(1.1); /* Scale the image by 10% on hover */ +} + +.my-masonry-grid { + display: -webkit-box; /* Not needed if autoprefixing */ + display: -ms-flexbox; /* Not needed if autoprefixing */ + display: flex; + margin-left: -30px; /* gutter size offset */ + width: auto; +} +.my-masonry-grid_column { + padding-left: 30px; /* gutter size */ + background-clip: padding-box; +} + +/* Style your items */ +.my-masonry-grid_column > div { /* change div to reference your elements you put in */ + background: grey; + margin-bottom: 30px; } \ No newline at end of file