-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: display meeting indexes by semester
fix: improve calendar event handling and metadata refactor: update button class names and styles across multiple components
- Loading branch information
1 parent
657b00c
commit 08e70e6
Showing
30 changed files
with
496 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,43 @@ | ||
export const meetingMetatypes = [ | ||
'general', | ||
'ctf', | ||
'purple', | ||
'embedded', | ||
]; | ||
|
||
'general', | ||
'seminar', | ||
'ctf', | ||
'purple', | ||
'embedded', | ||
]; | ||
|
||
export type MeetingMetatype = typeof meetingMetatypes[number]; | ||
|
||
export interface MeetingMetadata { | ||
name: string; | ||
shortName: string; | ||
} | ||
name: string; | ||
shortName: string; | ||
description?: string; | ||
}; | ||
|
||
export const meetingMetadata: Record<MeetingMetatype, MeetingMetadata> = { | ||
'general': { | ||
name: 'General', | ||
shortName: 'General', | ||
}, | ||
'ctf': { | ||
name: 'CTF Team', | ||
shortName: 'CTF', | ||
}, | ||
'purple': { | ||
name: 'Purple Team', | ||
shortName: 'Purple', | ||
}, | ||
'embedded': { | ||
name: 'Embedded Team', | ||
shortName: 'Embedded', | ||
}, | ||
'general': { | ||
name: 'General Meetings', | ||
shortName: 'General', | ||
description: 'Attend our weekly general meetings to learn fundamental skills in cybersecurity.', | ||
}, | ||
'seminar': { | ||
name: 'Seminar Meetings', | ||
shortName: 'Seminar', | ||
description: 'Attend our seminars to discuss advanced and novel research topics in cybersecurity.', | ||
}, | ||
'ctf': { | ||
name: 'CTF Team', | ||
shortName: 'CTF', | ||
description: 'Compete in "Capture the Flag" events to hone your cybersecurity skills.', | ||
}, | ||
'purple': { | ||
name: 'Purple Team', | ||
shortName: 'Purple', | ||
description: 'Learn red-teaming (offensive) and blue-teaming (defensive) skills to secure systems and networks.', | ||
}, | ||
'embedded': { | ||
name: 'Embedded Team', | ||
shortName: 'Embedded', | ||
description: 'Build secure embedded systems and learn about hardware hacking!', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { useState } from 'react'; | ||
import type { Placement } from '@floating-ui/react'; | ||
import { | ||
Popover, | ||
PopoverTrigger, | ||
PopoverContent, | ||
} from '@/components/Popover'; | ||
import Menu from '@/components/Menu'; | ||
import { ChevronUpDownFilled } from '$/components/Icons/fluentui'; | ||
|
||
interface DropdownSelectOptionsProps { | ||
id: string; | ||
displayText?: string; | ||
href?: string; | ||
} | ||
|
||
interface DropdownSelectProps { | ||
children?: React.ReactNode; | ||
contentRootClassName?: string; | ||
options: DropdownSelectOptionsProps[]; | ||
selectedId: string; | ||
displayText?: string; | ||
onSelect?: (selected: string) => void; | ||
placement?: Placement; | ||
} | ||
|
||
export default function DropdownSelect(props: DropdownSelectProps) { | ||
const [open, setOpen] = useState(false); | ||
const selectedText = props.displayText ?? props.options.find((option) => option.id === props.selectedId)?.displayText ?? props.selectedId; | ||
|
||
return ( | ||
<Popover open={open} onOpenChange={setOpen} placement={props.placement ?? "bottom-start"}> | ||
<PopoverTrigger | ||
onClick={() => setOpen(!open)} | ||
className={`button flex flex-row gap-2 items-center justify-between bg-surface-100 hover:bg-surface-150 text-white w-full border border-surface-200 pr-1 ${open ? "ring-primary ring-2 ring-offset-2 ring-offset-surface-000" : ""}`} | ||
> | ||
<span className="truncate">{selectedText}</span> | ||
<ChevronUpDownFilled /> | ||
</PopoverTrigger> | ||
<PopoverContent className={props.contentRootClassName}> | ||
{props.children} | ||
</PopoverContent> | ||
</Popover> | ||
); | ||
}; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
import Layout from '@/layouts/Base.astro'; | ||
--- | ||
<Layout | ||
title="Meetings" | ||
description="Index of SIGPwny meetings" | ||
> | ||
<div class="flex flex-col mx-auto page-width-lg pb-8"> | ||
<h1>Meetings</h1> | ||
<nav> | ||
<span>TODO: Select Semester</span> | ||
</nav> | ||
<slot /> | ||
</div> | ||
</Layout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.