-
Notifications
You must be signed in to change notification settings - Fork 3
Add newsletter and wiki archives #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
009da51
Add discoverable newsletter and wiki archives
andrewsoonqn 6fbc6e0
Host newsletter PDF in team storage
andrewsoonqn 2e46aa0
Clarify newsletter edition label
andrewsoonqn b12aecf
Preserve historical newsletters
andrewsoonqn 357ef96
Remove unavailable newsletter year
andrewsoonqn 2bcebf2
Show only available newsletter years
andrewsoonqn 626c2f0
Route archive menus to publications
andrewsoonqn dbe486e
Keep archive links in sync
andrewsoonqn a7e7f87
Clarify dropdown interaction safeguards
andrewsoonqn f304a41
Keep archive keyboard paths consistent
andrewsoonqn 3ead56d
Complete the AY24/25 newsletter archive
andrewsoonqn 07b5e61
Keep archive navigation consistent
andrewsoonqn 5f897d1
Allow repeated dropdown destinations
andrewsoonqn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,6 @@ | ||
| import ArchivePage from '@/components/ArchivePage'; | ||
| import { newsletterArchive } from '@/lib/archive'; | ||
|
|
||
| export default function NewsletterPage() { | ||
| return <ArchivePage archive={newsletterArchive} />; | ||
| } |
This file contains hidden or 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,6 @@ | ||
| import ArchivePage from '@/components/ArchivePage'; | ||
| import { wikiArchive } from '@/lib/archive'; | ||
|
|
||
| export default function WikiPage() { | ||
| return <ArchivePage archive={wikiArchive} />; | ||
| } |
This file contains hidden or 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,79 @@ | ||
| import { ExternalLinkIcon } from 'lucide-react'; | ||
| import Image from 'next/image'; | ||
| import Link from 'next/link'; | ||
|
|
||
| import { anchorForArchiveYear, type ArchiveDefinition } from '@/lib/archive'; | ||
|
|
||
| export default function ArchivePage({ | ||
| archive, | ||
| }: { | ||
| archive: ArchiveDefinition; | ||
| }) { | ||
| return ( | ||
| <> | ||
| <section className='relative h-80 w-full overflow-hidden md:h-104'> | ||
| <Image | ||
| src='/images/hero.jpg' | ||
| alt='Students performing at a NUS College event' | ||
| fill | ||
| sizes='100vw' | ||
| className='object-cover' | ||
| priority | ||
| /> | ||
| <div className='absolute inset-0 bg-linear-to-b from-[rgba(29,107,173,0)] to-[#0C2C47]' /> | ||
| <div className='relative z-10 flex h-full items-end px-8 pb-12 md:px-16 md:pb-16'> | ||
| <h1 className='text-4xl font-bold text-white md:text-6xl'> | ||
| {archive.name} | ||
| </h1> | ||
| </div> | ||
| </section> | ||
|
|
||
| <section className='bg-white px-8 py-14 md:px-16 md:py-20'> | ||
| <div className='mx-auto max-w-7xl'> | ||
| <p className='max-w-3xl text-lg leading-8 text-gray-600'> | ||
| {archive.description} | ||
| </p> | ||
|
|
||
| <div className='mt-12 grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3'> | ||
| {archive.years.map((year) => ( | ||
| <article | ||
| key={year.year} | ||
| id={anchorForArchiveYear(year.year)} | ||
| className='flex min-h-56 scroll-mt-24 flex-col items-center justify-center bg-[#FFF4E5] p-8 text-center' | ||
| > | ||
| <h2 className='text-2xl font-bold text-[#0C2C47] uppercase'> | ||
| {year.year} | ||
| </h2> | ||
| {year.editions ? ( | ||
| <ul className='mt-6 space-y-3'> | ||
| {year.editions.map((edition) => ( | ||
| <li key={edition.href}> | ||
| <Link | ||
| href={edition.href} | ||
| target='_blank' | ||
| rel='noopener noreferrer' | ||
| className='inline-flex items-center gap-2 font-semibold text-[#FF7D4E] underline decoration-2 underline-offset-4 hover:text-[#0C2C47] focus-visible:text-[#0C2C47]' | ||
| > | ||
| {edition.label} | ||
| <ExternalLinkIcon | ||
| className='h-4 w-4 shrink-0' | ||
| aria-hidden='true' | ||
| /> | ||
| <span className='sr-only'>(opens in a new tab)</span> | ||
| </Link> | ||
| </li> | ||
| ))} | ||
| </ul> | ||
| ) : ( | ||
| <p className='mt-6 font-semibold text-gray-500'> | ||
| FORTHCOMING | ||
| </p> | ||
| )} | ||
| </article> | ||
| ))} | ||
| </div> | ||
| </div> | ||
| </section> | ||
| </> | ||
| ); | ||
| } | ||
This file contains hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.