Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
ky28059 authored Aug 30, 2024
2 parents ec9e58e + 025d7ab commit 7b78f84
Show file tree
Hide file tree
Showing 20 changed files with 62 additions and 262 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/vercel-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Deploy to vercel on merge
on:
push:
branches:
- main
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: amondnet/vercel-action@v20
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-args: '--prod'
vercel-org-id: ${{ secrets.ORG_ID}}
vercel-project-id: ${{ secrets.PROJECT_ID}}
github-comment: false
20 changes: 20 additions & 0 deletions .github/workflows/vercel-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Create vercel preview URL on pull request
on:
pull_request:
branches:
- main
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: amondnet/vercel-action@v20
id: vercel-deploy
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-org-id: ${{ secrets.ORG_ID}}
vercel-project-id: ${{ secrets.PROJECT_ID}}
- name: preview-url
run: |
echo ${{ steps.vercel-deploy.outputs.preview-url }}
23 changes: 7 additions & 16 deletions app/(home)/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import Timer from '@/app/(home)/Timer';
import { BsChevronCompactDown } from 'react-icons/bs';
import { getConfig } from '@/util/config';

Expand All @@ -9,25 +8,17 @@ export default async function Header() {
return (
<header className="container flex flex-col items-center justify-center h-screen">
<img
src="/assets/logo-uwu.png"
className="-mb-7 max-h-96"
/>
<Timer
startTime={config.data.startTime}
endTime={config.data.endTime}
src="/assets/logo-internal.png"
className="max-h-96"
/>
<p className="mb-2 max-w-3xl text-center text-pretty">
b01lers CTF is the public competitive CTF hosted by the b01lers CTF team at Purdue University.
Join our discord at <a href="https://discord.gg/tBMqujE" target="_blank" rel="noopener noreferrer" className="text-theme-bright hover:underline">discord.gg/tBMqujE</a>{' '}
and look out for further info soon!
Welcome to b01lers internal CTF! b01lers internal CTF is both a training camp to sharpen your CTF
skills, and a look at past b01lers CTF challenges. Check out the{' '}
<a href="https://discord.gg/tBMqujE" target="_blank" rel="noopener noreferrer" className="text-theme-bright hover:underline">Discord</a>{' '}
and enjoy!
</p>
<div className="flex divide-x divide-primary text-sm">
<a href="#rules" className="px-4 py-2 uppercase hover:underline">Rules</a>
<a href="#prizes" className="px-4 py-2 uppercase hover:underline">Prizes</a>
<a href="#sponsors" className="px-4 py-2 uppercase hover:underline">Sponsors</a>
</div>

<a href="#rules" className="text-inherit text-4xl mt-6 sm:mt-12 sm:mb-8 text-primary">
<a href="#rules" className="text-inherit text-4xl mt-6 sm:mb-8 text-primary">
<BsChevronCompactDown className="animate-bounce" />
<span className="sr-only">Jump to Rules</span>
</a>
Expand Down
62 changes: 0 additions & 62 deletions app/(home)/Prizes.tsx

This file was deleted.

14 changes: 1 addition & 13 deletions app/(home)/Rules.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,11 @@ export default function Rules() {
<SectionHeader id="rules">
Rules
</SectionHeader>
<ol className="list-decimal list-outside pl-6 space-y-2 mb-16">
<ol className="list-decimal list-outside pl-6 space-y-2">
<li>
During the competition, each person may only be a part of one team total, and only members of a
given team may assist in solving a challenge for that team.
</li>
<li>
Each team must have a valid email address that should serve as the point of contact.
</li>
<li>
For the <strong>Open</strong> division: there is no limit on team size, and teams can be from
anywhere.
</li>
<li>
For the <strong>Purdue</strong> division: teams must be composed of current Purdue students to be
eligible for prizes, and there is a maximum team size of 4. Sign up with a @purdue.edu email to
gain access to the Purdue division.
</li>
<li>
Flags are of the format{' '}
<code className="bg-black/40 px-2 py-1 text-primary rounded">{'bctf{[ -~]+}'}</code>{' '}
Expand Down
32 changes: 0 additions & 32 deletions app/(home)/Sponsor.tsx

This file was deleted.

54 changes: 0 additions & 54 deletions app/(home)/Sponsors.tsx

This file was deleted.

64 changes: 0 additions & 64 deletions app/(home)/Timer.tsx

This file was deleted.

5 changes: 0 additions & 5 deletions app/(home)/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import Header from '@/app/(home)/Header';
import Sponsors from '@/app/(home)/Sponsors';
import Rules from '@/app/(home)/Rules';
import Prizes from '@/app/(home)/Prizes';


export default async function Home() {
Expand All @@ -12,11 +10,8 @@ export default async function Home() {
<div className="bg-black/40 py-16 mb-12 backdrop-blur-sm border-t border-tertiary">
<div className="px-6 sm:container">
<Rules />
<Prizes />
</div>
</div>

<Sponsors />
</main>
)
}
6 changes: 3 additions & 3 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ const inter = Inter({ subsets: ['latin'] })

export const metadata: Metadata = {
title: {
absolute: 'b01lers CTF 2024',
template: '%s - b01lers CTF 2024'
absolute: 'b01lers internal CTF',
template: '%s - b01lers internal CTF'
},
description: 'b01lers CTF is jeopardy-style CTF hosted by the b01lers CTF team at Purdue University.',
description: 'b01lers internal CTF is a training camp to sharpen your CTF skills, hosted by the b01lers CTF team at Purdue University.',
}

export default function RootLayout(props: { children: ReactNode }) {
Expand Down
2 changes: 1 addition & 1 deletion app/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function Login() {
return (
<div className="container pt-32 pb-24">
<h1 className="text-2xl font-bold mb-8 text-center">
Log in to b01lers CTF
Log in to b01lers internal CTF
</h1>

<LoginContent />
Expand Down
2 changes: 1 addition & 1 deletion app/profile/TeamInvite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { BsChevronUp } from 'react-icons/bs';


export default function TeamInvite(props: { token: string }) {
const url = `https://b01lersc.tf/login?token=${encodeURIComponent(props.token)}`;
const url = `https://internal.b01lersc.tf/login?token=${encodeURIComponent(props.token)}`;

function copy() {
void navigator.clipboard.writeText(url);
Expand Down
2 changes: 1 addition & 1 deletion app/recover/RecoverContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function RecoverContent() {
return !recovered ? (
<>
<h1 className="text-2xl font-bold mb-8 text-center">
Recover your b01lers CTF account
Recover your b01lers internal CTF account
</h1>

<form
Expand Down
2 changes: 1 addition & 1 deletion app/register/RegisterContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function RegisterContent() {
return !registered ? (
<>
<h1 className="text-2xl font-bold mb-6 text-center">
Register for b01lers CTF
Register for b01lers internal CTF
</h1>
<p className="text-center text-primary mb-8">
Please register one account per team.
Expand Down
2 changes: 1 addition & 1 deletion components/CTFNotStarted.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default function CTFNotStarted() {
<FaRegClock className="text-5xl" />
<div>
<h1 className="font-semibold text-2xl">
b01lers CTF has not started yet.
b01lers internal CTF has not started yet.
</h1>
</div>
</div>
Expand Down
Loading

0 comments on commit 7b78f84

Please sign in to comment.