Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ const OptimizedImages = require('next-optimized-images');
const withVideos = require('next-videos');

const customConfig = {

eslint: {
// Warning: This allows production builds to successfully complete even if
// your project has ESLint errors.
ignoreDuringBuilds: true,
},
webpack: function (config) {
config.module.rules.push(
{
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
"version": "1.0.0",
"description": "",
"main": "index.js",
"engines": {
"node": "22.x",
"npm": ">=10.x"
},
"scripts": {
"build": "next build",
"build-ssg": "next build && next export",
Expand Down
27 changes: 24 additions & 3 deletions pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import Document, { DocumentContext, Head, Html, Main, NextScript } from 'next/document';


class MyDocument extends Document {

static async getInitialProps(ctx: DocumentContext) {
Expand All @@ -26,16 +25,38 @@ class MyDocument extends Document {
href="https://cdn.staticaly.com/gh/hung1001/font-awesome-pro/8af0edd/css/all.css"
rel="stylesheet"
/>

{/* Google Tag Manager */}
<script
dangerouslySetInnerHTML={{
__html: `
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-N7TQWNCN');
`,
}}
/>
</Head>
<body>
{/* Google Tag Manager (noscript) - Must be right after opening <body> tag */}
<noscript>
<iframe
src="https://www.googletagmanager.com/ns.html?id=GTM-N7TQWNCN"
height="0"
width="0"
style={{display: 'none', visibility: 'hidden'}}
/>
</noscript>

<Main />
<NextScript />
<script src="https://play.inctf.in/sdk.js" />
</body>
</Html>
);
}

}

export default MyDocument;
export default MyDocument;
38 changes: 38 additions & 0 deletions pages/ambassadorpgm.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import React from 'react';

import TopBar from '../src/components/shared/TopBar';
import Footer from '../src/components/shared/Footer';
import Schedule from '../src/components/landing/Schedule';
import PageHeader from '../src/components/PageHeader';
import SiteView from '../src/components/SiteView';
import AmbassadorProgram from '@/src/components/AmbassadorProgram/ambassador-program';

const AmbassadorProgramPage = () => {
return (
<SiteView meta={{ title: 'Ambassador Program' }}>
<TopBar />
<PageHeader
title="Ambassador Program"
description={"Join us in empowering the next generation of cybersecurity leaders across India."}

breadcrumb={[
{
title: 'Get Started',
link: '/start',
},
{
title: 'Ambassador Program',
link: '/ambassadorpgm',
isActive: true,
},
]}
/>
<div className="py-4" style={{ minHeight: '100vh' }}>
<AmbassadorProgram />
</div>
<Footer />
</SiteView>
);
};

export default AmbassadorProgramPage;
20 changes: 15 additions & 5 deletions pages/faq.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ const FAQPage = () => {
}, [router.isReady]);

useEffect(() => {
setOpen(0);
const items = filteredFAQ(search, tags);
if (items.length > 0) {
setOpen(0); // Open first question if results exist
} else {
setOpen(null); // No questions to open if no results
}
}, [search, tags]);

const updateTotalVisible = (value) =>
Expand All @@ -63,7 +68,7 @@ const FAQPage = () => {
answer={q.answer}
search={search}
isOpen={i === openQ}
onClick={() => setOpen(i !== openQ ? i : null)}
onClick={() => setOpen(i === openQ ? null : i)}
key={i}
/>
),
Expand All @@ -76,9 +81,9 @@ const FAQPage = () => {
You could try rephrasing the question in a different way, or
can join our
{' '}
<a href="/discord" target="_blank" className="hover:text-blue-600">
<a href="/discord" target="_blank" className="text-blue-600 hover:text-blue-800 hover:underline">
discord community
<i className="fa fa-external-link mr-1" />
<i className="fa fa-external-link ml-1" />
{' '}
</a>
{' '}
Expand Down Expand Up @@ -108,7 +113,12 @@ const FAQPage = () => {
<div style={{ color: '#222' }}>
Write to us at
{' '}
<a href="mailto:inctfj@am.amrita.edu">inctfj@am.amrita.edu</a>
<a
href="mailto:inctfj@am.amrita.edu"
className="text-blue-600 hover:text-blue-800 hover:underline"
>
inctfj@am.amrita.edu
</a>
</div>
</div>
</Waypoint>
Expand Down
16 changes: 11 additions & 5 deletions pages/rules.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,13 @@ const RulePage = () => {
<div style={{ width: '100%', maxWidth: '900px' }}>
{rules.rule.map((rule, index) => {
if (rule.tag === 'p') {
return <p key={index}>{rule.text}</p>;
return (
<p key={index}>
{rule.text.map((text, textIndex) => (
<span key={textIndex} dangerouslySetInnerHTML={{ __html: text }} />
))}
</p>
);
} else if (rule.tag === 'h1') {
return <h1 key={index}>{rule.text}</h1>;
} else if (rule.tag === 'h2') {
Expand All @@ -78,14 +84,14 @@ const RulePage = () => {
return <h3 key={index}>{rule.text}</h3>;
} else if (rule.tag === 'ul') {
return (<ul key={index}>
{rule.text.map((text, index) => {
return <li key={index}>{text}</li>;
{rule.text.map((text, textIndex) => {
return <li key={textIndex} dangerouslySetInnerHTML={{ __html: text }} />;
})}
</ul>);
} else if (rule.tag === 'ol') {
return (<ol key={index}>
{rule.text.map((text, index) => {
return <li key={index}>{text}</li>;
{rule.text.map((text, textIndex) => {
return <li key={textIndex} dangerouslySetInnerHTML={{ __html: text }} />;
})}
</ol>);
}
Expand Down
Loading