Skip to content

Commit d86d098

Browse files
committed
Redesigned homepage
1 parent b2c5e2a commit d86d098

File tree

10 files changed

+1336
-175
lines changed

10 files changed

+1336
-175
lines changed

website/docusaurus.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,14 +176,14 @@ const config: Config = {
176176
type: 'doc',
177177
docId: 'index',
178178
position: 'left',
179-
label: 'Prompts',
179+
label: 'Prompt Library',
180180
docsPluginId: 'prompts',
181181
},
182182
{
183183
type: 'doc',
184184
docId: 'cli-coding-agents',
185185
position: 'left',
186-
label: 'Developer Tools',
186+
label: 'Toolbox',
187187
docsPluginId: 'developer-tools',
188188
},
189189
{

website/src/components/LessonAudioPlayer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default function LessonAudioPlayer(): React.ReactElement | null {
4949
}
5050

5151
setIsLoading(false);
52-
} catch (error) {
52+
} catch {
5353
setIsLoading(false);
5454
}
5555
}

website/src/components/PresentationMode/PresentationToggle.tsx

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { useState, useEffect, useCallback, lazy, Suspense } from 'react';
22
import useBaseUrl from '@docusaurus/useBaseUrl';
33
import styles from './PresentationToggle.module.css';
4+
import type { PresentationData } from './RevealSlideshow';
45

56
// Lazy load RevealSlideshow to avoid bundling Reveal.js for all users
67
const RevealSlideshow = lazy(() => import('./RevealSlideshow'));
@@ -9,9 +10,13 @@ interface PresentationToggleProps {
910
lessonPath: string;
1011
}
1112

12-
export default function PresentationToggle({ lessonPath }: PresentationToggleProps) {
13+
export default function PresentationToggle({
14+
lessonPath,
15+
}: PresentationToggleProps) {
1316
const [isOpen, setIsOpen] = useState(false);
14-
const [presentation, setPresentation] = useState<any>(null);
17+
const [presentation, setPresentation] = useState<PresentationData | null>(
18+
null
19+
);
1520
const [loading, setLoading] = useState(false);
1621
const [error, setError] = useState<string | null>(null);
1722
const [hasPresentation, setHasPresentation] = useState(false);
@@ -27,7 +32,7 @@ export default function PresentationToggle({ lessonPath }: PresentationTogglePro
2732
// Check if this lesson has a presentation
2833
setHasPresentation(!!manifest[lessonPath]);
2934
}
30-
} catch (err) {
35+
} catch {
3136
// Manifest doesn't exist yet, hide button
3237
setHasPresentation(false);
3338
}
@@ -42,7 +47,9 @@ export default function PresentationToggle({ lessonPath }: PresentationTogglePro
4247

4348
try {
4449
// Load manifest to get presentation URL
45-
const manifestResponse = await fetch(`${baseUrl}presentations/manifest.json`);
50+
const manifestResponse = await fetch(
51+
`${baseUrl}presentations/manifest.json`
52+
);
4653
if (!manifestResponse.ok) {
4754
throw new Error('Presentation manifest not found');
4855
}
@@ -55,7 +62,9 @@ export default function PresentationToggle({ lessonPath }: PresentationTogglePro
5562
}
5663

5764
// Load presentation data
58-
const presentationResponse = await fetch(`${baseUrl.replace(/\/$/, '')}${lessonData.presentationUrl}`);
65+
const presentationResponse = await fetch(
66+
`${baseUrl.replace(/\/$/, '')}${lessonData.presentationUrl}`
67+
);
5968
if (!presentationResponse.ok) {
6069
throw new Error('Failed to load presentation');
6170
}
@@ -126,7 +135,11 @@ export default function PresentationToggle({ lessonPath }: PresentationTogglePro
126135
)}
127136

128137
{isOpen && presentation && (
129-
<Suspense fallback={<div className={styles.loadingOverlay}>Loading presentation...</div>}>
138+
<Suspense
139+
fallback={
140+
<div className={styles.loadingOverlay}>Loading presentation...</div>
141+
}
142+
>
130143
<RevealSlideshow
131144
presentation={presentation}
132145
onClose={() => {

website/src/components/PresentationMode/RevealSlideshow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ interface Slide {
6767
speakerNotes?: SpeakerNotes;
6868
}
6969

70-
interface PresentationData {
70+
export interface PresentationData {
7171
metadata: {
7272
title: string;
7373
lessonId: string;

website/src/components/PresentationMode/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export interface ScalableVisualProps extends PresentationAwareProps {
137137
* ```
138138
*/
139139
export function isPresentationAware(
140-
props: any
140+
props: unknown
141141
): props is PresentationAwareProps {
142142
return props !== null && typeof props === 'object';
143143
}

website/src/components/VisualElements/UShapeAttentionCurve.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export default function UShapeAttentionCurve({
161161
cancelAnimationFrame(animationFrameRef.current);
162162
}
163163
};
164-
}, [curvePath]);
164+
}, [curvePath, endX, middleX]);
165165

166166
// Area fill path (curve + bottom edge for filled area)
167167
// Use animatedEndX to keep the right edge synchronized during transitions

website/src/docusaurus-theme.d.ts

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/**
2+
* Ambient type declarations for Docusaurus @theme/* modules.
3+
* These modules are generated at build time by Docusaurus and don't have
4+
* static type definitions available to TSC.
5+
*/
6+
7+
declare module '@theme/DocItem/Paginator' {
8+
import type { ComponentType } from 'react';
9+
const DocItemPaginator: ComponentType;
10+
export default DocItemPaginator;
11+
}
12+
13+
declare module '@theme/DocVersionBanner' {
14+
import type { ComponentType } from 'react';
15+
const DocVersionBanner: ComponentType;
16+
export default DocVersionBanner;
17+
}
18+
19+
declare module '@theme/DocVersionBadge' {
20+
import type { ComponentType } from 'react';
21+
const DocVersionBadge: ComponentType;
22+
export default DocVersionBadge;
23+
}
24+
25+
declare module '@theme/DocItem/Footer' {
26+
import type { ComponentType } from 'react';
27+
const DocItemFooter: ComponentType;
28+
export default DocItemFooter;
29+
}
30+
31+
declare module '@theme/DocItem/TOC/Mobile' {
32+
import type { ComponentType } from 'react';
33+
const DocItemTOCMobile: ComponentType;
34+
export default DocItemTOCMobile;
35+
}
36+
37+
declare module '@theme/DocItem/TOC/Desktop' {
38+
import type { ComponentType } from 'react';
39+
const DocItemTOCDesktop: ComponentType;
40+
export default DocItemTOCDesktop;
41+
}
42+
43+
declare module '@theme/DocBreadcrumbs' {
44+
import type { ComponentType } from 'react';
45+
const DocBreadcrumbs: ComponentType;
46+
export default DocBreadcrumbs;
47+
}
48+
49+
declare module '@theme/ContentVisibility' {
50+
import type { ComponentType } from 'react';
51+
import type { DocMetadata } from '@docusaurus/plugin-content-docs';
52+
interface ContentVisibilityProps {
53+
metadata: DocMetadata;
54+
}
55+
const ContentVisibility: ComponentType<ContentVisibilityProps>;
56+
export default ContentVisibility;
57+
}
58+
59+
declare module '@theme/DocItem/Layout' {
60+
import type { ReactNode } from 'react';
61+
export interface Props {
62+
children: ReactNode;
63+
}
64+
}

0 commit comments

Comments
 (0)