Add password-protected NCERT workshop pages

This commit is contained in:
Neeldhara Misra 2026-07-16 10:45:20 +05:30
parent 3f53d3c289
commit 3c694517fc
12 changed files with 871 additions and 16 deletions

View file

@ -41,7 +41,9 @@ const shouldRenderBody = !isOverview || showOverviewContent || showScheduleBlock
const shouldUseWideBody = Boolean(isOverview && event.showScheduleOnOverview);
const scheduleAsTabs =
showScheduleBlock && event.scheduleDisplay === "tabs" && (event.schedule?.length ?? 0) > 1;
const showHeroScheduleLink = Boolean(schedulePage && !event.showScheduleOnOverview);
const showHeroScheduleLink = Boolean(
schedulePage && !event.showScheduleOnOverview && event.showScheduleLinkInHero !== false,
);
const hasHeroActions = Boolean(event.sourceUrl || showHeroScheduleLink);
---
@ -54,9 +56,10 @@ const hasHeroActions = Boolean(event.sourceUrl || showHeroScheduleLink);
brandTitle={eventTitle}
brandSubtitle="Event home"
navItems={navItems}
accessPassword={event.accessPassword}
>
{isOverview ? (
<section class:list={["event-hero", `event-hero--${theme}`]}>
<section class:list={["event-hero", `event-hero--${theme}`, event.slug === "ncert" && "event-hero--narrow"]}>
<div class="event-hero__content">
<p class="eyebrow">{event.kind} / {event.year}</p>
<h1>{event.title}</h1>
@ -123,9 +126,24 @@ const hasHeroActions = Boolean(event.sourceUrl || showHeroScheduleLink);
)}
{isOverview && showOverviewContent && event.links && (
<section class="link-strip" aria-label="Related links">
{event.links.map((link) => <a href={link.href}>{link.label}</a>)}
</section>
event.slug === "ncert" ? (
<section class="content-section quick-links" aria-labelledby="quick-links-title">
<p class="eyebrow">Quick links</p>
<h2 id="quick-links-title">Working documents and handbooks</h2>
<div class="quick-link-grid">
{event.links.map((link) => (
<a href={link.href} target="_blank" rel="noreferrer">
<span>{link.label}</span>
<strong aria-hidden="true">Open ↗</strong>
</a>
))}
</div>
</section>
) : (
<section class="link-strip" aria-label="Related links">
{event.links.map((link) => <a href={link.href}>{link.label}</a>)}
</section>
)
)}
{isOverview && showOverviewContent && overviewSections.map((section) => (
@ -143,6 +161,35 @@ const hasHeroActions = Boolean(event.sourceUrl || showHeroScheduleLink);
{section.bullets.map((bullet) => <li>{bullet}</li>)}
</ul>
)}
{section.links && (
<div class="resource-grid">
{section.links.map((link) => (
<a href={link.href} target="_blank" rel="noreferrer">
<span>{link.label}</span>
{link.description && <small>{link.description}</small>}
<strong aria-hidden="true">Open PDF ↗</strong>
</a>
))}
</div>
)}
{section.entries && (
<div class="minutes-list">
{section.entries.map((entry) => (
<article class="minutes-entry">
<header>
{entry.meta && <p>{entry.meta}</p>}
<h3>{entry.title}</h3>
</header>
{entry.body.map((paragraph) => <p>{paragraph}</p>)}
{entry.bullets && (
<ul>
{entry.bullets.map((bullet) => <li>{bullet}</li>)}
</ul>
)}
</article>
))}
</div>
)}
{section.table && (
<div class="table-wrap">
<table>
@ -196,6 +243,35 @@ const hasHeroActions = Boolean(event.sourceUrl || showHeroScheduleLink);
{currentSection.bullets.map((bullet) => <li>{bullet}</li>)}
</ul>
)}
{currentSection.links && (
<div class="resource-grid">
{currentSection.links.map((link) => (
<a href={link.href} target="_blank" rel="noreferrer">
<span>{link.label}</span>
{link.description && <small>{link.description}</small>}
<strong aria-hidden="true">Open PDF ↗</strong>
</a>
))}
</div>
)}
{currentSection.entries && (
<div class="minutes-list">
{currentSection.entries.map((entry) => (
<article class="minutes-entry">
<header>
{entry.meta && <p>{entry.meta}</p>}
<h3>{entry.title}</h3>
</header>
{entry.body.map((paragraph) => <p>{paragraph}</p>)}
{entry.bullets && (
<ul>
{entry.bullets.map((bullet) => <li>{bullet}</li>)}
</ul>
)}
</article>
))}
</div>
)}
{currentSection.table && (
<div class="table-wrap">
<table>