WebsiteBench / tasks /linkedin /solution /site /implementation /clone /components /PublicExplore.tsx
Download tasks/linkedin/solution/site/implementation/clone/components/PublicExplore.tsx from TIGER-Lab/WebsiteBench: direct link, hf CLI and curl.
- Browser
- Download file 13 kB
-
https://huggingface.co/datasets/TIGER-Lab/WebsiteBench/resolve/main/tasks/linkedin/solution/site/implementation/clone/components/PublicExplore.tsx
- Command line
-
hf download hf://datasets/TIGER-Lab/WebsiteBench/tasks/linkedin/solution/site/implementation/clone/components/PublicExplore.tsx
-
curl -L -o PublicExplore.tsx https://huggingface.co/datasets/TIGER-Lab/WebsiteBench/resolve/main/tasks/linkedin/solution/site/implementation/clone/components/PublicExplore.tsx
13 kB
| "use client"; | |
| import Link from "next/link"; | |
| import { useMemo, useState } from "react"; | |
| import { ArrowRight, BookOpen, CheckCircle2, ChevronDown, Gamepad2, Lock, Play, Search, Sparkles, Users } from "lucide-react"; | |
| import { Brand } from "./Brand"; | |
| import { ReplicaSafetyNotice } from "./ReplicaSafetyNotice"; | |
| const courses = [ | |
| { slug: "systems-thinking", title: "Systems Thinking for Product Teams", author: "Nadia Alvarez", level: "Intermediate", time: "1h 42m", type: "Course", software: "Miro" }, | |
| { slug: "excel-modeling", title: "Excel Modeling for Operators", author: "Daniel Kim", level: "Beginner", time: "58m", type: "Course", software: "Excel" }, | |
| { slug: "ai-evaluation", title: "Practical AI Evaluation", author: "Priya Raman", level: "Advanced", time: "2h 15m", type: "Learning Path", software: "Python" }, | |
| { slug: "leadership-rituals", title: "Leadership Rituals for Hybrid Teams", author: "Maya Chen", level: "Intermediate", time: "47m", type: "Course", software: "Notion" }, | |
| ]; | |
| const filterOptions: Record<string, string[]> = { | |
| "Best match": ["Best match", "Newest", "Most popular", "Recently updated"], | |
| Difficulty: ["Beginner", "Intermediate", "Advanced"], | |
| Type: ["Course", "Learning Path", "Video", "Certificate"], | |
| "Completion time": ["Under 30m", "30m-2h", "2h-5h", "5h+"], | |
| Software: ["Excel", "Python", "Miro", "Notion", "Figma"], | |
| }; | |
| const articles = [ | |
| { slug: "career-capital", category: "Career", title: "Career capital is built in boring weekly rituals", author: "Elena Torres", read: "6 min read" }, | |
| { slug: "manager-readme", category: "Leadership", title: "The manager readme is due for a redesign", author: "Andre Wallace", read: "8 min read" }, | |
| { slug: "ai-checklists", category: "Technology", title: "AI checklists work when they name failure modes", author: "Priya Raman", read: "5 min read" }, | |
| ]; | |
| const games = [ | |
| { slug: "logic-grid", title: "Logic Grid", body: "Place five signals into the right operating pattern.", stat: "5 min" }, | |
| { slug: "word-link", title: "Word Link", body: "Connect adjacent work terms before the clock runs down.", stat: "Daily" }, | |
| { slug: "priority-stack", title: "Priority Stack", body: "Sort competing priorities by urgency and impact.", stat: "3 rounds" }, | |
| ]; | |
| export function PublicHeader() { | |
| return ( | |
| <header className="public-header public-header-compact"> | |
| <Brand /> | |
| <nav> | |
| <Link prefetch={false} href="/jobs">Jobs</Link> | |
| <Link prefetch={false} href="/learning">Learning</Link> | |
| <Link prefetch={false} href="/top-content">Top Content</Link> | |
| <Link prefetch={false} href="/games">Games</Link> | |
| <Link prefetch={false} href="/login">Sign in</Link> | |
| <Link prefetch={false} className="button button-outline" href="/register">Join LinkedIn</Link> | |
| </nav> | |
| </header> | |
| ); | |
| } | |
| export function LearningView() { | |
| const [query, setQuery] = useState(""); | |
| const [openFilter, setOpenFilter] = useState<string | null>(null); | |
| const filtered = useMemo(() => { | |
| const normalized = query.toLowerCase(); | |
| return courses.filter((course) => !normalized || `${course.title} ${course.author} ${course.software}`.toLowerCase().includes(normalized)); | |
| }, [query]); | |
| return ( | |
| <div className="public-subpage"> | |
| <PublicHeader /> | |
| <main className="learning-page"> | |
| <section className="public-page-hero"> | |
| <p className="eyebrow-dark">LinkedIn Learning</p> | |
| <h1>Learn practical skills from working professionals</h1> | |
| <form className="learning-search" onSubmit={(event) => event.preventDefault()}> | |
| <Search size={20} /> | |
| <input value={query} onChange={(event) => setQuery(event.target.value)} placeholder="Search skills, software, or instructors" /> | |
| <button className="button button-primary">Search</button> | |
| </form> | |
| </section> | |
| <div className="learning-filter-row"> | |
| {Object.keys(filterOptions).map((filter) => ( | |
| <div className="learning-filter" key={filter}> | |
| <button className={`filter-pill ${openFilter === filter ? "active" : ""}`} type="button" onClick={() => setOpenFilter(openFilter === filter ? null : filter)}> | |
| {filter} <ChevronDown size={16} /> | |
| </button> | |
| {openFilter === filter && ( | |
| <div className="learning-filter-menu"> | |
| {filterOptions[filter].map((option) => <button type="button" key={option}>{option}</button>)} | |
| </div> | |
| )} | |
| </div> | |
| ))} | |
| </div> | |
| <section className="course-grid"> | |
| {filtered.map((course) => ( | |
| <Link prefetch={false} className="course-card" href={`/learning/${course.slug}`} key={course.slug}> | |
| <div><BookOpen size={30} /><span>{course.software}</span></div> | |
| <h2>{course.title}</h2> | |
| <p>{course.author}</p> | |
| <small>{course.level} · {course.time} · {course.type}</small> | |
| </Link> | |
| ))} | |
| </section> | |
| </main> | |
| </div> | |
| ); | |
| } | |
| export function LearningCourseDetail({ slug }: { slug: string }) { | |
| const course = courses.find((item) => item.slug === slug) ?? courses[0]; | |
| return ( | |
| <div className="public-subpage"> | |
| <PublicHeader /> | |
| <main className="course-detail-page"> | |
| <section className="surface course-detail-hero"> | |
| <div> | |
| <p className="eyebrow-dark">Course</p> | |
| <h1>{course.title}</h1> | |
| <p>With {course.author} · {course.level} · {course.time}</p> | |
| <div className="hero-actions"> | |
| <button className="button button-primary"><Play size={17} /> Start free month</button> | |
| <Link prefetch={false} className="button button-outline" href="/register">Join now</Link> | |
| <Link prefetch={false} className="button button-quiet" href="/login">Sign in</Link> | |
| </div> | |
| </div> | |
| <div className="course-video-preview"><Play size={42} /><span>Preview lesson</span></div> | |
| </section> | |
| <section className="course-detail-grid"> | |
| <article className="surface"><h2>What you will learn</h2><p>Translate ambiguous work into clear decisions, use repeatable frameworks, and document the tradeoffs that matter.</p></article> | |
| <article className="surface"><h2>Skills covered</h2><p>Product thinking · Collaboration · Decision quality · Operating cadence</p></article> | |
| <article className="surface"><h2>For teams</h2><p>Buy a team plan to assign courses, track progress, and build shared practice rituals.</p><button className="button button-outline">Buy for my team</button></article> | |
| </section> | |
| </main> | |
| </div> | |
| ); | |
| } | |
| export function TopContentView({ slug }: { slug?: string }) { | |
| const selected = articles.find((item) => item.slug === slug); | |
| return ( | |
| <div className="public-subpage"> | |
| <PublicHeader /> | |
| <main className="top-content-page"> | |
| <section className="public-page-hero"> | |
| <p className="eyebrow-dark">Top Content</p> | |
| <h1>Ideas professionals are reading now</h1> | |
| <div className="content-tabs"><Link prefetch={false} href="/top-content">All</Link><Link prefetch={false} href="/top-content?category=career">Career</Link><Link prefetch={false} href="/top-content?category=leadership">Leadership</Link><Link prefetch={false} href="/top-content?category=technology">Technology</Link></div> | |
| </section> | |
| {selected ? ( | |
| <article className="surface content-detail"> | |
| <span>{selected.category} · Editor pick</span> | |
| <h2>{selected.title}</h2> | |
| <p><b>{selected.author}</b> · {selected.read}</p> | |
| <div className="ai-summary"><Sparkles size={20} /><p>AI summary: this piece argues for clearer weekly rituals, narrower decision records, and professional networks that reward useful specificity.</p></div> | |
| <p>Professional growth usually looks quieter than people expect. The strongest operators build durable habits around writing, feedback, and asking sharper questions before the meeting starts.</p> | |
| </article> | |
| ) : ( | |
| <section className="content-grid"> | |
| {articles.map((article) => <Link prefetch={false} className="surface content-card" href={`/top-content/${article.slug}`} key={article.slug}><span>{article.category}</span><h2>{article.title}</h2><p>{article.author} · {article.read}</p><ArrowRight size={18} /></Link>)} | |
| </section> | |
| )} | |
| </main> | |
| </div> | |
| ); | |
| } | |
| function GamesExperience({ slug }: { slug?: string }) { | |
| const [started, setStarted] = useState(false); | |
| const selected = games.find((item) => item.slug === slug); | |
| return ( | |
| <main className="games-page"> | |
| <section className="public-page-hero"> | |
| <p className="eyebrow-dark">LinkedIn Games</p> | |
| <h1>Short daily challenges for professional pattern matching</h1> | |
| </section> | |
| {selected ? ( | |
| <section className="surface game-detail"> | |
| <Link prefetch={false} href="/games">Back to games</Link> | |
| <Gamepad2 size={46} /> | |
| <h2>{selected.title}</h2> | |
| <p>{selected.body}</p> | |
| <button className="button button-primary" onClick={() => setStarted(true)}>{started ? <><CheckCircle2 size={18} /> Round started</> : "Start game"}</button> | |
| {started && <div className="game-board"><span>Signal</span><span>Constraint</span><span>Decision</span><span>Result</span></div>} | |
| </section> | |
| ) : ( | |
| <section className="game-grid"> | |
| {games.map((game) => <Link prefetch={false} className="surface game-card" href={`/games/${game.slug}`} key={game.slug}><Gamepad2 size={34} /><h2>{game.title}</h2><p>{game.body}</p><span>{game.stat}</span></Link>)} | |
| </section> | |
| )} | |
| </main> | |
| ); | |
| } | |
| export function GamesView({ slug }: { slug?: string }) { | |
| return <div className="public-subpage"><PublicHeader /><GamesExperience slug={slug} /></div>; | |
| } | |
| export function MemberGamesView({ slug }: { slug?: string }) { | |
| return <GamesExperience slug={slug} />; | |
| } | |
| const directoryContent: Record<string, { title: string; body: string; items: Array<{ title: string; detail: string }> }> = { | |
| groups: { title: "Groups", body: "Join professional communities around the work you care about.", items: [ | |
| { title: "Product Design Leaders", detail: "128K members · Active daily" }, | |
| { title: "Responsible AI Practitioners", detail: "84K members · 12 new discussions" }, | |
| { title: "Climate Technology Network", detail: "41K members · 5 events this month" }, | |
| ] }, | |
| events: { title: "Events", body: "Learn with your network in live and recorded sessions.", items: [ | |
| { title: "Designing useful AI evaluations", detail: "Tomorrow · Online" }, | |
| { title: "Platform leadership roundtable", detail: "Friday · Online" }, | |
| { title: "Climate tech operator meetup", detail: "Aug 22 · San Francisco" }, | |
| ] }, | |
| newsletters: { title: "Newsletters", body: "Follow recurring ideas from people and teams in your network.", items: [ | |
| { title: "The Practical Operator", detail: "Weekly · 92K subscribers" }, | |
| { title: "Responsible AI Review", detail: "Twice monthly · 48K subscribers" }, | |
| { title: "Design Systems Fieldnotes", detail: "Monthly · 37K subscribers" }, | |
| ] }, | |
| }; | |
| export function MemberDirectoryView({ kind }: { kind: string }) { | |
| const content = directoryContent[kind] ?? directoryContent.groups; | |
| return <main className="member-directory-page"> | |
| <section className="surface member-directory-hero"><h1>{content.title}</h1><p>{content.body}</p></section> | |
| <section className="member-directory-grid">{content.items.map((item) => <article className="surface" key={item.title}><h2>{item.title}</h2><p>{item.detail}</p><button className="button button-outline" type="button">{kind === "events" ? "View event" : kind === "newsletters" ? "Subscribe" : "View group"}</button></article>)}</section> | |
| </main>; | |
| } | |
| export function AuthWallView({ kind }: { kind: string }) { | |
| const label = kind.replace(/-/g, " "); | |
| return ( | |
| <div className="authwall-page"> | |
| <PublicHeader /> | |
| <main className="authwall-card"> | |
| <Lock size={38} /> | |
| <h1>Join LinkedIn to continue</h1> | |
| <p>The public {label} directory is protected so member profiles, posts, and article activity stay inside the local LinkedIn experience.</p> | |
| <ReplicaSafetyNotice className="authwall-safety-notice" /> | |
| <div className="authwall-form authwall-safe-actions"> | |
| <Link prefetch={false} className="button button-primary button-full" href="/register">Create account</Link> | |
| <Link prefetch={false} className="button button-outline button-full" href="/login">Sign in</Link> | |
| </div> | |
| <div className="authwall-actions"> | |
| <span><Users size={17} /> Your account is protected with email verification.</span> | |
| </div> | |
| </main> | |
| </div> | |
| ); | |
| } | |