Skip to content

Commit 66646e8

Browse files
committed
init
1 parent 80ca8ee commit 66646e8

File tree

6 files changed

+261
-392
lines changed

6 files changed

+261
-392
lines changed

src/components/Button.js

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import Link from 'next/link'
2+
import clsx from 'clsx'
3+
4+
const baseStyles = {
5+
solid:
6+
'group inline-flex items-center justify-center py-2 px-4 text-sm font-semibold focus:outline-none focus-visible:outline-2 focus-visible:outline-offset-2',
7+
outline:
8+
'group inline-flex ring-1 items-center justify-center py-2 px-4 text-sm focus:outline-none',
9+
}
10+
11+
const variantStyles = {
12+
solid: {
13+
slate:
14+
'bg-slate-900 text-white hover:bg-slate-700 hover:text-slate-100 active:bg-slate-800 active:text-slate-300 focus-visible:outline-slate-900',
15+
blue: 'rounded-sm bg-blue-600 text-white hover:text-slate-100 hover:bg-blue-500 active:bg-blue-800 active:text-blue-100 focus-visible:outline-blue-600',
16+
white:
17+
'bg-white text-slate-900 hover:bg-blue-50 active:bg-blue-200 active:text-slate-600 focus-visible:outline-white',
18+
},
19+
outline: {
20+
slate:
21+
'ring-slate-200 text-slate-700 hover:text-slate-900 hover:ring-slate-300 active:bg-slate-100 active:text-slate-600 focus-visible:outline-blue-600 focus-visible:ring-slate-300',
22+
white:
23+
'ring-slate-700 text-white hover:ring-slate-500 active:ring-slate-700 active:text-slate-400 focus-visible:outline-white',
24+
},
25+
}
26+
27+
export function Button({
28+
variant = 'solid',
29+
color = 'slate',
30+
className,
31+
href,
32+
...props
33+
}) {
34+
className = clsx(
35+
baseStyles[variant],
36+
variantStyles[variant][color],
37+
className
38+
)
39+
40+
return href ? (
41+
<Link href={href} className={className} {...props} />
42+
) : (
43+
<button className={className} {...props} />
44+
)
45+
}

src/pages/api/hello.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/pages/hackpsu2023.js

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
2+
// default template
3+
4+
import { useEffect, useState } from 'react'
5+
6+
export default function hackpsu2023() {
7+
8+
const [terminalUsername, setTerminalUsername] = useState("...");
9+
const [terminalPassword, setTerminalPassword] = useState("...");
10+
11+
useEffect(() => {
12+
const fetchTerminalData = async () => {
13+
try {
14+
const endPoint = 'https://terminal-gateway2.ctfguide.com/createvm';
15+
const requestOptions = {
16+
method: 'GET',
17+
}
18+
const response = await fetch(endPoint, requestOptions);
19+
const result = await response.json();
20+
21+
setTerminalUsername(result.username);
22+
setTerminalPassword(result.password);
23+
24+
25+
26+
27+
} catch (err) {
28+
console.log(err);
29+
setTerminalUsername("Something went wrong.")
30+
setTerminalPassword("Something went wrong.")
31+
32+
}
33+
};
34+
35+
try {
36+
fetchTerminalData();
37+
} catch(err) {
38+
console.log(err)
39+
setTerminalUsername("Something went wrong.")
40+
setTerminalPassword("Something went wrong.")
41+
}
42+
}, []);
43+
return (
44+
45+
<>
46+
<script src="https://cdn.tailwindcss.com"></script>
47+
48+
49+
50+
51+
52+
53+
<div className="px-2 py-1">
54+
55+
<div className="flex my-auto mb-2">
56+
<img width="50" src="https://www.ctfguide.com/darkLogo.png"></img>
57+
<p className="text-md mt-3 mr-3">@</p>
58+
<img width="30" src="https://hackpsu.org/assets/images/logo.svg"></img>
59+
<p style={{fontFamily: 'Poppins, sans-serif'}} className="text-xl text-center ml-auto">Connect to the terminal using the username <span className='text-yellow-500'> {terminalUsername} </span> and the password <span className='text-yellow-500'>{terminalPassword}</span> </p>
60+
</div>
61+
<p style={{fontFamily: 'Poppins, sans-serif'}}><span className="text-green-500 text-xl mr-2">⦿</span>Connected to the terminal2.ctfguide.com</p>
62+
<iframe className="border-none" style={{width: '100%', height: '400px', borderStyle: "none"}} src="https://terminal2.ctfguide.com/wetty"></iframe>
63+
64+
65+
</div>
66+
67+
</>
68+
)
69+
}

src/pages/index.js

Lines changed: 117 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -2,122 +2,130 @@ import Head from 'next/head'
22
import Image from 'next/image'
33
import { Inter } from 'next/font/google'
44
import styles from '@/styles/Home.module.css'
5+
import Link from 'next/link'
56

6-
const inter = Inter({ subsets: ['latin'] })
77

88
export default function Home() {
99
return (
1010
<>
11+
<script src="https://cdn.tailwindcss.com"></script>
12+
13+
14+
1115
<Head>
12-
<title>Create Next App</title>
13-
<meta name="description" content="Generated by create next app" />
14-
<meta name="viewport" content="width=device-width, initial-scale=1" />
15-
<link rel="icon" href="/favicon.ico" />
16+
<title>CTFGuide</title>
17+
<meta
18+
name="description"
19+
content="Cybersecurity as a service."
20+
/>
21+
<style>
22+
@import url(&apos;https://fonts.googleapis.com/css2?family=Poppins&display=swap&apos;);
23+
</style>
24+
1625
</Head>
17-
<main className={styles.main}>
18-
<div className={styles.description}>
19-
<p>
20-
Get started by editing&nbsp;
21-
<code className={styles.code}>src/pages/index.js</code>
22-
</p>
23-
<div>
24-
<a
25-
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
26-
target="_blank"
27-
rel="noopener noreferrer"
28-
>
29-
By{' '}
30-
<Image
31-
src="/vercel.svg"
32-
alt="Vercel Logo"
33-
className={styles.vercelLogo}
34-
width={100}
35-
height={24}
36-
priority
37-
/>
38-
</a>
39-
</div>
40-
</div>
41-
42-
<div className={styles.center}>
43-
<Image
44-
className={styles.logo}
45-
src="/next.svg"
46-
alt="Next.js Logo"
47-
width={180}
48-
height={37}
49-
priority
50-
/>
51-
<div className={styles.thirteen}>
52-
<Image
53-
src="/thirteen.svg"
54-
alt="13"
55-
width={40}
56-
height={31}
57-
priority
58-
/>
59-
</div>
60-
</div>
61-
62-
<div className={styles.grid}>
63-
<a
64-
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
65-
className={styles.card}
66-
target="_blank"
67-
rel="noopener noreferrer"
68-
>
69-
<h2 className={inter.className}>
70-
Docs <span>-&gt;</span>
71-
</h2>
72-
<p className={inter.className}>
73-
Find in-depth information about Next.js features and&nbsp;API.
74-
</p>
75-
</a>
76-
77-
<a
78-
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
79-
className={styles.card}
80-
target="_blank"
81-
rel="noopener noreferrer"
82-
>
83-
<h2 className={inter.className}>
84-
Learn <span>-&gt;</span>
85-
</h2>
86-
<p className={inter.className}>
87-
Learn about Next.js in an interactive course with&nbsp;quizzes!
88-
</p>
89-
</a>
90-
91-
<a
92-
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
93-
className={styles.card}
94-
target="_blank"
95-
rel="noopener noreferrer"
96-
>
97-
<h2 className={inter.className}>
98-
Templates <span>-&gt;</span>
99-
</h2>
100-
<p className={inter.className}>
101-
Discover and deploy boilerplate example Next.js&nbsp;projects.
102-
</p>
103-
</a>
104-
105-
<a
106-
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
107-
className={styles.card}
108-
target="_blank"
109-
rel="noopener noreferrer"
110-
>
111-
<h2 className={inter.className}>
112-
Deploy <span>-&gt;</span>
113-
</h2>
114-
<p className={inter.className}>
115-
Instantly deploy your Next.js site to a shareable URL
116-
with&nbsp;Vercel.
117-
</p>
118-
</a>
119-
</div>
120-
</main>
26+
27+
28+
29+
30+
<div style={{ fontFamily: 'Poppins, sans-serif' }} className="z-60 items-center text-center mx-auto gap-x-6 px-6 py-5 sm:px-3.5 sm:before:flex-1">
31+
<p className="text-sm text-center text-xl text-white" style={{ fontFamily: 'Poppins, sans-serif' }}>
32+
33+
Want to learn more about cybersecurity? Start learning on <a href="https://ctfguide.com" className='text-blue-500 font-semibold text-hover'>CTFGuide</a>.
34+
35+
</p>
36+
37+
</div>
38+
39+
40+
<div className="isolate " style={{ fontFamily: 'Poppins, sans-serif' }}>
41+
42+
<div>
43+
<div className=" px-6 lg:px-8 flex h-screen" style={{ height: "100vh" }}>
44+
45+
<div className="mx-auto my-auto max-w-3xl pt-10 pb-32 sm:pt-20 sm:pb-40 animate__animated animate__fadeIn">
46+
47+
<div>
48+
49+
50+
51+
<div>
52+
53+
54+
<h1 className="z-index-6 pulsing-text mx-auto my-auto text-4xl text-white font-bold tracking-tight sm:text-center sm:text-6xl">
55+
CTFGuide Live </h1>
56+
<p className="mx-auto my-auto mt-6 text-lg leading-8 text-gray-200 sm:text-center">
57+
58+
Attending a live event? Find related resources here.
59+
60+
</p>
61+
62+
63+
64+
</div>
65+
66+
<div className='mt-10'>
67+
<div className="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3 mx-auto text-center">
68+
<div className="flex flex-col overflow-hidden rounded-lg shadow-lg">
69+
<div className="flex-shrink-0">
70+
<h1 className='bg-clip-text text-transparent bg-gradient-to-r from-indigo-500 to-blue-400 cursor-pointer'>HackPSU 2023</h1>
71+
</div>
72+
</div>
73+
74+
<div className="flex flex-col overflow-hidden rounded-lg shadow-lg">
75+
<div className="flex-shrink-0">
76+
<h1 className='bg-clip-text text-transparent bg-gradient-to-r from-red-500 to-orange-400 cursor-disabled'>HackPSU 2024</h1>
77+
</div>
78+
</div>
79+
80+
81+
<div className="flex flex-col overflow-hidden rounded-lg shadow-lg">
82+
<div className="flex-shrink-0">
83+
<h1 className='bg-clip-text text-transparent bg-gradient-to-r from-purple-500 to-pink-400'>Hackfest 2025</h1>
84+
</div>
85+
</div>
86+
</div>
87+
88+
</div>
89+
90+
91+
<div className="truncate absolute inset-x-0 top-[calc(100%-13rem)] -z-10 transform-gpu overflow-hidden blur-3xl sm:top-[calc(100%-30rem)]">
92+
93+
<svg
94+
className="relative left-[calc(50%+3rem)] h-[35rem] max-w-none -translate-x-1/2 sm:left-[calc(50%+36rem)] sm:h-[70rem]"
95+
viewBox="0 0 2000 1200"
96+
fill="none"
97+
xmlns="http://www.w3.org/2000/svg"
98+
>
99+
<path
100+
fill="url(#ecb5b0c9-546c-4772-8c71-4d3f06d544bc)"
101+
fillOpacity=".3"
102+
d="M317.219 518.975L203.852 678 0 438.341l317.219 80.634 204.172-286.402c1.307 132.337 45.083 346.658 209.733 145.248C936.936 126.058 882.053-94.234 1031.02 41.331c119.18 108.451 130.68 295.337 121.53 375.223L855 299l21.173 362.054-558.954-142.079z"
103+
/>
104+
<defs>
105+
<linearGradient
106+
id="ecb5b0c9-546c-4772-8c71-4d3f06d544bc"
107+
x1="1155.49"
108+
x2="-78.208"
109+
y1=".177"
110+
y2="474.645"
111+
gradientUnits="userSpaceOnUse"
112+
>
113+
<stop stopColor="#030642" />
114+
<stop offset={1} stopColor="#000dff" />
115+
</linearGradient>
116+
</defs>
117+
</svg>
118+
119+
</div>
120+
</div>
121+
</div>
122+
</div>
123+
</div>
124+
</div>
125+
126+
127+
128+
121129
</>
122130
)
123131
}

0 commit comments

Comments
 (0)