/* ============================================================
PRAVI — RESOURCES PAGE (Essays · Events · Feed, each Load more)
============================================================ */
const { useState, useEffect, useRef } = React;
const P = window.PRAVI;
const ChevronMark = window.PraviChevronMark;
const HomeNav = window.PraviHomeNav;
const HomeFooter = window.PraviHomeFooter;
const CtaBand = window.PraviCtaBand;
const PageHero = window.PraviPageHero;
const useReveal = window.praviUseReveal;
const useScrollFX = window.praviUseScrollFX;
const useHashScroll = window.praviUseHashScroll;
const Head = window.PraviHead;
const ProgressBar = window.PraviProgressBar;
const Blob = window.PraviBlob;
function Mark({ style = {} }) {
return (
);
}
function LoadMore({ onClick, label }) {
return (
{label}
);
}
function SectionHead({ title, accent, blue, note }) {
return (
{title} {accent} {blue && <> {blue} >}
{note &&
{note}
}
);
}
/* ---------- Essays ---------- */
function Essays() {
const [n, setN] = useState(3);
const shown = P.blogs.slice(0, n);
return (
{n < P.blogs.length && setN(P.blogs.length)} className="btn ghost">Load more blogs }
{n >= P.blogs.length && n > 3 && setN(3)} className="btn ghost">See less }
);
}
/* ---------- Events ---------- */
function Events() {
const [n, setN] = useState(2);
const shown = P.events.slice(0, n);
return (
{shown.map((e, i) => (
ev.target.style.display = 'none'} />
{e.date}
{e.title}
{e.desc}
))}
{n < P.events.length &&
setN(P.events.length)} />}
);
}
/* ---------- Feed (LinkedIn) ---------- */
const LINKEDIN_EMBEDS = [
{ embedUrl: 'https://www.linkedin.com/embed/feed/update/urn:li:activity:7458153193127108609?collapsed=1' },
{ embedUrl: 'https://www.linkedin.com/embed/feed/update/urn:li:activity:7469746039751696384?collapsed=1' },
{ embedUrl: 'https://www.linkedin.com/embed/feed/update/urn:li:activity:7454801646989066240?collapsed=1' },
{ embedUrl: 'https://www.linkedin.com/embed/feed/update/urn:li:activity:7334579366330306560?collapsed=1' },
{ embedUrl: 'https://www.linkedin.com/embed/feed/update/urn:li:activity:7335587985469427713?collapsed=1' },
{ embedUrl: 'https://www.linkedin.com/embed/feed/update/urn:li:activity:7333309541809274881?collapsed=1' },
{ embedUrl: 'https://www.linkedin.com/embed/feed/update/urn:li:activity:7331386972109733888?collapsed=1' },
{ embedUrl: 'https://www.linkedin.com/embed/feed/update/urn:li:activity:7329461069049929729?collapsed=1' },
];
function Feed() {
const [showAll, setShowAll] = useState(false);
return (
{LINKEDIN_EMBEDS.map((post, i) => (
= 3) ? 'none' : 'block', ['--d']: ((i % 3) * 90) + 'ms' }}>
))}
{!showAll && setShowAll(true)} className="btn ghost">Load more posts }
{showAll && setShowAll(false)} className="btn ghost">See less }
);
}
function Resources() {
const stageRef = useRef(null);
useReveal(stageRef);
useScrollFX(stageRef);
useHashScroll();
return (
Ideas, out in the open. >}
lead="The essays we write, the rooms we convene, and the threads we share. A running record of how Pravi thinks about governance, policy, and technology."
buttons={<>
Read the blogs
{/* See events */}
>}
/>
{/* */}
);
}
ReactDOM.createRoot(document.getElementById('root')).render( );