8000 Aryan by aryansinha1908 · Pull Request #1 · aryansinha1908/pcon · GitHub
[go: up one dir, main page]

Skip to content
Merged
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
87 changes: 44 additions & 43 deletions app/achievements/achievements.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,56 +3,57 @@

/* ───── Hero ───── */
.ach-hero { position: relative; isolation: isolate; padding: 104px 0 80px; text-align: center; }
.ach-hero__backdrop { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse 55% 60% at 50% 0%, rgb(39 201 173 / 20%), transparent 70%); }
.ach-hero__backdrop::after { position: absolute; inset: 0; background-image: radial-gradient(rgb(134 193 163 / 22%) .8px, transparent .8px); background-size: 22px 22px; mask-image: radial-gradient(ellipse 60% 70% at 50% 30%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 30%, #000 20%, transparent 75%); content: ""; }
.ach-hero__backdrop { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse 55% 60% at 50% 0%, rgb(39 201 173 / 9%), transparent 70%); }
.ach-hero__backdrop::after { position: absolute; inset: 0; background-image: radial-gradient(rgb(134 193 163 / 12%) .8px, transparent .8px); background-size: 22px 22px; mask-image: radial-gradient(ellipse 60% 70% at 50% 30%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 30%, #000 20%, transparent 75%); content: ""; }
.ach-hero .eyebrow { justify-content: center; }
.ach-hero h1 { margin: 24px 0 18px; font: 700 clamp(48px, 7.5vw, 92px)/1.02 var(--display); letter-spacing: -.06em; }
.ach-hero h1 span { color: var(--mint); text-shadow: 0 0 60px rgb(39 201 173 / 35%); }
.ach-hero .eyebrow, .ach-section .section-label { color: var(--text-muted); font-size: 12px; letter-spacing: .02em; text-transform: none; }
.ach-hero h1 { margin: 24px 0 20px; font: 600 clamp(44px, 7vw, 84px)/1.04 var(--display); letter-spacing: -.035em; }
.ach-hero h1 span { color: var(--mint); }
.ach-hero p { max-width: 560px; margin: 0 auto; color: var(--text-muted); font-size: 16px; line-height: 1.75; }

.ach-stats { display: inline-grid; grid-template-columns: repeat(4, auto); margin: 40px 0 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: rgb(3 15 13 / 70%); list-style: none; }
.ach-stats li { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 26px; }
.ach-stats li + li { border-left: 1px solid var(--line); }
.ach-stats strong { color: var(--mint); font: 22px/1 var(--pixel); text-shadow: 0 0 20px rgb(0 255 160 / 35%); }
.ach-stats span { color: var(--text-faint); font: 10px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.ach-stats { display: inline-grid; grid-template-columns: repeat(4, auto); margin: 40px 0 0; padding: 0; overflow: hidden; border: 1px solid var(--hairline); border-radius: var(--radius-card); background: var(--ink-raised); list-style: none; }
.ach-stats li { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 24px; }
.ach-stats li + li { border-left: 1px solid var(--hairline); }
.ach-stats strong { color: var(--paper); font: 20px/1 var(--pixel); font-variant-numeric: tabular-nums; }
.ach-stats span { color: var(--text-muted); font: 12px/1.3 var(--mono); }

/* ───── Sections ───── */
.ach-section { border-top: 1px solid var(--line); }
.ach-section h2 { margin: 26px 0 44px; }
.ach-section h2 { margin: 24px 0 40px; }
.ach-section h2 span, .ach-band h2 span { text-shadow: none; }
.ach-section--grid { background: var(--ink-deep); }

/* ───── Featured ───── */
.feat { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); overflow: hidden; border: 1px solid var(--line-strong); border-radius: 22px; background: linear-gradient(150deg, rgb(14 48 41 / 70%), rgb(3 15 13 / 92%) 55%); box-shadow: 0 30px 80px -20px rgb(0 0 0 / 70%), 0 0 70px -20px rgb(0 255 160 / 25%); }
.feat { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-panel); background: linear-gradient(150deg, rgb(14 48 41 / 70%), rgb(3 15 13 / 92%) 55%); box-shadow: 0 30px 80px -20px rgb(0 0 0 / 70%); }
.feat__photo { position: relative; min-height: 420px; background: var(--ink-raised); }
.feat__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feat__body { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 14px; padding: clamp(28px, 4vw, 52px); }
.feat__rank { margin: 6px 0 0; color: var(--paper); font: clamp(72px, 9vw, 120px)/.9 var(--pixel); letter-spacing: -.04em; text-shadow: 0 0 50px rgb(0 255 160 / 35%); }
.feat__body { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 16px; padding: clamp(24px, 4vw, 48px); }
.feat__rank { margin: 6px 0 0; color: var(--paper); font: clamp(72px, 9vw, 120px)/.9 var(--pixel); letter-spacing: -.04em; }
.feat__rank span { color: var(--mint); font-size: .55em; vertical-align: .55em; }
.feat__body h3 { margin: 0; font: 700 clamp(24px, 2.8vw, 34px)/1.15 var(--display); letter-spacing: -.035em; }
.feat__highlight { display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 8px 14px; border: 1px solid rgb(245 196 81 / 45%); border-radius: 999px; background: rgb(245 196 81 / 10%); color: #f5c451; font: 600 14px var(--sans); }
.feat__highlight::before { content: "★"; }
.feat__meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 14px 28px; width: 100%; margin: 10px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.feat__meta dt { color: var(--text-faint); font: 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.feat__meta dd { margin: 6px 0 0; color: var(--paper-dim); font-size: 14px; }
.feat__body h3 { margin: 0; font: 600 clamp(24px, 2.8vw, 34px)/1.15 var(--display); letter-spacing: -.02em; }
.feat__highlight { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 8px 12px; border: 1px solid rgb(245 196 81 / 45%); border-radius: 999px; background: rgb(245 196 81 / 10%); color: #f5c451; font: 600 14px var(--sans); }
.feat__meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 16px 32px; width: 100%; margin: 8px 0 0; padding-top: 16px; border-top: 1px solid var(--hairline); }
.feat__meta dt { color: var(--text-muted); font: 12px/1 var(--mono); }
.feat__meta dd { margin: 8px 0 0; color: var(--paper-dim); font-size: 14px; }

/* ───── Grid of milestones ───── */
.ach-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ach-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: rgb(6 25 20 / 60%); transition: translate .35s cubic-bezier(.16, 1, .3, 1), border-color .25s, box-shadow .35s; }
.ach-card:hover { translate: 0 -6px; border-color: var(--line-strong); box-shadow: 0 24px 50px rgb(0 0 0 / 40%), 0 0 44px rgb(0 255 160 / 10%); }
.ach-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 1px solid var(--hairline); border-radius: var(--radius-card); background: var(--ink-raised); transition: border-color var(--dur-fast) var(--ease); }
.ach-card:hover { border-color: var(--line-strong); }
.ach-card__photo { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ink-raised); }
.ach-card__photo img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85); transition: scale .6s cubic-bezier(.16, 1, .3, 1), filter .3s; }
.ach-card:hover .ach-card__photo img { scale: 1.05; filter: none; }
.ach-card__photo img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85); transition: filter var(--dur-enter) var(--ease); }
.ach-card:hover .ach-card__photo img { filter: none; }
/* Fade the photo into the card. */
.ach-card__photo::after { position: absolute; inset: auto 0 0; height: 45%; background: linear-gradient(to top, rgb(3 15 13 / 85%), transparent); content: ""; }
.ach-card__body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 22px; }
.ach-card__kind { color: var(--mint); font: 10.5px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.ach-card h3 { margin: 0; font: 650 19px/1.25 var(--display); letter-spacing: -.025em; }
.ach-card__org { margin: 0; color: var(--text-muted); font-size: 13.5px; }
.ach-card__highlight { margin: 4px 0 0; color: var(--paper-dim); font-size: 13px; }
.ach-card__body { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px 20px; }
.ach-card__kind { margin-bottom: 4px; color: var(--mint); font: 12px/1.4 var(--mono); }
.ach-card h3 { margin: 0; font: 600 18px/1.3 var(--display); letter-spacing: -.01em; }
.ach-card__org { margin: 0; color: var(--text-muted); font-size: 14px; }
.ach-card__highlight { margin: 4px 0 0; color: var(--paper-dim); font-size: 14px; }

/* Result badge pinned to the photo. */
.result { position: absolute; z-index: 1; top: 14px; left: 14px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border: 1px solid currentColor; border-radius: 999px; background: rgb(1 8 6 / 82%); font: 600 12px/1 var(--sans); letter-spacing: .02em; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.result::before { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; content: ""; }
.result { position: absolute; z-index: 1; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid currentColor; border-radius: 999px; background: rgb(1 8 6 / 82%); font: 600 12px/1 var(--sans); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.result::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.result--winner { color: #f5c451; }
.result--runner-up { color: #cbd5e1; }
.result--finalist { color: var(--mint); }
Expand All @@ -63,13 +64,13 @@
.ach-vision h2 { margin-bottom: 0; }
.ach-vision__terminal { width: 100%; margin: 0; }
.ach-vision__list { display: grid; gap: 12px; margin: 0; list-style: none; white-space: normal; }
.ach-vision__list li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; font-size: 13.5px; line-height: 1.6; }
.ach-vision__list li { display: grid; grid-template-columns: 28px 1fr; gap: 8px; font-size: 14px; line-height: 1.6; }

/* ───── Closing band ───── */
.ach-band { padding: 90px 0; border-top: 1px solid var(--line); background: radial-gradient(ellipse 50% 80% at 50% 100%, rgb(245 196 81 / 9%), transparent 70%); text-align: center; }
.ach-band__inner { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.ach-band p { margin: 0; color: var(--text-faint); font: 12px var(--mono); }
.ach-band h2 { margin: 0 0 8px; font: 600 clamp(30px, 4vw, 46px)/1.1 var(--display); letter-spacing: -.05em; }
.ach-band { padding: 96px 0; border-top: 1px solid var(--line); text-align: center; }
.ach-band__inner { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.ach-band p { margin: 0; color: var(--text-muted); font: 12px var(--mono); }
.ach-band h2 { margin: 0 0 8px; font: 600 clamp(30px, 4vw, 46px)/1.1 var(--display); letter-spacing: -.025em; }
.ach-band h2 span { color: #f5c451; }

/* ───── Responsive ───── */
Expand All @@ -80,29 +81,29 @@
@media (max-width: 900px) {
.feat { grid-template-columns: 1fr; }
.feat__photo { min-height: 0; aspect-ratio: 4 / 3; }
.ach-vision__inner { grid-template-columns: 1fr; gap: 28px; }
.ach-vision__inner { grid-template-columns: 1fr; gap: 32px; }
.ach-stats { grid-template-columns: repeat(2, auto); }
.ach-stats li:nth-child(3) { border-left: 0; }
.ach-stats li:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

@media (max-width: 640px) {
.ach-hero { padding: 64px 0 52px; }
.ach-hero h1 { font-size: clamp(42px, 13vw, 58px); }
.ach-hero { padding: 64px 0 48px; }
.ach-hero h1 { font-size: clamp(38px, 12vw, 52px); }
.ach-hero p { font-size: 14px; }
.ach-stats { grid-template-columns: repeat(2, 1fr); width: 100%; }
.ach-stats li { padding: 14px 10px; }
.ach-stats li { padding: 16px 8px; }
.ach-stats strong { font-size: 18px; }
.ach-section h2 { margin-bottom: 32px; }
.ach-grid { grid-template-columns: 1fr; }
.feat { border-radius: 18px; }
.feat { border-radius: var(--radius-card); }
.feat__rank { font-size: 64px; }
}

/* Achievements without a photo, and a featured result that isn't a rank. */
.ach-photo-fallback { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(ellipse 70% 70% at 30% 20%, rgb(0 255 160 / 18%), transparent 70%), radial-gradient(rgb(134 193 163 / 18%) .8px, transparent .8px) 0 0 / 18px 18px, var(--ink-raised); }
.ach-photo-fallback span { color: var(--mint); font: clamp(28px, 4vw, 44px)/1 var(--pixel); text-shadow: 0 0 26px rgb(0 255 160 / 45%); }
.ach-photo-fallback { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(ellipse 70% 70% at 30% 20%, rgb(0 255 160 / 8%), transparent 70%), radial-gradient(rgb(134 193 163 / 12%) .8px, transparent .8px) 0 0 / 18px 18px, var(--ink-raised); }
.ach-photo-fallback span { color: var(--mint); font: clamp(28px, 4vw, 44px)/1 var(--pixel); opacity: .7; }
.ach-card__photo img { display: block; }
.feat__result { margin: 6px 0 0; font: clamp(40px, 5vw, 64px)/1 var(--pixel); text-shadow: 0 0 40px currentColor; }
.feat__result { margin: 6px 0 0; font: clamp(40px, 5vw, 64px)/1 var(--pixel); }
.ach-empty { width: min(640px, 100%); margin: 0; }
.ach-empty .terminal__body { white-space: normal; }
32 changes: 20 additions & 12 deletions app/achievements/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Metadata } from "next";
import Image from "next/image";
import Link from "next/link";
import { ArrowIcon } from "@/components/brand";
import { ScrollReveal } from "@/components/scroll-reveal";
Expand All @@ -21,8 +22,15 @@ export const metadata: Metadata = {
openGraph: { ...baseOpenGraph, title: "Achievements · PCON", description, url: "/achievements" },
};

function Photo({ image, eager = false }: { image: ClubAchievement["image"]; eager?: boolean }) {
/** Local uploads and Cloudinary are allow-listed for next/image (resized, WebP/AVIF). */
const optimizable = (src: string) => src.startsWith("/") || src.startsWith("https://res.cloudinary.com/");

function Photo({ image, eager = false, sizes }: { image: ClubAchievement["image"]; eager?: boolean; sizes: string }) {
if (!image) return <div className="ach-photo-fallback" aria-hidden="true"><span>{"{ }"}</span></div>;
// Phones get a photo sized for their screen instead of the full-resolution original.
if (optimizable(image.src)) {
return <Image src={image.src} alt={image.alt} fill sizes={sizes} priority={eager} loading={eager ? undefined : "lazy"} />;
}
// eslint-disable-next-line @next/next/no-img-element -- admin-entered images can live on any host (uploads, Cloudinary, links), so next/image would need every host allow-listed.
return <img src={image.src} alt={image.alt} loading={eager ? "eager" : "lazy"} />;
}
Expand All @@ -32,7 +40,7 @@ function Featured({ achievement }: { achievement: ClubAchievement }) {
return (
<article className="feat" data-reveal>
<div className="feat__photo">
<Photo image={achievement.image} eager />
<Photo image={achievement.image} eager sizes="(max-width: 900px) 100vw, 560px" />
</div>
<div className="feat__body">
<span className="chip chip--live">{achievement.kind} · {achievement.year}</span>
Expand All @@ -58,7 +66,7 @@ function Card({ achievement }: { achievement: ClubAchievement }) {
<div data-reveal>
<article className="ach-card">
<div className="ach-card__photo">
<Photo image={achievement.image} />
<Photo image={achievement.image} sizes="(max-width: 640px) 100vw, (max-width: 1100px) 50vw, 380px" />
<span className={`result result--${achievement.tier}`}>{achievement.result}</span>
</div>
<div className="ach-card__body">
Expand Down Expand Up @@ -87,8 +95,8 @@ export default async function AchievementsPage() {
<section className="ach-hero" aria-labelledby="ach-title">
<div className="ach-hero__backdrop" aria-hidden="true" />
<div className="shell">
<div className="eyebrow"><span className="status-dot" /> PCON · ACHIEVEMENTS</div>
<h1 id="ach-title">Where PCON<br /><span>shows up.</span></h1>
<div className="eyebrow"><span className="status-dot" /> PCON · Achievements</div>
<h1 id="ach-title">Where PCON<br /><span>shows up</span></h1>
<p>
Since {FOUNDED}, the club has carried its coding culture beyond campus, to the ICPC regionals and
national hackathons. A few of the milestones.
Expand All @@ -107,17 +115,17 @@ export default async function AchievementsPage() {
{featured && (
<section className="section-pad ach-section" aria-labelledby="feat-title">
<div className="shell">
<div className="section-label"><span>01 / HIGHLIGHT</span><i /></div>
<h2 id="feat-title">The <span>headline.</span></h2>
<div className="section-label"><span>01 / Highlight</span><i /></div>
<h2 id="feat-title">Our <span>best finish</span></h2>
<Featured achievement={featured} />
</div>
</section>
)}

<section className="section-pad ach-section ach-section--grid" aria-labelledby="all-title">
<div className="shell">
<div className="section-label"><span>{featured ? "02" : "01"} / MILESTONES</span><i /></div>
<h2 id="all-title">On the <span>big stages.</span></h2>
<div className="section-label"><span>{featured ? "02" : "01"} / Milestones</span><i /></div>
<h2 id="all-title">On the <span>big stages</span></h2>
{rest.length > 0 ? (
<div className="ach-grid">
{rest.map((a) => <Card achievement={a} key={a.id} />)}
Expand All @@ -137,8 +145,8 @@ export default async function AchievementsPage() {
<section className="section-pad ach-section ach-vision" aria-labelledby="vision-title">
<div className="shell ach-vision__inner">
<div>
<div className="section-label"><span>THE GOAL SINCE {FOUNDED}</span><i /></div>
<h2 id="vision-title">Why we <span>compete.</span></h2>
<div className="section-label"><span>The goal since {FOUNDED}</span><i /></div>
<h2 id="vision-title">Why we <span>compete</span></h2>
</div>
<div className="terminal ach-vision__terminal" data-reveal>
<div className="terminal__bar" aria-hidden="true"><i /><i /><i /><span>pcon — vision.md</span></div>
Expand All @@ -154,7 +162,7 @@ export default async function AchievementsPage() {
<section className="ach-band">
<div className="shell ach-band__inner" data-reveal>
<p><span className="terminal__prompt" aria-hidden="true">$</span> cd ../hall-of-fame</p>
<h2>Winners of <span>our own contests.</span></h2>
<h2>Winners of <span>our own contests</span></h2>
<Link className="button button--outline" href="/hall-of-fame">Visit the Hall of Fame <ArrowIcon /></Link>
</div>
</section>
Expand Down
4 changes: 4 additions & 0 deletions app/admin/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,10 @@
.adm-login p { margin: 0; }
.adm-login__back { align-self: center; margin-top: 6px; color: var(--adm-muted); font-size: 12px; }
.adm-login__back:hover { color: var(--mint); }
.adm-login__card > * { min-width: 0; }
.adm-login__dev { flex-direction: column; gap: 4px; height: auto; min-height: 44px; padding: 8px 12px; border: 1px dashed var(--adm-line-strong); white-space: normal; text-align: center; }
.adm-login__dev span { font-weight: 600; }
.adm-login__dev small { max-width: 100%; color: var(--adm-muted); font: 12px/1.3 var(--mono); overflow-wrap: anywhere; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
Expand Down
Loading
Loading
0