File size: 13,045 Bytes
9d4a3b0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
"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>
  );
}