From 86cf5e745b8a422c4361a5e3e64ee313a37247ae Mon Sep 17 00:00:00 2001 From: Arik Chakma Date: Fri, 27 Jun 2025 01:34:06 +0600 Subject: [PATCH] wip --- .../SQLCourseVariant/ChapterRow.tsx | 140 ++++++++ .../SQLCourseVariant/CourseFeatures.tsx | 7 +- .../SQLCourseVariant/MeetYourInstructor.tsx | 60 ++++ .../SQLCourseVariant/SQLCourseVariantPage.tsx | 329 +++++++++++++++--- 4 files changed, 490 insertions(+), 46 deletions(-) create mode 100644 src/components/SQLCourseVariant/ChapterRow.tsx create mode 100644 src/components/SQLCourseVariant/MeetYourInstructor.tsx diff --git a/src/components/SQLCourseVariant/ChapterRow.tsx b/src/components/SQLCourseVariant/ChapterRow.tsx new file mode 100644 index 000000000..aaa7b0c38 --- /dev/null +++ b/src/components/SQLCourseVariant/ChapterRow.tsx @@ -0,0 +1,140 @@ +import { ChevronDown, BookIcon, CodeIcon, CircleDot } from 'lucide-react'; +import { cn } from '../../lib/classname'; +import { useEffect, useState } from 'react'; + +type ChapterRowProps = { + counter: number; + icon: React.ReactNode; + title: string; + description: string; + lessonCount: number; + challengeCount: number; + isExpandable?: boolean; + className?: string; + lessons?: { title: string; type: 'lesson' | 'challenge' | 'quiz' }[]; +}; + +export function ChapterRow(props: ChapterRowProps) { + const { + counter, + icon, + title, + description, + lessonCount, + challengeCount, + isExpandable = true, + className, + lessons = [], + } = props; + + const [isExpanded, setIsExpanded] = useState(false); + + const regularLessons = lessons.filter((l) => l.type === 'lesson'); + const challenges = lessons.filter((l) => + ['challenge', 'quiz'].includes(l.type), + ); + + return ( +
+
isExpandable && setIsExpanded(!isExpanded)} + className={cn( + 'relative rounded-xl border border-zinc-800 bg-zinc-800 p-6', + 'bg-linear-to-br from-zinc-900/90 via-zinc-900/70 to-zinc-900/50', + !isExpanded && + 'hover:bg-linear-to-br hover:from-zinc-900/95 hover:via-zinc-900/80 hover:to-zinc-900/60', + !isExpanded && + 'hover:cursor-pointer hover:shadow-[0_0_30px_rgba(0,0,0,0.2)]', + isExpanded && 'cursor-pointer rounded-b-none border-b-0', + )} + > +
+
+
{icon}
+
+ +
+

+ + {counter}.{' '} + + {title} +

+

{description}

+ +
+
+ {lessonCount} Lessons +
+
+ {challengeCount} Challenges +
+
+
+ + {isExpandable && ( +
+ +
+ )} +
+
+ + {isExpanded && ( +
+
+ {regularLessons.length > 0 && ( +
+

+ Lessons +

+
+ {regularLessons.map((lesson, index) => ( +
+ + {lesson.title} +
+ ))} +
+
+ )} + + {challenges.length > 0 && ( +
+

+ Exercises +

+
+ {challenges.map((challenge, index) => ( +
+ {challenge.type === 'challenge' ? ( + + ) : ( + + )} + {challenge.title} +
+ ))} +
+
+ )} +
+
+ )} +
+ ); +} diff --git a/src/components/SQLCourseVariant/CourseFeatures.tsx b/src/components/SQLCourseVariant/CourseFeatures.tsx index c0e3a567b..93511ee6d 100644 --- a/src/components/SQLCourseVariant/CourseFeatures.tsx +++ b/src/components/SQLCourseVariant/CourseFeatures.tsx @@ -102,7 +102,12 @@ function CourseFeature(props: CourseFeatureProps) { return (
-
+

diff --git a/src/components/SQLCourseVariant/MeetYourInstructor.tsx b/src/components/SQLCourseVariant/MeetYourInstructor.tsx new file mode 100644 index 000000000..a6031315c --- /dev/null +++ b/src/components/SQLCourseVariant/MeetYourInstructor.tsx @@ -0,0 +1,60 @@ +import { AwardIcon, TrophyIcon } from 'lucide-react'; + +export function MeetYourInstructor() { + return ( +
+

+ Meet your instructor: Kamran Ahmed +

+ +
+
+ Kamran Ahmed +
+ Kamran Ahmed +
+ Founder roadmap.sh +
+
+
+ + + Multiple GitHub Star Awards + + + + + + #2 Most Starred Developer + + + + Founder roadmap.sh + + + + Google Developer Expert + +
+ +

+ Kamran is the creator of roadmap.sh (2M+ registered users!) and an + engineering leader with over a decade of experience in the tech + industry. Throughout his career he’s built and scaled software + systems, designed complex data systems, and worked with large + amounts of data to create efficient solutions. +

+ +

+ This hands-on, AI-assisted course is his distilled blueprint on how + to master SQL queries, from beginner to advanced. +

+
+
+
+ ); +} diff --git a/src/components/SQLCourseVariant/SQLCourseVariantPage.tsx b/src/components/SQLCourseVariant/SQLCourseVariantPage.tsx index 0bc8f9fa2..5827d1b82 100644 --- a/src/components/SQLCourseVariant/SQLCourseVariantPage.tsx +++ b/src/components/SQLCourseVariant/SQLCourseVariantPage.tsx @@ -5,6 +5,14 @@ import { Eye, FileCheckIcon, FileQuestionIcon, + DatabaseIcon, + TableIcon, + LayersIcon, + GitMergeIcon, + WrenchIcon, + BarChartIcon, + GitBranchIcon, + ArrowUpDownIcon, } from 'lucide-react'; import { Spotlight } from '../SQLCourse/Spotlight'; import { RoadmapLogoIcon } from '../ReactIcons/RoadmapLogo'; @@ -13,64 +21,281 @@ import { PlatformDemo } from './PlatformDemo'; import { PurchaseBanner } from './PurchaseBanner'; import { ReviewCarousel } from './ReviewCarousel'; import { CourseFeatures } from './CourseFeatures'; +import { MeetYourInstructor } from './MeetYourInstructor'; +import { SectionHeader } from './SectionHeader'; +import { ChapterRow } from './ChapterRow'; + +type ChapterData = { + icon: React.ReactNode; + title: string; + description: string; + lessonCount: number; + challengeCount: number; + lessons: { title: string; type: 'lesson' | 'challenge' | 'quiz' }[]; +}; + +export const sqlCourseChapters: ChapterData[] = [ + { + icon: , + title: 'Introduction', + description: 'Get comfortable with database concepts and SQL fundamentals.', + lessonCount: 4, + challengeCount: 1, + lessons: [ + { title: 'Basics of Databases', type: 'lesson' }, + { title: 'What is SQL?', type: 'lesson' }, + { title: 'Types of Queries', type: 'lesson' }, + { title: 'Next Steps', type: 'lesson' }, + { title: 'Introduction Quiz', type: 'challenge' }, + ], + }, + { + icon: , + title: 'SQL Basics', + description: 'Master the essential SQL query operations and syntax.', + lessonCount: 9, + challengeCount: 7, + lessons: [ + { title: 'SELECT Fundamentals', type: 'lesson' }, + { title: 'Aliases and Constants', type: 'lesson' }, + { title: 'Expressions in SELECT', type: 'lesson' }, + { title: 'Selecting DISTINCT Values', type: 'lesson' }, + { title: 'Filtering with WHERE', type: 'lesson' }, + { title: 'Sorting with ORDER BY', type: 'lesson' }, + { title: 'Limiting Results with LIMIT', type: 'lesson' }, + { title: 'Handling NULL Values', type: 'lesson' }, + { title: 'Comments', type: 'lesson' }, + { title: 'Basic Queries Quiz', type: 'quiz' }, + { title: 'Projection Challenge', type: 'challenge' }, + { title: 'Select Expression', type: 'challenge' }, + { title: 'Select Unique', type: 'challenge' }, + { title: 'Logical Operators', type: 'challenge' }, + { title: 'Sorting Challenge', type: 'challenge' }, + { title: 'Sorting and Limiting', type: 'challenge' }, + { title: 'Sorting and Filtering', type: 'challenge' }, + ], + }, + { + icon: , + title: 'Manipulating Data', + description: 'Learn how to modify and manipulate data in your database.', + lessonCount: 3, + challengeCount: 3, + lessons: [ + { title: 'INSERT Operations', type: 'lesson' }, + { title: 'UPDATE Operations', type: 'lesson' }, + { title: 'DELETE Operations', type: 'lesson' }, + { title: 'Data Manipulation Quiz', type: 'quiz' }, + { title: 'Inserting Customers', type: 'challenge' }, + { title: 'Updating Bookstore', type: 'challenge' }, + { title: 'Deleting Books', type: 'challenge' }, + ], + }, + { + icon: , + title: 'Defining Tables', + description: 'Master database schema design and table management.', + lessonCount: 9, + challengeCount: 7, + lessons: [ + { title: 'Creating Tables', type: 'lesson' }, + { title: 'Data Types in SQLite', type: 'lesson' }, + { title: 'Common Data Types', type: 'lesson' }, + { title: 'More on Numeric Types', type: 'lesson' }, + { title: 'Temporal Data Types', type: 'lesson' }, + { title: 'CHECK Constraints', type: 'lesson' }, + { title: 'Primary Key Constraint', type: 'lesson' }, + { title: 'Modifying Tables', type: 'lesson' }, + { title: 'Dropping and Truncating', type: 'lesson' }, + { title: 'Defining Tables Quiz', type: 'quiz' }, + { title: 'Simple Table Creation', type: 'challenge' }, + { title: 'Data Types Challenge', type: 'challenge' }, + { title: 'Constraints Challenge', type: 'challenge' }, + { title: 'Temporal Validation', type: 'challenge' }, + { title: 'Sales Data Analysis', type: 'challenge' }, + { title: 'Modifying Tables', type: 'challenge' }, + { title: 'Removing Table Data', type: 'challenge' }, + ], + }, + { + icon: , + title: 'Multi-Table Queries', + description: + 'Learn to work with multiple tables using JOINs and relationships.', + lessonCount: 7, + challengeCount: 10, + lessons: [ + { title: 'More on Relational Data', type: 'lesson' }, + { title: 'Relationships and Types', type: 'lesson' }, + { title: 'JOINs in Queries', type: 'lesson' }, + { title: 'Self Joins and Usecases', type: 'lesson' }, + { title: 'Foreign Key Constraint', type: 'lesson' }, + { title: 'Set Operator Queries', type: 'lesson' }, + { title: 'Views and Virtual Tables', type: 'lesson' }, + { title: 'Multi-Table Queries Quiz', type: 'quiz' }, + { title: 'Inactive Customers', type: 'challenge' }, + { title: 'Recent 3 Orders', type: 'challenge' }, + { title: 'High Value Orders', type: 'challenge' }, + { title: 'Specific Book Customers', type: 'challenge' }, + { title: 'Referred Customers', type: 'challenge' }, + { title: 'Readers Like You', type: 'challenge' }, + { title: 'Same Price Books', type: 'challenge' }, + { title: 'Multi-Section Authors', type: 'challenge' }, + { title: 'Expensive Books', type: 'challenge' }, + { title: 'Trending Tech Books', type: 'challenge' }, + ], + }, + { + icon: , + title: 'Aggregate Functions', + description: + "Analyze and summarize data using SQL's powerful aggregation features.", + lessonCount: 4, + challengeCount: 10, + lessons: [ + { title: 'What is Aggregation?', type: 'lesson' }, + { title: 'Basic Aggregation', type: 'lesson' }, + { title: 'Grouping Data', type: 'lesson' }, + { title: 'Grouping and Filtering', type: 'lesson' }, + { title: 'Aggregate Queries Quiz', type: 'quiz' }, + { title: 'Book Sales Summary', type: 'challenge' }, + { title: 'Category Insights', type: 'challenge' }, + { title: 'Author Tier Analysis', type: 'challenge' }, + { title: 'Author Book Stats', type: 'challenge' }, + { title: 'Daily Sales Report', type: 'challenge' }, + { title: 'Publisher Stats', type: 'challenge' }, + { title: 'High Value Publishers', type: 'challenge' }, + { title: 'Premium Authors', type: 'challenge' }, + { title: 'Sales Analysis', type: 'challenge' }, + { title: 'Employee Performance', type: 'challenge' }, + ], + }, + { + icon: , + title: 'Scalar Functions', + description: + 'Master built-in functions for data transformation and manipulation.', + lessonCount: 6, + challengeCount: 5, + lessons: [ + { title: 'What are they?', type: 'lesson' }, + { title: 'String Functions', type: 'lesson' }, + { title: 'Numeric Functions', type: 'lesson' }, + { title: 'Date Functions', type: 'lesson' }, + { title: 'Conversion Functions', type: 'lesson' }, + { title: 'Logical Functions', type: 'lesson' }, + { title: 'Scalar Functions Quiz', type: 'quiz' }, + { title: 'Customer Contact List', type: 'challenge' }, + { title: 'Membership Duration', type: 'challenge' }, + { title: 'Book Performance', type: 'challenge' }, + { title: 'Book Categories', type: 'challenge' }, + { title: 'Monthly Sales Analysis', type: 'challenge' }, + ], + }, + { + icon: , + title: 'Subqueries and CTEs', + description: + 'Write complex queries using subqueries and common table expressions.', + lessonCount: 4, + challengeCount: 6, + lessons: [ + { title: 'What are Subqueries?', type: 'lesson' }, + { title: 'Correlated Subqueries', type: 'lesson' }, + { title: 'Common Table Expressions', type: 'lesson' }, + { title: 'Recursive CTEs', type: 'lesson' }, + { title: 'Subqueries Quiz', type: 'quiz' }, + { title: 'Books Above Average', type: 'challenge' }, + { title: 'Latest Category Books', type: 'challenge' }, + { title: 'Low Stock by Category', type: 'challenge' }, + { title: 'Bestseller Rankings', type: 'challenge' }, + { title: 'New Customer Analysis', type: 'challenge' }, + { title: 'Daily Sales Report', type: 'challenge' }, + ], + }, + { + icon: , + title: 'Window Functions', + description: 'Advanced analytics and calculations using window functions.', + lessonCount: 5, + challengeCount: 7, + lessons: [ + { title: 'What are they?', type: 'lesson' }, + { title: 'OVER and PARTITION BY', type: 'lesson' }, + { title: 'Use of ORDER BY', type: 'lesson' }, + { title: 'Ranking Functions', type: 'lesson' }, + { title: 'Window Frames', type: 'lesson' }, + { title: 'Window Functions Quiz', type: 'quiz' }, + { title: 'Basic Sales Metrics', type: 'challenge' }, + { title: 'Bestseller Comparison', type: 'challenge' }, + { title: 'Author Category Sales', type: 'challenge' }, + { title: 'Top Authors', type: 'challenge' }, + { title: 'Price Tier Rankings', type: 'challenge' }, + { title: 'Month-over-Month Sales', type: 'challenge' }, + { title: 'Price Range Analysis', type: 'challenge' }, + ], + }, +]; export function SQLCourseVariantPage() { return ( <>
-
- +
+
+ -
- - - -
-

- Master SQL Queries -

-

- Complete course with AI Tutor, real-world challenges and more -

+
+ + + +
+

+ Master SQL Queries +

+

+ Complete course with AI Tutor, real-world challenges and more +

+
-
-

- Get certified for SQL queries and ready to deploy your newly-gained - skill in 30 days. Perfect for developers, data analysts, and anyone - working with data. Level up risk-free with a 7-day money-back - guarantee. -

+

+ Get certified for SQL queries and ready to deploy your + newly-gained skill in 30 days. Perfect for developers, data + analysts, and anyone working with data. Level up risk-free with a + 7-day money-back guarantee. +

-
-
-
-
- - 55+ Lessons -
-
- - 100+ Challenges -
-
- - AI Tutor -
-
- - Integrated IDE +
+
+
+
+ + 55+ Lessons +
+
+ + 100+ Challenges +
+
+ + AI Tutor +
+
+ + Integrated IDE +
+ +
- +
- -
@@ -78,6 +303,20 @@ export function SQLCourseVariantPage() { + + + + + +
+ {sqlCourseChapters.map((chapter, index) => ( + + ))} +