Add Ternary Search Magic Trick interactive and fix layout issues
- Create new Ternary Search Magic Trick interactive with ternary search logic - Add emoji buttons and 'not present' option for better UX - Implement 'How it Works' modal with embedded YouTube video - Fix layout margins when accessing interactives from theme pages - Add standalone and green screen pages for the new interactive - Update Data Structures theme to include the new interactive
This commit is contained in:
parent
3f04e8c7d7
commit
7451682dd5
7 changed files with 419 additions and 26 deletions
18
src/pages/TernarySearchTrickGreenScreen.tsx
Normal file
18
src/pages/TernarySearchTrickGreenScreen.tsx
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { useParams } from 'react-router-dom';
|
||||
import TernarySearchTrick from '@/components/TernarySearchTrick';
|
||||
import GreenScreenWrapper from '@/components/GreenScreenWrapper';
|
||||
|
||||
const TernarySearchTrickGreenScreen = () => {
|
||||
const { mode } = useParams<{ mode: 'gs-lite' | 'gs-dark' }>();
|
||||
const greenScreenMode = mode === 'gs-dark' ? 'dark' : 'lite';
|
||||
|
||||
return (
|
||||
<GreenScreenWrapper mode={greenScreenMode}>
|
||||
<div className="space-y-6">
|
||||
<TernarySearchTrick showSocialShare={false} />
|
||||
</div>
|
||||
</GreenScreenWrapper>
|
||||
);
|
||||
};
|
||||
|
||||
export default TernarySearchTrickGreenScreen;
|
||||
13
src/pages/TernarySearchTrickPage.tsx
Normal file
13
src/pages/TernarySearchTrickPage.tsx
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import TernarySearchTrick from '@/components/TernarySearchTrick';
|
||||
|
||||
const TernarySearchTrickPage = () => {
|
||||
return (
|
||||
<div className="min-h-screen bg-background flex items-center justify-center">
|
||||
<div className="w-full max-w-6xl px-4 py-8">
|
||||
<TernarySearchTrick showSocialShare={true} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default TernarySearchTrickPage;
|
||||
|
|
@ -1,14 +1,7 @@
|
|||
import Layout from "@/components/Layout";
|
||||
import InteractiveGallery from "@/components/InteractiveGallery";
|
||||
|
||||
const DataStructures = () => {
|
||||
return (
|
||||
<Layout>
|
||||
<div className="max-w-7xl mx-auto p-6">
|
||||
<InteractiveGallery />
|
||||
</div>
|
||||
</Layout>
|
||||
);
|
||||
return <InteractiveGallery />;
|
||||
};
|
||||
|
||||
export default DataStructures;
|
||||
Loading…
Add table
Add a link
Reference in a new issue