From 76660eb430ed57724c5bb6a03add8338cbb3ae27 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 30 Sep 2025 05:23:09 +0000 Subject: [PATCH 1/3] Initial plan From c85934763f4506564593616c891c4f2ce7e933fb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 30 Sep 2025 05:28:20 +0000 Subject: [PATCH 2/3] Initial exploration and dependency installation Co-authored-by: Adez017 <142787780+Adez017@users.noreply.github.com> --- docusaurus.config.js | 264 +++++ sidebars.js | 168 +++ src/components/BrowserWindow/index.js | 25 + src/components/Comming/index.js | 15 + src/components/Community/index.js | 98 ++ src/components/FloatingContributors/index.js | 472 +++++++++ src/components/GiscusComponent/index.js | 22 + src/components/HomepageFeatures/index.js | 45 + src/components/NewsLetterPopup.js | 67 ++ src/components/StatsSection/index.js | 49 + src/components/Svg/index.js | 42 + src/components/TeamProfileCards/index.js | 51 + src/components/blogCarousel/blogCard.js | 69 ++ src/components/blogCarousel/blogCarousel.js | 74 ++ .../dashboard/LeaderBoard/PRListModal.js | 57 + .../dashboard/LeaderBoard/leaderboard.js | 226 ++++ .../dashboard/LeaderBoard/mockData.js | 103 ++ src/components/discussions/DiscussionCard.js | 39 + src/components/discussions/index.js | 8 + src/components/faqs/faqs.js | 89 ++ src/components/giscus.js | 65 ++ src/components/header.js | 121 +++ src/components/header/header.js | 57 + src/components/mockup/DeveloperMockup.js | 54 + src/components/navbar/NavbarIcon.js | 31 + src/components/navbar/NavbarIconInjector.js | 74 ++ src/components/ourProjects.js | 122 +++ src/components/particle.js | 179 ++++ src/components/scroll/bottom-to-top.js | 63 ++ src/components/scroll/top-to-bottom.js | 64 ++ src/components/svgIcons/FavoriteIcon/index.js | 29 + .../testimonials/TestimonialCard.js | 29 + .../testimonials/TestimonialCarousel.js | 106 ++ src/components/topmate/TopMateCard.js | 28 + src/components/topmate/TopMateSection.js | 33 + src/components/ui/FirebaseAuthGithub.js | 120 +++ src/components/ui/NavbarFirebaseAuthGithub.js | 50 + src/components/ui/avatar.js | 76 ++ src/components/ui/badge.js | 83 ++ src/components/ui/button.js | 92 ++ src/components/ui/card.js | 95 ++ src/components/ui/carousel.js | 156 +++ src/components/ui/collapsible.js | 75 ++ src/components/ui/input.js | 65 ++ src/constants/navbarConfig.js | 23 + src/data/roadmaps/html.js | 77 ++ src/data/roadmaps/index.js | 46 + src/data/roadmaps/javascript/index.js | 180 ++++ src/data/userData.js | 50 + src/data/users.js | 175 ++++ src/database/blogs/index.js | 69 ++ src/database/ebooks/index.js | 33 + src/database/projects/projects.js | 30 + src/database/sponsors/index.js | 529 ++++++++++ src/lib/firebase.js | 19 + src/lib/statsProvider.js | 477 +++++++++ src/lib/utils.js | 12 + src/pages/License/index.js | 24 + src/pages/badges/github-badges.js | 122 +++ src/pages/blogs/index.js | 105 ++ src/pages/broadcasts/details.js | 161 +++ src/pages/broadcasts/index.js | 264 +++++ src/pages/careers/index.js | 280 +++++ src/pages/code-of-conduct/index.js | 27 + src/pages/community/index.js | 217 ++++ src/pages/contact-us/index.js | 14 + src/pages/courses/index.js | 293 ++++++ src/pages/dashboard/giveaway/index.js | 244 +++++ src/pages/dashboard/index.js | 345 ++++++ src/pages/get-started/index.js | 429 ++++++++ src/pages/index.js | 81 ++ src/pages/interview-prep/BehavioralTab.js | 133 +++ src/pages/interview-prep/CompaniesTab.js | 167 +++ src/pages/interview-prep/OverviewTab.js | 163 +++ src/pages/interview-prep/PracticeTab.js | 239 +++++ src/pages/interview-prep/TechnicalTab.js | 47 + src/pages/interview-prep/index.js | 978 ++++++++++++++++++ src/pages/our-sponsors/SponsorCard/index.js | 14 + src/pages/our-sponsors/index.js | 99 ++ src/pages/podcasts/details.js | 160 +++ src/pages/podcasts/index.js | 203 ++++ src/pages/privacy-policy/index.js | 12 + .../_components/ShowcaseCard/index.js | 55 + .../_components/ShowcaseFilterToggle/index.js | 92 ++ .../_components/ShowcaseTagSelect/index.js | 113 ++ .../_components/ShowcaseTooltip/index.js | 98 ++ src/pages/showcase/index.js | 257 +++++ src/pages/terms-service/index.js | 12 + src/plugins/tailwind-plugin.js | 13 + src/services/githubService.js | 544 ++++++++++ src/theme/ColorModeToggle/index.js | 43 + src/theme/DocSidebar/Desktop/index.js | 44 + src/theme/DocSidebarItem/Category/index.js | 227 ++++ src/theme/DocSidebarItem/Html/index.js | 25 + src/theme/DocSidebarItem/Link/index.js | 62 ++ src/theme/DocSidebarItem/index.js | 50 + src/theme/DocSidebarItem/types.js | 2 + src/theme/DocSidebarItems/index.js | 36 + src/theme/Footer/Copyright/index.js | 15 + src/theme/Footer/Layout/Counter.js | 71 ++ src/theme/Footer/Layout/index.js | 152 +++ src/theme/Footer/LinkItem/index.js | 48 + src/theme/Footer/Links/MultiColumn/index.js | 26 + src/theme/Footer/Links/Simple/index.js | 24 + src/theme/Footer/Links/index.js | 15 + src/theme/Footer/Logo/index.js | 27 + src/theme/Footer/index.js | 21 + src/theme/Layout.js | 37 + src/theme/Navbar/Content/index.js | 88 ++ src/theme/Navbar/index.js | 23 + src/theme/NavbarItem.js | 10 + src/theme/NavbarItem/index.js | 8 + src/theme/Root.js | 14 + src/utils/authors.js | 25 + src/utils/jsUtils.js | 29 + src/utils/navbarUtils.js | 22 + 116 files changed, 12719 insertions(+) create mode 100644 docusaurus.config.js create mode 100644 sidebars.js create mode 100644 src/components/BrowserWindow/index.js create mode 100644 src/components/Comming/index.js create mode 100644 src/components/Community/index.js create mode 100644 src/components/FloatingContributors/index.js create mode 100644 src/components/GiscusComponent/index.js create mode 100644 src/components/HomepageFeatures/index.js create mode 100644 src/components/NewsLetterPopup.js create mode 100644 src/components/StatsSection/index.js create mode 100644 src/components/Svg/index.js create mode 100644 src/components/TeamProfileCards/index.js create mode 100644 src/components/blogCarousel/blogCard.js create mode 100644 src/components/blogCarousel/blogCarousel.js create mode 100644 src/components/dashboard/LeaderBoard/PRListModal.js create mode 100644 src/components/dashboard/LeaderBoard/leaderboard.js create mode 100644 src/components/dashboard/LeaderBoard/mockData.js create mode 100644 src/components/discussions/DiscussionCard.js create mode 100644 src/components/discussions/index.js create mode 100644 src/components/faqs/faqs.js create mode 100644 src/components/giscus.js create mode 100644 src/components/header.js create mode 100644 src/components/header/header.js create mode 100644 src/components/mockup/DeveloperMockup.js create mode 100644 src/components/navbar/NavbarIcon.js create mode 100644 src/components/navbar/NavbarIconInjector.js create mode 100644 src/components/ourProjects.js create mode 100644 src/components/particle.js create mode 100644 src/components/scroll/bottom-to-top.js create mode 100644 src/components/scroll/top-to-bottom.js create mode 100644 src/components/svgIcons/FavoriteIcon/index.js create mode 100644 src/components/testimonials/TestimonialCard.js create mode 100644 src/components/testimonials/TestimonialCarousel.js create mode 100644 src/components/topmate/TopMateCard.js create mode 100644 src/components/topmate/TopMateSection.js create mode 100644 src/components/ui/FirebaseAuthGithub.js create mode 100644 src/components/ui/NavbarFirebaseAuthGithub.js create mode 100644 src/components/ui/avatar.js create mode 100644 src/components/ui/badge.js create mode 100644 src/components/ui/button.js create mode 100644 src/components/ui/card.js create mode 100644 src/components/ui/carousel.js create mode 100644 src/components/ui/collapsible.js create mode 100644 src/components/ui/input.js create mode 100644 src/constants/navbarConfig.js create mode 100644 src/data/roadmaps/html.js create mode 100644 src/data/roadmaps/index.js create mode 100644 src/data/roadmaps/javascript/index.js create mode 100644 src/data/userData.js create mode 100644 src/data/users.js create mode 100644 src/database/blogs/index.js create mode 100644 src/database/ebooks/index.js create mode 100644 src/database/projects/projects.js create mode 100644 src/database/sponsors/index.js create mode 100644 src/lib/firebase.js create mode 100644 src/lib/statsProvider.js create mode 100644 src/lib/utils.js create mode 100644 src/pages/License/index.js create mode 100644 src/pages/badges/github-badges.js create mode 100644 src/pages/blogs/index.js create mode 100644 src/pages/broadcasts/details.js create mode 100644 src/pages/broadcasts/index.js create mode 100644 src/pages/careers/index.js create mode 100644 src/pages/code-of-conduct/index.js create mode 100644 src/pages/community/index.js create mode 100644 src/pages/contact-us/index.js create mode 100644 src/pages/courses/index.js create mode 100644 src/pages/dashboard/giveaway/index.js create mode 100644 src/pages/dashboard/index.js create mode 100644 src/pages/get-started/index.js create mode 100644 src/pages/index.js create mode 100644 src/pages/interview-prep/BehavioralTab.js create mode 100644 src/pages/interview-prep/CompaniesTab.js create mode 100644 src/pages/interview-prep/OverviewTab.js create mode 100644 src/pages/interview-prep/PracticeTab.js create mode 100644 src/pages/interview-prep/TechnicalTab.js create mode 100644 src/pages/interview-prep/index.js create mode 100644 src/pages/our-sponsors/SponsorCard/index.js create mode 100644 src/pages/our-sponsors/index.js create mode 100644 src/pages/podcasts/details.js create mode 100644 src/pages/podcasts/index.js create mode 100644 src/pages/privacy-policy/index.js create mode 100644 src/pages/showcase/_components/ShowcaseCard/index.js create mode 100644 src/pages/showcase/_components/ShowcaseFilterToggle/index.js create mode 100644 src/pages/showcase/_components/ShowcaseTagSelect/index.js create mode 100644 src/pages/showcase/_components/ShowcaseTooltip/index.js create mode 100644 src/pages/showcase/index.js create mode 100644 src/pages/terms-service/index.js create mode 100644 src/plugins/tailwind-plugin.js create mode 100644 src/services/githubService.js create mode 100644 src/theme/ColorModeToggle/index.js create mode 100644 src/theme/DocSidebar/Desktop/index.js create mode 100644 src/theme/DocSidebarItem/Category/index.js create mode 100644 src/theme/DocSidebarItem/Html/index.js create mode 100644 src/theme/DocSidebarItem/Link/index.js create mode 100644 src/theme/DocSidebarItem/index.js create mode 100644 src/theme/DocSidebarItem/types.js create mode 100644 src/theme/DocSidebarItems/index.js create mode 100644 src/theme/Footer/Copyright/index.js create mode 100644 src/theme/Footer/Layout/Counter.js create mode 100644 src/theme/Footer/Layout/index.js create mode 100644 src/theme/Footer/LinkItem/index.js create mode 100644 src/theme/Footer/Links/MultiColumn/index.js create mode 100644 src/theme/Footer/Links/Simple/index.js create mode 100644 src/theme/Footer/Links/index.js create mode 100644 src/theme/Footer/Logo/index.js create mode 100644 src/theme/Footer/index.js create mode 100644 src/theme/Layout.js create mode 100644 src/theme/Navbar/Content/index.js create mode 100644 src/theme/Navbar/index.js create mode 100644 src/theme/NavbarItem.js create mode 100644 src/theme/NavbarItem/index.js create mode 100644 src/theme/Root.js create mode 100644 src/utils/authors.js create mode 100644 src/utils/jsUtils.js create mode 100644 src/utils/navbarUtils.js diff --git a/docusaurus.config.js b/docusaurus.config.js new file mode 100644 index 00000000..15462423 --- /dev/null +++ b/docusaurus.config.js @@ -0,0 +1,264 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var prism_react_renderer_1 = require("prism-react-renderer"); +var dotenv = __importStar(require("dotenv")); +dotenv.config(); +// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...) +var config = { + title: "Recode Hive", + tagline: "Dinosaurs are cool", + favicon: "img/favicon.ico", + url: "https://recodehive.com", + baseUrl: "/", + organizationName: "recodehive", + projectName: "recode-website", + onBrokenLinks: "throw", + onBrokenMarkdownLinks: "warn", + // Google Analytics and Theme Scripts + scripts: [ + { + src: "/instant-theme.js", + async: false, + }, + { + src: "https://www.googletagmanager.com/gtag/js?id=G-W02Z2VJYCR", + async: true, + }, + { + src: "/gtag-init.js", + }, + { + src: "/pinterest-init.js", + }, + ], + i18n: { + defaultLocale: "en", + locales: ["en"], + }, + presets: [ + [ + "classic", + { + docs: { + path: "docs", + routeBasePath: "docs", + sidebarPath: require.resolve("./sidebars.ts"), + editUrl: function (_a) { + var docPath = _a.docPath; + return "https://github.com/recodehive/recode-website/tree/main/docs/".concat(docPath); + }, + }, + blog: { + showReadingTime: true, + feedOptions: { + type: ["rss", "atom"], + xslt: true, + }, + editUrl: "https://github.com/recodehive/recode-website/tree/main", + onInlineTags: "warn", + onInlineAuthors: "warn", + onUntruncatedBlogPosts: "warn", + }, + theme: { + customCss: require.resolve("./src/css/custom.css"), + }, + gtag: { + trackingID: "G-W02Z2VJYCR", + anonymizeIP: false, + }, + }, + ], + ], + themeConfig: { + image: "img/docusaurus-social-card.jpg", + colorMode: { + defaultMode: "light", + disableSwitch: false, + respectPrefersColorScheme: false, // Let users manually control theme + }, + navbar: { + title: "Recode Hive", + logo: { + alt: "RecodeHive Logo", + src: "img/logo.png", + }, + items: [ + { + type: "dropdown", + html: '📚 Docs', + position: "left", + items: [ + { + type: "html", + value: "
\n Tutorials\n
\n \"SQL\" \n \"Python\" \n \"GitHub\" \n \"Nextjs\" \n \"Docs\" \n
\n
", + }, + { + type: "html", + value: '
', + }, + { + type: "html", + value: "
\n Courses\n
\n \"git\" \n \"Postman\" \n \"Google\" \n
\n
", + }, + { + type: "html", + value: '
', + }, + { + type: "html", + value: "
\n Interview Prep\n
\n \uD83E\uDDE9Technical \n \uD83D\uDCA1Behavioral \n
\n
", + }, + ], + }, + { + to: "/showcase", + html: '🌍 Showcase', + position: "left", + }, + { + to: "/dashboard", + html: '📊 Dashboard', + position: "left", + }, + { + to: "/our-sponsors/", + html: '💰 Donate', + position: "left", + }, + { + type: "dropdown", + html: '👩🏻‍💻 Devfolio', + position: "left", + items: [ + { + label: "💻GitHub Profiles", + to: "https://dev.recodehive.com/devfolio", + }, + { + label: "🎖️ GitHub Badges", + to: "/badges/github-badges/", + }, + ], + }, + { + to: "/blogs", + html: '📰 Blogs', + position: "left", + }, + { + type: "dropdown", + html: '🔗 More', + position: "left", + items: [ + { + label: "📚 E-books", + to: "https://learn.recodehive.com/datascience", + }, + { + label: "🗺️ Roadmap", + to: "https://github.com/orgs/recodehive/projects/9", + }, + { + label: "🤝 Community", + to: "/community", + }, + { + label: "📺 Broadcast", + to: "/broadcasts/", + }, + { + label: "🎙️ Podcast", + to: "/podcasts/", + }, + ], + }, + { + type: "search", + position: "right", + }, + { + type: "html", + position: "right", + value: '
', + }, + ], + }, + footer: { + style: "dark", + links: [], + copyright: "Copyright \u00A9 ".concat(new Date().getFullYear(), " recodehive. Built with Docusaurus."), + }, + prism: { + theme: prism_react_renderer_1.themes.github, + darkTheme: prism_react_renderer_1.themes.dracula, + }, + algolia: { + appId: "YOUR_APP_ID", + apiKey: "YOUR_SEARCH_API_KEY", + indexName: "YOUR_INDEX_NAME", + contextualSearch: true, + externalUrlRegex: "external\\.com|domain\\.com", + replaceSearchResultPathname: { + from: "/docs/", + to: "/", + }, + searchParameters: {}, + searchPagePath: "search", + insights: false, + }, + }, + markdown: { + mermaid: true, + }, + themes: ["@docusaurus/theme-mermaid"], + plugins: [ + [ + "@docusaurus/plugin-ideal-image", + { + quality: 70, + max: 1030, + min: 640, + steps: 2, + disableInDev: false, + }, + ], + ], + // ✅ Add this customFields object to expose the token to the client-side + customFields: { + gitToken: process.env.DOCUSAURUS_GIT_TOKEN, + }, +}; +exports.default = config; diff --git a/sidebars.js b/sidebars.js new file mode 100644 index 00000000..963adc62 --- /dev/null +++ b/sidebars.js @@ -0,0 +1,168 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...) +/** + * Creating a sidebar enables you to: + - create an ordered group of docs + - render a sidebar for each doc of that group + - provide next/previous navigation + + The sidebars can be generated from the filesystem, or explicitly defined here. + + Create as many sidebars as you want. + */ +var sidebars = { + // Custom manual sidebar configuration for complete control + tutorialSidebar: [ + { + type: 'doc', + id: 'docs', // document ID + label: '🏠 Home', // sidebar label + className: 'custom-sidebar-home', + }, + { + type: 'category', + label: '🐙 GitHub', + className: 'custom-sidebar-github', + items: [ + 'GitHub/intro-github', + { + type: 'category', + label: '⚙️ Setup Environment', + className: 'custom-sidebar-setup', + items: [ + 'GitHub/setup-environment/setup-environment', + 'GitHub/setup-environment/setup-git-on-windows', + 'GitHub/setup-environment/setup-git-on-mac', + 'GitHub/setup-environment/git-commands', + ], + }, + { + type: 'category', + label: '📚 GitHub Basics', + className: 'custom-sidebar-basics', + items: [ + 'GitHub/GitHub-basics/create-github-repo', + 'GitHub/GitHub-basics/github-repo-command-line', + 'GitHub/GitHub-basics/how-to-clone-repository', + 'GitHub/GitHub-basics/how-to-fork', + 'GitHub/GitHub-basics/firs-opensource-code', + ], + }, + { + type: 'category', + label: '👨‍💼 Maintainer Guide', + className: 'custom-sidebar-maintainer', + items: [ + 'GitHub/Maintainer-guide/github-labels', + 'GitHub/Maintainer-guide/milestone', + 'GitHub/Maintainer-guide/github-project', + 'GitHub/Maintainer-guide/enable-dicussion', + ], + }, + ], + }, + { + type: 'category', + label: '🐍 Python', + className: 'custom-sidebar-python', + items: [ + 'python/intro-python', + 'python/setup-environment', + 'python/python-syntax', + 'python/python-variables', + 'python/datatype-python', + 'python/python-casting', + 'python/python-string', + 'python/python-operators', + 'python/python-list', + 'python/python-tuple', + 'python/python-set', + 'python/python-dictionaries', + 'python/python-array', + 'python/python-conditional-statements', + 'python/python-loops', + ], + }, + { + type: 'category', + label: '🗄️ SQL', + className: 'custom-sidebar-sql', + items: [ + 'sql/intro-sql', + 'sql/setup-environment', + { + type: 'category', + label: '📊 SQL Basics', + className: 'custom-sidebar-sql-basics', + items: [ + 'sql/SQL-basics/sql-constraints', + 'sql/SQL-basics/selecting-data', + 'sql/SQL-basics/filtering-data', + 'sql/SQL-basics/ordering-data', + 'sql/SQL-basics/grouping-data', + 'sql/SQL-basics/the-inequality-operator', + 'sql/SQL-basics/sql-datatypes', + 'sql/SQL-basics/primary-key-foreign-key', + 'sql/SQL-basics/sql-operators' + ], + }, + { + type: 'category', + label: '🔄 Table Transformation', + className: 'custom-sidebar-sql-transform', + items: [ + 'sql/table-transformation/table-creation', + 'sql/table-transformation/alter-table', + 'sql/table-transformation/data-operations', + 'sql/table-transformation/list-drop-table', + ], + }, + { + type: 'category', + label: 'SQL Joins', + className: 'custom-sidebar-sql-joins', + items: [ + 'sql/SQL-joins/intro-sql-joins', + 'sql/SQL-joins/inner-join', + 'sql/SQL-joins/left-join', + 'sql/SQL-joins/right-join', + 'sql/SQL-joins/full-outer-join', + 'sql/SQL-joins/cross-join', + 'sql/SQL-joins/self-join', + ], + }, + ], + }, + { + type: 'category', + label: '⚡ Next.js', + className: 'custom-sidebar-nextjs', + items: [ + 'Nextjs/intro-nextjs', + 'Nextjs/setup-environment', + // 'Nextjs/git-commands', + ], + }, + { + type: 'category', + label: '🎓 Google Student Ambassador', + className: 'custom-sidebar-gsa', + items: [ + 'Google-Student-Ambassador/part-1-getting-started/gsa-part-1', + 'Google-Student-Ambassador/part-2-application-process/gsa-part-2', + 'Google-Student-Ambassador/part-3-eligibility/gsa-part-3', + 'Google-Student-Ambassador/part-4-gemini-pro/gsa-part-4', + ], + }, + { + type: 'category', + label: '🔧 Technical', + className: 'custom-sidebar-technical', + items: [ + 'Technical/intro-github', + ], + }, + ], +}; +exports.default = sidebars; diff --git a/src/components/BrowserWindow/index.js b/src/components/BrowserWindow/index.js new file mode 100644 index 00000000..8625f964 --- /dev/null +++ b/src/components/BrowserWindow/index.js @@ -0,0 +1,25 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = BrowserWindow; +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importDefault(require("react")); +var clsx_1 = __importDefault(require("clsx")); +var BrowserWindow_module_css_1 = __importDefault(require("./BrowserWindow.module.css")); +function BrowserWindow(_a) { + var children = _a.children, minHeight = _a.minHeight, _b = _a.url, url = _b === void 0 ? 'http://localhost:3000' : _b, style = _a.style, bodyStyle = _a.bodyStyle; + return ((0, jsx_runtime_1.jsxs)("div", { className: BrowserWindow_module_css_1.default.browserWindow, style: __assign(__assign({}, style), { minHeight: minHeight }), children: [(0, jsx_runtime_1.jsxs)("div", { className: BrowserWindow_module_css_1.default.browserWindowHeader, children: [(0, jsx_runtime_1.jsxs)("div", { className: BrowserWindow_module_css_1.default.buttons, children: [(0, jsx_runtime_1.jsx)("span", { className: BrowserWindow_module_css_1.default.dot, style: { background: '#f25f58' } }), (0, jsx_runtime_1.jsx)("span", { className: BrowserWindow_module_css_1.default.dot, style: { background: '#fbbe3c' } }), (0, jsx_runtime_1.jsx)("span", { className: BrowserWindow_module_css_1.default.dot, style: { background: '#58cb42' } })] }), (0, jsx_runtime_1.jsx)("div", { className: (0, clsx_1.default)(BrowserWindow_module_css_1.default.browserWindowAddressBar, 'text--truncate'), children: url }), (0, jsx_runtime_1.jsx)("div", { className: BrowserWindow_module_css_1.default.browserWindowMenuIcon, children: (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("span", { className: BrowserWindow_module_css_1.default.bar }), (0, jsx_runtime_1.jsx)("span", { className: BrowserWindow_module_css_1.default.bar }), (0, jsx_runtime_1.jsx)("span", { className: BrowserWindow_module_css_1.default.bar })] }) })] }), (0, jsx_runtime_1.jsx)("div", { className: BrowserWindow_module_css_1.default.browserWindowBody, style: bodyStyle, children: children })] })); +} diff --git a/src/components/Comming/index.js b/src/components/Comming/index.js new file mode 100644 index 00000000..f72fbf92 --- /dev/null +++ b/src/components/Comming/index.js @@ -0,0 +1,15 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importDefault(require("react")); +/** + * A maintenance notification component with contained sizing. + * @returns {JSX.Element} A React functional component + */ +var Coming = function () { + return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col justify-center items-center p-6 mx-auto my-8 max-w-2xl rounded-xl bg-white dark:bg-gray-800 shadow-lg", children: [(0, jsx_runtime_1.jsx)("img", { src: "https://www.svgrepo.com/show/426192/cogs-settings.svg", alt: "Maintenance in progress", className: "mb-6 h-32 w-32", height: 100, width: 100, loading: "lazy" }), (0, jsx_runtime_1.jsx)("h1", { className: "text-3xl font-bold text-center text-gray-800 dark:text-white mb-3", children: "Site Maintenance" }), (0, jsx_runtime_1.jsx)("p", { className: "text-center text-gray-600 dark:text-gray-300 mb-6", children: "We're working hard to improve your experience. Please check back soon!" }), (0, jsx_runtime_1.jsx)("div", { className: "flex flex-col sm:flex-row gap-10 w-full", children: (0, jsx_runtime_1.jsx)("a", { href: "/contact", className: "flex-1 bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded-lg text-center transition-colors ", children: "Contact Support" }) })] })); +}; +exports.default = Coming; diff --git a/src/components/Community/index.js b/src/components/Community/index.js new file mode 100644 index 00000000..3a546a39 --- /dev/null +++ b/src/components/Community/index.js @@ -0,0 +1,98 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.LandingCommunity = void 0; +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importStar(require("react")); +var react_slot_counter_1 = __importDefault(require("react-slot-counter")); +require("./LandingCommunity.css"); +var statsProvider_1 = require("@site/src/lib/statsProvider"); +var LandingCommunity = function (_a) { + var className = _a.className; + var _b = (0, statsProvider_1.useCommunityStatsContext)(), githubStarCountText = _b.githubStarCountText, githubContributorsCountText = _b.githubContributorsCountText, githubForksCountText = _b.githubForksCountText, githubReposCountText = _b.githubReposCountText, githubStarCount = _b.githubStarCount, githubContributorsCount = _b.githubContributorsCount, githubForksCount = _b.githubForksCount, githubReposCount = _b.githubReposCount, loading = _b.loading, error = _b.error; + var generateList = (0, react_1.useMemo)(function () { return [ + { + stat: githubStarCount, + statText: githubStarCountText, + description: "Stars across all our GitHub repositories, showcasing the support and appreciation from the community.", + href: "https://github.com/recodehive/Support", + label: "GitHub Stars" + }, + { + stat: githubReposCount, + statText: githubReposCountText, + description: "Live public projects on RecodHive, demonstrating the power of open-source collaboration.", + href: "https://github.com/orgs/recodehive/repositories?q=visibility%3Apublic+archived%3Afalse", + label: "Public Repositories" + }, + { + stat: githubContributorsCount, + statText: githubContributorsCountText, + description: "Amazing contributors who have made our repositories better and helped build our community.", + href: "https://github.com/orgs/recodehive/people", + label: "Contributors" + }, + { + stat: githubForksCount, + statText: githubForksCountText, + description: "Forks of our repositories, showing how our community extends and builds upon our work.", + href: "https://github.com/orgs/recodehive/discussions", + label: "Community Forks" + }, + ]; }, [githubStarCount, githubStarCountText, githubReposCount, githubReposCountText, githubContributorsCount, githubContributorsCountText, githubForksCount, githubForksCountText]); + var handleCardClick = function (href) { + if (href) { + window.open(href, '_blank', 'noopener,noreferrer'); + } + }; + return ((0, jsx_runtime_1.jsxs)("div", { className: "landing-community ".concat(className || ""), children: [(0, jsx_runtime_1.jsxs)("div", { className: "landing-community__header", children: [(0, jsx_runtime_1.jsxs)("h2", { className: "landing-community__title", children: ["Discover the strength of our", " ", (0, jsx_runtime_1.jsx)("span", { className: "landing-community__highlight", children: "amazing community" }), "."] }), error && ((0, jsx_runtime_1.jsx)("div", { className: "landing-community__error", children: (0, jsx_runtime_1.jsx)("small", { children: "\u26A0\uFE0F Stats may be cached or incomplete" }) }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "landing-community__content", children: [(0, jsx_runtime_1.jsx)("div", { className: "landing-community__stats", children: generateList.map(function (item, index) { return ((0, jsx_runtime_1.jsxs)("div", { className: "landing-community__stat-item ".concat(item.href ? 'clickable' : '', " ").concat(loading ? 'loading' : ''), onClick: function () { return handleCardClick(item.href); }, role: item.href ? "button" : "presentation", tabIndex: item.href ? 0 : -1, onKeyDown: function (e) { + if (item.href && (e.key === 'Enter' || e.key === ' ')) { + e.preventDefault(); + handleCardClick(item.href); + } + }, title: item.href ? "Click to visit ".concat(item.label) : item.label, children: [(0, jsx_runtime_1.jsx)("div", { className: "landing-community__stat-value", children: loading ? ((0, jsx_runtime_1.jsx)("div", { className: "landing-community__loading", children: (0, jsx_runtime_1.jsx)("span", { className: "loading-spinner", children: "\u23F3" }) })) : ((0, jsx_runtime_1.jsxs)("span", { children: [(0, jsx_runtime_1.jsx)(react_slot_counter_1.default, { value: item.stat, duration: 2, animateOnVisible: { + triggerOnce: true, + rootMargin: '0px 0px -100px 0px' + }, numberSlotClassName: "slot-counter-number", separatorClassName: "slot-counter-separator" }), item.href && (0, jsx_runtime_1.jsx)("span", { className: "external-link-icon", children: "\u2197" })] })) }), (0, jsx_runtime_1.jsx)("div", { className: "landing-community__stat-description", children: item.description })] }, index)); }) }), (0, jsx_runtime_1.jsxs)("div", { className: "landing-community__info clickable", onClick: function () { return handleCardClick("https://github.com/recodehive"); }, role: "button", tabIndex: 0, onKeyDown: function (e) { + if (e.key === 'Enter' || e.key === ' ') { + e.preventDefault(); + handleCardClick("https://github.com/recodehive"); + } + }, title: "Click to visit RecodHive GitHub Organization", children: [(0, jsx_runtime_1.jsx)("img", { className: "landing-community__image", src: "/community.png", alt: "team collaboration", loading: "lazy" }), (0, jsx_runtime_1.jsxs)("div", { className: "landing-community__info-text", children: ["Our developers are the core of RecodHive community. We take pride in our", " ", (0, jsx_runtime_1.jsx)("span", { className: "landing-community__link", children: "GitHub organization" }), " ", "with amazing", " ", (0, jsx_runtime_1.jsx)("span", { className: "landing-community__link", children: "contributors and maintainers" }), " ", "powering RecodHive's growth.", (0, jsx_runtime_1.jsxs)("div", { className: "external-link-indicator", children: [(0, jsx_runtime_1.jsx)("span", { className: "external-link-icon", children: "\u2197" }), (0, jsx_runtime_1.jsx)("small", { children: "Click to explore our GitHub" })] })] })] })] })] })); +}; +exports.LandingCommunity = LandingCommunity; diff --git a/src/components/FloatingContributors/index.js b/src/components/FloatingContributors/index.js new file mode 100644 index 00000000..216a6fa7 --- /dev/null +++ b/src/components/FloatingContributors/index.js @@ -0,0 +1,472 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importStar(require("react")); +var framer_motion_1 = require("framer-motion"); +require("./FloatingContributors.css"); +// Format relative time (e.g., "2 hours ago") +var formatTimeAgo = function (date) { + var seconds = Math.floor((new Date().getTime() - date.getTime()) / 1000); + var interval = Math.floor(seconds / 31536000); + if (interval > 1) + return "".concat(interval, " years ago"); + interval = Math.floor(seconds / 2592000); + if (interval > 1) + return "".concat(interval, " months ago"); + interval = Math.floor(seconds / 86400); + if (interval > 1) + return "".concat(interval, " days ago"); + if (interval === 1) + return "1 day ago"; + interval = Math.floor(seconds / 3600); + if (interval > 1) + return "".concat(interval, " hours ago"); + if (interval === 1) + return "1 hour ago"; + interval = Math.floor(seconds / 60); + if (interval > 1) + return "".concat(interval, " minutes ago"); + if (interval === 1) + return "1 minute ago"; + return "just now"; +}; +var FloatingContributors = function (_a) { + var _b = _a.headerEmbedded, headerEmbedded = _b === void 0 ? false : _b; + var _c = (0, react_1.useState)([]), contributors = _c[0], setContributors = _c[1]; + var _d = (0, react_1.useState)([]), activities = _d[0], setActivities = _d[1]; + var _e = (0, react_1.useState)(0), currentActivityIndex = _e[0], setCurrentActivityIndex = _e[1]; + var _f = (0, react_1.useState)(true), isVisible = _f[0], setIsVisible = _f[1]; + var _g = (0, react_1.useState)(true), loading = _g[0], setLoading = _g[1]; + var _h = (0, react_1.useState)(null), lastFetched = _h[0], setLastFetched = _h[1]; + var refreshTimerRef = (0, react_1.useRef)(null); + // Create fallback activities for when API fails + var createFallbackActivities = (0, react_1.useCallback)(function () { + var fallbackContributors = [ + { + login: 'sanjay-kv', + avatar_url: 'https://avatars.githubusercontent.com/u/30715153?v=4', + html_url: 'https://github.com/sanjay-kv', + }, + { + login: 'recodehive-team', + avatar_url: 'https://avatars.githubusercontent.com/u/150000000?v=4', + html_url: 'https://github.com/recodehive', + }, + { + login: 'open-source-contributor', + avatar_url: 'https://avatars.githubusercontent.com/u/583231?v=4', + html_url: 'https://github.com/open-source-contributor', + }, + { + login: 'developer', + avatar_url: 'https://avatars.githubusercontent.com/u/9919?v=4', + html_url: 'https://github.com/developer', + }, + { + login: 'coder', + avatar_url: 'https://avatars.githubusercontent.com/u/6154722?v=4', + html_url: 'https://github.com/coder', + }, + ]; + var actions = ['pushed', 'created', 'merged', 'opened', 'commented']; + var timeOffsets = [5, 10, 30, 60, 120, 240, 480]; // minutes + var messages = [ + 'Updated documentation', + 'Fixed styling issues', + 'Added new feature', + 'Resolved conflict in package.json', + 'Implemented responsive design', + 'Updated dependencies', + 'Fixed typo in README' + ]; + return fallbackContributors.map(function (contributor, index) { + var _a; + var now = new Date(); + var timestamp = new Date(now.getTime() - (timeOffsets[index % timeOffsets.length] * 60 * 1000)); + return { + id: "fallback-".concat(index), + contributor: { + login: contributor.login, + avatar_url: contributor.avatar_url, + html_url: contributor.html_url, + }, + action: actions[index % actions.length], + message: (_a = messages[index % messages.length]) === null || _a === void 0 ? void 0 : _a.slice(0, 50), // Consistent message length + timestamp: timestamp, + timeAgo: formatTimeAgo(timestamp), + }; + }); + }, []); + // Fetch live data from GitHub + var fetchLiveData = (0, react_1.useCallback)(function () { return __awaiter(void 0, void 0, void 0, function () { + var CACHE_KEY, CACHE_DURATION, now, events, cachedData, _a, data, timestamp, eventsResponse, newActivities, contributorsMap_1, contributorsResponse, contributorsData, error_1, error_2, fallbackActivities, contributorsMap_2; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _b.trys.push([0, 11, , 12]); + CACHE_KEY = 'recodehive_website_events'; + CACHE_DURATION = 2 * 60 * 1000; + now = Date.now(); + if (lastFetched && now - lastFetched < 30000) { + // Don't fetch more than once every 30 seconds + return [2 /*return*/]; + } + events = []; + if (typeof window !== 'undefined') { + try { + cachedData = localStorage.getItem(CACHE_KEY); + if (cachedData) { + _a = JSON.parse(cachedData), data = _a.data, timestamp = _a.timestamp; + if (now - timestamp < CACHE_DURATION) { + events = data; + } + } + } + catch (e) { + console.warn('Error retrieving cached events', e); + } + } + if (!(events.length === 0)) return [3 /*break*/, 3]; + setLoading(true); + return [4 /*yield*/, fetch('https://api.github.com/repos/recodehive/recode-website/events?per_page=30')]; + case 1: + eventsResponse = _b.sent(); + if (!eventsResponse.ok) { + throw new Error("GitHub API error: ".concat(eventsResponse.status)); + } + return [4 /*yield*/, eventsResponse.json()]; + case 2: + events = _b.sent(); + // Save to cache + if (typeof window !== 'undefined' && Array.isArray(events)) { + try { + localStorage.setItem(CACHE_KEY, JSON.stringify({ + data: events, + timestamp: now, + })); + } + catch (e) { + console.warn('Error caching events data', e); + } + } + _b.label = 3; + case 3: + if (!(Array.isArray(events) && events.length > 0)) return [3 /*break*/, 10]; + newActivities = events.map(function (event) { + var _a, _b, _c, _d, _e; + // Map GitHub event types to our action types + var action = 'other'; + var message; + switch (event.type) { + case 'PushEvent': + action = 'pushed'; + message = event.payload.commits && ((_b = (_a = event.payload.commits[0]) === null || _a === void 0 ? void 0 : _a.message) === null || _b === void 0 ? void 0 : _b.slice(0, 50)); + break; + case 'PullRequestEvent': + if (event.payload.action === 'opened') + action = 'opened'; + else if (event.payload.action === 'closed' && ((_c = event.payload.pull_request) === null || _c === void 0 ? void 0 : _c.merged)) + action = 'merged'; + else if (event.payload.action === 'closed') + action = 'closed'; + break; + case 'CreateEvent': + action = 'created'; + break; + case 'IssueCommentEvent': + case 'CommitCommentEvent': + case 'PullRequestReviewCommentEvent': + action = 'commented'; + message = (_e = (_d = event.payload.comment) === null || _d === void 0 ? void 0 : _d.body) === null || _e === void 0 ? void 0 : _e.slice(0, 50); + break; + default: + action = 'other'; + } + var timestamp = new Date(event.created_at); + return { + id: event.id, + contributor: { + login: event.actor.login, + avatar_url: event.actor.avatar_url, + html_url: "https://github.com/".concat(event.actor.login), + }, + action: action, + message: message === null || message === void 0 ? void 0 : message.slice(0, 50), // Consistent message length limit + timestamp: timestamp, + timeAgo: formatTimeAgo(timestamp), + }; + }); + if (!(newActivities.length > 0)) return [3 /*break*/, 10]; + setActivities(newActivities); + contributorsMap_1 = new Map(); + _b.label = 4; + case 4: + _b.trys.push([4, 8, , 9]); + return [4 /*yield*/, fetch('https://api.github.com/repos/recodehive/recode-website/contributors?per_page=100')]; + case 5: + contributorsResponse = _b.sent(); + if (!contributorsResponse.ok) return [3 /*break*/, 7]; + return [4 /*yield*/, contributorsResponse.json()]; + case 6: + contributorsData = _b.sent(); + if (Array.isArray(contributorsData)) { + contributorsData.forEach(function (contributor) { + if (contributor.login && contributor.type === 'User') { + contributorsMap_1.set(contributor.login, { + id: contributor.id.toString(), + login: contributor.login, + avatar_url: contributor.avatar_url, + contributions: contributor.contributions, + html_url: contributor.html_url, + }); + } + }); + } + _b.label = 7; + case 7: return [3 /*break*/, 9]; + case 8: + error_1 = _b.sent(); + console.warn('Error fetching contributors:', error_1); + // If we couldn't get contributors data, at least use actors from events + events.forEach(function (event) { + var login = event.actor.login; + if (!contributorsMap_1.has(login)) { + contributorsMap_1.set(login, { + id: event.actor.id.toString(), + login: login, + avatar_url: event.actor.avatar_url, + contributions: 1, // We don't know the actual count + html_url: "https://github.com/".concat(login), + }); + } + }); + return [3 /*break*/, 9]; + case 9: + // Update contributors if we found any + if (contributorsMap_1.size > 0) { + setContributors(Array.from(contributorsMap_1.values())); + } + _b.label = 10; + case 10: + setLastFetched(now); + setLoading(false); + // Set up next refresh + if (refreshTimerRef.current) { + clearTimeout(refreshTimerRef.current); + } + refreshTimerRef.current = setTimeout(function () { + fetchLiveData(); + }, 60000); // Refresh every minute + return [3 /*break*/, 12]; + case 11: + error_2 = _b.sent(); + console.warn('Error fetching GitHub events:', error_2); + // Use fallback data if we have no activities yet + if (activities.length === 0) { + fallbackActivities = createFallbackActivities(); + setActivities(fallbackActivities); + contributorsMap_2 = new Map(); + fallbackActivities.forEach(function (activity) { + var login = activity.contributor.login; + if (!contributorsMap_2.has(login)) { + contributorsMap_2.set(login, { + id: "fallback-".concat(login), + login: login, + avatar_url: activity.contributor.avatar_url, + contributions: Math.floor(Math.random() * 50) + 10, + html_url: activity.contributor.html_url, + }); + } + }); + setContributors(Array.from(contributorsMap_2.values())); + } + setLoading(false); + return [3 /*break*/, 12]; + case 12: return [2 /*return*/]; + } + }); + }); }, [activities.length, createFallbackActivities, lastFetched]); + // Initialize component and start data fetching + (0, react_1.useEffect)(function () { + // Set loading state + setLoading(true); + // Fetch data immediately + fetchLiveData(); + // Clean up on unmount + return function () { + if (refreshTimerRef.current) { + clearTimeout(refreshTimerRef.current); + } + }; + }, [fetchLiveData]); + // Cycle through activities + (0, react_1.useEffect)(function () { + if (activities.length <= 1) + return; + var interval = setInterval(function () { + setCurrentActivityIndex(function (prev) { return (prev + 1) % activities.length; }); + }, 4000); + return function () { return clearInterval(interval); }; + }, [activities.length]); + // Get GitHub URL for event + var getGitHubEventUrl = function (activity) { + var repoUrl = 'https://github.com/recodehive/recode-website'; + switch (activity.action) { + case 'pushed': + return "".concat(repoUrl, "/commits"); + case 'merged': + case 'opened': + case 'closed': + return "".concat(repoUrl, "/pulls"); + case 'commented': + return "".concat(repoUrl, "/issues"); + case 'created': + return repoUrl; + default: + return repoUrl; + } + }; + // Get icon for action type + var getActionIcon = function (action) { + switch (action) { + case 'pushed': return '🚀'; + case 'created': return '✨'; + case 'merged': return '🔄'; + case 'opened': return '📝'; + case 'commented': return '💬'; + case 'closed': return '✅'; + default: return '💻'; + } + }; + // Get text for action type + var getActionText = function (action) { + switch (action) { + case 'pushed': return 'PUSHED'; + case 'created': return 'CREATED'; + case 'merged': return 'MERGED'; + case 'opened': return 'OPENED'; + case 'commented': return 'COMMENTED'; + case 'closed': return 'CLOSED'; + default: return 'ACTIVE'; + } + }; + // Don't render anything while initial loading + if (loading && activities.length === 0) { + return null; + } + // Get current activity to display + var currentActivity = activities[currentActivityIndex]; + return ((0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { children: isVisible && ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "floating-contributors-container ".concat(headerEmbedded ? 'header-embedded' : ''), initial: { opacity: 0, y: headerEmbedded ? 0 : 50, scale: headerEmbedded ? 1 : 0.9 }, animate: { + opacity: 1, + y: 0, + scale: 1, + }, exit: { opacity: 0, y: headerEmbedded ? 0 : 50, scale: headerEmbedded ? 1 : 0.9 }, transition: { + duration: headerEmbedded ? 0.8 : 0.6, + ease: [0.4, 0, 0.2, 1] + }, children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "floating-contributors-card", animate: headerEmbedded ? {} : { + y: [0, -8, 0], + }, transition: headerEmbedded ? {} : { + duration: 4, + repeat: Infinity, + ease: "easeInOut", + }, children: [(0, jsx_runtime_1.jsx)("button", { className: "floating-contributors-close", onClick: function () { return setIsVisible(false); }, "aria-label": "Close contributors showcase", children: "\u00D7" }), (0, jsx_runtime_1.jsxs)("div", { className: "floating-contributors-header", children: [(0, jsx_runtime_1.jsxs)("div", { className: "floating-contributors-title", children: [(0, jsx_runtime_1.jsx)("span", { className: "title-icon", children: "\uD83D\uDC65" }), (0, jsx_runtime_1.jsx)("span", { children: "Live Activity" })] }), (0, jsx_runtime_1.jsx)("div", { className: "floating-contributors-subtitle", children: "recodehive/recode-website" })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { mode: "wait", children: (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "floating-contributors-activity contributor-activity-item", initial: { opacity: 0, x: 20 }, animate: { opacity: 1, x: 0 }, exit: { opacity: 0, x: -20 }, transition: { duration: 0.4 }, onClick: function () { return window.open(getGitHubEventUrl(currentActivity), '_blank'); }, tabIndex: 0, role: "link", "aria-label": "View ".concat(currentActivity.contributor.login, "'s ").concat(currentActivity.action, " activity on GitHub"), children: [(0, jsx_runtime_1.jsxs)("div", { className: "activity-avatar-container", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.img, { src: currentActivity.contributor.avatar_url, alt: currentActivity.contributor.login, className: "activity-avatar", whileHover: { scale: 1.1 }, transition: { type: "spring", stiffness: 400, damping: 10 } }), (0, jsx_runtime_1.jsx)("div", { className: "activity-status-indicator", children: (0, jsx_runtime_1.jsx)("span", { className: "status-dot" }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "activity-details", children: [(0, jsx_runtime_1.jsxs)("div", { className: "activity-user", children: [(0, jsx_runtime_1.jsxs)("span", { className: "activity-username", title: "@".concat(currentActivity.contributor.login), children: ["@", currentActivity.contributor.login] }), (0, jsx_runtime_1.jsx)("span", { className: "activity-action-badge", children: getActionText(currentActivity.action) })] }), currentActivity.message && ((0, jsx_runtime_1.jsx)("div", { className: "activity-message", title: currentActivity.message, children: currentActivity.message })), (0, jsx_runtime_1.jsx)("div", { className: "activity-time", children: currentActivity.timeAgo })] })] }, currentActivityIndex) }), (0, jsx_runtime_1.jsxs)("div", { className: "floating-contributors-grid", children: [(0, jsx_runtime_1.jsxs)("div", { className: "contributors-grid-header", children: [(0, jsx_runtime_1.jsx)("span", { children: "Recent Contributors" }), (0, jsx_runtime_1.jsx)("span", { className: "contributors-count", children: contributors.length })] }), (0, jsx_runtime_1.jsxs)("div", { className: "contributors-avatars", children: [contributors + .sort(function (a, b) { return b.contributions - a.contributions; }) // Sort contributors by contributions in descending order + .slice(0, 5) // Limit to top 5 contributors + .map(function (contributor, index) { return ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "contributor-avatar-wrapper", initial: { opacity: 0, scale: 0.8 }, animate: { opacity: 1, scale: 1 }, transition: { + delay: index * 0.05, + type: "spring", + stiffness: 300, + damping: 15 + }, whileHover: { scale: 1.1, zIndex: 5 }, children: (0, jsx_runtime_1.jsxs)("a", { href: contributor.html_url, target: "_blank", rel: "noopener noreferrer", "aria-label": "View ".concat(contributor.login, "'s GitHub profile"), className: "contributor-link", children: [(0, jsx_runtime_1.jsx)("img", { src: contributor.avatar_url, alt: contributor.login, className: "contributor-avatar" }), (0, jsx_runtime_1.jsxs)("div", { className: "contributor-tooltip", children: [(0, jsx_runtime_1.jsxs)("div", { className: "tooltip-username", children: ["@", contributor.login] }), (0, jsx_runtime_1.jsxs)("div", { className: "tooltip-contributions", children: [contributor.contributions || 0, " contributions"] })] })] }) }, contributor.id)); }), contributors.length > 12 && ((0, jsx_runtime_1.jsx)("div", { className: "contributors-more", children: (0, jsx_runtime_1.jsxs)("span", { children: ["+", contributors.length - 12, " more"] }) }))] })] }), (0, jsx_runtime_1.jsx)("div", { className: "floating-contributors-footer", children: (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.a, { href: "https://github.com/recodehive/recode-website", target: "_blank", rel: "noopener noreferrer", className: "contributors-cta", whileHover: { scale: 1.02 }, whileTap: { scale: 0.98 }, "aria-label": "View repository on GitHub and join the community", children: [(0, jsx_runtime_1.jsx)("span", { className: "cta-icon", children: "\uD83D\uDE80" }), (0, jsx_runtime_1.jsx)("span", { children: "View Repository on GitHub" }), (0, jsx_runtime_1.jsx)("span", { className: "cta-arrow", children: "\u2197" })] }) })] }), (0, jsx_runtime_1.jsx)("div", { className: "floating-particles", children: __spreadArray([], Array(6), true).map(function (_, i) { return ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "floating-particle", animate: { + y: [0, -20, 0], + x: [0, Math.sin(i) * 10, 0], + opacity: [0.3, 0.8, 0.3], + }, transition: { + duration: 3 + i * 0.5, + repeat: Infinity, + ease: "easeInOut", + delay: i * 0.2, + }, style: { + left: "".concat(10 + i * 15, "%"), + top: "".concat(20 + (i % 3) * 20, "%"), + } }, i)); }) })] })) })); +}; +exports.default = FloatingContributors; diff --git a/src/components/GiscusComponent/index.js b/src/components/GiscusComponent/index.js new file mode 100644 index 00000000..cd5a3185 --- /dev/null +++ b/src/components/GiscusComponent/index.js @@ -0,0 +1,22 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = GiscusComponent; +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importDefault(require("react")); +var react_2 = __importDefault(require("@giscus/react")); +var theme_common_1 = require("@docusaurus/theme-common"); +require("./style.css"); +/** + * GiscusComponent + * + * A React component that integrates Giscus for GitHub discussions. + * + * @returns {JSX.Element} The rendered component + */ +function GiscusComponent() { + var colorMode = (0, theme_common_1.useColorMode)().colorMode; // Retrieves the current color mode from Docusaurus theme + return ((0, jsx_runtime_1.jsx)("div", { className: "giscus-component", children: (0, jsx_runtime_1.jsx)(react_2.default, { id: "giscus", repo: "CodeHarborHub/codeharborhub.github.io", repoId: "R_kgDOLiT30w", category: "Support", categoryId: "DIC_kwDOLiT3084CfRMi", mapping: "pathname", term: "Welcome to @giscus/react component!", strict: "0", reactionsEnabled: "1", emitMetadata: "0", inputPosition: "bottom", theme: colorMode, lang: "en", loading: "lazy" }) })); +} diff --git a/src/components/HomepageFeatures/index.js b/src/components/HomepageFeatures/index.js new file mode 100644 index 00000000..cbdad5c3 --- /dev/null +++ b/src/components/HomepageFeatures/index.js @@ -0,0 +1,45 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = HomepageFeatures; +var jsx_runtime_1 = require("react/jsx-runtime"); +var clsx_1 = __importDefault(require("clsx")); +var Heading_1 = __importDefault(require("@theme/Heading")); +var styles_module_css_1 = __importDefault(require("./styles.module.css")); +var FeatureList = [ + { + title: 'Easy to Use', + Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default, + description: ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "Docusaurus was designed from the ground up to be easily installed and used to get your website up and running quickly." })), + }, + { + title: 'Focus on What Matters', + Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default, + description: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Docusaurus lets you focus on your docs, and we'll do the chores. Go ahead and move your docs into the ", (0, jsx_runtime_1.jsx)("code", { children: "docs" }), " directory."] })), + }, + { + title: 'Powered by React', + Svg: require('@site/static/img/undraw_docusaurus_react.svg').default, + description: ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "Extend or customize your website layout by reusing React. Docusaurus can be extended while reusing the same header and footer." })), + }, +]; +function Feature(_a) { + var title = _a.title, Svg = _a.Svg, description = _a.description; + return ((0, jsx_runtime_1.jsxs)("div", { className: (0, clsx_1.default)('col col--4'), children: [(0, jsx_runtime_1.jsx)("div", { className: "text--center", children: (0, jsx_runtime_1.jsx)(Svg, { className: styles_module_css_1.default.featureSvg, role: "img" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "text--center padding-horiz--md", children: [(0, jsx_runtime_1.jsx)(Heading_1.default, { as: "h3", children: title }), (0, jsx_runtime_1.jsx)("p", { children: description })] })] })); +} +function HomepageFeatures() { + return ((0, jsx_runtime_1.jsx)("section", { className: styles_module_css_1.default.features, children: (0, jsx_runtime_1.jsx)("div", { className: "container", children: (0, jsx_runtime_1.jsx)("div", { className: "row", children: FeatureList.map(function (props, idx) { return ((0, jsx_runtime_1.jsx)(Feature, __assign({}, props), idx)); }) }) }) })); +} diff --git a/src/components/NewsLetterPopup.js b/src/components/NewsLetterPopup.js new file mode 100644 index 00000000..bde17f31 --- /dev/null +++ b/src/components/NewsLetterPopup.js @@ -0,0 +1,67 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importStar(require("react")); +var NewsletterPopup = function () { + var _a = (0, react_1.useState)(false), showPopup = _a[0], setShowPopup = _a[1]; + (0, react_1.useEffect)(function () { + var hasSubscribed = localStorage.getItem('recodehive_newsletter_popup'); + if (hasSubscribed !== 'true') { + var handleScroll_1 = function () { + var scrollPosition = window.scrollY + window.innerHeight; + var pageHeight = document.body.scrollHeight; + if ((scrollPosition / pageHeight) >= 0.8) { + setShowPopup(true); + window.removeEventListener('scroll', handleScroll_1); + } + }; + window.addEventListener('scroll', handleScroll_1); + return function () { return window.removeEventListener('scroll', handleScroll_1); }; + } + }, []); + var handleClose = function () { + setShowPopup(false); + localStorage.setItem('recodehive_newsletter_popup', 'true'); + }; + if (!showPopup) + return null; + return ((0, jsx_runtime_1.jsx)("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 px-4", children: (0, jsx_runtime_1.jsxs)("div", { className: "bg-white/80 backdrop-blur-xl max-w-xl w-full rounded-3xl shadow-2xl p-8 text-center relative border border-gray-200 animate-fade-in", children: [(0, jsx_runtime_1.jsx)("img", { src: "/img/logo.png", alt: "RecodeHive Logo", className: "w-16 h-16 mx-auto mb-4 rounded-full shadow-md" }), (0, jsx_runtime_1.jsx)("h2", { className: "text-3xl font-extrabold mb-2 text-gray-900", children: "Sanjay\u2019s Substack" }), (0, jsx_runtime_1.jsxs)("p", { className: "text-gray-700 text-base leading-relaxed mb-4", children: ["Recodehive is an inclusive and welcoming platform where everyone can contribute, learn, and grow together. \u26A1 ", (0, jsx_runtime_1.jsx)("br", {}), "Check my \u2728 Website: ", (0, jsx_runtime_1.jsx)("a", { href: "https://www.recodehive.com", target: "_blank", className: "text-blue-600 hover:underline font-medium", children: "https://www.recodehive.com " }), (0, jsx_runtime_1.jsx)("br", {}), "\uD83D\uDCEE How to reach me: ", (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/sanjay-kv", target: "_blank", className: "text-blue-600 hover:underline font-medium", children: "github.com/sanjay-kv" }), (0, jsx_runtime_1.jsx)("br", {}), "\uD83D\uDC6B Join my opensource community"] }), (0, jsx_runtime_1.jsxs)("p", { className: "text-sm font-semibold text-gray-700 mb-4", children: ["By ", (0, jsx_runtime_1.jsx)("span", { className: "text-gray-900", children: "Sanjay Viswanathan" }), " \u00B7 Over ", (0, jsx_runtime_1.jsx)("span", { className: "text-gray-900", children: "31,000 subscribers" })] }), (0, jsx_runtime_1.jsxs)("form", { className: "flex items-stretch w-full border-2 border-gray-300 rounded-xl overflow-hidden bg-white shadow-inner mb-4 focus-within:ring-2 focus-within:ring-blue-500", onSubmit: function (e) { + e.preventDefault(); + alert('Subscribed! (Integrate with Substack API)'); + handleClose(); + }, children: [(0, jsx_runtime_1.jsx)("input", { type: "email", required: true, placeholder: "Type your email...", className: "flex-1 px-4 py-2 text-sm bg-transparent focus:outline-none text-gray-800 placeholder-gray-400" }), (0, jsx_runtime_1.jsx)("button", { type: "submit", className: "bg-gradient-to-r from-orange-400 to-orange-600 text-white px-6 text-sm font-bold transition duration-300 hover:from-orange-500 hover:to-orange-700", children: "Subscribe" })] }), (0, jsx_runtime_1.jsxs)("p", { className: "text-xs text-gray-500 mb-4", children: ["By subscribing, I agree to Substack\u2019s", ' ', (0, jsx_runtime_1.jsx)("a", { href: "#", className: "underline hover:text-blue-600", children: "Terms of Use" }), " and acknowledge its", ' ', (0, jsx_runtime_1.jsx)("a", { href: "#", className: "underline hover:text-blue-600", children: "Information Collection Notice" }), " and", ' ', (0, jsx_runtime_1.jsx)("a", { href: "#", className: "underline hover:text-blue-600", children: "Privacy Policy" }), "."] }), (0, jsx_runtime_1.jsx)("button", { onClick: handleClose, className: "text-sm text-gray-600 font-medium hover:text-black transition", "aria-label": "Close newsletter popup", children: "No thanks \u2192" })] }) })); +}; +exports.default = NewsletterPopup; diff --git a/src/components/StatsSection/index.js b/src/components/StatsSection/index.js new file mode 100644 index 00000000..3a4aacd4 --- /dev/null +++ b/src/components/StatsSection/index.js @@ -0,0 +1,49 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importDefault(require("react")); +var framer_motion_1 = require("framer-motion"); +var styles_module_css_1 = __importDefault(require("./styles.module.css")); +var stats = [ + { value: '10,000+', label: 'Active Learners', icon: '👥' }, + { value: '100+', label: 'Hours of Content', icon: '⏱️' }, + { value: '24/7', label: 'Community Support', icon: '💬' }, + { value: '4.9/5', label: 'Average Rating', icon: '⭐' }, +]; +var StatCard = function (_a) { + var stat = _a.stat, index = _a.index; + return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: styles_module_css_1.default.statCard, initial: { opacity: 0, y: 30 }, whileInView: { + opacity: 1, + y: 0, + transition: { + duration: 0.6, + delay: index * 0.1, + ease: "easeOut" + } + }, viewport: { once: true, margin: "-50px" }, whileHover: { + y: -5, + boxShadow: '0 15px 30px rgba(0, 0, 0, 0.2)' + }, children: [stat.icon && ((0, jsx_runtime_1.jsx)("div", { className: styles_module_css_1.default.statIcon, children: stat.icon })), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: styles_module_css_1.default.statValue, "aria-label": stat.value, initial: { scale: 0.9 }, whileInView: { + scale: 1, + transition: { + delay: 0.2 + (index * 0.05), + type: 'spring', + stiffness: 100 + } + }, viewport: { once: true }, children: stat.value }), (0, jsx_runtime_1.jsx)("div", { className: styles_module_css_1.default.statLabel, children: stat.label })] })); +}; +var StatsSection = function () { + return ((0, jsx_runtime_1.jsx)("section", { className: styles_module_css_1.default.section, children: (0, jsx_runtime_1.jsx)("div", { className: styles_module_css_1.default.container, children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: styles_module_css_1.default.statsGrid, initial: "hidden", whileInView: "visible", viewport: { once: true, amount: 0.5 }, variants: { + hidden: { opacity: 0 }, + visible: { + opacity: 1, + transition: { + staggerChildren: 0.1 + } + } + }, children: stats.map(function (stat, index) { return ((0, jsx_runtime_1.jsx)(StatCard, { stat: stat, index: index }, stat.label)); }) }) }) })); +}; +exports.default = StatsSection; diff --git a/src/components/Svg/index.js b/src/components/Svg/index.js new file mode 100644 index 00000000..76d51da3 --- /dev/null +++ b/src/components/Svg/index.js @@ -0,0 +1,42 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = Svg; +var jsx_runtime_1 = require("react/jsx-runtime"); +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +var react_1 = __importDefault(require("react")); +var clsx_1 = __importDefault(require("clsx")); +var styles_module_css_1 = __importDefault(require("./styles.module.css")); +function Svg(props) { + var svgClass = props.svgClass, colorAttr = props.colorAttr, children = props.children, _a = props.color, color = _a === void 0 ? 'inherit' : _a, _b = props.size, size = _b === void 0 ? 'medium' : _b, _c = props.viewBox, viewBox = _c === void 0 ? '0 0 24 24' : _c, rest = __rest(props, ["svgClass", "colorAttr", "children", "color", "size", "viewBox"]); + return ((0, jsx_runtime_1.jsx)("svg", __assign({ viewBox: viewBox, color: colorAttr, "aria-hidden": true, className: (0, clsx_1.default)(styles_module_css_1.default.svgIcon, styles_module_css_1.default[color], styles_module_css_1.default[size], svgClass) }, rest, { children: children }))); +} diff --git a/src/components/TeamProfileCards/index.js b/src/components/TeamProfileCards/index.js new file mode 100644 index 00000000..6ecc8ffd --- /dev/null +++ b/src/components/TeamProfileCards/index.js @@ -0,0 +1,51 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ActiveTeamRow = ActiveTeamRow; +exports.HonoraryAlumniTeamRow = HonoraryAlumniTeamRow; +exports.StudentFellowsTeamRow = StudentFellowsTeamRow; +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importDefault(require("react")); +var Translate_1 = __importDefault(require("@docusaurus/Translate")); +var Link_1 = __importDefault(require("@docusaurus/Link")); +var Heading_1 = __importDefault(require("@theme/Heading")); +require("./teamcards.css"); +function WebsiteLink(_a) { + var to = _a.to, children = _a.children; + return ((0, jsx_runtime_1.jsx)(Link_1.default, { to: to, children: children !== null && children !== void 0 ? children : ((0, jsx_runtime_1.jsx)(Translate_1.default, { id: "team.profile.websiteLinkLabel", children: "website" })) })); +} +function TeamProfileCard(_a) { + var className = _a.className, name = _a.name, children = _a.children, githubUrl = _a.githubUrl, twitterUrl = _a.twitterUrl, linkedInUrl = _a.linkedInUrl; + return ((0, jsx_runtime_1.jsx)("div", { className: "team-profile-card ".concat(className), children: (0, jsx_runtime_1.jsxs)("div", { className: "card card--full-height", children: [(0, jsx_runtime_1.jsx)("div", { className: "card__header", children: (0, jsx_runtime_1.jsxs)("div", { className: "avatar avatar--vertical", children: [(0, jsx_runtime_1.jsx)("img", { className: "avatar__photo avatar__photo--xl", src: "".concat(githubUrl, ".png"), alt: "".concat(name, "'s avatar") }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("div", { className: "avatar__intro", children: (0, jsx_runtime_1.jsx)(Heading_1.default, { as: "h3", className: "avatar__name", children: name }) })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "card__body", children: children }), (0, jsx_runtime_1.jsx)("div", { className: "card__footer", children: (0, jsx_runtime_1.jsxs)("div", { className: "button-group button-group--block", children: [githubUrl && ((0, jsx_runtime_1.jsx)(Link_1.default, { className: "button button--secondary", href: githubUrl, children: "GitHub" })), linkedInUrl && ((0, jsx_runtime_1.jsx)(Link_1.default, { className: "button button--secondary", href: linkedInUrl, children: "LinkedIn" })), twitterUrl && ((0, jsx_runtime_1.jsx)(Link_1.default, { className: "button button--secondary", href: twitterUrl, children: "Twitter" }))] }) })] }) })); +} +function TeamProfileCardCol(props) { + return ((0, jsx_runtime_1.jsx)(TeamProfileCard, __assign({}, props, { className: "col col--6 margin-bottom--lg" }))); +} +function ActiveTeamRow() { + return ((0, jsx_runtime_1.jsx)("div", { className: "row", children: (0, jsx_runtime_1.jsx)(TeamProfileCardCol, { name: "Ajay Dhangar", githubUrl: "https://github.com/ajay-dhangar", linkedInUrl: "https://www.linkedin.com/in/ajay-dhangar", twitterUrl: "https://twitter.com/CodesWithAjay", children: (0, jsx_runtime_1.jsx)(Translate_1.default, { id: "team.profile.Sebastien Lorber.body", values: { + website: (0, jsx_runtime_1.jsx)(WebsiteLink, { to: "https://ajay-dhangar.github.io/" }), + devto: (0, jsx_runtime_1.jsx)(Link_1.default, { to: "https://dev.to/ajaydhangar49", children: "Dev.to" }), + optimumAi: (0, jsx_runtime_1.jsx)(Link_1.default, { to: "https://www.optimumai.in/community", children: "OptimumAI" }), + }, children: "Founder, Lead Developer and Maintainer of CodeHarborHub. We are passionate about contributing to open source and regularly write articles on our {website} and {devto}. Currently working at {optimumAi}." }) }) })); +} +function HonoraryAlumniTeamRow() { + return ((0, jsx_runtime_1.jsx)("div", { className: "row", children: (0, jsx_runtime_1.jsx)(TeamProfileCardCol, { name: "Shivay", githubUrl: "https://github.com/shivay-coding", children: (0, jsx_runtime_1.jsx)(Translate_1.default, { id: "team.profile.Shivay.body", children: "A passionate developer who loves to contribute to open source and write articles on his blog." }) }) })); +} +function StudentFellowsTeamRow() { + return ((0, jsx_runtime_1.jsx)("div", { className: "row", children: (0, jsx_runtime_1.jsx)(TeamProfileCardCol, { name: "Narendra Dhangar", githubUrl: "https://github.com/Narendra-Dhangar", children: (0, jsx_runtime_1.jsx)(Translate_1.default, { id: "team.profile.Anshul Goyal.body", values: { + websiteLink: ((0, jsx_runtime_1.jsx)(Link_1.default, { href: "/", children: (0, jsx_runtime_1.jsx)(Translate_1.default, { id: "team.profile.Narendra Dhangar.body.websiteLink.label", children: "website" }) })), + }, children: "B.Tech student, open source enthusiast, and tech blogger. He loves to contribute to open source and write articles on his {websiteLink}." }) }) })); +} diff --git a/src/components/blogCarousel/blogCard.js b/src/components/blogCarousel/blogCard.js new file mode 100644 index 00000000..6c1739c1 --- /dev/null +++ b/src/components/blogCarousel/blogCard.js @@ -0,0 +1,69 @@ +"use client"; +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var jsx_runtime_1 = require("react/jsx-runtime"); +var React = __importStar(require("react")); +var react_1 = require("react"); +var framer_motion_1 = require("framer-motion"); +var Link_1 = __importDefault(require("@docusaurus/Link")); +var authors_1 = require("../../utils/authors"); +var BlogCard = function (_a) { + var type = _a.type, date = _a.date, title = _a.title, content = _a.content, imageUrl = _a.imageUrl, id = _a.id, authors = _a.authors; + var _b = (0, react_1.useState)(false), isHovered = _b[0], setIsHovered = _b[1]; + if (!id || !type) { + return (0, jsx_runtime_1.jsx)("div", { children: "data not fetched properly, imageId and entryId not found" }); + } + // Get category from title for demo purposes + var getCategory = function (title) { + if (title.toLowerCase().includes('design') || title.toLowerCase().includes('ux')) + return 'Design'; + if (title.toLowerCase().includes('ai') || title.toLowerCase().includes('deepmind')) + return 'AI & Tech'; + if (title.toLowerCase().includes('github') || title.toLowerCase().includes('git')) + return 'Development'; + return 'Resources'; + }; + var category = getCategory(title); + return ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: { opacity: 0, y: 40, scale: 0.95 }, animate: { opacity: 1, y: 0, scale: 1 }, transition: { duration: 0.6, ease: "easeOut" }, whileHover: { + y: -8, + scale: 1.02, + transition: { duration: 0.4, ease: "easeOut" } + }, onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, className: "relative overflow-hidden h-full transition-all duration-300", children: (0, jsx_runtime_1.jsx)(Link_1.default, { to: "/blog/".concat(id), className: "block h-full text-decoration-none", style: { textDecoration: 'none' }, children: (0, jsx_runtime_1.jsxs)("div", { className: "article-card h-full", children: [(0, jsx_runtime_1.jsx)("div", { className: "card-category", children: category }), (0, jsx_runtime_1.jsx)("div", { className: "card-image", children: (0, jsx_runtime_1.jsx)("img", { src: imageUrl, alt: title }) }), (0, jsx_runtime_1.jsxs)("div", { className: "card-content", children: [(0, jsx_runtime_1.jsx)("h3", { className: "card-title", children: title }), (0, jsx_runtime_1.jsx)("p", { className: "card-description", children: content }), (0, jsx_runtime_1.jsxs)("div", { className: "card-meta", children: [(0, jsx_runtime_1.jsxs)("div", { className: "card-author", children: [(0, jsx_runtime_1.jsx)("span", { className: "author-avatar", children: "\uD83D\uDC64" }), (0, jsx_runtime_1.jsx)("span", { className: "author-name", "data-full-name": (0, authors_1.getAuthorNames)(authors || []), children: (0, authors_1.getAuthorNames)(authors || []) })] }), (0, jsx_runtime_1.jsx)("span", { className: "card-read-time", children: "5 min read" })] }), (0, jsx_runtime_1.jsx)("div", { className: "card-read-more", children: "Read Article \u2192" })] })] }) }) })); +}; +exports.default = BlogCard; diff --git a/src/components/blogCarousel/blogCarousel.js b/src/components/blogCarousel/blogCarousel.js new file mode 100644 index 00000000..1cd3dac5 --- /dev/null +++ b/src/components/blogCarousel/blogCarousel.js @@ -0,0 +1,74 @@ +"use client"; +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.BlogCarousel = BlogCarousel; +var jsx_runtime_1 = require("react/jsx-runtime"); +var React = __importStar(require("react")); +var carousel_1 = require("../ui/carousel"); +var button_1 = require("../ui/button"); +var react_1 = require("react"); +var blogCard_1 = __importDefault(require("./blogCard")); +var blogs_1 = __importDefault(require("../../database/blogs")); +var embla_carousel_autoplay_1 = __importDefault(require("embla-carousel-autoplay")); +require("./blogCarousel.css"); +function BlogCarousel() { + var _a = (0, react_1.useState)(), api = _a[0], setApi = _a[1]; + var _b = (0, react_1.useState)(0), current = _b[0], setCurrent = _b[1]; + var _c = (0, react_1.useState)(0), count = _c[0], setCount = _c[1]; + (0, react_1.useEffect)(function () { + if (!api) + return; + setCount(api.scrollSnapList().length); + setCurrent(api.selectedScrollSnap() + 1); + api.on("select", function () { + setCurrent(api.selectedScrollSnap() + 1); + }); + }, [api]); + return ((0, jsx_runtime_1.jsx)("div", { className: "w-full max-w-8xl mx-auto px-4", children: (0, jsx_runtime_1.jsxs)(carousel_1.Carousel, { setApi: setApi, className: "w-full", opts: { + align: "start", + loop: true, + }, plugins: [ + (0, embla_carousel_autoplay_1.default)({ + delay: 4000, + stopOnInteraction: true, + }), + ], children: [(0, jsx_runtime_1.jsx)(carousel_1.CarouselContent, { className: "my-10", children: blogs_1.default.map(function (blog, index) { return ((0, jsx_runtime_1.jsx)(carousel_1.CarouselItem, { className: "basis-full sm:basis-1/2 lg:basis-1/3 xl:basis-1/4", children: (0, jsx_runtime_1.jsx)(blogCard_1.default, { type: "blog", date: "2024-01-01", title: blog.title, content: blog.description, imageUrl: blog.image, id: blog.slug, authors: blog.authors }) }, blog.id)); }) }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-center gap-4 mt-8", children: [(0, jsx_runtime_1.jsx)(carousel_1.CarouselPrevious, { className: "static translate-y-0 h-12 w-12 border-2 border-blue-200 dark:border-blue-800 hover:border-blue-400 dark:hover:border-blue-600 transition-all duration-300 hover:scale-110" }), (0, jsx_runtime_1.jsx)("div", { className: "flex gap-2", children: Array.from({ length: count }).map(function (_, index) { return ((0, jsx_runtime_1.jsx)(button_1.Button, { variant: "ghost", size: "sm", className: "h-3 w-3 p-0 rounded-full transition-all duration-300 ".concat(current === index + 1 + ? "bg-gradient-to-r from-blue-500 to-purple-500 scale-125" + : "bg-gray-300 dark:bg-gray-600 hover:bg-gray-400 dark:hover:bg-gray-500"), onClick: function () { return api === null || api === void 0 ? void 0 : api.scrollTo(index); } }, index)); }) }), (0, jsx_runtime_1.jsx)(carousel_1.CarouselNext, { className: "static translate-y-0 h-12 w-12 border-2 border-blue-200 dark:border-blue-800 hover:border-blue-400 dark:hover:border-blue-600 transition-all duration-300 hover:scale-110" })] })] }) })); +} diff --git a/src/components/dashboard/LeaderBoard/PRListModal.js b/src/components/dashboard/LeaderBoard/PRListModal.js new file mode 100644 index 00000000..c619cf34 --- /dev/null +++ b/src/components/dashboard/LeaderBoard/PRListModal.js @@ -0,0 +1,57 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = PRListModal; +var jsx_runtime_1 = require("react/jsx-runtime"); +// src/components/dashboard/LeaderBoard/PRListModal.tsx +var react_1 = __importDefault(require("react")); +var framer_motion_1 = require("framer-motion"); +var fa_1 = require("react-icons/fa"); +var theme_common_1 = require("@docusaurus/theme-common"); +var statsProvider_1 = require("../../../lib/statsProvider"); +function PRListModal(_a) { + var contributor = _a.contributor, isOpen = _a.isOpen, onClose = _a.onClose; + var colorMode = (0, theme_common_1.useColorMode)().colorMode; + var isDark = colorMode === "dark"; + // Get filtered PRs from context + var _b = (0, statsProvider_1.useCommunityStatsContext)(), getFilteredPRsForContributor = _b.getFilteredPRsForContributor, currentTimeFilter = _b.currentTimeFilter; + if (!contributor) + return null; + // Get filtered PRs instead of using contributor.prDetails + var filteredPRs = getFilteredPRsForContributor(contributor.username); + var formatDate = function (dateString) { + var date = new Date(dateString); + return date.toLocaleDateString('en-US', { + year: 'numeric', + month: 'short', + day: 'numeric' + }); + }; + var handleBackdropClick = function (e) { + if (e.target === e.currentTarget) { + onClose(); + } + }; + var handleKeyDown = function (e) { + if (e.key === 'Escape') { + onClose(); + } + }; + // Helper function to get filter display text + var getFilterDisplayText = function (filter) { + switch (filter) { + case 'week': return 'This Week'; + case 'month': return 'This Month'; + case 'year': return 'This Year'; + case 'all': return 'All Time'; + default: return 'All Time'; + } + }; + return ((0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { children: isOpen && ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "pr-modal-backdrop ".concat(isDark ? "dark" : "light"), initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, onClick: handleBackdropClick, onKeyDown: handleKeyDown, tabIndex: 0, role: "dialog", "aria-modal": "true", "aria-labelledby": "pr-modal-title", children: (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "pr-modal-container ".concat(isDark ? "dark" : "light"), initial: { opacity: 0, scale: 0.9, y: 20 }, animate: { opacity: 1, scale: 1, y: 0 }, exit: { opacity: 0, scale: 0.9, y: 20 }, transition: { type: "spring", damping: 25, stiffness: 300 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "pr-modal-header ".concat(isDark ? "dark" : "light"), children: [(0, jsx_runtime_1.jsxs)("div", { className: "pr-modal-user-info", children: [(0, jsx_runtime_1.jsx)("img", { src: contributor.avatar, alt: contributor.username, className: "pr-modal-avatar" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("h2", { id: "pr-modal-title", className: "pr-modal-title ".concat(isDark ? "dark" : "light"), children: [contributor.username, "'s Pull Requests"] }), (0, jsx_runtime_1.jsxs)("p", { className: "pr-modal-subtitle ".concat(isDark ? "dark" : "light"), children: [filteredPRs.length, " merged PR", filteredPRs.length !== 1 ? 's' : '', " \u2022 ", filteredPRs.length * 10, " points", currentTimeFilter !== 'all' && ((0, jsx_runtime_1.jsxs)("span", { style: { marginLeft: '8px', opacity: 0.7 }, children: ["(", getFilterDisplayText(currentTimeFilter), ")"] }))] })] })] }), (0, jsx_runtime_1.jsx)("button", { className: "pr-modal-close ".concat(isDark ? "dark" : "light"), onClick: onClose, "aria-label": "Close modal", children: (0, jsx_runtime_1.jsx)(fa_1.FaTimes, {}) })] }), (0, jsx_runtime_1.jsx)("div", { className: "pr-modal-body ".concat(isDark ? "dark" : "light"), children: filteredPRs && filteredPRs.length > 0 ? ((0, jsx_runtime_1.jsx)("div", { className: "pr-list", children: filteredPRs.map(function (pr, index) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "pr-item ".concat(isDark ? "dark" : "light"), initial: { opacity: 0, x: -20 }, animate: { opacity: 1, x: 0 }, transition: { delay: index * 0.05 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "pr-item-header", children: [(0, jsx_runtime_1.jsx)("h3", { className: "pr-item-title ".concat(isDark ? "dark" : "light"), children: pr.title }), (0, jsx_runtime_1.jsx)("div", { className: "pr-item-actions", children: (0, jsx_runtime_1.jsx)("a", { href: pr.url, target: "_blank", rel: "noopener noreferrer", className: "pr-item-link ".concat(isDark ? "dark" : "light"), "aria-label": "Open PR #".concat(pr.number, " in GitHub"), children: (0, jsx_runtime_1.jsx)(fa_1.FaExternalLinkAlt, {}) }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "pr-item-meta", children: [(0, jsx_runtime_1.jsxs)("span", { className: "pr-item-repo ".concat(isDark ? "dark" : "light"), children: [(0, jsx_runtime_1.jsx)(fa_1.FaGithub, {}), pr.repoName] }), (0, jsx_runtime_1.jsxs)("span", { className: "pr-item-number ".concat(isDark ? "dark" : "light"), children: ["#", pr.number] }), (0, jsx_runtime_1.jsxs)("span", { className: "pr-item-date ".concat(isDark ? "dark" : "light"), children: ["Merged on ", formatDate(pr.mergedAt)] })] })] }, "".concat(pr.repoName, "-").concat(pr.number))); }) })) : ((0, jsx_runtime_1.jsxs)("div", { className: "pr-empty-state ".concat(isDark ? "dark" : "light"), children: [(0, jsx_runtime_1.jsx)(fa_1.FaGithub, { className: "pr-empty-icon" }), (0, jsx_runtime_1.jsx)("p", { children: currentTimeFilter === 'all' + ? 'No pull request details available' + : "No PRs found for ".concat(getFilterDisplayText(currentTimeFilter).toLowerCase()) }), (0, jsx_runtime_1.jsx)("p", { className: "pr-empty-subtitle", children: currentTimeFilter === 'all' + ? 'PR details might not be loaded yet or this contributor has no merged PRs.' + : "Try selecting a different time period or check \"All Time\" to see all PRs." })] })) }), (0, jsx_runtime_1.jsx)("div", { className: "pr-modal-footer ".concat(isDark ? "dark" : "light"), children: (0, jsx_runtime_1.jsxs)("a", { href: contributor.profile, target: "_blank", rel: "noopener noreferrer", className: "pr-modal-profile-link ".concat(isDark ? "dark" : "light"), children: [(0, jsx_runtime_1.jsx)(fa_1.FaGithub, {}), "View GitHub Profile"] }) })] }) })) })); +} diff --git a/src/components/dashboard/LeaderBoard/leaderboard.js b/src/components/dashboard/LeaderBoard/leaderboard.js new file mode 100644 index 00000000..f0652871 --- /dev/null +++ b/src/components/dashboard/LeaderBoard/leaderboard.js @@ -0,0 +1,226 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = LeaderBoard; +var jsx_runtime_1 = require("react/jsx-runtime"); +// src/components/dashboard/LeaderBoard/leaderboard.tsx +var react_1 = __importStar(require("react")); +var framer_motion_1 = require("framer-motion"); +var fa_1 = require("react-icons/fa"); +var lucide_react_1 = require("lucide-react"); +var theme_common_1 = require("@docusaurus/theme-common"); +var statsProvider_1 = require("@site/src/lib/statsProvider"); +var PRListModal_1 = __importDefault(require("./PRListModal")); +var mockData_1 = require("./mockData"); +require("./leaderboard.css"); +var GITHUB_ORG = "recodehive"; +// Users to exclude from the leaderboard +var EXCLUDED_USERS = ["sanjay-kv", "allcontributors", "allcontributors[bot]"]; +function Badge(_a) { + var count = _a.count, label = _a.label, color = _a.color, onClick = _a.onClick, _b = _a.clickable, clickable = _b === void 0 ? false : _b; + var badgeStyle = __assign(__assign({}, color), { cursor: clickable ? 'pointer' : 'default', transition: clickable ? 'all 0.2s ease' : 'none' }); + var handleClick = function () { + if (clickable && onClick) { + onClick(); + } + }; + var handleKeyDown = function (e) { + if (clickable && (e.key === 'Enter' || e.key === ' ')) { + e.preventDefault(); + if (onClick) + onClick(); + } + }; + return ((0, jsx_runtime_1.jsxs)("span", { className: "badge ".concat(clickable ? 'clickable' : ''), style: badgeStyle, onClick: handleClick, onKeyDown: handleKeyDown, tabIndex: clickable ? 0 : -1, role: clickable ? 'button' : undefined, "aria-label": clickable ? "View ".concat(label.toLowerCase(), " details") : undefined, children: [count, " ", label] })); +} +function TopPerformerCard(_a) { + var contributor = _a.contributor, rank = _a.rank, onPRClick = _a.onPRClick; + var colorMode = (0, theme_common_1.useColorMode)().colorMode; + var isDark = colorMode === "dark"; + var rankClass = rank === 1 ? "top-1" : rank === 2 ? "top-2" : "top-3"; + return ((0, jsx_runtime_1.jsxs)("div", { className: "top-performer-card ".concat(isDark ? "dark" : "light"), children: [(0, jsx_runtime_1.jsx)("img", { src: contributor.avatar, alt: contributor.username, className: "avatar large" }), (0, jsx_runtime_1.jsx)("div", { className: "rank-overlay ".concat(rankClass), children: (0, jsx_runtime_1.jsx)("span", { className: "rank-text", children: rank }) }), (0, jsx_runtime_1.jsxs)("div", { className: "performer-info", children: [(0, jsx_runtime_1.jsx)("a", { href: contributor.profile, target: "_blank", rel: "noreferrer", className: "username-link", children: contributor.username }), (0, jsx_runtime_1.jsxs)("div", { className: "badges-container", children: [(0, jsx_runtime_1.jsx)(Badge, { count: contributor.prs, label: "PRs", color: { background: "#dbeafe", color: "#2563eb" }, onClick: function () { return onPRClick(contributor); }, clickable: true }), (0, jsx_runtime_1.jsx)(Badge, { count: contributor.points, label: "Points", color: { background: "#ede9fe", color: "#7c3aed" } })] })] })] })); +} +function LeaderBoard() { + // Get time filter functions from context + var _a = (0, statsProvider_1.useCommunityStatsContext)(), contributors = _a.contributors, stats = _a.stats, loading = _a.loading, error = _a.error, currentTimeFilter = _a.currentTimeFilter, setTimeFilter = _a.setTimeFilter; + var colorMode = (0, theme_common_1.useColorMode)().colorMode; + var isDark = colorMode === "dark"; + var _b = (0, react_1.useState)(""), searchQuery = _b[0], setSearchQuery = _b[1]; + var _c = (0, react_1.useState)(1), currentPage = _c[0], setCurrentPage = _c[1]; + var _d = (0, react_1.useState)(null), selectedContributor = _d[0], setSelectedContributor = _d[1]; + var _e = (0, react_1.useState)(false), isModalOpen = _e[0], setIsModalOpen = _e[1]; + var _f = (0, react_1.useState)(false), isSelectChanged = _f[0], setIsSelectChanged = _f[1]; + var itemsPerPage = 10; + // Modal handlers + var handlePRClick = function (contributor) { + setSelectedContributor(contributor); + setIsModalOpen(true); + }; + var handleCloseModal = function () { + setIsModalOpen(false); + setSelectedContributor(null); + }; + // Use mock data only in development mode when there's an error or no contributors + var displayContributors = (error || contributors.length === 0) + ? (typeof process !== "undefined" && process.env.NODE_ENV === "development" + ? mockData_1.mockContributors + : []) + : contributors; + // Filter out excluded users and apply search filter + var filteredContributors = contributors + .filter(function (contributor) { + return !EXCLUDED_USERS.some(function (excludedUser) { + return contributor.username.toLowerCase() === excludedUser.toLowerCase(); + }); + }) + .filter(function (contributor) { + return contributor.username.toLowerCase().includes(searchQuery.toLowerCase()); + }); + var totalPages = Math.ceil(filteredContributors.length / itemsPerPage); + var indexOfLast = currentPage * itemsPerPage; + var indexOfFirst = indexOfLast - itemsPerPage; + var currentItems = filteredContributors.slice(indexOfFirst, indexOfLast); + var paginate = function (pageNumber) { return setCurrentPage(Math.max(1, Math.min(pageNumber, totalPages))); }; + var renderPaginationButtons = function () { + var pages = []; + var maxVisibleButtons = 5; // Maximum number of page buttons to show directly + // Special case: if we have 7 or fewer pages, show all of them without ellipsis + if (totalPages <= 7) { + var _loop_1 = function (i) { + pages.push((0, jsx_runtime_1.jsx)("button", { onClick: function () { return paginate(i); }, className: "page-btn ".concat(currentPage === i ? "active" : ""), children: i }, i)); + }; + for (var i = 1; i <= totalPages; i++) { + _loop_1(i); + } + return pages; + } + // For more than 7 pages, use the ellipsis approach + // Always show first page + pages.push((0, jsx_runtime_1.jsx)("button", { onClick: function () { return paginate(1); }, className: "page-btn ".concat(currentPage === 1 ? "active" : ""), children: "1" }, 1)); + // Calculate the range of pages to show (middle section) + // We want to show current page and 1-2 pages before and after when possible + var startPage = Math.max(2, currentPage - 1); + var endPage = Math.min(totalPages - 1, currentPage + 1); + // Adjust start and end page if we're near the beginning or end + if (currentPage <= 3) { + // Near the beginning, show pages 2, 3, 4 + startPage = 2; + endPage = Math.min(4, totalPages - 1); + } + else if (currentPage >= totalPages - 2) { + // Near the end, show the three pages before the last page + endPage = totalPages - 1; + startPage = Math.max(2, totalPages - 3); + } + // Show ellipsis if needed before the middle range + if (startPage > 2) { + pages.push((0, jsx_runtime_1.jsx)("span", { className: "pagination-ellipsis", children: "..." }, "ellipsis-1")); + } + var _loop_2 = function (i) { + pages.push((0, jsx_runtime_1.jsx)("button", { onClick: function () { return paginate(i); }, className: "page-btn ".concat(currentPage === i ? "active" : ""), children: i }, i)); + }; + // Show pages in the middle range + for (var i = startPage; i <= endPage; i++) { + _loop_2(i); + } + // Show ellipsis if needed after the middle range + if (endPage < totalPages - 1) { + pages.push((0, jsx_runtime_1.jsx)("span", { className: "pagination-ellipsis", children: "..." }, "ellipsis-2")); + } + // Always show last page + pages.push((0, jsx_runtime_1.jsx)("button", { onClick: function () { return paginate(totalPages); }, className: "page-btn ".concat(currentPage === totalPages ? "active" : ""), children: totalPages }, totalPages)); + return pages; + }; + var getRankClass = function (index) { + if (index === 0) + return "top-1"; + if (index === 1) + return "top-2"; + if (index === 2) + return "top-3"; + return "regular"; + }; + // Helper function for time filter display + var getTimeFilterLabel = function (filter) { + switch (filter) { + case 'week': return '📊 This Week'; + case 'month': return '📆 This Month'; + case 'year': return '📅 This Year'; + case 'all': return '🏆 All Time'; + default: return '🏆 All Time'; + } + }; + return ((0, jsx_runtime_1.jsxs)("div", { className: "leaderboard-container ".concat(isDark ? "dark" : "light"), children: [(0, jsx_runtime_1.jsxs)("div", { className: "leaderboard-content", children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "header", initial: { opacity: 0, y: -20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5 }, children: [(0, jsx_runtime_1.jsx)("h1", { className: "title", children: "Recode Hive Leaderboard" }), (0, jsx_runtime_1.jsxs)("p", { className: "subtitle ".concat(isDark ? "dark" : "light"), children: ["Top contributors across the ", (0, jsx_runtime_1.jsx)("strong", { children: GITHUB_ORG }), " organization"] })] }), !loading && filteredContributors.length > 2 && ((0, jsx_runtime_1.jsxs)("div", { className: "top-performers-container", children: [(0, jsx_runtime_1.jsxs)("div", { className: "title-filter-container", children: [(0, jsx_runtime_1.jsx)("h2", { className: "top-performers-title ".concat(isDark ? "dark" : "light"), children: "RecodeHive Top Performers" }), (0, jsx_runtime_1.jsxs)("div", { className: "time-filter-wrapper top-title-filter", children: [(0, jsx_runtime_1.jsx)("label", { htmlFor: "time-period-filter", className: "filter-label", children: "Time Period:" }), (0, jsx_runtime_1.jsxs)("select", { id: "time-period-filter", value: currentTimeFilter, onChange: function (e) { + // Use setTimeFilter from context + setTimeFilter(e.target.value); + setCurrentPage(1); + setIsSelectChanged(true); + setTimeout(function () { return setIsSelectChanged(false); }, 1200); + }, className: "time-filter-select ".concat(isDark ? "dark" : "light", " ").concat(isSelectChanged ? 'highlight-change' : ''), children: [(0, jsx_runtime_1.jsx)("option", { value: "all", children: "\uD83C\uDFC6 All Time" }), (0, jsx_runtime_1.jsx)("option", { value: "year", children: "\uD83D\uDCC5 This Year" }), (0, jsx_runtime_1.jsx)("option", { value: "month", children: "\uD83D\uDCC6 This Month" }), (0, jsx_runtime_1.jsx)("option", { value: "week", children: "\uD83D\uDCCA This Week" })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "top-performers-grid", children: [(0, jsx_runtime_1.jsx)(TopPerformerCard, { contributor: filteredContributors[1], rank: 2, onPRClick: handlePRClick }), (0, jsx_runtime_1.jsx)(TopPerformerCard, { contributor: filteredContributors[0], rank: 1, onPRClick: handlePRClick }), (0, jsx_runtime_1.jsx)(TopPerformerCard, { contributor: filteredContributors[2], rank: 3, onPRClick: handlePRClick })] })] })), stats && ((0, jsx_runtime_1.jsxs)("div", { className: "stats-grid", children: [(0, jsx_runtime_1.jsx)("div", { className: "stat-card ".concat(isDark ? "dark" : "light"), children: (0, jsx_runtime_1.jsxs)("div", { className: "stat-content", children: [(0, jsx_runtime_1.jsx)("div", { className: "stat-icon users", children: (0, jsx_runtime_1.jsx)(fa_1.FaUsers, {}) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "stat-value ".concat(isDark ? "dark" : "light"), children: stats.totalContributors }), (0, jsx_runtime_1.jsx)("div", { className: "stat-label ".concat(isDark ? "dark" : "light"), children: "Total Contributors" })] })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "stat-card ".concat(isDark ? "dark" : "light"), children: (0, jsx_runtime_1.jsxs)("div", { className: "stat-content", children: [(0, jsx_runtime_1.jsx)("div", { className: "stat-icon prs", children: (0, jsx_runtime_1.jsx)(fa_1.FaCode, {}) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "stat-value ".concat(isDark ? "dark" : "light"), children: stats.flooredTotalPRs }), (0, jsx_runtime_1.jsx)("div", { className: "stat-label ".concat(isDark ? "dark" : "light"), children: "Merged PRs" })] })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "stat-card ".concat(isDark ? "dark" : "light"), children: (0, jsx_runtime_1.jsxs)("div", { className: "stat-content", children: [(0, jsx_runtime_1.jsx)("div", { className: "stat-icon points", children: (0, jsx_runtime_1.jsx)(fa_1.FaStar, {}) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "stat-value ".concat(isDark ? "dark" : "light"), children: stats.flooredTotalPoints }), (0, jsx_runtime_1.jsx)("div", { className: "stat-label ".concat(isDark ? "dark" : "light"), children: "Total Points" })] })] }) })] })), (0, jsx_runtime_1.jsx)("div", { className: "search-container", children: (0, jsx_runtime_1.jsxs)("div", { className: "search-wrapper", children: [(0, jsx_runtime_1.jsx)(fa_1.FaSearch, { className: "search-icon ".concat(isDark ? "dark" : "light") }), (0, jsx_runtime_1.jsx)("input", { type: "text", placeholder: "Search contributors...", value: searchQuery, onChange: function (e) { + setSearchQuery(e.target.value); + setCurrentPage(1); + }, className: "search-input ".concat(isDark ? "dark" : "light") })] }) }), loading && ((0, jsx_runtime_1.jsxs)("div", { className: "skeleton-loader ".concat(isDark ? "dark" : "light"), children: [(0, jsx_runtime_1.jsxs)("div", { className: "skeleton-header", children: [(0, jsx_runtime_1.jsx)("div", { children: "#" }), (0, jsx_runtime_1.jsx)("div", { children: "Contributor" }), (0, jsx_runtime_1.jsx)("div", { children: "Contributions" })] }), __spreadArray([], Array(itemsPerPage), true).map(function (_, i) { return ((0, jsx_runtime_1.jsxs)("div", { className: "skeleton-row", children: [(0, jsx_runtime_1.jsx)("div", { className: "skeleton-avatar" }), (0, jsx_runtime_1.jsx)("div", { className: "skeleton-avatar large" }), (0, jsx_runtime_1.jsxs)("div", { className: "skeleton-info", children: [(0, jsx_runtime_1.jsx)("div", { className: "skeleton-bar" }), (0, jsx_runtime_1.jsxs)("div", { className: "skeleton-badges", children: [(0, jsx_runtime_1.jsx)("div", { className: "skeleton-badge" }), (0, jsx_runtime_1.jsx)("div", { className: "skeleton-badge" })] })] })] }, i)); })] })), error && displayContributors.length === 0 && ((0, jsx_runtime_1.jsx)("div", { className: "no-contributors", children: (0, jsx_runtime_1.jsxs)("p", { children: ["Error: ", error] }) })), !loading && filteredContributors.length === 0 && ((0, jsx_runtime_1.jsx)("div", { className: "no-contributors", children: (0, jsx_runtime_1.jsx)("p", { children: "No contributors found." }) })), !loading && filteredContributors.length > 0 && ((0, jsx_runtime_1.jsxs)("div", { className: "contributors-container ".concat(isDark ? "dark" : "light"), children: [error && ((0, jsx_runtime_1.jsx)("div", { className: "error-banner", style: { + padding: '12px', + backgroundColor: isDark ? '#fee8e7' : '#fee8e7', + color: '#dc2626', + borderRadius: '8px', + marginBottom: '16px', + fontSize: '14px', + textAlign: 'center' + }, children: "Demo Mode: Showing sample data due to API configuration issue" })), (0, jsx_runtime_1.jsxs)("div", { className: "contributors-header", children: [(0, jsx_runtime_1.jsx)("div", { className: "contributor-cell rank", children: "Rank" }), (0, jsx_runtime_1.jsx)("div", { className: "contributor-cell avatar-cell", children: "Avatar" }), (0, jsx_runtime_1.jsx)("div", { className: "contributor-cell username-cell", children: "User" }), (0, jsx_runtime_1.jsx)("div", { className: "contributor-cell prs-cell", children: "PRs" }), (0, jsx_runtime_1.jsx)("div", { className: "contributor-cell points-cell", children: "Points" })] }), currentItems.map(function (contributor, index) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.3, delay: index * 0.05 }, className: "contributor-row ".concat(isDark ? (index % 2 === 0 ? "even" : "odd") : (index % 2 === 0 ? "even" : "odd")), children: [(0, jsx_runtime_1.jsx)("div", { className: "contributor-cell rank-cell", children: (0, jsx_runtime_1.jsx)("div", { className: "rank-badge ".concat(getRankClass(filteredContributors.indexOf(contributor))), children: filteredContributors.indexOf(contributor) + 1 }) }), (0, jsx_runtime_1.jsx)("div", { className: "contributor-cell avatar-cell", children: (0, jsx_runtime_1.jsx)("img", { src: contributor.avatar, alt: contributor.username, className: "avatar ".concat(isDark ? "dark" : "light") }) }), (0, jsx_runtime_1.jsx)("div", { className: "contributor-cell username-cell", children: (0, jsx_runtime_1.jsx)("a", { href: contributor.profile, target: "_blank", rel: "noreferrer", className: "username-link ".concat(isDark ? "dark" : "light"), children: contributor.username }) }), (0, jsx_runtime_1.jsx)("div", { className: "contributor-cell prs-cell", children: (0, jsx_runtime_1.jsx)(Badge, { count: contributor.prs, label: "PRs", color: { background: "#dbeafe", color: "#2563eb" }, onClick: function () { return handlePRClick(contributor); }, clickable: true }) }), (0, jsx_runtime_1.jsx)("div", { className: "contributor-cell points-cell", children: (0, jsx_runtime_1.jsx)(Badge, { count: contributor.points, label: "Points", color: { background: "#ede9fe", color: "#7c3aed" } }) })] }, contributor.username)); }), totalPages > 1 && ((0, jsx_runtime_1.jsxs)("div", { className: "pagination ".concat(isDark ? "dark" : "light"), children: [(0, jsx_runtime_1.jsx)("button", { onClick: function () { return paginate(currentPage - 1); }, disabled: currentPage === 1, className: "pagination-btn ".concat(currentPage === 1 ? "disabled" : ""), "aria-label": "Previous page", title: "Previous page", children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronLeft, { size: 20 }) }), (0, jsx_runtime_1.jsx)("div", { className: "page-numbers", children: renderPaginationButtons() }), (0, jsx_runtime_1.jsx)("button", { onClick: function () { return paginate(currentPage + 1); }, disabled: currentPage === totalPages, className: "pagination-btn ".concat(currentPage === totalPages ? "disabled" : ""), "aria-label": "Next page", title: "Next page", children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { size: 20 }) })] })), (0, jsx_runtime_1.jsxs)("div", { className: "cta-footer ".concat(isDark ? "dark" : "light"), children: [(0, jsx_runtime_1.jsx)("p", { className: "cta-text ".concat(isDark ? "dark" : "light"), children: "Want to get on this leaderboard?" }), (0, jsx_runtime_1.jsxs)("a", { href: "https://github.com/".concat(GITHUB_ORG), target: "_blank", rel: "noreferrer", className: "cta-button", children: [(0, jsx_runtime_1.jsx)(fa_1.FaGithub, { style: { marginRight: 8 } }), "Contribute on GitHub"] })] })] }))] }), (0, jsx_runtime_1.jsx)(PRListModal_1.default, { contributor: selectedContributor, isOpen: isModalOpen, onClose: handleCloseModal })] })); +} diff --git a/src/components/dashboard/LeaderBoard/mockData.js b/src/components/dashboard/LeaderBoard/mockData.js new file mode 100644 index 00000000..6f561b5b --- /dev/null +++ b/src/components/dashboard/LeaderBoard/mockData.js @@ -0,0 +1,103 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.mockContributors = void 0; +// Temporary mock data for testing the PR list modal functionality +exports.mockContributors = [ + { + username: "testuser1", + avatar: "https://github.com/testuser1.png", + profile: "https://github.com/testuser1", + points: 50, + prs: 5, + prDetails: [ + { + title: "Add new feature: user authentication system", + url: "https://github.com/recodehive/repo1/pull/123", + mergedAt: "2024-01-15T10:30:00Z", + repoName: "auth-service", + number: 123 + }, + { + title: "Fix: resolve security vulnerability in login flow", + url: "https://github.com/recodehive/repo1/pull/124", + mergedAt: "2024-01-14T14:22:00Z", + repoName: "auth-service", + number: 124 + }, + { + title: "Update documentation for API endpoints", + url: "https://github.com/recodehive/repo2/pull/45", + mergedAt: "2024-01-13T09:15:00Z", + repoName: "api-docs", + number: 45 + }, + { + title: "Implement dark mode toggle component", + url: "https://github.com/recodehive/repo3/pull/67", + mergedAt: "2024-01-12T16:45:00Z", + repoName: "ui-components", + number: 67 + }, + { + title: "Optimize database queries for better performance", + url: "https://github.com/recodehive/repo1/pull/125", + mergedAt: "2024-01-11T11:30:00Z", + repoName: "backend-core", + number: 125 + } + ] + }, + { + username: "testuser2", + avatar: "https://github.com/testuser2.png", + profile: "https://github.com/testuser2", + points: 30, + prs: 3, + prDetails: [ + { + title: "Add responsive design to landing page", + url: "https://github.com/recodehive/repo4/pull/89", + mergedAt: "2024-01-10T13:20:00Z", + repoName: "frontend-website", + number: 89 + }, + { + title: "Fix mobile navigation menu issue", + url: "https://github.com/recodehive/repo4/pull/90", + mergedAt: "2024-01-09T08:45:00Z", + repoName: "frontend-website", + number: 90 + }, + { + title: "Add unit tests for utility functions", + url: "https://github.com/recodehive/repo5/pull/12", + mergedAt: "2024-01-08T15:30:00Z", + repoName: "utils-library", + number: 12 + } + ] + }, + { + username: "testuser3", + avatar: "https://github.com/testuser3.png", + profile: "https://github.com/testuser3", + points: 20, + prs: 2, + prDetails: [ + { + title: "Update README with installation instructions", + url: "https://github.com/recodehive/repo6/pull/23", + mergedAt: "2024-01-07T12:15:00Z", + repoName: "documentation", + number: 23 + }, + { + title: "Add error handling for API failures", + url: "https://github.com/recodehive/repo7/pull/34", + mergedAt: "2024-01-06T10:00:00Z", + repoName: "error-handling", + number: 34 + } + ] + } +]; diff --git a/src/components/discussions/DiscussionCard.js b/src/components/discussions/DiscussionCard.js new file mode 100644 index 00000000..83f1ab88 --- /dev/null +++ b/src/components/discussions/DiscussionCard.js @@ -0,0 +1,39 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = DiscussionCard; +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importDefault(require("react")); +var framer_motion_1 = require("framer-motion"); +var lucide_react_1 = require("lucide-react"); +function DiscussionCard(_a) { + var discussion = _a.discussion, index = _a.index; + var formatDate = function (dateString) { + var date = new Date(dateString); + return date.toLocaleDateString("en-US", { + year: "numeric", + month: "short", + day: "numeric", + }); + }; + var truncateText = function (text, maxLength) { + if (!text || text.length <= maxLength) + return text; + return text.substring(0, maxLength).trim() + "..."; + }; + var formatCount = function (count) { + if (count >= 1000) { + return (count / 1000).toFixed(1) + "k"; + } + return count.toString(); + }; + return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "discussion-card-new", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5, delay: index * 0.1 }, whileHover: { boxShadow: "0 4px 20px rgba(0,0,0,0.08)" }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "discussion-card-header", children: [(0, jsx_runtime_1.jsxs)("div", { className: "discussion-category-badge", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Tag, { size: 14 }), (0, jsx_runtime_1.jsx)("span", { children: discussion.category.name })] }), (0, jsx_runtime_1.jsxs)("div", { className: "discussion-date-badge", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Calendar, { size: 14 }), (0, jsx_runtime_1.jsx)("span", { children: formatDate(discussion.created_at) })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "discussion-main-content", children: [(0, jsx_runtime_1.jsx)("h3", { className: "discussion-title-new", children: (0, jsx_runtime_1.jsx)("a", { href: discussion.html_url, target: "_blank", rel: "noopener noreferrer", children: discussion.title }) }), discussion.body && ((0, jsx_runtime_1.jsx)("p", { className: "discussion-excerpt", children: truncateText(discussion.body.replace(/[#*`\[\]]/g, "").replace(/\n/g, " "), 150) })), discussion.labels.length > 0 && ((0, jsx_runtime_1.jsx)("div", { className: "discussion-keywords", children: discussion.labels.slice(0, 4).map(function (label, idx) { return ((0, jsx_runtime_1.jsx)("span", { className: "keyword-tag", children: label.name }, idx)); }) }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "discussion-card-footer", children: [(0, jsx_runtime_1.jsxs)("div", { className: "discussion-author-info", children: [discussion.author.avatar_url ? ((0, jsx_runtime_1.jsx)("img", { src: discussion.author.avatar_url, alt: discussion.author.login, className: "author-avatar-small", onError: function (e) { + var target = e.currentTarget; + target.style.display = 'none'; + var fallback = target.nextElementSibling; + if (fallback) + fallback.style.display = 'flex'; + } })) : null, (0, jsx_runtime_1.jsx)("div", { className: "author-avatar-fallback", style: { display: discussion.author.avatar_url ? 'none' : 'flex' }, children: discussion.author.login.charAt(0).toUpperCase() }), (0, jsx_runtime_1.jsx)("span", { className: "author-name-new", children: discussion.author.login })] }), (0, jsx_runtime_1.jsxs)("div", { className: "discussion-engagement", children: [(0, jsx_runtime_1.jsxs)("div", { className: "engagement-item", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.MessageCircle, { size: 16 }), (0, jsx_runtime_1.jsx)("span", { children: formatCount(discussion.comments) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "engagement-item", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.ThumbsUp, { size: 16 }), (0, jsx_runtime_1.jsx)("span", { children: formatCount(discussion.reactions.total_count) })] })] })] })] })); +} diff --git a/src/components/discussions/index.js b/src/components/discussions/index.js new file mode 100644 index 00000000..31a33322 --- /dev/null +++ b/src/components/discussions/index.js @@ -0,0 +1,8 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DiscussionCard = void 0; +var DiscussionCard_1 = require("./DiscussionCard"); +Object.defineProperty(exports, "DiscussionCard", { enumerable: true, get: function () { return __importDefault(DiscussionCard_1).default; } }); diff --git a/src/components/faqs/faqs.js b/src/components/faqs/faqs.js new file mode 100644 index 00000000..53b507fe --- /dev/null +++ b/src/components/faqs/faqs.js @@ -0,0 +1,89 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importStar(require("react")); +var fi_1 = require("react-icons/fi"); +var framer_motion_1 = require("framer-motion"); +var theme_common_1 = require("@docusaurus/theme-common"); // Docusaurus theme detection +var faqData = [ + { + question: "What is the recode hive?", + answer: "Recode Hive is a comprehensive platform focused on providing students with the right resources at the right time. We help you focus on important topics and tools used in current industry standards compared to traditional university curricula. This includes data engineering tutorials, blogs, and opportunities for open-source contribution with earning potential.

🌐 Visit our official website | 📚 Explore our documentation", + }, + { + question: "What features do the recode hive provides?", + answer: "We provide students with comprehensive learning opportunities through our Recode Hive GitHub organization, which includes 1000+ data-related projects. Our community is non-profit and inclusive for all, offering:

Learning Resources: Tutorials, documentation, and hands-on projects
Open Source Contribution: Real-world project experience
Earning Opportunities: GitHub sponsorship program
Community Support: Discord community and mentorship

🚀 Browse our GitHub projects", + }, + { + question: "How can I contribute tutorials?", + answer: "Contributing tutorials is straightforward! Our community is completely open-source, and the entire codebase is available on GitHub for forking and contributing. Whether you're a beginner or experienced developer, we welcome your contributions.

Getting Started:
1. Fork our main repository
2. Check our contribution guidelines
3. Create your tutorial content
4. Submit a pull request

📖 Learn how to make your first contribution", + }, + { + question: "What all resources are available here?", + answer: "We offer a comprehensive range of learning resources across multiple technologies:

Currently Available:
• 🐍 Python Tutorials - From basics to advanced concepts
• 🗄️ SQL Resources - Database management and queries
• 🐙 GitHub Guides - Version control and collaboration
• 📮 Postman API Testing
• ⚛️ Next.js Development

Coming Soon: Advanced data tools tutorials, cloud technologies, and more!", + }, + { + question: "How can I contribute as a beginner?", + answer: "We've designed our community specifically with beginners in mind! Contributing to open-source can seem intimidating, but we provide a supportive environment for learning.

Beginner-Friendly Steps:
1. Start with our GitHub Basics guide
2. Join our Discord community for support
3. Look for 'good first issue' labels in our repositories
4. Follow our step-by-step contribution guide

🎯 Make your first open-source contribution", + }, + { + question: "How can I earn from this recode hive organisation?", + answer: "We offer earning opportunities through our GitHub sponsorship program! Every week, we sponsor contributors who make valuable open-source contributions.

Sponsorship Details:
• Weekly sponsorship program
• Earning range: ₹100 to ₹500 per week
• Based on contribution quality and impact
• Open to all community members

How to Qualify:
• Make meaningful contributions to our projects
• Follow contribution guidelines
• Engage with the community

💰 Learn more about GitHub Sponsorship | 🚀 Start contributing today", + }, + { + question: "How will I stay up to date with the latest news from this organisation?", + answer: "Stay connected with Recode Hive through multiple channels to never miss important updates:

📧 Newsletter: Our primary communication channel providing weekly updates on community happenings, new resources, and opportunities.

Social Media:
• 📱 Instagram - Visual updates and behind-the-scenes
• 🐦 Twitter - Quick updates and tech insights
• 💼 LinkedIn - Professional updates
• 🎥 YouTube - Video tutorials and content

📬 Subscribe to our Newsletter | 💬 Join our Discord", + }, +]; +var FAQs = function () { + var _a = (0, react_1.useState)(null), activeIndex = _a[0], setActiveIndex = _a[1]; + var colorMode = (0, theme_common_1.useColorMode)().colorMode; + var isDark = colorMode === "dark"; + var toggleAccordion = function (index) { + setActiveIndex(activeIndex === index ? null : index); + }; + return ((0, jsx_runtime_1.jsx)("section", { className: "py-8 transition-colors duration-300 ".concat(isDark ? "bg-[#121212]" : "bg-gray-50"), children: (0, jsx_runtime_1.jsx)("div", { className: "mx-auto px-2 sm:px-4 lg:px-6", children: (0, jsx_runtime_1.jsx)("div", { className: "flex flex-col justify-center items-center gap-x-8 gap-y-12 xl:gap-28 lg:flex-row lg:justify-between", children: (0, jsx_runtime_1.jsxs)("div", { className: "w-full", children: [(0, jsx_runtime_1.jsxs)("div", { className: "mb-8 lg:mb-16", children: [(0, jsx_runtime_1.jsx)("h6", { className: "text-lg text-center lg:text-left font-medium text-indigo-600 mb-2", children: "FAQs" }), (0, jsx_runtime_1.jsx)("h2", { className: "text-4xl text-center lg:text-left font-bold ".concat(isDark ? "text-gray-100" : "text-gray-900", " leading-snug"), children: "Looking for answers?" }), (0, jsx_runtime_1.jsx)("p", { className: "".concat(isDark ? "text-gray-400" : "text-gray-600", " text-center lg:text-left"), children: "Find answers to the most common questions about Recode Hive." })] }), (0, jsx_runtime_1.jsx)("div", { className: "columns-1 md:columns-2 md:gap-x-6", children: faqData.map(function (faq, index) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "accordion h-fit border-gray-200 dark:border-gray-700 pb-4 mb-4 break-inside-avoid", initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.3 }, children: [(0, jsx_runtime_1.jsxs)("button", { className: "accordion-toggle group flex justify-between items-center text-lg font-medium w-full transition-all duration-300 \n ".concat(isDark + ? "text-gray-200 bg-gray-800 hover:text-indigo-400" + : "text-gray-700 bg-gray-100 hover:text-indigo-600", " \n p-4 rounded-lg focus:outline-none"), onClick: function () { return toggleAccordion(index); }, children: [faq.question, (0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "transform transition-transform duration-300", animate: { rotate: activeIndex === index ? 180 : 0 }, children: (0, jsx_runtime_1.jsx)(fi_1.FiChevronDown, { size: 22 }) })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "accordion-content overflow-hidden", initial: { height: 0, opacity: 0 }, animate: { + height: activeIndex === index ? "auto" : 0, + opacity: activeIndex === index ? 1 : 0, + }, transition: { duration: 0.3, ease: "easeInOut" }, children: (0, jsx_runtime_1.jsx)("div", { className: "mt-2 text-base transition-colors duration-200 ".concat(isDark ? "text-gray-300" : "text-gray-900"), style: { + color: isDark ? '#d1d5db' : '#111827' + }, dangerouslySetInnerHTML: { + __html: faq.answer.replace(//g, "")).replace(/ 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var jsx_runtime_1 = require("react/jsx-runtime"); +var React = __importStar(require("react")); +var react_1 = __importStar(require("@tsparticles/react")); +var react_2 = require("react"); +var slim_1 = require("@tsparticles/slim"); +var ParticlesComponent = function (props) { + var _a = (0, react_2.useState)(false), init = _a[0], setInit = _a[1]; + (0, react_2.useEffect)(function () { + (0, react_1.initParticlesEngine)(function (engine) { return __awaiter(void 0, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, (0, slim_1.loadSlim)(engine)]; + case 1: + _a.sent(); + return [2 /*return*/]; + } + }); + }); }).then(function () { + setInit(true); + }); + }, []); + var particlesLoaded = function (container) { + console.log(container); + }; + var options = (0, react_2.useMemo)(function () { return ({ + fullScreen: { + enable: false, // Important: disable built-in fullscreen + }, + fpsLimit: 120, + interactivity: { + events: { + onClick: { + enable: true, + mode: "repulse", + }, + onHover: { + enable: true, + mode: "repulse", + }, + }, + modes: { + repulse: { + distance: 200, + duration: 0.4, + }, + grab: { + distance: 150, + }, + }, + }, + particles: { + number: { + value: 100, + density: { + enable: true, + value_area: 800, + }, + }, + color: { + value: "#FFFFFF", + }, + shape: { + type: "triangle", + stroke: { + width: 0, + color: "#FFD700", + }, + polygon: { + nb_sides: 12, + }, + }, + links: { + color: "#778899", + distance: 180, + enable: true, + opacity: 0.8, + width: 1, + }, + move: { + direction: "none", + enable: true, + outModes: { + default: "bounce", + }, + random: true, + speed: 5, + straight: false, + }, + opacity: { + value: 0.7, + }, + size: { + value: { min: 1, max: 3 }, + }, + }, + detectRetina: true, + }); }, []); + return ((0, jsx_runtime_1.jsx)("div", { style: { + position: "fixed", + width: "100vw", + height: "100vh", + top: 0, + left: 0, + zIndex: -1, // Critical: ensures it's in the background + pointerEvents: "none", // Ensures it doesn't block clicks + }, children: (0, jsx_runtime_1.jsx)(react_1.default, { id: props.id, options: options }) })); +}; +exports.default = ParticlesComponent; diff --git a/src/components/scroll/bottom-to-top.js b/src/components/scroll/bottom-to-top.js new file mode 100644 index 00000000..c942e32e --- /dev/null +++ b/src/components/scroll/bottom-to-top.js @@ -0,0 +1,63 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = ScrollBottomToTop; +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importStar(require("react")); +var fa_1 = require("react-icons/fa"); +function ScrollBottomToTop() { + var _a = (0, react_1.useState)(false), showButton = _a[0], setShowButton = _a[1]; + var scrollToTop = function () { + window.scrollTo({ + top: 0, + behavior: "smooth", + }); + }; + var handleScroll = function () { + if (window.scrollY > 300) { + setShowButton(true); + } + else { + setShowButton(false); + } + }; + (0, react_1.useEffect)(function () { + window.addEventListener("scroll", handleScroll); + return function () { + window.removeEventListener("scroll", handleScroll); + }; + }, []); + return (showButton && ((0, jsx_runtime_1.jsx)("button", { onClick: scrollToTop, className: "fixed bottom-20 right-5 bg-blue-600 text-white border-none rounded-lg p-2.5 cursor-pointer shadow-md transition-opacity duration-300 opacity-80 z-50 hover:bg-blue-700 hover:opacity-100", children: (0, jsx_runtime_1.jsx)(fa_1.FaArrowUp, {}) }))); +} diff --git a/src/components/scroll/top-to-bottom.js b/src/components/scroll/top-to-bottom.js new file mode 100644 index 00000000..f141a096 --- /dev/null +++ b/src/components/scroll/top-to-bottom.js @@ -0,0 +1,64 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = ScrollTopToBottom; +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importStar(require("react")); +var fa_1 = require("react-icons/fa"); +function ScrollTopToBottom() { + var _a = (0, react_1.useState)(false), showButton = _a[0], setShowButton = _a[1]; + var scrollToBottom = function () { + window.scrollTo({ + top: document.documentElement.scrollHeight, + behavior: "smooth", + }); + }; + var handleScroll = function () { + var bottomThreshold = document.documentElement.scrollHeight - window.innerHeight - 100; + if (window.scrollY < bottomThreshold) { + setShowButton(true); + } + else { + setShowButton(false); + } + }; + (0, react_1.useEffect)(function () { + window.addEventListener("scroll", handleScroll); + return function () { + window.removeEventListener("scroll", handleScroll); + }; + }, []); + return (showButton && ((0, jsx_runtime_1.jsx)("button", { onClick: scrollToBottom, className: "fixed bottom-5 right-5 bg-green-600 text-white border-none rounded-lg p-2.5 cursor-pointer shadow-md transition-opacity duration-300 opacity-80 z-50 hover:bg-green-700 hover:opacity-100", children: (0, jsx_runtime_1.jsx)(fa_1.FaArrowDown, {}) }))); +} diff --git a/src/components/svgIcons/FavoriteIcon/index.js b/src/components/svgIcons/FavoriteIcon/index.js new file mode 100644 index 00000000..d28fde9c --- /dev/null +++ b/src/components/svgIcons/FavoriteIcon/index.js @@ -0,0 +1,29 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = FavoriteIcon; +var jsx_runtime_1 = require("react/jsx-runtime"); +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +var react_1 = __importDefault(require("react")); +var Svg_1 = __importDefault(require("../../Svg")); +function FavoriteIcon(props) { + return ((0, jsx_runtime_1.jsx)(Svg_1.default, __assign({}, props, { children: (0, jsx_runtime_1.jsx)("path", { d: "M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z" }) }))); +} diff --git a/src/components/testimonials/TestimonialCard.js b/src/components/testimonials/TestimonialCard.js new file mode 100644 index 00000000..a17720a9 --- /dev/null +++ b/src/components/testimonials/TestimonialCard.js @@ -0,0 +1,29 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importDefault(require("react")); +var framer_motion_1 = require("framer-motion"); +var avatar_1 = require("../ui/avatar"); +var theme_common_1 = require("@docusaurus/theme-common"); +var TestimonialCard = function (_a) { + var _b; + var name = _a.name, username = _a.username, content = _a.content, date = _a.date, avatar = _a.avatar, link = _a.link; + var colorMode = (0, theme_common_1.useColorMode)().colorMode; + var isDark = colorMode === "dark"; + // Function to format the link display + var formatLinkDisplay = function (url) { + try { + var urlObj = new URL(url); + return urlObj.hostname + urlObj.pathname; + } + catch (_a) { + // If URL parsing fails, return the original link + return url; + } + }; + return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, className: "rounded-2xl p-6 shadow-lg hover:shadow-xl transition-shadow duration-300 h-[250px] flex flex-col justify-between ".concat(isDark ? "bg-[#1a1a1a] text-white" : "bg-white text-gray-900"), children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-4", children: [(0, jsx_runtime_1.jsxs)(avatar_1.Avatar, { className: "w-24 h-24 rounded-full", children: [(0, jsx_runtime_1.jsx)(avatar_1.AvatarImage, { src: avatar, className: "object-contain" }), (0, jsx_runtime_1.jsx)(avatar_1.AvatarFallback, { children: "CN" })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h3", { className: "font-semibold text-lg ".concat(isDark ? "text-white" : "text-gray-900"), children: name }), (0, jsx_runtime_1.jsxs)("p", { className: "text-sm ".concat(isDark ? "text-gray-400" : "text-gray-500"), children: ["@", username] })] })] }), (0, jsx_runtime_1.jsx)("p", { className: "line-clamp-3 my-4 flex-grow ".concat(isDark ? "text-gray-300" : "text-gray-700"), children: content }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-2 text-sm pt-2 border-t ".concat(isDark ? "border-gray-700" : "border-gray-100"), children: [(0, jsx_runtime_1.jsx)("div", { className: "flex gap-2 flex-wrap", children: (_b = content.match(/#\w+/g)) === null || _b === void 0 ? void 0 : _b.map(function (hashtag, index) { return ((0, jsx_runtime_1.jsx)("span", { className: "text-blue-500 hover:text-blue-600 cursor-pointer", children: hashtag }, index)); }) }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between", children: [(0, jsx_runtime_1.jsx)("a", { href: link, target: "_blank", rel: "noopener noreferrer", className: "hover:underline cursor-pointer ".concat(isDark ? "text-blue-400 hover:text-blue-300" : "text-blue-600 hover:text-blue-700"), children: formatLinkDisplay(link) }), (0, jsx_runtime_1.jsx)("span", { className: isDark ? "text-gray-500" : "text-gray-400", children: date })] })] })] })); +}; +exports.default = TestimonialCard; diff --git a/src/components/testimonials/TestimonialCarousel.js b/src/components/testimonials/TestimonialCarousel.js new file mode 100644 index 00000000..1e370fc8 --- /dev/null +++ b/src/components/testimonials/TestimonialCarousel.js @@ -0,0 +1,106 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TestimonialCarousel = TestimonialCarousel; +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importStar(require("react")); +var carousel_1 = require("../ui/carousel"); +var button_1 = require("../ui/button"); +var TestimonialCard_1 = __importDefault(require("./TestimonialCard")); +var embla_carousel_autoplay_1 = __importDefault(require("embla-carousel-autoplay")); +// Sample testimonial data +var testimonials = [ + { + name: "Rashi Chouhan", + username: "RashiChouhan", + content: "Valuable insights shared, productive discussions, and actionable outcomes. Looking forward to implementing the strategies discussed.! #TechCommunity #WomenInTech", + date: "May 18, 2024", + avatar: "/icons/adobe.png", + link: "https://topmate.io/sanjaykv" + }, + { + name: "Namith", + username: "namith", + content: "Gave remarkable insights on parts i have to improve and gave me new opportunities . cheers~! #TechCommunity #Grateful", + date: "April 21, 2023", + avatar: "/icons/google.png", + link: "https://topmate.io/sanjaykv" + }, + { + name: "Rajdeep Chakraborty", + username: "RajdeepChakraborty", + content: "I appreciate Sanjay sir's insights on open source and his suggestions for improving my GitHub profile. I'm excited to hear more and discuss open source further.! #OpenSource #TechCommunity", + date: "Oct 18, 2024", + avatar: "/icons/amazon.png", + link: "https://topmate.io/sanjaykv" + } +]; +function TestimonialCarousel() { + var _a = (0, react_1.useState)(), api = _a[0], setApi = _a[1]; + var _b = (0, react_1.useState)(0), current = _b[0], setCurrent = _b[1]; + var _c = (0, react_1.useState)(0), count = _c[0], setCount = _c[1]; + (0, react_1.useEffect)(function () { + if (!api) { + return; + } + setCount(api.scrollSnapList().length); + setCurrent(api.selectedScrollSnap() + 1); + api.on("select", function () { + setCurrent(api.selectedScrollSnap() + 1); + }); + }, [api]); + return ((0, jsx_runtime_1.jsxs)("div", { className: "w-full", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-center mb-10", children: [(0, jsx_runtime_1.jsx)("h2", { className: "text-3xl font-bold mb-2", children: "Loved by Many Users" }), (0, jsx_runtime_1.jsx)("div", { className: "w-32 h-1 bg-blue-500 mx-auto rounded-full" })] }), (0, jsx_runtime_1.jsxs)(carousel_1.Carousel, { setApi: setApi, className: "w-full", opts: { + align: "start", + loop: true, + }, plugins: [ + (0, embla_carousel_autoplay_1.default)({ + delay: 4000, + }), + ], children: [(0, jsx_runtime_1.jsx)(carousel_1.CarouselContent, { className: "-ml-2 md:-ml-4 my-16", children: testimonials.map(function (testimonial, index) { return ((0, jsx_runtime_1.jsx)(carousel_1.CarouselItem, { className: "pl-2 md:pl-4 md:basis-1/2 h-full", children: (0, jsx_runtime_1.jsx)(TestimonialCard_1.default, __assign({}, testimonial)) }, index)); }) }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-center gap-2 mt-8", children: [(0, jsx_runtime_1.jsx)(carousel_1.CarouselPrevious, { className: "static translate-y-0" }), (0, jsx_runtime_1.jsx)("div", { className: "flex gap-2", children: Array.from({ length: count }).map(function (_, index) { return ((0, jsx_runtime_1.jsx)(button_1.Button, { variant: current === index + 1 ? "default" : "outline", size: "icon", className: "h-2 w-2 p-0 rounded-full", onClick: function () { return api === null || api === void 0 ? void 0 : api.scrollTo(index); } }, index)); }) }), (0, jsx_runtime_1.jsx)(carousel_1.CarouselNext, { className: "static translate-y-0" })] })] })] })); +} diff --git a/src/components/topmate/TopMateCard.js b/src/components/topmate/TopMateCard.js new file mode 100644 index 00000000..b9fabc3a --- /dev/null +++ b/src/components/topmate/TopMateCard.js @@ -0,0 +1,28 @@ +"use strict"; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importDefault(require("react")); +var framer_motion_1 = require("framer-motion"); +var lucide_react_1 = require("lucide-react"); +var theme_common_1 = require("@docusaurus/theme-common"); +var TopMateCard = function (_a) { + var title = _a.title, description = _a.description, duration = _a.duration, profileImage = _a.profileImage, username = _a.username, setShowTopmate = _a.setShowTopmate; + var colorMode = (0, theme_common_1.useColorMode)().colorMode; + var isDark = colorMode === "dark"; + return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5 }, className: "relative w-full max-w-md mx-auto rounded-3xl shadow-2xl overflow-hidden hover:shadow-3xl transition-all duration-300 transform hover:-translate-y-1 ".concat(isDark ? "bg-[#1a1a1a] text-white" : "bg-white text-black"), children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute -top-4 -left-4 flex gap-2", children: __spreadArray([], Array(3), true).map(function (_, i) { return ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: { opacity: 0, x: -10 }, animate: { opacity: 1, x: 0 }, transition: { delay: i * 0.1 }, className: "text-purple-500", children: (0, jsx_runtime_1.jsx)(lucide_react_1.ArrowUpRight, { size: 24, className: "transform rotate-45" }) }, i)); }) }), (0, jsx_runtime_1.jsxs)("div", { className: "p-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between mb-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-sm font-medium ".concat(isDark ? "text-gray-300" : "text-gray-600"), children: "1:1 CALL" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1 ".concat(isDark ? "text-gray-400" : "text-gray-500"), children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Clock, { size: 16 }), (0, jsx_runtime_1.jsx)("span", { className: "text-sm", children: duration })] })] }), (0, jsx_runtime_1.jsxs)("button", { className: "text-xl font-semibold ".concat(isDark + ? "text-gray-500 hover:text-gray-300" + : "text-gray-400 hover:text-gray-600"), onClick: function () { return setShowTopmate(false); }, children: [(0, jsx_runtime_1.jsx)("span", { className: "sr-only", children: "Close" }), "\u00D7"] })] }), (0, jsx_runtime_1.jsx)("h2", { className: "text-2xl font-bold mb-4 ".concat(isDark ? "text-white" : "text-gray-900"), children: title }), (0, jsx_runtime_1.jsx)("p", { className: "".concat(isDark ? "text-gray-300" : "text-gray-600", " mb-6"), children: description }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between flex-wrap md:flex-nowrap gap-y-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-3 min-w-0", children: [(0, jsx_runtime_1.jsx)("img", { src: profileImage, alt: "Profile", className: "w-12 h-12 rounded-full object-cover border-2 border-purple-200" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-sm ".concat(isDark ? "text-gray-300" : "text-gray-600"), children: "Book a slot at" }), (0, jsx_runtime_1.jsxs)("a", { href: "https://topmate.io/".concat(username), target: "_blank", rel: "noopener noreferrer", className: "text-purple-500 font-semibold hover:text-purple-600 transition-colors flex items-center gap-1 truncate", children: [(0, jsx_runtime_1.jsxs)("span", { className: "truncate", children: ["topmate.io/", username] }), (0, jsx_runtime_1.jsx)(lucide_react_1.ArrowUpRight, { size: 16 })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2 shrink-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "h-4 w-4 overflow-hidden flex-shrink-0 rounded-sm", children: (0, jsx_runtime_1.jsx)("img", { src: "/icons/topmate.png", alt: "Topmate icon", className: "h-4 w-auto object-cover object-left opacity-90" }) }), (0, jsx_runtime_1.jsx)("span", { className: "text-sm font-semibold shrink-0 ".concat(isDark ? "text-gray-200" : "text-gray-700"), children: "topmate" })] })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 border-2 border-transparent rounded-3xl bg-gradient-to-br from-purple-500/20 to-pink-500/20 -z-10" })] })); +}; +exports.default = TopMateCard; diff --git a/src/components/topmate/TopMateSection.js b/src/components/topmate/TopMateSection.js new file mode 100644 index 00000000..83f6edcc --- /dev/null +++ b/src/components/topmate/TopMateSection.js @@ -0,0 +1,33 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importDefault(require("react")); +var TopMateCard_1 = __importDefault(require("./TopMateCard")); +var theme_common_1 = require("@docusaurus/theme-common"); +var TopMateSection = function (_a) { + var setShowTopmate = _a.setShowTopmate; + var colorMode = (0, theme_common_1.useColorMode)().colorMode; // Get current theme: 'light' or 'dark' + var profileData = { + title: "1:1 Mentorship Call", + description: "Book a slot, Free for Hive Community Members", + duration: "30 mins", + profileImage: "/sanjay.png", + username: "sanjaykv", + }; + return ((0, jsx_runtime_1.jsx)("div", { className: "px-4", children: (0, jsx_runtime_1.jsxs)("div", { className: "mx-auto", children: [(0, jsx_runtime_1.jsxs)("div", { className: "mx-auto text-center mb-16", children: [(0, jsx_runtime_1.jsx)("h1", { className: "text-4xl font-bold mb-4 ".concat(colorMode === "dark" ? "text-white" : "text-gray-900"), children: "Book a Session" }), (0, jsx_runtime_1.jsx)("p", { className: "text-lg ".concat(colorMode === "dark" ? "text-gray-300" : "text-gray-600"), children: "Get personalized guidance and feedback through one-on-one sessions" })] }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(TopMateCard_1.default, __assign({}, profileData, { setShowTopmate: setShowTopmate })) })] }) })); +}; +exports.default = TopMateSection; diff --git a/src/components/ui/FirebaseAuthGithub.js b/src/components/ui/FirebaseAuthGithub.js new file mode 100644 index 00000000..4c819d29 --- /dev/null +++ b/src/components/ui/FirebaseAuthGithub.js @@ -0,0 +1,120 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importStar(require("react")); +var firebase_1 = require("../../lib/firebase"); +var auth_1 = require("firebase/auth"); +var uiConfig = { + signInFlow: 'popup', + signInOptions: [ + { + provider: auth_1.GithubAuthProvider.PROVIDER_ID, + // You can add scopes and custom parameters here if needed + }, + ], + callbacks: { + signInSuccessWithAuthResult: function () { return false; }, // Prevents redirect + }, +}; +var FirebaseAuthGithub = function () { + var _a = (0, react_1.useState)(null), user = _a[0], setUser = _a[1]; + (0, react_1.useEffect)(function () { + var unregisterAuthObserver = firebase_1.auth.onAuthStateChanged(function (user) { return setUser(user); }); + return function () { return unregisterAuthObserver(); }; + }, []); + if (user) { + return ((0, jsx_runtime_1.jsxs)("div", { style: { textAlign: 'center' }, className: 'flex justify-center items-center gap-5 p-0', children: [(0, jsx_runtime_1.jsx)("img", { src: user.photoURL || '', alt: "avatar", style: { width: 48, borderRadius: '50%', border: '2px solid #000' } }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsxs)("button", { onClick: function () { return firebase_1.auth.signOut(); }, className: "bg-gray-900 hover:bg-gray-700 text-white px-4 py-1 rounded flex items-center gap-2 transition-colors duration-200 shadow-md font-semibold", children: [(0, jsx_runtime_1.jsxs)("svg", { height: "20", width: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [(0, jsx_runtime_1.jsx)("path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }), (0, jsx_runtime_1.jsx)("polyline", { points: "16 17 21 12 16 7" }), (0, jsx_runtime_1.jsx)("line", { x1: "21", y1: "12", x2: "9", y2: "12" })] }), "Sign out"] })] })); + } + var handleGithubSignIn = function () { return __awaiter(void 0, void 0, void 0, function () { + var provider, error_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + provider = new auth_1.GithubAuthProvider(); + _a.label = 1; + case 1: + _a.trys.push([1, 3, , 4]); + return [4 /*yield*/, (0, auth_1.signInWithPopup)(firebase_1.auth, provider)]; + case 2: + _a.sent(); + return [3 /*break*/, 4]; + case 3: + error_1 = _a.sent(); + console.error('GitHub sign-in error:', error_1); + return [3 /*break*/, 4]; + case 4: return [2 /*return*/]; + } + }); + }); }; + return ((0, jsx_runtime_1.jsx)("div", { style: { textAlign: 'center' }, className: 'flex justify-center items-center gap-5 p-0', children: (0, jsx_runtime_1.jsxs)("button", { onClick: handleGithubSignIn, className: "bg-black text-white px-4 py-2 rounded flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)("svg", { height: "24", width: "24", viewBox: "0 0 16 16", fill: "currentColor", "aria-hidden": "true", children: (0, jsx_runtime_1.jsx)("path", { d: "M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82a7.65 7.65 0 0 1 2-.27c.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z" }) }), (0, jsx_runtime_1.jsx)("span", { className: "github-text", children: "Sign in with GitHub" })] }) })); +}; +exports.default = FirebaseAuthGithub; diff --git a/src/components/ui/NavbarFirebaseAuthGithub.js b/src/components/ui/NavbarFirebaseAuthGithub.js new file mode 100644 index 00000000..ac5a9bcf --- /dev/null +++ b/src/components/ui/NavbarFirebaseAuthGithub.js @@ -0,0 +1,50 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importStar(require("react")); +var react_dom_1 = require("react-dom"); +var FirebaseAuthGithub_1 = __importDefault(require("./FirebaseAuthGithub")); +var NavbarFirebaseAuthGithub = function () { + var _a = (0, react_1.useState)(null), container = _a[0], setContainer = _a[1]; + (0, react_1.useEffect)(function () { + setContainer(document.getElementById("firebase-auth-github-navbar")); + }, []); + return container ? (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(FirebaseAuthGithub_1.default, {}), container) : null; +}; +exports.default = NavbarFirebaseAuthGithub; diff --git a/src/components/ui/avatar.js b/src/components/ui/avatar.js new file mode 100644 index 00000000..169bffd8 --- /dev/null +++ b/src/components/ui/avatar.js @@ -0,0 +1,76 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Avatar = Avatar; +exports.AvatarImage = AvatarImage; +exports.AvatarFallback = AvatarFallback; +var jsx_runtime_1 = require("react/jsx-runtime"); +var React = __importStar(require("react")); +var AvatarPrimitive = __importStar(require("@radix-ui/react-avatar")); +var utils_1 = require("@site/src/lib/utils"); +function Avatar(_a) { + var className = _a.className, props = __rest(_a, ["className"]); + return ((0, jsx_runtime_1.jsx)(AvatarPrimitive.Root, __assign({ "data-slot": "avatar", className: (0, utils_1.cn)("relative flex size-8 shrink-0 overflow-hidden rounded-full", className) }, props))); +} +function AvatarImage(_a) { + var className = _a.className, props = __rest(_a, ["className"]); + return ((0, jsx_runtime_1.jsx)(AvatarPrimitive.Image, __assign({ "data-slot": "avatar-image", className: (0, utils_1.cn)("aspect-square size-full", className) }, props))); +} +function AvatarFallback(_a) { + var className = _a.className, props = __rest(_a, ["className"]); + return ((0, jsx_runtime_1.jsx)(AvatarPrimitive.Fallback, __assign({ "data-slot": "avatar-fallback", className: (0, utils_1.cn)("bg-muted flex size-full items-center justify-center rounded-full", className) }, props))); +} diff --git a/src/components/ui/badge.js b/src/components/ui/badge.js new file mode 100644 index 00000000..7e2333dd --- /dev/null +++ b/src/components/ui/badge.js @@ -0,0 +1,83 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.badgeVariants = void 0; +exports.Badge = Badge; +var jsx_runtime_1 = require("react/jsx-runtime"); +var React = __importStar(require("react")); +var react_slot_1 = require("@radix-ui/react-slot"); +var class_variance_authority_1 = require("class-variance-authority"); +var utils_1 = require("../../../src/lib/utils"); +var badgeVariants = (0, class_variance_authority_1.cva)("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden", { + variants: { + variant: { + default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90", + secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90", + destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60", + outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground", + }, + }, + defaultVariants: { + variant: "default", + }, +}); +exports.badgeVariants = badgeVariants; +function Badge(_a) { + var className = _a.className, variant = _a.variant, _b = _a.asChild, asChild = _b === void 0 ? false : _b, props = __rest(_a, ["className", "variant", "asChild"]); + var Comp = asChild ? react_slot_1.Slot : "span"; + return ((0, jsx_runtime_1.jsx)(Comp, __assign({ "data-slot": "badge", className: (0, utils_1.cn)(badgeVariants({ variant: variant }), className) }, props))); +} diff --git a/src/components/ui/button.js b/src/components/ui/button.js new file mode 100644 index 00000000..f09fc2c5 --- /dev/null +++ b/src/components/ui/button.js @@ -0,0 +1,92 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.buttonVariants = void 0; +exports.Button = Button; +var jsx_runtime_1 = require("react/jsx-runtime"); +var React = __importStar(require("react")); +var react_slot_1 = require("@radix-ui/react-slot"); +var class_variance_authority_1 = require("class-variance-authority"); +var utils_1 = require("@site/src/lib/utils"); +var buttonVariants = (0, class_variance_authority_1.cva)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", { + variants: { + variant: { + default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90", + destructive: "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60", + outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50", + secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80", + ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50", + link: "text-primary underline-offset-4 hover:underline", + }, + size: { + default: "h-9 px-4 py-2 has-[>svg]:px-3", + sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5", + lg: "h-10 rounded-md px-6 has-[>svg]:px-4", + icon: "size-9", + }, + }, + defaultVariants: { + variant: "default", + size: "default", + }, +}); +exports.buttonVariants = buttonVariants; +function Button(_a) { + var className = _a.className, variant = _a.variant, size = _a.size, _b = _a.asChild, asChild = _b === void 0 ? false : _b, props = __rest(_a, ["className", "variant", "size", "asChild"]); + var Comp = asChild ? react_slot_1.Slot : "button"; + return ((0, jsx_runtime_1.jsx)(Comp, __assign({ "data-slot": "button", className: (0, utils_1.cn)(buttonVariants({ variant: variant, size: size, className: className })) }, props))); +} diff --git a/src/components/ui/card.js b/src/components/ui/card.js new file mode 100644 index 00000000..b6183e34 --- /dev/null +++ b/src/components/ui/card.js @@ -0,0 +1,95 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Card = Card; +exports.CardHeader = CardHeader; +exports.CardFooter = CardFooter; +exports.CardTitle = CardTitle; +exports.CardAction = CardAction; +exports.CardDescription = CardDescription; +exports.CardContent = CardContent; +var jsx_runtime_1 = require("react/jsx-runtime"); +var React = __importStar(require("react")); +var utils_1 = require("@site/src/lib/utils"); +function Card(_a) { + var className = _a.className, props = __rest(_a, ["className"]); + return ((0, jsx_runtime_1.jsx)("div", __assign({ "data-slot": "card", className: (0, utils_1.cn)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm", className) }, props))); +} +function CardHeader(_a) { + var className = _a.className, props = __rest(_a, ["className"]); + return ((0, jsx_runtime_1.jsx)("div", __assign({ "data-slot": "card-header", className: (0, utils_1.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", className) }, props))); +} +function CardTitle(_a) { + var className = _a.className, props = __rest(_a, ["className"]); + return ((0, jsx_runtime_1.jsx)("div", __assign({ "data-slot": "card-title", className: (0, utils_1.cn)("leading-none font-semibold", className) }, props))); +} +function CardDescription(_a) { + var className = _a.className, props = __rest(_a, ["className"]); + return ((0, jsx_runtime_1.jsx)("div", __assign({ "data-slot": "card-description", className: (0, utils_1.cn)("text-muted-foreground text-sm", className) }, props))); +} +function CardAction(_a) { + var className = _a.className, props = __rest(_a, ["className"]); + return ((0, jsx_runtime_1.jsx)("div", __assign({ "data-slot": "card-action", className: (0, utils_1.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className) }, props))); +} +function CardContent(_a) { + var className = _a.className, props = __rest(_a, ["className"]); + return ((0, jsx_runtime_1.jsx)("div", __assign({ "data-slot": "card-content", className: (0, utils_1.cn)("px-6", className) }, props))); +} +function CardFooter(_a) { + var className = _a.className, props = __rest(_a, ["className"]); + return ((0, jsx_runtime_1.jsx)("div", __assign({ "data-slot": "card-footer", className: (0, utils_1.cn)("flex items-center px-6 [.border-t]:pt-6", className) }, props))); +} diff --git a/src/components/ui/carousel.js b/src/components/ui/carousel.js new file mode 100644 index 00000000..d8ee10d6 --- /dev/null +++ b/src/components/ui/carousel.js @@ -0,0 +1,156 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Carousel = Carousel; +exports.CarouselContent = CarouselContent; +exports.CarouselItem = CarouselItem; +exports.CarouselPrevious = CarouselPrevious; +exports.CarouselNext = CarouselNext; +var jsx_runtime_1 = require("react/jsx-runtime"); +var React = __importStar(require("react")); +var embla_carousel_react_1 = __importDefault(require("embla-carousel-react")); +var lucide_react_1 = require("lucide-react"); +var utils_1 = require("@site/src/lib/utils"); +var button_1 = require("@site/src/components/ui/button"); +var CarouselContext = React.createContext(null); +function useCarousel() { + var context = React.useContext(CarouselContext); + if (!context) { + throw new Error("useCarousel must be used within a "); + } + return context; +} +function Carousel(_a) { + var _b = _a.orientation, orientation = _b === void 0 ? "horizontal" : _b, opts = _a.opts, setApi = _a.setApi, plugins = _a.plugins, className = _a.className, children = _a.children, props = __rest(_a, ["orientation", "opts", "setApi", "plugins", "className", "children"]); + var _c = (0, embla_carousel_react_1.default)(__assign(__assign({}, opts), { axis: orientation === "horizontal" ? "x" : "y" }), plugins), carouselRef = _c[0], api = _c[1]; + var _d = React.useState(false), canScrollPrev = _d[0], setCanScrollPrev = _d[1]; + var _e = React.useState(false), canScrollNext = _e[0], setCanScrollNext = _e[1]; + var onSelect = React.useCallback(function (api) { + if (!api) + return; + setCanScrollPrev(api.canScrollPrev()); + setCanScrollNext(api.canScrollNext()); + }, []); + var scrollPrev = React.useCallback(function () { + api === null || api === void 0 ? void 0 : api.scrollPrev(); + }, [api]); + var scrollNext = React.useCallback(function () { + api === null || api === void 0 ? void 0 : api.scrollNext(); + }, [api]); + var handleKeyDown = React.useCallback(function (event) { + if (event.key === "ArrowLeft") { + event.preventDefault(); + scrollPrev(); + } + else if (event.key === "ArrowRight") { + event.preventDefault(); + scrollNext(); + } + }, [scrollPrev, scrollNext]); + React.useEffect(function () { + if (!api || !setApi) + return; + setApi(api); + }, [api, setApi]); + React.useEffect(function () { + if (!api) + return; + onSelect(api); + api.on("reInit", onSelect); + api.on("select", onSelect); + return function () { + api === null || api === void 0 ? void 0 : api.off("select", onSelect); + }; + }, [api, onSelect]); + return ((0, jsx_runtime_1.jsx)(CarouselContext.Provider, { value: { + carouselRef: carouselRef, + api: api, + opts: opts, + orientation: orientation || ((opts === null || opts === void 0 ? void 0 : opts.axis) === "y" ? "vertical" : "horizontal"), + scrollPrev: scrollPrev, + scrollNext: scrollNext, + canScrollPrev: canScrollPrev, + canScrollNext: canScrollNext, + }, children: (0, jsx_runtime_1.jsx)("div", __assign({ onKeyDownCapture: handleKeyDown, className: (0, utils_1.cn)("relative", className), role: "region", "aria-roledescription": "carousel", "data-slot": "carousel" }, props, { children: children })) })); +} +function CarouselContent(_a) { + var className = _a.className, props = __rest(_a, ["className"]); + var _b = useCarousel(), carouselRef = _b.carouselRef, orientation = _b.orientation; + return ((0, jsx_runtime_1.jsx)("div", { ref: carouselRef, className: "overflow-hidden", "data-slot": "carousel-content", children: (0, jsx_runtime_1.jsx)("div", __assign({ className: (0, utils_1.cn)("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className) }, props)) })); +} +function CarouselItem(_a) { + var className = _a.className, props = __rest(_a, ["className"]); + var orientation = useCarousel().orientation; + return ((0, jsx_runtime_1.jsx)("div", __assign({ role: "group", "aria-roledescription": "slide", "data-slot": "carousel-item", className: (0, utils_1.cn)("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "pl-4" : "pt-4", className) }, props))); +} +function CarouselPrevious(_a) { + var className = _a.className, _b = _a.variant, variant = _b === void 0 ? "outline" : _b, _c = _a.size, size = _c === void 0 ? "icon" : _c, props = __rest(_a, ["className", "variant", "size"]); + var _d = useCarousel(), orientation = _d.orientation, scrollPrev = _d.scrollPrev, canScrollPrev = _d.canScrollPrev; + return ((0, jsx_runtime_1.jsxs)(button_1.Button, __assign({ "data-slot": "carousel-previous", variant: variant, size: size, className: (0, utils_1.cn)("absolute size-8 rounded-full", orientation === "horizontal" + ? "top-1/2 -left-12 -translate-y-1/2" + : "-top-12 left-1/2 -translate-x-1/2 rotate-90", className), disabled: !canScrollPrev, onClick: scrollPrev }, props, { children: [(0, jsx_runtime_1.jsx)(lucide_react_1.ArrowLeft, {}), (0, jsx_runtime_1.jsx)("span", { className: "sr-only", children: "Previous slide" })] }))); +} +function CarouselNext(_a) { + var className = _a.className, _b = _a.variant, variant = _b === void 0 ? "outline" : _b, _c = _a.size, size = _c === void 0 ? "icon" : _c, props = __rest(_a, ["className", "variant", "size"]); + var _d = useCarousel(), orientation = _d.orientation, scrollNext = _d.scrollNext, canScrollNext = _d.canScrollNext; + return ((0, jsx_runtime_1.jsxs)(button_1.Button, __assign({ "data-slot": "carousel-next", variant: variant, size: size, className: (0, utils_1.cn)("absolute size-8 rounded-full", orientation === "horizontal" + ? "top-1/2 -right-12 -translate-y-1/2" + : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", className), disabled: !canScrollNext, onClick: scrollNext }, props, { children: [(0, jsx_runtime_1.jsx)(lucide_react_1.ArrowRight, {}), (0, jsx_runtime_1.jsx)("span", { className: "sr-only", children: "Next slide" })] }))); +} diff --git a/src/components/ui/collapsible.js b/src/components/ui/collapsible.js new file mode 100644 index 00000000..bc333652 --- /dev/null +++ b/src/components/ui/collapsible.js @@ -0,0 +1,75 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Collapsible = Collapsible; +exports.CollapsibleTrigger = CollapsibleTrigger; +exports.CollapsibleContent = CollapsibleContent; +var jsx_runtime_1 = require("react/jsx-runtime"); +var CollapsiblePrimitive = __importStar(require("@radix-ui/react-collapsible")); +var React = __importStar(require("react")); +function Collapsible(_a) { + var props = __rest(_a, []); + return (0, jsx_runtime_1.jsx)(CollapsiblePrimitive.Root, __assign({ "data-slot": "collapsible" }, props)); +} +function CollapsibleTrigger(_a) { + var props = __rest(_a, []); + return ((0, jsx_runtime_1.jsx)(CollapsiblePrimitive.CollapsibleTrigger, __assign({ "data-slot": "collapsible-trigger" }, props))); +} +function CollapsibleContent(_a) { + var props = __rest(_a, []); + return ((0, jsx_runtime_1.jsx)(CollapsiblePrimitive.CollapsibleContent, __assign({ "data-slot": "collapsible-content" }, props))); +} diff --git a/src/components/ui/input.js b/src/components/ui/input.js new file mode 100644 index 00000000..62963316 --- /dev/null +++ b/src/components/ui/input.js @@ -0,0 +1,65 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Input = Input; +var jsx_runtime_1 = require("react/jsx-runtime"); +var React = __importStar(require("react")); +var utils_1 = require("../../../src/lib/utils"); +function Input(_a) { + var className = _a.className, type = _a.type, props = __rest(_a, ["className", "type"]); + return ((0, jsx_runtime_1.jsx)("input", __assign({ type: type, "data-slot": "input", className: (0, utils_1.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", className) }, props))); +} diff --git a/src/constants/navbarConfig.js b/src/constants/navbarConfig.js new file mode 100644 index 00000000..6b6e8129 --- /dev/null +++ b/src/constants/navbarConfig.js @@ -0,0 +1,23 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.NAVBAR_ICONS = exports.NAVBAR_CONFIG = void 0; +var lucide_react_1 = require("lucide-react"); +exports.NAVBAR_CONFIG = { + Docs: lucide_react_1.Book, + Showcase: lucide_react_1.Eye, + Dashboard: lucide_react_1.LayoutDashboard, + Donate: lucide_react_1.DollarSign, + Devfolio: lucide_react_1.User, + Blogs: lucide_react_1.Newspaper, + More: lucide_react_1.MoreHorizontal, + GitHub: lucide_react_1.Github, + Badges: lucide_react_1.BadgeCheck, + Ebooks: lucide_react_1.FileText, + Roadmap: lucide_react_1.Map, + Community: lucide_react_1.Users, + Broadcast: lucide_react_1.Tv, + Podcast: lucide_react_1.Mic, + Technical: lucide_react_1.Puzzle, + Behavioral: lucide_react_1.Lightbulb +}; +exports.NAVBAR_ICONS = Object.keys(exports.NAVBAR_CONFIG); diff --git a/src/data/roadmaps/html.js b/src/data/roadmaps/html.js new file mode 100644 index 00000000..80c38c40 --- /dev/null +++ b/src/data/roadmaps/html.js @@ -0,0 +1,77 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.htmlRoadmapData = void 0; +exports.htmlRoadmapData = [ + { + title: "HTML Basics", + items: [ + { text: "Introduction to HTML", link: "/docs/html/intro-html/", status: "todo" }, + { text: "HTML Documents Structure", link: "#", status: "todo" }, + { text: "Basic HTML Tags", link: "#", status: "todo" }, + { text: "Attributes in HTML", link: "#", status: "todo" }, + { + text: "HTML Paragraphs and Text Formatting", + link: "#", + status: "todo", + }, + { text: "Links and Images in HTML", link: "#", status: "todo" }, + { text: "HTML Lists", link: "#", status: "todo" }, + ], + }, + { + title: "HTML Forms", + items: [ + { text: "Introduction to HTML Forms", link: "#", status: "todo" }, + { text: "Form Elements and Attributes", link: "#", status: "todo" }, + { text: "Input Types in HTML", link: "#", status: "todo" }, + { text: "Form Action and Method", link: "#", status: "todo" }, + { text: "HTML Form Validation", link: "#", status: "todo" }, + ], + }, + { + title: "HTML5 Elements", + items: [ + { text: "HTML5 Semantic Elements", link: "#", status: "todo" }, + { text: "HTML5 Media Elements", link: "#", status: "todo" }, + { text: "HTML5 Graphics Elements", link: "#", status: "todo" }, + { text: "HTML5 Form Types", link: "#", status: "todo" }, + { text: "HTML5 New Attributes", link: "#", status: "todo" }, + { text: "Web Storage in HTML5", link: "#", status: "todo" }, + ], + }, + { + title: "HTML Tables", + items: [ + { text: "Basic HTML Table Structure", link: "#", status: "todo" }, + { text: "HTML Table Attributes", link: "#", status: "todo" }, + { text: "Row and Colspan in HTML", link: "#", status: "todo" }, + { text: "Table Caption and Summary", link: "#", status: "todo" }, + { text: "Complex Tables in HTML", link: "#", status: "todo" }, + ], + }, + { + title: "HTML and SEO", + items: [ + { text: "Basic SEO Concepts", link: "#", status: "todo" }, + { text: "HTML Tags and SEO", link: "#", status: "todo" }, + { text: "SEO and HTML Meta Tags", link: "#", status: "todo" }, + { text: "SEO and HTML Sitemap", link: "#", status: "todo" }, + { text: "SEO and HTML Robots", link: "#", status: "todo" }, + ], + }, + { + title: "Responsive Web Design", + items: [ + { + text: "Understanding Responsive Web Design", + link: "#", + status: "todo", + }, + { text: "Media Queries in CSS", link: "#", status: "todo" }, + { text: "Responsive Images", link: "#", status: "todo" }, + { text: "CSS Flexbox", link: "#", status: "todo" }, + { text: "CSS Grid", link: "#", status: "todo" }, + { text: "CSS Frameworks", link: "#", status: "todo" }, + ], + }, +]; diff --git a/src/data/roadmaps/index.js b/src/data/roadmaps/index.js new file mode 100644 index 00000000..7dd1b62d --- /dev/null +++ b/src/data/roadmaps/index.js @@ -0,0 +1,46 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.roadmaps = void 0; +exports.roadmaps = [ + { + id: "html", + title: "HTML Basics", + description: "Learn the basics of HTML", + lessons: [ + { + id: "html_intro", + title: "Introduction to HTML", + duration: "1 hour", + link: "https://www.w3schools.com/html/", + }, + { + id: "html_elements", + title: "HTML Elements", + duration: "2 hours", + link: "https://www.w3schools.com/html/html_elements.asp", + }, + // Add more lessons as needed + ], + }, + { + id: "css", + title: "CSS Styling", + description: "Learn CSS for styling web pages", + lessons: [ + { + id: "css_intro", + title: "Introduction to CSS", + duration: "1.5 hours", + link: "https://www.w3schools.com/css/", + }, + { + id: "css_selectors", + title: "CSS Selectors", + duration: "2.5 hours", + link: "https://www.w3schools.com/css/css_selectors.asp", + }, + // Add more lessons as needed + ], + }, + // Add more courses (React, Node.js, etc.) +]; diff --git a/src/data/roadmaps/javascript/index.js b/src/data/roadmaps/javascript/index.js new file mode 100644 index 00000000..5501a31f --- /dev/null +++ b/src/data/roadmaps/javascript/index.js @@ -0,0 +1,180 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var roadmapJavaScript = [ + { + title: "Beginner Topics", + description: "Start with these!", + topics: [ + { + title: "Introduction to JavaScript", + description: "Learn the basics of JavaScript", + }, + { + title: "Variables", + description: "Learn how to declare variables", + }, + { + title: "Data Types", + description: "Learn about the different data types in JavaScript", + }, + { + title: "Operators", + description: "Learn about the different operators in JavaScript", + }, + { + title: "Control Structures", + description: "Learn about control structures in JavaScript", + }, + { + title: "Functions", + description: "Learn about functions in JavaScript", + }, + { + title: "Arrays", + description: "Learn about arrays in JavaScript", + }, + { + title: "Objects", + description: "Learn about objects in JavaScript", + }, + { + title: "Classes", + description: "Learn about classes in JavaScript", + }, + { + title: "DOM Manipulation", + description: "Learn about manipulating the DOM in JavaScript", + }, + { + title: "Events", + description: "Learn about events in JavaScript", + }, + { + title: "AJAX", + description: "Learn about AJAX in JavaScript", + }, + { + title: "ES6 Features", + description: "Learn about the new features in ES6", + }, + ], + }, + { + title: "Intermediate Topics", + description: "Pick these after beginner topics", + topics: [ + { + title: "Promises", + description: "Learn about promises in JavaScript", + }, + { + title: "Async/Await", + description: "Learn about async/await in JavaScript", + }, + { + title: "Modules", + description: "Learn about modules in JavaScript", + }, + { + title: "Error Handling", + description: "Learn about error handling in JavaScript", + }, + { + title: "Regular Expressions", + description: "Learn about regular expressions in JavaScript", + }, + { + title: "Closures", + description: "Learn about closures in JavaScript", + }, + { + title: "Scope", + description: "Learn about scope in JavaScript", + }, + { + title: "This Keyword", + description: "Learn about the this keyword in JavaScript", + }, + { + title: "Prototype", + description: "Learn about prototype in JavaScript", + }, + { + title: "Functional Programming", + description: "Learn about functional programming in JavaScript", + }, + { + title: "Testing", + description: "Learn about testing in JavaScript", + }, + { + title: "Debugging", + description: "Learn about debugging in JavaScript", + }, + { + title: "Performance", + description: "Learn about performance in JavaScript", + }, + ], + }, + { + title: "Advanced Topics", + description: "Pick these after intermediate topics", + topics: [ + { + title: "Web Components", + description: "Learn about web components in JavaScript", + }, + { + title: "Web Workers", + description: "Learn about web workers in JavaScript", + }, + { + title: "Service Workers", + description: "Learn about service workers in JavaScript", + }, + { + title: "Web Assembly", + description: "Learn about web assembly in JavaScript", + }, + { + title: "Web Sockets", + description: "Learn about web sockets in JavaScript", + }, + { + title: "WebRTC", + description: "Learn about webRTC in JavaScript", + }, + { + title: "Node.js", + description: "Learn about Node.js", + }, + { + title: "Express.js", + description: "Learn about Express.js", + }, + { + title: "GraphQL", + description: "Learn about GraphQL", + }, + { + title: "React", + description: "Learn about React", + }, + { + title: "Vue", + description: "Learn about Vue", + }, + { + title: "Angular", + description: "Learn about Angular", + }, + { + title: "TypeScript", + description: "Learn about TypeScript", + }, + ], + }, + // Add more items as needed +]; +exports.default = roadmapJavaScript; diff --git a/src/data/userData.js b/src/data/userData.js new file mode 100644 index 00000000..54dc5054 --- /dev/null +++ b/src/data/userData.js @@ -0,0 +1,50 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Users = void 0; +exports.Users = [ + // ML Repository + { + title: "ML Repository", + description: "Curated collection of machine learning projects, tutorials, and resources for enthusiasts and developers.", + preview: require("./showcase/machine-learning-project.png"), + website: "https://machine-learning-repos.vercel.app/", + source: "https://github.com/recodehive/machine-learning-repos", + tags: ["opensource", "ml", "favorite", "react"], + }, + // Opesource project + { + title: "Opesource Practice", + description: "A beginner-friendly repository designed for newcomers to learn , collaborate and practice open-source contributions.", + preview: require("./showcase/opesource-project.png"), + website: "https://github.com/recodehive/Opensource-practice", + source: "https://github.com/recodehive/Opensource-practice", + tags: ["opensource", "clone", "templates"], + }, + // Scrape ML + { + title: "Scrape ML", + description: "Scrape ML is a Streamlit app that allows users to scrape and analyze data from various websites, providing insights and visualizations for machine learning enthusiasts.", + preview: require("./showcase/Scrape-ml-project.png"), + website: "https://scrape-ml.streamlit.app/", + source: "https://github.com/recodehive/Scrape-ML", + tags: ["opensource", "templates", "clone"], + }, + // StackOverflow Analysis + { + title: "StackOverflow Analysis", + description: "StackOverflow Analysis is a comprehensive data analysis project that explores the vast repository of questions and answers on StackOverflow. ", + preview: require("./showcase/Stackoverflow-analysis.png"), + website: "https://github.com/recodehive/Stackoverflow-Analysis", + source: null, + tags: ["opensource", "product", "nextjs", "javascript"], + }, + // Awesome GitHub Profiles" + { + title: "GitHub Profiles", + description: "Curated list of awesome GitHub profiles showcasing creativity, design, and coding skills.", + preview: require("./showcase/awesome-project.png"), + website: "https://dev.recodehive.com/devfolio", + source: "https://github.com/recodehive/awesome-github-profiles", + tags: ["opensource", "nextjs", "typescript", "ai", "favorite"], + }, +]; diff --git a/src/data/users.js b/src/data/users.js new file mode 100644 index 00000000..bf805add --- /dev/null +++ b/src/data/users.js @@ -0,0 +1,175 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.sortedUsers = exports.TagList = exports.Tags = void 0; +var jsUtils_1 = require("../utils/jsUtils"); +var userData_1 = require("./userData"); +exports.Tags = { + html: { + label: "HTML", + description: "", + color: "#f06529", + }, + css: { + label: "CSS", + description: "", + color: "#2965f1", + }, + javascript: { + label: "JavaScript", + description: "", + color: "#f0db4f", + }, + vanilla: { + label: "Vanilla", + description: "", + color: "#f0db4f", + }, + react: { + label: "React.js", + description: "", + color: "#61dafb", + }, + nextjs: { + label: "Next.js", + description: "", + color: "#000000", + }, + typescript: { + label: "TypeScript", + description: "", + color: "#007acc", + }, + nodejs: { + label: "Node.js", + description: "", + color: "#026e00", + }, + mongodb: { + label: "MongoDB", + description: "", + color: "#13aa52", + }, + favorite: { + label: "Favorite", + description: "", + color: "#f06529", + }, + opensource: { + label: "Open-Source", + description: "", + color: "#39ca30", + }, + product: { + label: "Product", + description: "", + color: "#dfd545", + }, + design: { + label: "Design", + description: "", + color: "#a44fb7", + }, + i18n: { + label: "I18n", + description: "", + color: "#127f82", + }, + versioning: { + label: "Versioning", + description: "", + color: "#fe6829", + }, + large: { + label: "Large", + description: "", + color: "#8c2f00", + }, + motion: { + label: "Motion", + description: "", + color: "#f06529", + }, + redux: { + label: "Redux", + description: "", + color: "#764abc", + }, + meta: { + label: "Meta", + description: "", + color: "#4267b2", + }, + php: { + label: "PHP", + description: "", + color: "#8892be", + }, + personal: { + label: "Personal", + description: "", + color: "#14cfc3", + }, + templates: { + label: "Templates", + description: "", + color: "#ffcfc3", + }, + portfolio: { + label: "portfolio", + description: "", + color: "#ff4400", + }, + clone: { + label: "Clone", + description: "", + color: "#004400", + }, + ai: { + label: "AI", + description: "", + color: "#007acc", + }, + documentation: { + label: "Documentation", + description: "", + color: "#007acc", + }, + game: { + label: "Game", + description: "", + color: "#555555", + }, + ml: { + label: "ML", + description: "", + color: "#007acc", + }, + gym: { + label: "Gym", + description: "", + color: "#FF5733", + }, + mdx: { + label: "MDX", + description: "", + color: "#007acc", + }, + tailwind: { + label: "Tailwind", + description: "", + color: "#007acc", + }, + scss: { + label: "SCSS", + description: "", + color: "#007acc", + }, +}; +exports.TagList = Object.keys(exports.Tags); +function sortUsers() { + var result = userData_1.Users; + result = (0, jsUtils_1.sortBy)(result, function (user) { return user.title.toLowerCase(); }); + result = (0, jsUtils_1.sortBy)(result, function (user) { return !user.tags.includes("favorite"); }); + return result; +} +exports.sortedUsers = sortUsers(); diff --git a/src/database/blogs/index.js b/src/database/blogs/index.js new file mode 100644 index 00000000..b4df685e --- /dev/null +++ b/src/database/blogs/index.js @@ -0,0 +1,69 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var blogs = [ + { + id: 1, + title: "Streamline Your UX Design", + image: "/img/blogs/05-ux-streamline.png", + description: "User experience design can be overwhelming because of the number of factors that influence what a product should look like and how it should function.", + slug: "streamline-ux-ui", + authors: ["dharshibalasubramaniyam", "sanjay-kv"], + }, + { + id: 2, + title: "Land a Job in UI/UX Design", + image: "/img/blogs/04-ux-job-design.png", + description: " Are you passionate about design and dreaming of a career in it? Or maybe you are already in the design space and looking to pivot into UI/UX? ", + slug: "ux-ui-design-job", + authors: ["dharshibalasubramaniyam", "sanjay-kv"], + }, + { + id: 3, + title: "UX Designers Future with AI", + image: "/img/blogs/03-ui-ux.png", + description: "The impact of technology on UX design is undeniable. Automation and artificial intelligence are making it easier to identify user needs and create tailored experiences.", + slug: "ux-designers-ai", + authors: ["dharshibalasubramaniyam", "sanjay-kv"], + }, + { + id: 4, + title: "What is Google DeepMind?", + image: "/img/blogs/02-deepmind.png", + description: "DeepMind is an auxiliary of Google that centers around man-made brainpower. It utilizes a part of AI called AI", + slug: "google-deepmind", + authors: ["dharshibalasubramaniyam", "sanjay-kv"], + }, + { + id: 5, + title: "What are backlinks for SEO", + image: "/img/blogs/01-seo-image.png", + description: "An SEO backlink is created when one website links to another, and they're extremely important for SEO. ", + slug: "google-backlinks", + authors: ["sanjay-kv"], + }, + { + id: 6, + title: "What is GitHub Copilot", + image: "/img/blogs/06-github-agent.png", + description: "The GitHub Copilot Coding Agent is an asynchronous software engineering agent that assists developers by suggesting code snippets", + slug: "git-coding-agent", + authors: ["sanjay-kv"], + }, + { + id: 7, + title: "Apache Spark Architecture Explained", + image: "img/blogs/07-spark-blog-banner.png", + description: "Apache Spark is a fast, open-source big data framework that leverages in-memory computing for high performance. Its architecture powers scalable distributed processing across clusters, making it essential for analytics and machine learning.", + slug: "spark-architecture", + authors: ["Aditya-Singh-Rathore", "sanjay-kv"], + }, + { + id: 8, + title: "N8N: The Future of Workflow Automation", + image: "/img/blogs/n8n-logo.png", + description: "N8N is an open-source workflow automation tool that enables users to connect various apps and services to automate tasks without extensive coding knowledge.", + slug: "n8n-workflow-automation", + authors: ["Aditya-Singh-Rathore",], + } +]; +exports.default = blogs; diff --git a/src/database/ebooks/index.js b/src/database/ebooks/index.js new file mode 100644 index 00000000..09851861 --- /dev/null +++ b/src/database/ebooks/index.js @@ -0,0 +1,33 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var books = [ + { + id: 1, + title: 'Programming in C', + image: 'https://cdn.geekboots.com/geek/c-language-popularity-meta-1656157189121.jpg', + description: 'C is a general-purpose, procedural computer programming language supporting structured programming, lexical variable scope, and recursion, with a static type system. By design, C provides constructs that map efficiently to typical machine instructions.', + link: 'https://drive.google.com/file/d/1B36OGR_QVEFnJvcH3NiBa0tcBaa2po6W/view?usp=drive_link', + }, + { + id: 2, + title: 'Programming in C++', + image: 'https://media.geeksforgeeks.org/wp-content/cdn-uploads/20230703144619/CPP-Language.png', + description: 'C++ is a general-purpose programming language created by Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significantly over time, and modern C++ now has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.', + link: 'https://drive.google.com/file/d/1asF5MoWe2o5eDAG3o_OeA_f5vf9AKKy9/view?usp=drive_link', + }, + { + id: 3, + title: 'Programming in Java', + image: 'https://1.bp.blogspot.com/-bIgZGyzK51I/XyzniiD0JYI/AAAAAAAH7W0/dFGu48SV2I4Yg9--YNhAZ4Z6RiNbcWbuwCLcBGAsYHQ/s1600/java.jpg', + description: 'Java is a class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible. It is a general-purpose programming language intended to let application developers write once, run anywhere (WORA), meaning that compiled Java code can run on all platforms that support Java without the need for recompilation.', + link: 'https://drive.google.com/file/d/1Yzw0HDlQ4dECk04hb-1P81xR5dwEBM_k/view?usp=drive_link', + }, + { + id: 4, + title: 'Programming in Python', + image: 'https://1.bp.blogspot.com/-WFlTDRQ5nZI/XqMED_-aV8I/AAAAAAAB1NM/X4mEmbLbylYotlO25v8f6v4RM2zQobmVgCLcBGAsYHQ/s1600/image2%2B-%2B2020-04-24T172119.147.jpg', + description: 'Python is an interpreted high-level general-purpose programming language. Python\'s design philosophy emphasizes code readability with its notable use of significant indentation. Its language constructs and object-oriented approach aim to help programmers write clear, logical code for small and large-scale projects.', + link: 'https://drive.google.com/file/d/1NTzQFX47JqjQtFUMMscL264wqpUwIwGT/view?usp=drive_link', + }, +]; +exports.default = books; diff --git a/src/database/projects/projects.js b/src/database/projects/projects.js new file mode 100644 index 00000000..ae1d96cb --- /dev/null +++ b/src/database/projects/projects.js @@ -0,0 +1,30 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var projectsData = { + tag: "Our Projects", + title: "Explore Our Latest Projects and Innovations", + description: "Discover our diverse projects showcasing all the begineer friendly opensource contributions, innovative applications. Each project represents our commitment to excellence and continuous learning.", + items: [ + { + title: "Awesome GitHub Profile", + image: "/img/blogs/awesome-project.png" + }, + { + title: "Machine Learning Repository", + image: "/img/blogs/machine-learning-project.png" + }, + { + title: "Stack overflow Analysis", + image: "/img/blogs/Stackoverflow-analysis.png" + }, + { + title: "Scrape ML Project", + image: "/img/blogs/Scrape-ml-project.png" + }, + { + title: "Opensource Project", + image: "/img/blogs/opesource-project.png" + }, + ] +}; +exports.default = projectsData; diff --git a/src/database/sponsors/index.js b/src/database/sponsors/index.js new file mode 100644 index 00000000..ca6bd1a3 --- /dev/null +++ b/src/database/sponsors/index.js @@ -0,0 +1,529 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var sponsors = [ + { + name: "DevXavier", + image: "https://avatars.githubusercontent.com/u/192259212?v=4", + description: "Student ", + github: "https://github.com/DevXavierNieto", + }, + { + name: "Austin Jian", + image: "https://avatars.githubusercontent.com/u/135089334?v=4", + description: "Student ", + github: "https://github.com/austinjiann", + }, + { + name: "Ayokanmi Adejola", + image: "https://avatars.githubusercontent.com/u/191106326?v=4", + description: "Developer at Softlyft", + github: "https://github.com/Ayokanmi-Adejola", + linkedin: "https://www.linkedin.com/in/ayokanmiadejola/", + twitter: "https://x.com/AyoAdejola100", + }, + { + name: "Matheus Farias", + image: "http://avatars.githubusercontent.com/u/22086460?v=4", + description: "Student", + github: "https://github.com/MatheusFarias8", + }, + { + name: "superdevp", + image: "https://avatars.githubusercontent.com/u/202645405?v=4", + description: "Web Developer", + github: "https://github.com/superdevp", + }, + { + name: "MeeTy HA", + image: "https://avatars.githubusercontent.com/u/196355500?v=4", + description: "Student ", + github: "https://github.com/MeeTyHA", + }, + { + name: "milos matovicup", + image: "https://avatars.githubusercontent.com/u/184030535?v=4", + description: "Student", + github: "https://github.com/milosmatovicup", + }, + { + name: "Tirth Patel", + image: "https://avatars.githubusercontent.com/u/111308497?v=4", + description: "Student", + github: "https://github.com/TirthWillLearn", + linkedin: "https://www.linkedin.com/in/tirth-k-patel/", + twitter: "https://x.com/codewithtirth", + }, + { + name: "Takashi Arai", + image: "https://avatars.githubusercontent.com/u/42265874?v=4", + description: "Student Ryukyu Uni, Japan", + github: "https://github.com/arataka1313", + linkedin: "https://www.linkedin.com/in/takashi-arai-2b697b360/", + twitter: "https://x.com/jjackofall", + isPastSponsor: true, + }, + { + name: "Sumit Khanna", + image: "https://avatars.githubusercontent.com/u/29749122?v=4", + description: "Developer at slickspender", + github: "https://github.com/jjackofall", + twitter: "https://x.com/jjackofall", + isPastSponsor: true, + }, + { + name: "Prakhar Saxena", + image: "https://avatars.githubusercontent.com/u/111764688?v=4", + description: "Studying @McMaster University", + github: "https://www.linkedin.com/in/prakharsaxena5/", + linkedin: "https://www.linkedin.com/in/prakharsaxena5/", + isPastSponsor: true, + }, + { + name: "Varghese Baby", + image: "https://avatars.githubusercontent.com/u/68038057?v=4", + description: "Software Developer", + github: "https://github.com/varghese25", + linkedin: "https://www.linkedin.com/in/varghese-baby-138429175/", + isPastSponsor: true, + }, + { + name: "Carlos Romero", + image: "https://avatars.githubusercontent.com/u/119690391?v=4", + description: "CS Student of La Salle", + github: "https://github.com/carlosromerorodriguez", + linkedin: "https://www.linkedin.com/in/carlos-romero-rdgz/", + isPastSponsor: true, + }, + { + name: "Yahya Banouk", + image: "https://avatars.githubusercontent.com/u/83559441?v=4", + description: "Full-Stack Engineer at Expersi", + github: "https://github.com/yahya-banouk", + linkedin: "https://x.com/Yahya_Banouk", + twitter: "https://x.com/Yahya_Banouk", + isPastSponsor: true, + }, + { + name: "Mike ", + image: "https://avatars.githubusercontent.com/u/79911993?v=4", + description: "AI Consultant", + github: "#", + linkedin: "#", + isPastSponsor: true, + }, + { + name: "Alex Choi", + image: "https://avatars.githubusercontent.com/u/64334999?v=4", + description: "Legacy sponsor", + github: "https://github.com/alexechoi", + linkedin: "https://www.linkedin.com/in/alexchoi1/", + twitter: "https://x.com/alexchhk", + isPastSponsor: true, + }, + { + name: "Renato Maynard", + image: "https://avatars.githubusercontent.com/u/79546214?v=4", + description: "M.Sc. in Operations Research", + github: "https://www.linkedin.com/in/renatomaynardetche/", + linkedin: "#", + twitter: "#", + isPastSponsor: true, + }, + { + name: "Tram Khoi Nguyen", + image: "https://avatars.githubusercontent.com/u/112838098?v=4", + description: "Student at Tra Vinh, Vietnam", + github: "https://github.com/khoinguyennni", + linkedin: "#", + twitter: "#", + isPastSponsor: true, + }, + { + name: "Bobby Azad", + image: "https://avatars.githubusercontent.com/u/48394338?v=4", + description: "BI Developer at Agtegra", + github: "https://github.com/gbazad93", + linkedin: "https://www.linkedin.com/in/bobby-azad-b2035b65/", + twitter: "#", + isPastSponsor: true, + }, + { + name: "Sudarshan Giri", + image: "https://avatars.githubusercontent.com/u/41857483?v=4", + description: "Drupal Developer at Webfirst", + github: "hhttps://github.com/SudarshanGiri", + linkedin: "https://www.linkedin.com/in/sudarshangiri/", + twitter: "https://x.com/sudarshanhang", + isPastSponsor: true, + }, + { + name: "Aryan Jaiswal", + image: "https://pbs.twimg.com/profile_images/1921606118683426816/M1mU3vm8_400x400.jpg", + description: "Founder @MLSA", + github: "https://github.com/Aryanjstar", + linkedin: "https://www.linkedin.com/in/aryanjstar/", + twitter: "https://x.com/Aryanjstar", + isPastSponsor: true, + }, + { + name: "Kashif Khan", + image: "https://avatars.githubusercontent.com/u/88695658?v=4", + description: "Quality Assurance Engineer", + github: "https://github.com/KashifKhaan", + linkedin: "https://www.linkedin.com/in/mr-kashif-442146214/", + twitter: "https://x.com/KaxhifKhan", + isPastSponsor: true, + }, + { + name: "Judar", + image: "https://pbs.twimg.com/profile_images/1625875289795604480/Vghp-Ym6_400x400.jpg", + description: "Founder @MLSA", + github: "https://github.com/trongphuhappy", + linkedin: "#", + twitter: "https://x.com/Judar_Clitus", + isPastSponsor: true, + }, + { + name: "Kriti Raj", + image: "https://avatars.githubusercontent.com/u/62815511?v=4", + description: "Student at IIIT , India", + github: "https://github.com/kriti-raj", + linkedin: "https://www.linkedin.com/in/kritirajtech/", + twitter: "https://x.com/kriti___raj", + isPastSponsor: true, + }, + { + name: "Alex Cerezo", + image: "https://avatars.githubusercontent.com/u/92682715?v=4", + description: "Software Engineer at Outlier", + github: "https://github.com/alexcerezo", + linkedin: "https://www.linkedin.com/in/alexcerezocontreras/", + twitter: "https://x.com/alexcerezx", + isPastSponsor: true, + }, + { + name: "Monojit Pal", + image: "https://avatars.githubusercontent.com/u/144504389?v=4", + description: "Student at St. Thomas' College", + github: "https://github.com/Monojit-Pal", + linkedin: "https://www.linkedin.com/in/pal-monojit/", + twitter: "https://x.com/Monojit__18", + isPastSponsor: true, + }, + { + name: "Chiluka Akshitha", + image: "https://avatars.githubusercontent.com/u/120377576?v=4", + description: "Student at IIT Madras", + github: "https://github.com/AKSHITHA-CHILUKA", + linkedin: "https://www.linkedin.com/in/akshitha-chiluka-b19245259", + twitter: "https://x.com/AkshithaChiluka?t=5ztRGbV2DDB6Wf5tlCyHrw&s=09", + isPastSponsor: true, + }, + { + name: "Medha", + image: "https://avatars.githubusercontent.com/u/90996890?v=4", + description: "Student: NextJs Developer", + github: "https://github.com/medss19", + linkedin: "https://www.linkedin.com/in/medha-agarwal-01b33725a/", + isWeSponsor: true, + }, + { + name: "Aadil Latif", + image: "https://avatars.githubusercontent.com/u/145087959?v=4", + description: "Founder TechXNinjas", + github: "https://github.com/iaadillatif", + linkedin: "https://www.linkedin.com/in/iaadillatif/", + isWeSponsor: true, + }, + { + name: "Richa jaishwal", + image: "https://avatars.githubusercontent.com/u/156594333?v=4", + description: "MERN Developer", + github: "https://github.com/Richajaishwal0", + linkedin: "https://www.linkedin.com/in/richa-jaishwal/", + isWeSponsor: true, + }, + { + name: "Sonal Yadav", + image: "https://avatars.githubusercontent.com/u/169170929?v=4", + description: "Web & App Developer", + github: "https://github.com/sonalyadav1", + linkedin: "https://www.linkedin.com/in/sonal-yadav-193471238/", + twitter: "https://x.com/SonalYa944317", + isWeSponsor: true, + }, + { + name: "Ayokanmi Adejola", + image: "https://avatars.githubusercontent.com/u/191106326?v=4", + description: "Final Year Student", + github: "https://github.com/Ayokanmi-Adejola", + linkedin: "hhttps://www.linkedin.com/in/ayokanmiadejola/", + twitter: "https://x.com/AyoAdejola100", + isWeSponsor: true, + }, + { + name: "Nishant Rana", + image: "https://avatars.githubusercontent.com/u/126577697?v=4", + description: "Final Year Student", + github: "https://github.com/NishantRana07", + linkedin: "https://www.linkedin.com/in/nishantrana07/", + twitter: "https://x.com/TechwNishant", + isWeSponsor: true, + }, + { + name: "Ankit Modanwal", + image: "https://avatars.githubusercontent.com/u/166202965?v=4", + description: "Next.js & ML Developer ", + github: "https://github.com/ankitmodanwall", + linkedin: "https://www.linkedin.com/in/ankit-modanwal/", + twitter: "https://x.com/ankitt_ml", + isWeSponsor: true, + }, + { + name: "Irfan", + image: "https://avatars.githubusercontent.com/u/138690953?v=4", + description: "Final Year Student", + github: "https://github.com/iitzIrFan", + linkedin: "https://www.linkedin.com/in/irfan-shaikh-8b5b94259/", + twitter: "https://x.com/iitzIrfan", + isWeSponsor: true, + }, + { + name: "Renato Maynard", + image: "https://avatars.githubusercontent.com/u/79546214?v=4", + description: "M.Sc. in Operations Research", + github: "https://www.linkedin.com/in/renatomaynardetche/", + twitter: "https://x.com/codewithdhruba", + isWeSponsor: true, + }, + { + name: "Dhrubaraj Pati", + image: "https://avatars.githubusercontent.com/u/146111647?v=4", + description: "Student at SVU", + github: "https://github.com/codewithdhruba01", + linkedin: "#", + twitter: "#", + isWeSponsor: true, + }, + { + name: "Carlos Romero", + image: "https://avatars.githubusercontent.com/u/119690391?v=4", + description: "CS Student of La Salle", + github: "https://github.com/carlosromerorodriguez", + linkedin: "https://www.linkedin.com/in/carlos-romero-rdgz/", + isWeSponsor: true, + }, + { + name: "Shivansh Saxena", + image: "https://avatars.githubusercontent.com/u/112249407?v=4", + description: "Intern at Geo Softech", + github: "https://github.com/ShivanshPlays", + linkedin: "https://www.linkedin.com/in/shivansh-saxena-288785168/", + isWeSponsor: true, + }, + { + name: "Mastan Sayyad", + image: "https://avatars.githubusercontent.com/u/101971980?v=4", + description: "Web Deveoper at SWOC", + github: "https://github.com/MastanSayyad", + linkedin: "https://www.linkedin.com/in/mastan-sayyad/", + twitter: "https://x.com/mastansayyad02", + isWeSponsor: true, + }, + { + name: "GSSOC", + image: "https://avatars.githubusercontent.com/u/166525102?s=200&v=4", + description: "Girlscript Organisation", + github: "https://github.com/GSSoC24", + linkedin: "https://www.linkedin.com/company/girlscriptsoc/posts/?feedView=all", + isWeSponsor: true, + }, + { + name: "Anshika Tiwari", + image: "https://avatars.githubusercontent.com/u/143124119?v=4", + description: "Student, ", + github: "https://github.com/anshikatiwari20", + linkedin: "https://www.linkedin.com/in/anshika-tiwari-/", + twitter: "https://x.com/anshikat_20", + isWeSponsor: true, + }, + { + name: "Meet Jain", + image: "https://avatars.githubusercontent.com/u/133582566?v=4", + description: "Student @ IIIT Jabalpur", + github: "https://github.com/Meetjain1", + linkedin: "https://www.linkedin.com/in/meet-jain-413015265/", + twitter: "https://x.com/Meetjain_100", + isWeSponsor: true, + }, + { + name: "Hemant Lohar", + image: "https://avatars.githubusercontent.com/u/131635107?v=4", + description: "Student, India", + github: "https://github.com/Hemantlohar", + linkedin: "#", + isWeSponsor: true, + }, + { + name: "Chiluka Akshitha", + image: "https://avatars.githubusercontent.com/u/120377576?v=4", + description: "Student at IIT Madras", + github: "https://github.com/AKSHITHA-CHILUKA", + linkedin: "https://www.linkedin.com/in/akshitha-chiluka-b19245259", + twitter: "https://x.com/AkshithaChiluka?t=5ztRGbV2DDB6Wf5tlCyHrw&s=09", + isWeSponsor: true, + }, + { + name: "Himangshu Sharma", + image: "https://avatars.githubusercontent.com/u/120270398?v=4", + description: "Opensource developer", + github: "https://github.com/HimangshuSharma01", + linkedin: "https://www.linkedin.com/in/himangshusharma01", + isWeSponsor: true, + }, + { + name: "Siddheya Kulkarni", + image: "https://avatars.githubusercontent.com/u/115717746?v=4", + description: "Student, Opensource developer", + github: "https://github.com/Asymtode712", + linkedin: "https://www.linkedin.com/in/siddheya-kulkarni/", + twitter: "https://x.com/SidKulkarni712", + isWeSponsor: true, + }, + { + name: "Prithwi Hegde", + image: "https://avatars.githubusercontent.com/u/115262737?v=4", + description: "Student at JSSSSU", + github: "https://github.com/Prithwi32", + linkedin: "https://www.linkedin.com/in/prithwi-hegde/", + isWeSponsor: true, + }, + { + name: "Vansh Chaurasiya", + image: "https://avatars.githubusercontent.com/u/114163734?v=4", + description: "Intern at GoComet", + github: "https://github.com/vansh-codes", + linkedin: "https://www.linkedin.com/in/vanshchaurasiya24/", + twitter: "https://x.com/VanshChaurasiy4", + isWeSponsor: true, + }, + { + name: "Hemanth kumar", + image: "https://avatars.githubusercontent.com/u/106808387?v=4", + description: "Tech Lead at GSSOC", + github: "https://github.com/Hemu21", + linkedin: "https://www.linkedin.com/in/hemu21/", + twitter: "https://x.com/Hemu21_", + isWeSponsor: true, + }, + { + name: "Eduardo San Martin", + image: "https://avatars.githubusercontent.com/u/664177?v=4", + description: "Member of the @vuejs", + github: "https://github.com/posva", + twitter: "https://x.com/posva", + isWeSponsor: true, + }, + { + name: "Md Azfar Alam", + image: "https://avatars.githubusercontent.com/u/100375390?v=4", + description: "Devops Engineer", + github: "https://github.com/mdazfar2", + linkedin: "https://www.linkedin.com/in/md-azfar-alam/", + twitter: "https://x.com/azfarxx_", + isWeSponsor: true, + }, + { + name: "Ajay Dhangar", + image: "https://avatars.githubusercontent.com/u/99037494?v=4", + description: "Founder at CodeHarborHub", + github: "https://github.com/ajay-dhangar", + linkedin: "https://www.linkedin.com/in/ajay-dhangar/", + twitter: "https://x.com/CodesWithAjay", + isWeSponsor: true, + }, + { + name: "Sneha kumari", + image: "https://avatars.githubusercontent.com/u/95492939?v=4", + description: "Developer at GHCL", + github: "https://github.com/Snehsk", + linkedin: "https://www.linkedin.com/in/sneha-kumari1/", + isWeSponsor: true, + }, + { + name: "Swarnendu Bhandari", + image: "https://media.licdn.com/dms/image/v2/D5603AQExzsjM2S4ojA/profile-displayphoto-shrink_400_400/profile-displayphoto-shrink_400_400/0/1724809628013?e=1753920000&v=beta&t=PRD0i8nyd-EVblyVMHkJWJrCrLxcmsB5bJWsPOa46x8", + description: "Student at IIT Kharagpur", + github: "https://github.com/Swarnendu0123", + linkedin: "https://www.linkedin.com/in/swarnendu-bhandari/", + isWeSponsor: true, + }, + { + name: "Alex Cerezo", + image: "https://avatars.githubusercontent.com/u/92682715?v=4", + description: "Developer at Outlier", + github: "https://github.com/alexcerezo", + linkedin: "https://www.linkedin.com/in/alexcerezocontreras", + twitter: "https://x.com/alexcerezx", + isWeSponsor: true, + }, + { + name: "Aditya Bhaumik", + image: "https://avatars.githubusercontent.com/u/92214013?v=4", + description: "Student at VIT", + github: "https://github.com/aditya-bhaumik", + linkedin: "https://www.linkedin.com/in/aditya-bhaumik-62b6b2220/", + isWeSponsor: true, + }, + { + name: "Vivek Vardhan", + image: "https://avatars.githubusercontent.com/u/91594529?v=4", + description: "Student at VIT", + github: "https://github.com/vivekvardhan2810", + linkedin: "https://www.linkedin.com/in/vivek-vardhan-23682521b/", + isWeSponsor: true, + }, + { + name: "Dinesh Talwadker", + image: "https://media.licdn.com/dms/image/v2/D4D35AQEPaJ17Vq2zMw/profile-framedphoto-shrink_200_200/B4DZgO2PCnHAAc-/0/1752595755484?e=1753635600&v=beta&t=ltSZKvnsXqQavgb4LISSOevZSIU3uhEi--Nx_FtTSQU", + description: "Co-Founder at Sanity Esports", + github: "https://github.com/dinxsh", + linkedin: "https://www.linkedin.com/in/dineshtalwadker/", + twitter: "https://x.com/dineshcodes", + isWeSponsor: true, + }, + { + name: "Sanya Dureja", + image: "https://avatars.githubusercontent.com/u/84080312?v=4", + description: "SDE at Paypal", + github: "https://github.com/sanyadureja", + linkedin: "https://www.linkedin.com/in/sanya-dureja-13960122a/", + isWeSponsor: true, + }, + { + name: "Razvan Stoenescu", + image: "https://avatars.githubusercontent.com/u/4665641?v=4", + description: "Team lead of Quasar Framework", + github: "https://github.com/rstoenescu", + linkedin: "#", + isWeSponsor: true, + }, + { + name: "Sarah Drasner", + image: "https://avatars.githubusercontent.com/u/2281088?v=4", + description: "Director at Google", + github: "https://github.com/sdras", + linkedin: "#", + twitter: "https://x.com/sarah_edo", + isWeSponsor: true, + }, + { + name: "Homebrew", + image: "https://avatars.githubusercontent.com/u/1503512?s=200&v=4", + description: "package manager for macOS", + github: "https://github.com/Homebrew", + linkedin: "#", + isWeSponsor: true, + }, +]; +exports.default = sponsors; diff --git a/src/lib/firebase.js b/src/lib/firebase.js new file mode 100644 index 00000000..ab0b74fc --- /dev/null +++ b/src/lib/firebase.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.auth = exports.app = void 0; +var app_1 = require("firebase/app"); +var auth_1 = require("firebase/auth"); +var firebaseConfig = { + apiKey: "AIzaSyBSiO9d5tHuyyAeUCt37pxDWTT7jPSigaU", + authDomain: "awesome-github-profiles.firebaseapp.com", + databaseURL: "https://awesome-github-profiles-default-rtdb.firebaseio.com", + projectId: "awesome-github-profiles", + storageBucket: "awesome-github-profiles.firebasestorage.app", + messagingSenderId: "490821849262", + appId: "1:490821849262:web:7e97984d98f578b81f9d3f", + measurementId: "G-WM33JZYEV0" +}; +var app = (0, app_1.getApps)().length ? (0, app_1.getApp)() : (0, app_1.initializeApp)(firebaseConfig); +exports.app = app; +var auth = (0, auth_1.getAuth)(app); +exports.auth = auth; diff --git a/src/lib/statsProvider.js b/src/lib/statsProvider.js new file mode 100644 index 00000000..96fdc4ae --- /dev/null +++ b/src/lib/statsProvider.js @@ -0,0 +1,477 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.convertStatToText = exports.useCommunityStatsContext = exports.CommunityStatsContext = void 0; +exports.CommunityStatsProvider = CommunityStatsProvider; +var jsx_runtime_1 = require("react/jsx-runtime"); +/** @jsxImportSource react */ +var react_1 = __importStar(require("react")); +var githubService_1 = require("../services/githubService"); +var useDocusaurusContext_1 = __importDefault(require("@docusaurus/useDocusaurusContext")); +exports.CommunityStatsContext = (0, react_1.createContext)(undefined); +var GITHUB_ORG = "recodehive"; +var POINTS_PER_PR = 10; +var MAX_CONCURRENT_REQUESTS = 8; +var CACHE_DURATION = 5 * 60 * 1000; // 5 minutes cache +var MAX_PAGES_PER_REPO = 20; +// Time filter utility functions +var getTimeFilterDate = function (filter) { + var now = new Date(); + switch (filter) { + case 'week': + return new Date(now.getTime() - 7 * 24 * 60 * 60 * 1000); + case 'month': { + var lastMonth = new Date(now); + lastMonth.setMonth(now.getMonth() - 1); + return lastMonth; + } + case 'year': + return new Date(now.getTime() - 365 * 24 * 60 * 60 * 1000); + case 'all': + default: + return null; // No filter + } +}; +var isPRInTimeRange = function (mergedAt, filter) { + if (filter === 'all') + return true; + var filterDate = getTimeFilterDate(filter); + if (!filterDate) + return true; + var prDate = new Date(mergedAt); + return prDate >= filterDate; +}; +function CommunityStatsProvider(_a) { + var _this = this; + var children = _a.children; + var customFields = (0, useDocusaurusContext_1.default)().siteConfig.customFields; + var token = (customFields === null || customFields === void 0 ? void 0 : customFields.gitToken) || ""; + var _b = (0, react_1.useState)(true), loading = _b[0], setLoading = _b[1]; + var _c = (0, react_1.useState)(null), error = _c[0], setError = _c[1]; + var _d = (0, react_1.useState)(0), githubStarCount = _d[0], setGithubStarCount = _d[1]; + var _e = (0, react_1.useState)(0), githubContributorsCount = _e[0], setGithubContributorsCount = _e[1]; + var _f = (0, react_1.useState)(0), githubForksCount = _f[0], setGithubForksCount = _f[1]; + var _g = (0, react_1.useState)(0), githubReposCount = _g[0], setGithubReposCount = _g[1]; + var _h = (0, react_1.useState)(0), githubDiscussionsCount = _h[0], setGithubDiscussionsCount = _h[1]; + var _j = (0, react_1.useState)(null), lastUpdated = _j[0], setLastUpdated = _j[1]; + // Time filter state + var _k = (0, react_1.useState)('all'), currentTimeFilter = _k[0], setCurrentTimeFilter = _k[1]; + // Enhanced state for leaderboard data (stores all contributors with full PR history) + var _l = (0, react_1.useState)([]), allContributors = _l[0], setAllContributors = _l[1]; + var _m = (0, react_1.useState)(null), stats = _m[0], setStats = _m[1]; + // Cache state (stores raw data without filters) + var _o = (0, react_1.useState)({ data: null, timestamp: 0 }), cache = _o[0], setCache = _o[1]; + // Computed filtered contributors based on current time filter + var contributors = (0, react_1.useMemo)(function () { + if (!allContributors.length) + return []; + var filteredContributors = allContributors + .map(function (contributor) { + var filteredPRs = contributor.allPRDetails.filter(function (pr) { + return isPRInTimeRange(pr.mergedAt, currentTimeFilter); + }); + return { + username: contributor.username, + avatar: contributor.avatar, + profile: contributor.profile, + points: filteredPRs.length * POINTS_PER_PR, + prs: filteredPRs.length, + prDetails: filteredPRs, // For backward compatibility, though we'll use the new function + }; + }) + .filter(function (contributor) { return contributor.prs > 0; }) // Only show contributors with PRs in the time range + .sort(function (a, b) { return b.points - a.points || b.prs - a.prs; }); + return filteredContributors; + }, [allContributors, currentTimeFilter]); + // Update stats when contributors change + (0, react_1.useEffect)(function () { + if (contributors.length > 0) { + setStats({ + flooredTotalPRs: contributors.reduce(function (sum, c) { return sum + c.prs; }, 0), + totalContributors: contributors.length, + flooredTotalPoints: contributors.reduce(function (sum, c) { return sum + c.points; }, 0), + }); + } + }, [contributors]); + // Function to get filtered PRs for a specific contributor (for PR view modal) + var getFilteredPRsForContributor = (0, react_1.useCallback)(function (username) { + var contributor = allContributors.find(function (c) { return c.username === username; }); + if (!contributor) + return []; + return contributor.allPRDetails + .filter(function (pr) { return isPRInTimeRange(pr.mergedAt, currentTimeFilter); }) + .sort(function (a, b) { return new Date(b.mergedAt).getTime() - new Date(a.mergedAt).getTime(); }); // Sort by newest first + }, [allContributors, currentTimeFilter]); + // Time filter setter function + var setTimeFilter = (0, react_1.useCallback)(function (filter) { + setCurrentTimeFilter(filter); + }, []); + var fetchAllOrgRepos = (0, react_1.useCallback)(function (headers) { return __awaiter(_this, void 0, void 0, function () { + var repos, page, resp, data; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + repos = []; + page = 1; + _a.label = 1; + case 1: + if (!true) return [3 /*break*/, 4]; + return [4 /*yield*/, fetch("https://api.github.com/orgs/".concat(GITHUB_ORG, "/repos?type=public&per_page=100&page=").concat(page), { + headers: headers, + })]; + case 2: + resp = _a.sent(); + if (!resp.ok) { + throw new Error("Failed to fetch org repos: ".concat(resp.status, " ").concat(resp.statusText)); + } + return [4 /*yield*/, resp.json()]; + case 3: + data = _a.sent(); + repos.push.apply(repos, data); + if (!Array.isArray(data) || data.length < 100) + return [3 /*break*/, 4]; + page++; + return [3 /*break*/, 1]; + case 4: return [2 /*return*/, repos]; + } + }); + }); }, []); + var fetchMergedPRsForRepo = (0, react_1.useCallback)(function (repoName, headers) { return __awaiter(_this, void 0, void 0, function () { + var mergedPRs, firstResp, firstPRs, firstPageMerged, pagePromises, maxPages, i, remainingPages; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + mergedPRs = []; + return [4 /*yield*/, fetch("https://api.github.com/repos/".concat(GITHUB_ORG, "/").concat(repoName, "/pulls?state=closed&per_page=100&page=1"), { headers: headers })]; + case 1: + firstResp = _a.sent(); + if (!firstResp.ok) { + console.warn("Failed to fetch PRs for ".concat(repoName, ": ").concat(firstResp.status, " ").concat(firstResp.statusText)); + return [2 /*return*/, []]; + } + return [4 /*yield*/, firstResp.json()]; + case 2: + firstPRs = _a.sent(); + if (!Array.isArray(firstPRs) || firstPRs.length === 0) + return [2 /*return*/, []]; + firstPageMerged = firstPRs.filter(function (pr) { return Boolean(pr.merged_at); }); + mergedPRs.push.apply(mergedPRs, firstPageMerged); + // If we got less than 100, that's all there is + if (firstPRs.length < 100) + return [2 /*return*/, mergedPRs]; + pagePromises = []; + maxPages = Math.min(MAX_PAGES_PER_REPO, 10); + for (i = 2; i <= maxPages; i++) { + pagePromises.push(fetch("https://api.github.com/repos/".concat(GITHUB_ORG, "/").concat(repoName, "/pulls?state=closed&per_page=100&page=").concat(i), { headers: headers }) + .then(function (resp) { return __awaiter(_this, void 0, void 0, function () { + var prs; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!resp.ok) + return [2 /*return*/, []]; + return [4 /*yield*/, resp.json()]; + case 1: + prs = _a.sent(); + if (!Array.isArray(prs)) + return [2 /*return*/, []]; + return [2 /*return*/, prs.filter(function (pr) { return Boolean(pr.merged_at); })]; + } + }); + }); }) + .catch(function () { return []; })); + } + return [4 /*yield*/, Promise.all(pagePromises)]; + case 3: + remainingPages = _a.sent(); + remainingPages.forEach(function (pagePRs) { + if (pagePRs.length > 0) + mergedPRs.push.apply(mergedPRs, pagePRs); + }); + return [2 /*return*/, mergedPRs]; + } + }); + }); }, []); + // Enhanced processing function that stores all PR data without filtering + var processBatch = (0, react_1.useCallback)(function (repos, headers) { return __awaiter(_this, void 0, void 0, function () { + var contributorMap, totalMergedPRs, i, batch, promises, results; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + contributorMap = new Map(); + totalMergedPRs = 0; + i = 0; + _a.label = 1; + case 1: + if (!(i < repos.length)) return [3 /*break*/, 4]; + batch = repos.slice(i, i + MAX_CONCURRENT_REQUESTS); + promises = batch.map(function (repo) { return __awaiter(_this, void 0, void 0, function () { + var mergedPRs, error_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (repo.archived) + return [2 /*return*/, { mergedPRs: [], repoName: repo.name }]; + _a.label = 1; + case 1: + _a.trys.push([1, 3, , 4]); + return [4 /*yield*/, fetchMergedPRsForRepo(repo.name, headers)]; + case 2: + mergedPRs = _a.sent(); + return [2 /*return*/, { mergedPRs: mergedPRs, repoName: repo.name }]; + case 3: + error_1 = _a.sent(); + console.warn("Skipping repo ".concat(repo.name, " due to error:"), error_1); + return [2 /*return*/, { mergedPRs: [], repoName: repo.name }]; + case 4: return [2 /*return*/]; + } + }); + }); }); + return [4 /*yield*/, Promise.all(promises)]; + case 2: + results = _a.sent(); + // Process results from this batch + results.forEach(function (_a) { + var mergedPRs = _a.mergedPRs, repoName = _a.repoName; + totalMergedPRs += mergedPRs.length; + mergedPRs.forEach(function (pr) { + var username = pr.user.login; + if (!contributorMap.has(username)) { + contributorMap.set(username, { + username: username, + avatar: pr.user.avatar_url, + profile: pr.user.html_url, + points: 0, // Will be calculated later based on filter + prs: 0, // Will be calculated later based on filter + allPRDetails: [], // Store all PRs here + }); + } + var contributor = contributorMap.get(username); + // Add detailed PR information to the full list + if (pr.title && pr.html_url && pr.merged_at && pr.number) { + contributor.allPRDetails.push({ + title: pr.title, + url: pr.html_url, + mergedAt: pr.merged_at, + repoName: repoName, + number: pr.number, + }); + } + }); + }); + _a.label = 3; + case 3: + i += MAX_CONCURRENT_REQUESTS; + return [3 /*break*/, 1]; + case 4: return [2 /*return*/, { contributorMap: contributorMap, totalMergedPRs: totalMergedPRs }]; + } + }); + }); }, [fetchMergedPRsForRepo]); + var fetchAllStats = (0, react_1.useCallback)(function (signal) { return __awaiter(_this, void 0, void 0, function () { + var now, headers, _a, orgStats, repos, _b, contributorMap, totalMergedPRs, contributorsArray, err_1; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + setLoading(true); + setError(null); + now = Date.now(); + if (cache.data && (now - cache.timestamp) < CACHE_DURATION) { + setAllContributors(cache.data.contributors); + setLoading(false); + return [2 /*return*/]; + } + if (!token) { + setError("GitHub token not found. Please set customFields.gitToken in docusaurus.config.js."); + setLoading(false); + return [2 /*return*/]; + } + _c.label = 1; + case 1: + _c.trys.push([1, 4, 5, 6]); + headers = { + Authorization: "token ".concat(token), + Accept: "application/vnd.github.v3+json", + }; + return [4 /*yield*/, Promise.all([ + githubService_1.githubService.fetchOrganizationStats(signal), + fetchAllOrgRepos(headers) + ])]; + case 2: + _a = _c.sent(), orgStats = _a[0], repos = _a[1]; + // Set org stats immediately + setGithubStarCount(orgStats.totalStars); + setGithubContributorsCount(orgStats.totalContributors); + setGithubForksCount(orgStats.totalForks); + setGithubReposCount(orgStats.publicRepositories); + setGithubDiscussionsCount(orgStats.discussionsCount); + setLastUpdated(new Date(orgStats.lastUpdated)); + return [4 /*yield*/, processBatch(repos, headers)]; + case 3: + _b = _c.sent(), contributorMap = _b.contributorMap, totalMergedPRs = _b.totalMergedPRs; + contributorsArray = Array.from(contributorMap.values()); + setAllContributors(contributorsArray); + // Cache the results (raw data without filtering) + setCache({ + data: { + contributors: contributorsArray, + rawStats: { totalPRs: totalMergedPRs } + }, + timestamp: now + }); + return [3 /*break*/, 6]; + case 4: + err_1 = _c.sent(); + if (err_1.name !== 'AbortError') { + console.error("Error fetching GitHub organization stats:", err_1); + setError(err_1 instanceof Error ? err_1.message : 'Failed to fetch GitHub stats'); + // Set fallback values on error + setGithubStarCount(0); + setGithubContributorsCount(140); + setGithubForksCount(0); + setGithubReposCount(20); + setGithubDiscussionsCount(0); + } + return [3 /*break*/, 6]; + case 5: + setLoading(false); + return [7 /*endfinally*/]; + case 6: return [2 /*return*/]; + } + }); + }); }, [token, fetchAllOrgRepos, processBatch, cache]); + var clearCache = (0, react_1.useCallback)(function () { + githubService_1.githubService.clearCache(); + setCache({ data: null, timestamp: 0 }); + var abortController = new AbortController(); + fetchAllStats(abortController.signal); + }, [fetchAllStats]); + (0, react_1.useEffect)(function () { + var abortController = new AbortController(); + fetchAllStats(abortController.signal); + return function () { + abortController.abort(); + }; + }, [fetchAllStats]); + var githubStarCountText = (0, react_1.useMemo)(function () { return (0, exports.convertStatToText)(githubStarCount); }, [githubStarCount]); + var githubContributorsCountText = (0, react_1.useMemo)(function () { return (0, exports.convertStatToText)(githubContributorsCount); }, [githubContributorsCount]); + var githubForksCountText = (0, react_1.useMemo)(function () { return (0, exports.convertStatToText)(githubForksCount); }, [githubForksCount]); + var githubReposCountText = (0, react_1.useMemo)(function () { return (0, exports.convertStatToText)(githubReposCount); }, [githubReposCount]); + var githubDiscussionsCountText = (0, react_1.useMemo)(function () { return (0, exports.convertStatToText)(githubDiscussionsCount); }, [githubDiscussionsCount]); + var value = { + githubStarCount: githubStarCount, + githubStarCountText: githubStarCountText, + githubContributorsCount: githubContributorsCount, + githubContributorsCountText: githubContributorsCountText, + githubForksCount: githubForksCount, + githubForksCountText: githubForksCountText, + githubReposCount: githubReposCount, + githubReposCountText: githubReposCountText, + githubDiscussionsCount: githubDiscussionsCount, + githubDiscussionsCountText: githubDiscussionsCountText, + loading: loading, + error: error, + lastUpdated: lastUpdated, + refetch: fetchAllStats, + clearCache: clearCache, + contributors: contributors, + stats: stats, + currentTimeFilter: currentTimeFilter, + setTimeFilter: setTimeFilter, + getFilteredPRsForContributor: getFilteredPRsForContributor, + }; + return ((0, jsx_runtime_1.jsx)(exports.CommunityStatsContext.Provider, { value: value, children: children })); +} +var useCommunityStatsContext = function () { + var context = (0, react_1.useContext)(exports.CommunityStatsContext); + if (context === undefined) { + throw new Error("useCommunityStatsContext must be used within a CommunityStatsProvider"); + } + return context; +}; +exports.useCommunityStatsContext = useCommunityStatsContext; +var convertStatToText = function (num) { + var hasIntlSupport = typeof Intl === "object" && Intl && typeof Intl.NumberFormat === "function"; + if (!hasIntlSupport) { + return "".concat((num / 1000).toFixed(1), "k"); + } + var formatter = new Intl.NumberFormat("en-US", { + notation: "compact", + compactDisplay: "short", + maximumSignificantDigits: 3, + }); + return formatter.format(num); +}; +exports.convertStatToText = convertStatToText; diff --git a/src/lib/utils.js b/src/lib/utils.js new file mode 100644 index 00000000..ea9e8f4c --- /dev/null +++ b/src/lib/utils.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.cn = cn; +var clsx_1 = require("clsx"); +var tailwind_merge_1 = require("tailwind-merge"); +function cn() { + var inputs = []; + for (var _i = 0; _i < arguments.length; _i++) { + inputs[_i] = arguments[_i]; + } + return (0, tailwind_merge_1.twMerge)((0, clsx_1.clsx)(inputs)); +} diff --git a/src/pages/License/index.js b/src/pages/License/index.js new file mode 100644 index 00000000..bc68e177 --- /dev/null +++ b/src/pages/License/index.js @@ -0,0 +1,24 @@ +"use strict"; +var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importDefault(require("react")); +var Layout_1 = __importDefault(require("@theme/Layout")); +var styled_components_1 = __importDefault(require("styled-components")); +// Styled Components +var LicensingContainer = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n max-width: 800px;\n margin: 0 auto;\n padding: 20px;\n border-radius: 5px;\n box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);\n margin-top: 20px;\n margin-bottom: 20px;\n font-size: 16px;\n line-height: 1.6;\n font-family: 'Open Sans', sans-serif;\n text-align: justify;\n"], ["\n max-width: 800px;\n margin: 0 auto;\n padding: 20px;\n border-radius: 5px;\n box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);\n margin-top: 20px;\n margin-bottom: 20px;\n font-size: 16px;\n line-height: 1.6;\n font-family: 'Open Sans', sans-serif;\n text-align: justify;\n"]))); +var Title = styled_components_1.default.h2(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n margin-bottom: 24px;\n font-family: 'Open Sans', sans-serif;\n font-weight: 700;\n line-height: 1.6;\n text-align: center;\n font-size: 27px;\n"], ["\n margin-bottom: 24px;\n font-family: 'Open Sans', sans-serif;\n font-weight: 700;\n line-height: 1.6;\n text-align: center;\n font-size: 27px;\n"]))); +var SubTitle = styled_components_1.default.h3(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n margin-bottom: 20px;\n font-weight: 700;\n"], ["\n margin-bottom: 20px;\n font-weight: 700;\n"]))); +var Content = styled_components_1.default.p(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n margin-bottom: 20px;\n"], ["\n margin-bottom: 20px;\n"]))); +// Licensing Component +var Licensing = function () { + return ((0, jsx_runtime_1.jsx)(Layout_1.default, { title: "Licensing", description: "Licensing information for RecodeHive", children: (0, jsx_runtime_1.jsxs)(LicensingContainer, { children: [(0, jsx_runtime_1.jsx)(Title, { children: "Licensing" }), (0, jsx_runtime_1.jsx)(Content, { children: "Welcome to RecodeHive. This project is licensed under the MIT License. This page outlines the terms of the license and provides details on how you can use, modify, and distribute our project." }), (0, jsx_runtime_1.jsxs)(Content, { children: [(0, jsx_runtime_1.jsx)(SubTitle, { children: "MIT License" }), (0, jsx_runtime_1.jsxs)(Content, { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Copyright (c) 2025 recodehive" }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {}), "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {}), "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {}), "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {})] })] })] }) })); +}; +exports.default = Licensing; +var templateObject_1, templateObject_2, templateObject_3, templateObject_4; diff --git a/src/pages/badges/github-badges.js b/src/pages/badges/github-badges.js new file mode 100644 index 00000000..b6247bbb --- /dev/null +++ b/src/pages/badges/github-badges.js @@ -0,0 +1,122 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importStar(require("react")); +var Head_1 = __importDefault(require("@docusaurus/Head")); +var framer_motion_1 = require("framer-motion"); +var Layout_1 = __importDefault(require("@theme/Layout")); +var ExecutionEnvironment_1 = __importDefault(require("@docusaurus/ExecutionEnvironment")); +// Safe hook for color mode that handles SSR +function useSafeColorMode() { + var _a = (0, react_1.useState)(false), mounted = _a[0], setMounted = _a[1]; + (0, react_1.useEffect)(function () { + setMounted(true); + }, []); + var colorMode = 'light'; + var isDark = false; + if (mounted && ExecutionEnvironment_1.default.canUseDOM) { + try { + var useColorModeHook = require('@docusaurus/theme-common').useColorMode; + var colorModeResult = useColorModeHook(); + colorMode = colorModeResult.colorMode; + isDark = colorMode === 'dark'; + } + catch (error) { + console.warn('Failed to get color mode:', error); + } + } + return { colorMode: colorMode, isDark: isDark, mounted: mounted }; +} +var github_badges_module_css_1 = __importDefault(require("./github-badges.module.css")); +var GithubBadgesContent = function () { + var _a = useSafeColorMode(), colorMode = _a.colorMode, isDark = _a.isDark, mounted = _a.mounted; + // Scroll to top button logic + (0, react_1.useEffect)(function () { + var scrollToTopBtn = document.getElementById("scrollToTop"); + var handleScroll = function () { + if (!scrollToTopBtn) + return; + if (window.scrollY > 200) { + scrollToTopBtn.classList.add("show"); + } + else { + scrollToTopBtn.classList.remove("show"); + } + // Progress bar logic + var progressBar = document.getElementById("progressBar"); + if (progressBar) { + var scrollTop = window.scrollY; + var docHeight = document.documentElement.scrollHeight - window.innerHeight; + var scrollPercent = (scrollTop / docHeight) * 100; + progressBar.style.width = "".concat(scrollPercent, "%"); + } + }; + window.addEventListener("scroll", handleScroll); + return function () { return window.removeEventListener("scroll", handleScroll); }; + }, []); + var handleScrollToTop = function () { + window.scrollTo({ top: 0, behavior: "smooth" }); + }; + return ((0, jsx_runtime_1.jsx)(Layout_1.default, { title: "GitHub Achievements - RecodeHive", description: "Explore GitHub achievements and badges", children: (0, jsx_runtime_1.jsxs)("div", { className: "".concat(github_badges_module_css_1.default["github-badges-page"], " transition-colors duration-300 ").concat(isDark ? 'dark-bg-primary dark-text-primary' : 'bg-white text-black'), children: [(0, jsx_runtime_1.jsxs)(Head_1.default, { children: [(0, jsx_runtime_1.jsx)("title", { children: "GitHub Achievements - RecodeHive" }), (0, jsx_runtime_1.jsx)("meta", { name: "description", content: "Explore GitHub achievements and badges" }), (0, jsx_runtime_1.jsx)("link", { rel: "stylesheet", href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css", integrity: "sha512-iecdLmaskl7CVkqkXNQ/ZH/XLlvWZOJyj7Yy7tcenmpD1ypASozpmT/E0iPtmFIB46ZmdtAc9eNBvH0H/ZpiBw==", crossOrigin: "anonymous", referrerPolicy: "no-referrer" })] }), " ", (0, jsx_runtime_1.jsx)(framer_motion_1.motion.h1, { initial: { opacity: 0, y: -30 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.7, ease: "easeOut" }, style: { display: 'flex', alignItems: 'center', justifyContent: 'center', gap: 10 }, className: github_badges_module_css_1.default.title, children: "\uD83C\uDFC6 GitHub Achievements \uD83C\uDFC6" }), (0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.bannerAchievements, children: (0, jsx_runtime_1.jsx)("strong", { children: "Achievements Banner" }) }), (0, jsx_runtime_1.jsx)("h2", { children: "\uD83D\uDCC3 Achievement List \uD83D\uDCC3" }), (0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.tableWrapper, children: (0, jsx_runtime_1.jsxs)("table", { className: github_badges_module_css_1.default.achievementsTable, children: [(0, jsx_runtime_1.jsx)("thead", { children: (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("th", { children: "Badge" }), (0, jsx_runtime_1.jsx)("th", { children: "Name" }), (0, jsx_runtime_1.jsx)("th", { children: "How to get" }), (0, jsx_runtime_1.jsxs)("th", { children: ["Needed Amount", (0, jsx_runtime_1.jsx)("br", {})] })] }) }), (0, jsx_runtime_1.jsxs)("tbody", { children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.tr, { initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: 0.05 }, whileHover: { scale: 1.02 }, style: { boxShadow: "0 4px 20px rgba(0,0,0,0.07)" }, children: [(0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.img, { src: "https://github.githubassets.com/images/modules/profile/achievements/starstruck-default.png", alt: "Starstruck", className: github_badges_module_css_1.default.badgeImgSmall, whileHover: { scale: 1.13, rotate: -6 }, transition: { type: "spring", stiffness: 300 } }) }), (0, jsx_runtime_1.jsx)("td", { children: "Starstruck" }), (0, jsx_runtime_1.jsxs)("td", { children: ["Create a repository with a lot of stars.", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/sanjay-kv/Open-source-Practice", target: "_blank", rel: "noopener noreferrer", children: "Sample repo" }), (0, jsx_runtime_1.jsx)("br", {}), "If you get the first 16 stars you will unlock the badge.", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("a", { href: "https://youtu.be/v2Pai1TY_Lg", target: "_blank", rel: "noopener noreferrer", children: "Watch the Video Tutorial" })] }), (0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsxs)("div", { className: github_badges_module_css_1.default.badgeLevels, children: [(0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.levelText, children: "Levels: Default, Bronze, Silver, Gold" }), (0, jsx_runtime_1.jsxs)("div", { className: github_badges_module_css_1.default.levelImages, children: [(0, jsx_runtime_1.jsx)("img", { src: "https://github.githubassets.com/images/modules/profile/achievements/starstruck-default.png", alt: "Starstruck Default", title: "Default (16)", className: github_badges_module_css_1.default.badgeImgSmall }), (0, jsx_runtime_1.jsx)("img", { src: "https://github.githubassets.com/images/modules/profile/achievements/starstruck-bronze.png", alt: "Starstruck Bronze", title: "Bronze (128)", className: github_badges_module_css_1.default.badgeImgSmall }), (0, jsx_runtime_1.jsx)("img", { src: "https://github.githubassets.com/images/modules/profile/achievements/starstruck-silver.png", alt: "Starstruck Silver", title: "Silver (512)", className: github_badges_module_css_1.default.badgeImgSmall }), (0, jsx_runtime_1.jsx)("img", { src: "https://github.githubassets.com/images/modules/profile/achievements/starstruck-gold.png", alt: "Starstruck Gold", title: "Gold (4096)", className: github_badges_module_css_1.default.badgeImgSmall })] }), (0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.neededAmount, children: "Needed: 16, 128, 512, 4096" })] }) })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.tr, { initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: 0.10 }, whileHover: { scale: 1.02, boxShadow: "0 4px 20px rgba(0,0,0,0.07)" }, children: [(0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.img, { src: "https://github.githubassets.com/images/modules/profile/achievements/quickdraw-default.png", alt: "Quickdraw", className: github_badges_module_css_1.default.badgeImgSmall, whileHover: { scale: 1.13, rotate: 6 }, transition: { type: "spring", stiffness: 300 } }) }), (0, jsx_runtime_1.jsx)("td", { children: "Quickdraw" }), (0, jsx_runtime_1.jsxs)("td", { children: ["Gitty up!", (0, jsx_runtime_1.jsx)("br", {}), "If you closed an issue / pull request within 5 minutes of opening you will unlock this badge"] }), (0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsxs)("div", { className: github_badges_module_css_1.default.singleBadge, children: [(0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.levelText, children: "Level: Default" }), (0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Quick-Draw/PNG/Skin-Tones/QuickDraw_SkinTone1.png", alt: "Quickdraw Default", className: github_badges_module_css_1.default.badgeImgSmall }), (0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.neededAmount, children: "Needed: 1" })] }) })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.tr, { initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: 0.15 }, whileHover: { scale: 1.02, boxShadow: "0 4px 20px rgba(0,0,0,0.07)" }, children: [(0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.img, { src: "https://github.githubassets.com/images/modules/profile/achievements/pair-extraordinaire-default.png", alt: "Pair Extraordinaire", className: github_badges_module_css_1.default.badgeImgSmall, whileHover: { scale: 1.13, rotate: -8 }, transition: { type: "spring", stiffness: 300 } }) }), (0, jsx_runtime_1.jsx)("td", { children: "Pair Extraordinaire" }), (0, jsx_runtime_1.jsxs)("td", { children: ["Coauthored commits on merged pull request", (0, jsx_runtime_1.jsx)("br", {}), "Requirement: VSCode IDE (bit difficult to get)", (0, jsx_runtime_1.jsx)("br", {}), "You can raise a sample PR ", (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/recodehive/Opensource-practice", target: "_blank", rel: "noopener noreferrer", children: "here" }), " by adding to the existing readme file and tag ", (0, jsx_runtime_1.jsx)("b", { children: "@sanjay-kv" }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("a", { href: "https://youtu.be/BNKSlT8jLQ0", target: "_blank", rel: "noopener noreferrer", children: "Watch the Video Tutorial" })] }), (0, jsx_runtime_1.jsxs)("td", { children: [(0, jsx_runtime_1.jsx)("b", { children: "Needed:" }), " 1, 10, 24, 48", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsxs)("div", { style: { display: "flex", gap: 8, marginTop: 6 }, children: [(0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Pair-Extraordinaire/PNG/PairExtraordinaire.png", alt: "Starstruck Default", title: "Default (16)", className: github_badges_module_css_1.default.badgeImgSmall }), (0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Pair-Extraordinaire/PNG/PairExtraordinaire_Bronze.png", alt: "Starstruck Bronze", title: "Bronze (128)", className: github_badges_module_css_1.default.badgeImgSmall }), (0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Pair-Extraordinaire/PNG/PairExtraordinaire_Silver.png", alt: "Starstruck Silver", title: "Silver (512)", className: github_badges_module_css_1.default.badgeImgSmall }), (0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Pair-Extraordinaire/PNG/PairExtraordinaire_Gold.png", alt: "Starstruck Gold", title: "Gold (4096)", className: github_badges_module_css_1.default.badgeImgSmall })] }), (0, jsx_runtime_1.jsx)("b", { children: "Levels:" }), " Default, Bronze, Silver, Gold"] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.tr, { initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: 0.20 }, whileHover: { scale: 1.02, boxShadow: "0 4px 20px rgba(0,0,0,0.07)" }, children: [(0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.img, { src: "https://github.githubassets.com/images/modules/profile/achievements/pull-shark-default.png", alt: "Pull Shark", className: github_badges_module_css_1.default.badgeImgSmall, whileHover: { scale: 1.13, rotate: 6 }, transition: { type: "spring", stiffness: 300 } }) }), (0, jsx_runtime_1.jsx)("td", { children: "Pull Shark" }), (0, jsx_runtime_1.jsxs)("td", { children: ["Opened a pull request and it should be merged", (0, jsx_runtime_1.jsx)("br", {}), "You can raise a sample PR ", (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/recodehive/resume-pitch", target: "_blank", rel: "noopener noreferrer", children: "here" }), " by adding on existing readme file and tag ", (0, jsx_runtime_1.jsx)("b", { children: "@sanjay-kv" }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("a", { href: "https://youtu.be/7uKMWBFN2jQ", target: "_blank", rel: "noopener noreferrer", children: "Watch the Video Tutorial" })] }), (0, jsx_runtime_1.jsxs)("td", { children: [(0, jsx_runtime_1.jsx)("b", { children: "Needed:" }), " 2, 16, 128, 1024", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsxs)("div", { style: { display: "flex", gap: 8, marginTop: 6 }, children: [(0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Pull-Shark/PNG/PullShark.png", alt: "Starstruck Default", title: "Default (16)", className: github_badges_module_css_1.default.badgeImgSmall }), (0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Pull-Shark/PNG/PullShark_Bronze.png", alt: "Starstruck Bronze", title: "Bronze (128)", className: github_badges_module_css_1.default.badgeImgSmall }), (0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Pull-Shark/PNG/PullShark_Silver.png", alt: "Starstruck Silver", title: "Silver (512)", className: github_badges_module_css_1.default.badgeImgSmall }), (0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Pull-Shark/PNG/PullShark_Gold.png", alt: "Starstruck Gold", title: "Gold (4096)", className: github_badges_module_css_1.default.badgeImgSmall })] }), (0, jsx_runtime_1.jsx)("b", { children: "Levels:" }), " Default, Bronze, Silver, Gold"] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.tr, { initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: 0.25 }, whileHover: { scale: 1.02, boxShadow: "0 4px 20px rgba(0,0,0,0.07)" }, children: [(0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.img, { src: "https://github.githubassets.com/images/modules/profile/achievements/galaxy-brain-default.png", alt: "Galaxy Brain", className: github_badges_module_css_1.default.badgeImgSmall, whileHover: { scale: 1.13, rotate: -8 }, transition: { type: "spring", stiffness: 300 } }) }), (0, jsx_runtime_1.jsx)("td", { children: "Galaxy Brain" }), (0, jsx_runtime_1.jsxs)("td", { children: ["Answered a discussion and someone marked your reply as answer", (0, jsx_runtime_1.jsx)("br", {}), "You can answer some of the discussions ", (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/orgs/recodehive/discussions", target: "_blank", rel: "noopener noreferrer", children: "here" }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("a", { href: "https://youtu.be/v2Pai1TY_Lg", target: "_blank", rel: "noopener noreferrer", children: "Watch the Video Tutorial" })] }), (0, jsx_runtime_1.jsxs)("td", { children: [(0, jsx_runtime_1.jsx)("b", { children: "Needed:" }), " 2, 8, 16, 32", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsxs)("div", { style: { display: "flex", gap: 8, marginTop: 6 }, children: [(0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Galaxy-Brain/PNG/GalaxyBrain.png", alt: "Starstruck Default", title: "Default (16)", className: github_badges_module_css_1.default.badgeImgSmall }), (0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Galaxy-Brain/PNG/GalaxyBrain_Bronze.png", alt: "Starstruck Bronze", title: "Bronze (128)", className: github_badges_module_css_1.default.badgeImgSmall }), (0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Galaxy-Brain/PNG/GalaxyBrain_Silver.png", alt: "Starstruck Silver", title: "Silver (512)", className: github_badges_module_css_1.default.badgeImgSmall }), (0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Galaxy-Brain/PNG/GalaxyBrain_Gold.png", alt: "Starstruck Gold", title: "Gold (4096)", className: github_badges_module_css_1.default.badgeImgSmall })] }), (0, jsx_runtime_1.jsx)("b", { children: "Levels:" }), " Default, Bronze, Silver, Gold"] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.tr, { initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: 0.30 }, whileHover: { scale: 1.02, boxShadow: "0 4px 20px rgba(0,0,0,0.07)" }, children: [(0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.img, { src: "https://github.githubassets.com/images/modules/profile/achievements/yolo-default.png", alt: "YOLO", className: github_badges_module_css_1.default.badgeImgSmall, whileHover: { scale: 1.13, rotate: 8 }, transition: { type: "spring", stiffness: 300 } }) }), (0, jsx_runtime_1.jsx)("td", { children: "YOLO" }), (0, jsx_runtime_1.jsxs)("td", { children: ["Merged a pull request without a review", (0, jsx_runtime_1.jsx)("br", {}), "You can raise a PR ", (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/recodehive/machine-learning-repos", target: "_blank", rel: "noopener noreferrer", children: "here" }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("a", { href: "https://youtu.be/GnHNScuGKrg", target: "_blank", rel: "noopener noreferrer", children: "Watch the Video Tutorial" })] }), (0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsxs)("div", { className: github_badges_module_css_1.default.singleBadge, children: [(0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.levelText, children: "Level: Default" }), (0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/YOLO/PNG/YOLO_Badge.png", alt: "Starstruck Default", title: "Default (16)", className: github_badges_module_css_1.default.badgeImgSmall }), (0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.neededAmount, children: "Needed: 1" })] }) })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.tr, { initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: 0.35 }, whileHover: { scale: 1.02, boxShadow: "0 4px 20px rgba(0,0,0,0.07)" }, children: [(0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.img, { src: "https://github.githubassets.com/images/modules/profile/achievements/public-sponsor-default.png", alt: "Public Sponsor", className: github_badges_module_css_1.default.badgeImgSmall, whileHover: { scale: 1.13, rotate: -6 }, transition: { type: "spring", stiffness: 300 } }) }), (0, jsx_runtime_1.jsx)("td", { children: "Public Sponsor" }), (0, jsx_runtime_1.jsxs)("td", { children: ["GitHub Sponsors.", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/sponsors", target: "_blank", rel: "noopener noreferrer", children: "GitHub Sponsors" }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("a", { href: "https://youtu.be/dcdpkD7lYDg", target: "_blank", rel: "noopener noreferrer", children: "Watch the Video Tutorial" })] }), (0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsxs)("div", { className: github_badges_module_css_1.default.singleBadge, children: [(0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.levelText, children: "Level: Default" }), (0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/GitHub-Sponsor/PNG/GitHubSponsorBadge.png", alt: "Starstruck Default", title: "Default (16)", className: github_badges_module_css_1.default.badgeImgSmall }), (0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.neededAmount, children: "Needed: 1" })] }) })] })] })] }) }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.h2, { className: github_badges_module_css_1.default.skinHeading, initial: { opacity: 0, x: -40 }, whileInView: { opacity: 1, x: 0 }, viewport: { once: true }, transition: { duration: 0.7, delay: 0.1 }, children: [(0, jsx_runtime_1.jsx)("span", { role: "img", "aria-label": "wave", children: "\uD83D\uDC4B" }), " Achievement Skin Tone ", (0, jsx_runtime_1.jsx)("span", { role: "img", "aria-label": "wave", children: "\uD83D\uDC4B" })] }), (0, jsx_runtime_1.jsxs)("p", { className: github_badges_module_css_1.default.paragraph, style: { textAlign: "center" }, children: ["Some achievements' appearance depends on your Emoji Skin Tone Preference.", (0, jsx_runtime_1.jsx)("br", {}), "You can change your preferred Skin Tone by going to", (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/settings/appearance", target: "_blank", rel: "noopener noreferrer", children: "appearance settings" }), "."] }), (0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.tableWrapper, children: (0, jsx_runtime_1.jsxs)("table", { className: github_badges_module_css_1.default.skinToneTable, children: [(0, jsx_runtime_1.jsxs)("thead", { children: [(0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("th", { children: "Badge" }), (0, jsx_runtime_1.jsx)("th", { children: "Name" }), (0, jsx_runtime_1.jsx)("th", { colSpan: 6, children: "Skin Tone Versions" })] }), (0, jsx_runtime_1.jsx)("tr", {})] }), (0, jsx_runtime_1.jsxs)("tbody", { children: [(0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsx)("img", { src: "https://github.githubassets.com/images/modules/profile/achievements/starstruck-default.png", alt: "Starstruck", className: github_badges_module_css_1.default.badgeImgSmall }) }), (0, jsx_runtime_1.jsx)("td", { children: "Starstruck" }), (0, jsx_runtime_1.jsxs)("td", { children: [(0, jsx_runtime_1.jsx)("img", { src: "https://github.githubassets.com/images/modules/profile/achievements/starstruck-default.png", className: github_badges_module_css_1.default.badgeImgSmall }), " \uD83D\uDC4B"] }), (0, jsx_runtime_1.jsxs)("td", { children: [(0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Star-Struck/PNG/Skin-Tones/StarStruck_SkinTone2.png", className: github_badges_module_css_1.default.badgeImgSmall }), " \uD83D\uDC4B\uD83C\uDFFB"] }), (0, jsx_runtime_1.jsxs)("td", { children: [(0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Star-Struck/PNG/Skin-Tones/StarStruck_SkinTone3.png", className: github_badges_module_css_1.default.badgeImgSmall }), " \uD83D\uDC4B\uD83C\uDFFC"] }), (0, jsx_runtime_1.jsxs)("td", { children: [(0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Star-Struck/PNG/Skin-Tones/StarStruck_SkinTone4.png", className: github_badges_module_css_1.default.badgeImgSmall }), " \uD83D\uDC4B\uD83C\uDFFD"] }), (0, jsx_runtime_1.jsxs)("td", { children: [(0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Star-Struck/PNG/Skin-Tones/StarStruck_SkinTone5.png", className: github_badges_module_css_1.default.badgeImgSmall }), " \uD83D\uDC4B\uD83C\uDFFE"] }), (0, jsx_runtime_1.jsxs)("td", { children: [(0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Star-Struck/PNG/Skin-Tones/StarStruck_SkinTone6.png", className: github_badges_module_css_1.default.badgeImgSmall }), " \uD83D\uDC4B\uD83C\uDFFF"] })] }), (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsx)("img", { src: "https://github.githubassets.com/images/modules/profile/achievements/quickdraw-default.png", alt: "Quickdraw", className: github_badges_module_css_1.default.badgeImgSmall }) }), (0, jsx_runtime_1.jsx)("td", { children: "Quickdraw" }), (0, jsx_runtime_1.jsxs)("td", { children: [(0, jsx_runtime_1.jsx)("img", { src: "https://github.githubassets.com/images/modules/profile/achievements/quickdraw-default.png", className: github_badges_module_css_1.default.badgeImgSmall }), " \uD83D\uDC4B"] }), (0, jsx_runtime_1.jsxs)("td", { children: [(0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Quick-Draw/PNG/Skin-Tones/QuickDraw_SkinTone2.png", className: github_badges_module_css_1.default.badgeImgSmall }), " \uD83D\uDC4B\uD83C\uDFFB"] }), (0, jsx_runtime_1.jsxs)("td", { children: [(0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Quick-Draw/PNG/Skin-Tones/QuickDraw_SkinTone3.png", className: github_badges_module_css_1.default.badgeImgSmall }), " \uD83D\uDC4B\uD83C\uDFFC"] }), (0, jsx_runtime_1.jsxs)("td", { children: [(0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Quick-Draw/PNG/Skin-Tones/QuickDraw_SkinTone4.png", className: github_badges_module_css_1.default.badgeImgSmall }), " \uD83D\uDC4B\uD83C\uDFFD"] }), (0, jsx_runtime_1.jsxs)("td", { children: [(0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Quick-Draw/PNG/Skin-Tones/QuickDraw_SkinTone5.png", className: github_badges_module_css_1.default.badgeImgSmall }), " \uD83D\uDC4B\uD83C\uDFFE"] }), (0, jsx_runtime_1.jsxs)("td", { children: [(0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Quick-Draw/PNG/Skin-Tones/QuickDraw_SkinTone6.png", className: github_badges_module_css_1.default.badgeImgSmall }), " \uD83D\uDC4B\uD83C\uDFFF"] })] })] })] }) }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.h2, { className: github_badges_module_css_1.default.highlightsHeading, initial: { opacity: 0, x: 40 }, whileInView: { opacity: 1, x: 0 }, viewport: { once: true }, transition: { duration: 0.7, delay: 0.1 }, children: "\u2728 Highlights Badges \u2728" }), (0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.tableWrapper, children: (0, jsx_runtime_1.jsxs)("table", { className: github_badges_module_css_1.default.highlightsTable, children: [(0, jsx_runtime_1.jsx)("thead", { children: (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("th", { children: "Badge" }), (0, jsx_runtime_1.jsx)("th", { children: "Name" }), (0, jsx_runtime_1.jsx)("th", { children: "How to get" })] }) }), (0, jsx_runtime_1.jsxs)("tbody", { children: [(0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { children: "\u2B50" }), (0, jsx_runtime_1.jsx)("td", { children: "Pro" }), (0, jsx_runtime_1.jsxs)("td", { children: ["Pay for ", (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/pricing", target: "_blank", rel: "noopener noreferrer", children: "GitHub Pro" }), " or if you are student get it free: ", (0, jsx_runtime_1.jsx)("a", { href: "https://youtu.be/knr5gBv-c9c", target: "_blank", rel: "noopener noreferrer", children: "Watch Video" })] })] }), (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { children: "\uD83D\uDCCB" }), (0, jsx_runtime_1.jsx)("td", { children: "Developer Program Member" }), (0, jsx_runtime_1.jsxs)("td", { children: ["Be a registered member of the ", (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/developers", target: "_blank", rel: "noopener noreferrer", children: "GitHub Developer Program" })] })] }), (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { children: "\uD83D\uDD12" }), (0, jsx_runtime_1.jsx)("td", { children: "Security Bug Bounty Hunter" }), (0, jsx_runtime_1.jsxs)("td", { children: ["Helped out hunting down security vulnerabilities at ", (0, jsx_runtime_1.jsx)("a", { href: "https://bounty.github.com/", target: "_blank", rel: "noopener noreferrer", children: "GitHub Security" })] })] }), (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { children: "\uD83C\uDF93" }), (0, jsx_runtime_1.jsx)("td", { children: "GitHub Campus Expert" }), (0, jsx_runtime_1.jsxs)("td", { children: ["Participate in the ", (0, jsx_runtime_1.jsx)("a", { href: "https://education.github.com/experts", target: "_blank", rel: "noopener noreferrer", children: "GitHub Campus Program" })] })] }), (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { children: "\u26A0\uFE0F" }), (0, jsx_runtime_1.jsx)("td", { children: "Security advisory credit" }), (0, jsx_runtime_1.jsxs)("td", { children: ["Have your security advisory submitted to the ", (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/advisories", target: "_blank", rel: "noopener noreferrer", children: "GitHub Advisory Database" }), " accepted"] })] })] })] }) }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.h2, { className: github_badges_module_css_1.default.retiredHeading, initial: { opacity: 0, y: 40 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.7, delay: 0.1 }, children: "\u274C Badges no longer earnable \u274C" }), (0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.tableWrapper, children: (0, jsx_runtime_1.jsxs)("table", { className: github_badges_module_css_1.default.retiredTable, children: [(0, jsx_runtime_1.jsx)("thead", { children: (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("th", { children: "Badge" }), (0, jsx_runtime_1.jsx)("th", { children: "Name" }), (0, jsx_runtime_1.jsx)("th", { children: "How to get" }), (0, jsx_runtime_1.jsx)("th", { children: "Needed Amount" })] }) }), (0, jsx_runtime_1.jsxs)("tbody", { children: [(0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Mars-2020-Contributor/PNG/Mars2020ContributorBadge.png", alt: "Mars 2020 Contributor", className: github_badges_module_css_1.default.badgeImgSmall }) }), (0, jsx_runtime_1.jsx)("td", { children: "Mars 2020 Contributor" }), (0, jsx_runtime_1.jsxs)("td", { children: ["Contributed code to a repository used in the ", (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/readme/featured/nasa-ingenuity-helicopter", target: "_blank", rel: "noopener noreferrer", children: "Mars 2020 Helicopter Mission" })] }), (0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsxs)("div", { className: github_badges_module_css_1.default.neededBox, children: [(0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.neededLabel, children: "DEFAULT" }), (0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Mars-2020-Contributor/PNG/Mars2020ContributorBadge.png", alt: "Mars 2020 Contributor", className: github_badges_module_css_1.default.badgeImgSmall }), (0, jsx_runtime_1.jsx)("div", { children: "1" })] }) })] }), (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/2020-Arctic-Code-Vault-Contributor/PNG/2020ArcticCodeVaultBadge.png", alt: "Arctic Code Vault Contributor", className: github_badges_module_css_1.default.badgeImgSmall }) }), (0, jsx_runtime_1.jsx)("td", { children: "Arctic Code Vault Contributor" }), (0, jsx_runtime_1.jsxs)("td", { children: ["Contributed code to a repository in the ", (0, jsx_runtime_1.jsx)("a", { href: "https://archiveprogram.github.com/", target: "_blank", rel: "noopener noreferrer", children: "2020 GitHub Archive Program" })] }), (0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsxs)("div", { className: github_badges_module_css_1.default.neededBox, children: [(0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.neededLabel, children: "DEFAULT" }), (0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/2020-Arctic-Code-Vault-Contributor/PNG/2020ArcticCodeVaultBadge.png", alt: "Arctic Code Vault Contributor", className: github_badges_module_css_1.default.badgeImgSmall }), (0, jsx_runtime_1.jsx)("div", { children: "1" })] }) })] })] })] }) }), " ", (0, jsx_runtime_1.jsx)("hr", { className: github_badges_module_css_1.default.hr }), (0, jsx_runtime_1.jsxs)("div", { style: { textAlign: "center" }, children: [(0, jsx_runtime_1.jsx)("h2", { className: github_badges_module_css_1.default.subheading, children: "\uD83D\uDEC8 More Information \uD83D\uDEC8" }), (0, jsx_runtime_1.jsxs)("p", { className: github_badges_module_css_1.default.paragraph, children: ["You can find more information about GitHub Badges under this", ' ', (0, jsx_runtime_1.jsx)("a", { href: "https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile", target: "_blank", rel: "noopener noreferrer", children: "link" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: github_badges_module_css_1.default.certificationHero, style: { + display: "flex", + alignItems: "center", + gap: "100px", + flexWrap: "wrap", + borderRadius: "24px", + padding: "32px", + width: "100%", + maxWidth: "100vw", + margin: "0 auto", + }, children: [(0, jsx_runtime_1.jsx)("div", { style: { flex: 1, minWidth: 260 }, children: (0, jsx_runtime_1.jsx)("h1", { style: { margin: 0 }, children: "Showcase your expertise with GitHub" }) }), (0, jsx_runtime_1.jsx)("div", { style: { flex: 1, display: "flex", justifyContent: "flex-end", minWidth: 220, borderRadius: "20px" }, children: (0, jsx_runtime_1.jsx)("img", { src: "https://images.ctfassets.net/wfutmusr1t3h/6eWM76bx8skN2B4Jpvkcil/3ccdafea4229f02802abbd9fc6634a3b/Certifiedtocat_full__2_.svg?w=1280&q=75", alt: "GitHub Certification", style: { + maxHeight: "320px", + width: "auto", + borderRadius: "20px", + maxWidth: "100%", + objectFit: "contain", + background: "#f6f8fa", + padding: "8px" + } }) }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("p", { style: { fontSize: "1.2rem", margin: "16px 0", color: "#000", textAlign: "left" }, children: "Getting GitHub certified is a strong endorsement of your skills and knowledge of the technologies and developer tools used by millions of developers worldwide." }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: github_badges_module_css_1.default.certificationCards, children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "".concat(github_badges_module_css_1.default.certCard), initial: { opacity: 0, x: -50 }, whileInView: { opacity: 1, x: 0 }, viewport: { once: true }, transition: { duration: 0.5 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: github_badges_module_css_1.default.cardContent, children: [(0, jsx_runtime_1.jsx)("h2", { children: "GitHub Foundations" }), (0, jsx_runtime_1.jsx)("p", { children: "Highlight your understanding of the foundational topics and concepts of collaborating, contributing, and working on GitHub. This exam covers collaboration, GitHub products, Git basics, and working within GitHub repositories." }), (0, jsx_runtime_1.jsx)("a", { href: "https://examregistration.github.com/waitlist/foundations", className: github_badges_module_css_1.default.certLink, target: "_blank", rel: "noopener noreferrer", children: "Prepare for the GitHub Foundations exam \u2192" })] }), (0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.certBadge, children: (0, jsx_runtime_1.jsx)("img", { src: "https://images.ctfassets.net/wfutmusr1t3h/1GLjOPbAzxSyIZy7Cvu2Do/4220986cedca60a0cb3eaa1ed21ca5fc/foundations-river-image__1_.png?w=1280&q=75", alt: "GitHub Foundations Badge", style: { borderRadius: "30px" } }) })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "".concat(github_badges_module_css_1.default.certCard), initial: { opacity: 0, x: 50 }, whileInView: { opacity: 1, x: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: 0.1 }, children: [(0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.certBadge, children: (0, jsx_runtime_1.jsx)("img", { src: "https://images.ctfassets.net/wfutmusr1t3h/7xYtTWmQ24xRlS68Do9qiG/a785c50083a579f2530863c230198e98/actions-river-image__1_.png?w=1280&q=75", alt: "GitHub Actions Badge", style: { borderRadius: "30px" } }) }), (0, jsx_runtime_1.jsxs)("div", { className: github_badges_module_css_1.default.cardContent, children: [(0, jsx_runtime_1.jsx)("h2", { children: "GitHub Actions" }), (0, jsx_runtime_1.jsx)("p", { children: "Certify your proficiency in automating workflows and accelerating development with GitHub Actions. Test your skills in streamlining workflows, automating tasks, and optimizing software pipelines, including CI/CD\u2014all within customizable workflows." }), (0, jsx_runtime_1.jsx)("a", { href: "https://examregistration.github.com/waitlist/actions", className: github_badges_module_css_1.default.certLink, target: "_blank", rel: "noopener noreferrer", children: "Prepare for the GitHub Actions exam \u2192" })] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "".concat(github_badges_module_css_1.default.certCard), initial: { opacity: 0, x: -50 }, whileInView: { opacity: 1, x: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: 0.2 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: github_badges_module_css_1.default.cardContent, children: [(0, jsx_runtime_1.jsx)("h2", { children: "GitHub Advanced Security" }), (0, jsx_runtime_1.jsx)("p", { children: "Highlight your code security knowledge with the GitHub Advanced Security certification. Validate your expertise in vulnerability identification, workflow security, and robust security implementation\u2014elevating software integrity standards." }), (0, jsx_runtime_1.jsx)("a", { href: "https://examregistration.github.com/waitlist/security", className: github_badges_module_css_1.default.certLink, target: "_blank", rel: "noopener noreferrer", children: "Prepare for the GitHub Advanced Security exam \u2192" })] }), (0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.certBadge, children: (0, jsx_runtime_1.jsx)("img", { src: "https://images.ctfassets.net/wfutmusr1t3h/1GLjOPbAzxSyIZy7Cvu2Do/4220986cedca60a0cb3eaa1ed21ca5fc/foundations-river-image__1_.png?w=1280&q=75", alt: "GitHub Advanced Security Badge", style: { borderRadius: "30px" } }) })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "".concat(github_badges_module_css_1.default.certCard), initial: { opacity: 0, x: 50 }, whileInView: { opacity: 1, x: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: 0.3 }, children: [(0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.certBadge, children: (0, jsx_runtime_1.jsx)("img", { src: "https://images.ctfassets.net/wfutmusr1t3h/1GLjOPbAzxSyIZy7Cvu2Do/4220986cedca60a0cb3eaa1ed21ca5fc/foundations-river-image__1_.png?w=1280&q=75", alt: "GitHub Administration Badge", style: { borderRadius: "30px" } }) }), (0, jsx_runtime_1.jsxs)("div", { className: github_badges_module_css_1.default.cardContent, children: [(0, jsx_runtime_1.jsx)("h2", { children: "GitHub Administration" }), (0, jsx_runtime_1.jsx)("p", { children: "Certify your ability to optimize and manage a healthy GitHub environment with the GitHub Admin exam. Highlight your expertise in repository management, workflow optimization, and efficient collaboration to support successful projects on GitHub." }), (0, jsx_runtime_1.jsx)("a", { href: "https://examregistration.github.com/waitlist/admin", className: github_badges_module_css_1.default.certLink, target: "_blank", rel: "noopener noreferrer", children: "Prepare for the GitHub Administration exam \u2192" })] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "".concat(github_badges_module_css_1.default.certCard), initial: { opacity: 0, y: 50 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: 0.4 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: github_badges_module_css_1.default.cardContent, children: [(0, jsx_runtime_1.jsx)("h2", { children: "GitHub Copilot" }), (0, jsx_runtime_1.jsx)("p", { children: "The GitHub Copilot certification exam evaluates your skill in using the AI-driven code completion tool in various programming languages, certifying your capability to optimize software development workflows efficiently." }), (0, jsx_runtime_1.jsx)("a", { href: "https://examregistration.github.com/waitlist/copilot", className: github_badges_module_css_1.default.certLink, target: "_blank", rel: "noopener noreferrer", children: "Coming Soon! Join the waitlist now for priority access \u2192" })] }), (0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.certBadge, children: (0, jsx_runtime_1.jsx)("img", { src: "https://images.ctfassets.net/wfutmusr1t3h/KdVTNopvz0GZy60xzXCq0/86148a36ddf27ea1d22226f0113b8711/admin-river-image__1_.png?w=1280&q=75", alt: "GitHub Copilot Badge", style: { borderRadius: "50px" } }) }), " "] })] })] }) })); +}; +var handleScrollToTop = function () { + window.scrollTo({ top: 0, behavior: "smooth" }); +}; +var GithubBadges = function () { + return (0, jsx_runtime_1.jsx)(GithubBadgesContent, {}); +}; +exports.default = GithubBadges; diff --git a/src/pages/blogs/index.js b/src/pages/blogs/index.js new file mode 100644 index 00000000..ebee2a75 --- /dev/null +++ b/src/pages/blogs/index.js @@ -0,0 +1,105 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = Blogs; +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importStar(require("react")); +var useDocusaurusContext_1 = __importDefault(require("@docusaurus/useDocusaurusContext")); +var Layout_1 = __importDefault(require("@theme/Layout")); +var Link_1 = __importDefault(require("@docusaurus/Link")); +var index_1 = __importDefault(require("../../database/blogs/index")); +var Head_1 = __importDefault(require("@docusaurus/Head")); +require("./blogs-new.css"); +// Author mapping based on actual blog posts +var authorMapping = { + "streamline-ux-ui": ["Sowmiya Venketashan", "Sanjay Viswanthan"], + "ux-ui-design-job": ["Sowmiya Venketashan", "Sanjay Viswanthan"], + "ux-designers-ai": ["Sowmiya Venketashan", "Sanjay Viswanthan"], + "google-deepmind": ["Sowmiya Venketashan", "Sanjay Viswanthan"], + "google-backlinks": ["Sanjay Viswanthan"], + "git-coding-agent": ["Sanjay Viswanthan"], + "spark-architecture": ["Aditya Singh Rathore", "Sanjay Viswanthan"], + "n8n-workflow-automation": ["Aditya Singh Rathore"], +}; +function Blogs() { + var siteConfig = (0, useDocusaurusContext_1.default)().siteConfig; + var _a = (0, react_1.useState)(""), searchTerm = _a[0], setSearchTerm = _a[1]; + var _b = (0, react_1.useState)(index_1.default), filteredBlogs = _b[0], setFilteredBlogs = _b[1]; + // Filter blogs based on search term + (0, react_1.useEffect)(function () { + if (searchTerm.trim() === "") { + setFilteredBlogs(index_1.default); + } + else { + var filtered = index_1.default.filter(function (blog) { + var _a; + return blog.title.toLowerCase().includes(searchTerm.toLowerCase()) || + blog.description.toLowerCase().includes(searchTerm.toLowerCase()) || + ((_a = blog.tags) === null || _a === void 0 ? void 0 : _a.some(function (tag) { return tag.toLowerCase().includes(searchTerm.toLowerCase()); })); + }); + setFilteredBlogs(filtered); + } + }, [searchTerm]); + var handleSearchChange = function (e) { + setSearchTerm(e.target.value); + }; + return ((0, jsx_runtime_1.jsxs)(Layout_1.default, { title: "Blogs from ".concat(siteConfig.title), description: "Welcome to RecodeHive Blogs. Learn the basics to advanced concepts of web development including HTML, CSS, JavaScript, React, Node.js, DSA, and more.", children: [(0, jsx_runtime_1.jsxs)(Head_1.default, { children: [(0, jsx_runtime_1.jsx)("link", { rel: "preconnect", href: "https://fonts.googleapis.com" }), (0, jsx_runtime_1.jsx)("link", { rel: "preconnect", href: "https://fonts.gstatic.com", crossOrigin: "anonymous" }), (0, jsx_runtime_1.jsx)("link", { href: "https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap", rel: "stylesheet" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "blog-page", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-shapes", children: [(0, jsx_runtime_1.jsx)("div", { className: "bg-shape bg-shape-1" }), (0, jsx_runtime_1.jsx)("div", { className: "bg-shape bg-shape-2" }), (0, jsx_runtime_1.jsx)("div", { className: "bg-shape bg-shape-3" }), (0, jsx_runtime_1.jsx)("div", { className: "bg-shape bg-shape-4" }), (0, jsx_runtime_1.jsx)("div", { className: "bg-shape bg-shape-5" })] }), (0, jsx_runtime_1.jsxs)("section", { className: "blog-hero-section", children: [(0, jsx_runtime_1.jsxs)("div", { className: "floating-particles", children: [(0, jsx_runtime_1.jsx)("div", { className: "particle particle-1" }), (0, jsx_runtime_1.jsx)("div", { className: "particle particle-2" }), (0, jsx_runtime_1.jsx)("div", { className: "particle particle-3" }), (0, jsx_runtime_1.jsx)("div", { className: "particle particle-4" }), (0, jsx_runtime_1.jsx)("div", { className: "particle particle-5" }), (0, jsx_runtime_1.jsx)("div", { className: "particle particle-6" })] }), (0, jsx_runtime_1.jsx)("div", { className: "blog-hero-container", children: (0, jsx_runtime_1.jsxs)("div", { className: "hero-content", children: [(0, jsx_runtime_1.jsxs)("h1", { className: "blog-main-title", children: ["Welcome to ", (0, jsx_runtime_1.jsx)("span", { className: "gradient-text", children: "RecodeHive" }), " Blogs"] }), (0, jsx_runtime_1.jsx)("p", { className: "blog-main-subtitle", children: "Discover comprehensive web development articles, tutorials, and insights covering everything from HTML & CSS fundamentals to advanced JavaScript, React, Node.js, Data Structures & Algorithms, and cutting-edge technologies." })] }) })] }), (0, jsx_runtime_1.jsx)("section", { className: "latest-articles-section", children: (0, jsx_runtime_1.jsxs)("div", { className: "articles-container", children: [(0, jsx_runtime_1.jsx)("div", { className: "section-header", children: (0, jsx_runtime_1.jsx)("div", { className: "search-container", children: (0, jsx_runtime_1.jsxs)("div", { className: "search-wrapper", children: [(0, jsx_runtime_1.jsxs)("svg", { className: "search-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", children: [(0, jsx_runtime_1.jsx)("circle", { cx: "11", cy: "11", r: "8" }), (0, jsx_runtime_1.jsx)("path", { d: "m21 21-4.35-4.35" })] }), (0, jsx_runtime_1.jsx)("input", { type: "text", placeholder: "Search articles by title, description, or topic...", className: "search-input", value: searchTerm, onChange: handleSearchChange }), searchTerm && ((0, jsx_runtime_1.jsx)("button", { className: "clear-search-icon", onClick: function () { return setSearchTerm(""); }, "aria-label": "Clear search", children: (0, jsx_runtime_1.jsxs)("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", children: [(0, jsx_runtime_1.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), (0, jsx_runtime_1.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })] }) }))] }) }) }), searchTerm && ((0, jsx_runtime_1.jsx)("div", { className: "search-results-info", children: (0, jsx_runtime_1.jsx)("p", { children: filteredBlogs.length > 0 + ? "Found ".concat(filteredBlogs.length, " article").concat(filteredBlogs.length !== 1 ? 's' : '', " for \"").concat(searchTerm, "\"") + : "No articles found for \"".concat(searchTerm, "\"") }) })), (0, jsx_runtime_1.jsx)("div", { className: "articles-grid", children: filteredBlogs.length > 0 ? (filteredBlogs.map(function (blog, index) { return ((0, jsx_runtime_1.jsx)(BlogCard, { blog: blog, index: index }, blog.id)); })) : ((0, jsx_runtime_1.jsx)("div", { className: "no-results", children: (0, jsx_runtime_1.jsxs)("div", { className: "no-results-content", children: [(0, jsx_runtime_1.jsx)("div", { className: "no-results-icon", children: "\uD83D\uDD0D" }), (0, jsx_runtime_1.jsx)("h3", { children: "No articles found" }), (0, jsx_runtime_1.jsx)("p", { children: "Try adjusting your search terms or browse all articles." }), (0, jsx_runtime_1.jsx)("button", { className: "clear-search-btn", onClick: function () { return setSearchTerm(""); }, children: "Clear Search" })] }) })) })] }) })] })] })); +} +var BlogCard = function (_a) { + var blog = _a.blog, index = _a.index; + // Get category from blog title or description for demo purposes + var getCategory = function (title) { + if (title.toLowerCase().includes('design') || title.toLowerCase().includes('ux')) + return 'Design'; + if (title.toLowerCase().includes('ai') || title.toLowerCase().includes('deepmind')) + return 'AI & Tech'; + if (title.toLowerCase().includes('github') || title.toLowerCase().includes('git')) + return 'Development'; + return 'Resources'; + }; + // Get authors for this blog post + var getAuthors = function (slug) { + var authors = authorMapping[slug] || ["RecodeHive Team"]; + return authors.length > 1 ? authors.join(" & ") : authors[0]; + }; + var category = getCategory(blog.title); + var authorName = getAuthors(blog.slug); + return ((0, jsx_runtime_1.jsxs)("div", { className: "article-card", children: [(0, jsx_runtime_1.jsx)("div", { className: "card-category", children: category }), (0, jsx_runtime_1.jsx)("div", { className: "card-image", children: (0, jsx_runtime_1.jsx)("img", { src: blog.image, alt: blog.title }) }), (0, jsx_runtime_1.jsxs)("div", { className: "card-content", children: [(0, jsx_runtime_1.jsx)("h3", { className: "card-title", children: blog.title }), (0, jsx_runtime_1.jsx)("p", { className: "card-description", children: blog.description }), (0, jsx_runtime_1.jsxs)("div", { className: "card-meta", children: [(0, jsx_runtime_1.jsxs)("div", { className: "card-author", children: [(0, jsx_runtime_1.jsx)("span", { className: "author-avatar", children: "\uD83D\uDC64" }), (0, jsx_runtime_1.jsx)("span", { className: "author-name", "data-full-name": authorName, children: authorName })] }), (0, jsx_runtime_1.jsx)("span", { className: "card-read-time", children: "5 min read" })] }), (0, jsx_runtime_1.jsx)(Link_1.default, { to: "/blog/".concat(blog.slug), className: "card-read-more", children: "Read Article \u2192" })] })] })); +}; diff --git a/src/pages/broadcasts/details.js b/src/pages/broadcasts/details.js new file mode 100644 index 00000000..8df9dab3 --- /dev/null +++ b/src/pages/broadcasts/details.js @@ -0,0 +1,161 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = VideoDetails; +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importStar(require("react")); +var Layout_1 = __importDefault(require("@theme/Layout")); +var router_1 = require("@docusaurus/router"); +require("./video.css"); +require("./index.css"); +require("./details.css"); +// Function to extract YouTube video ID from URL +var getYoutubeVideoId = function (url) { + var videoId = ''; + var normalMatch = url.match(/(?:youtube\.com\/watch\?v=|youtu\.be\/)([^&\s]+)/); + var shortsMatch = url.match(/youtube\.com\/shorts\/([^&\s]+)/); + if (normalMatch) { + videoId = normalMatch[1]; + } + else if (shortsMatch) { + videoId = shortsMatch[1]; + } + return videoId; +}; +function VideoDetails() { + var _this = this; + var location = (0, router_1.useLocation)(); + var history = (0, router_1.useHistory)(); + var state = location.state; + var video = state === null || state === void 0 ? void 0 : state.video; + var _a = (0, react_1.useState)('Loading...'), title = _a[0], setTitle = _a[1]; + (0, react_1.useEffect)(function () { + var fetchVideoTitle = function () { return __awaiter(_this, void 0, void 0, function () { + var response, data, error_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!(video === null || video === void 0 ? void 0 : video.youtubeUrl)) + return [2 /*return*/]; + _a.label = 1; + case 1: + _a.trys.push([1, 4, , 5]); + return [4 /*yield*/, fetch("https://www.youtube.com/oembed?url=".concat(encodeURIComponent(video.youtubeUrl), "&format=json"))]; + case 2: + response = _a.sent(); + return [4 /*yield*/, response.json()]; + case 3: + data = _a.sent(); + setTitle(data.title); + return [3 /*break*/, 5]; + case 4: + error_1 = _a.sent(); + setTitle('Video Title Unavailable'); + console.error('Error fetching video title:', error_1); + return [3 /*break*/, 5]; + case 5: return [2 /*return*/]; + } + }); + }); }; + fetchVideoTitle(); + }, [video === null || video === void 0 ? void 0 : video.youtubeUrl]); + // Random descriptive text about videos + var descriptions = [ + "Watch engaging content that inspires and educates.", + "Experience the power of visual storytelling.", + "Join us on a journey of learning through video.", + "Explore new concepts through dynamic video content.", + "Get inspired by expert insights and demonstrations.", + "Discover trending topics and timely tutorials.", + "Learn from the best in the field.", + "Stay updated with the latest trends and techniques.", + "Enhance your skills through visual learning.", + ]; + // Get a random description + var randomDescription = descriptions[Math.floor(Math.random() * descriptions.length)]; + if (!video) { + return ((0, jsx_runtime_1.jsx)(Layout_1.default, { children: (0, jsx_runtime_1.jsxs)("div", { className: "video-container", children: [(0, jsx_runtime_1.jsx)("h1", { children: "Video Not Found" }), (0, jsx_runtime_1.jsx)("p", { children: "Sorry, we couldn't find the video you're looking for." })] }) })); + } + return ((0, jsx_runtime_1.jsx)(Layout_1.default, { children: (0, jsx_runtime_1.jsx)("div", { className: "video-container", children: (0, jsx_runtime_1.jsx)("div", { className: "video-card details-card", children: (0, jsx_runtime_1.jsxs)("div", { className: "video-content", children: [(0, jsx_runtime_1.jsxs)("div", { className: "video-info", children: [(0, jsx_runtime_1.jsxs)("div", { className: "video-title", children: [(0, jsx_runtime_1.jsx)("h1", { children: title }), (0, jsx_runtime_1.jsx)("div", { className: "video-type", children: video.type === 'shorts' ? '📱 Shorts' : '🎥 Video' })] }), (0, jsx_runtime_1.jsx)("div", { className: "video-description", children: (0, jsx_runtime_1.jsx)("p", { children: randomDescription }) })] }), (0, jsx_runtime_1.jsx)("div", { className: "video-embed-large", children: (0, jsx_runtime_1.jsx)("iframe", { src: "https://www.youtube.com/embed/".concat(getYoutubeVideoId(video.youtubeUrl)).concat(video.type === 'shorts' ? '?loop=1' : ''), frameBorder: "0", allowFullScreen: true, allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture", loading: "eager", title: title }) }), (0, jsx_runtime_1.jsx)("div", { className: "video-meta", children: (0, jsx_runtime_1.jsx)("p", { children: "Watch in full screen for the best viewing experience" }) }), (0, jsx_runtime_1.jsx)("div", { className: "pagination", style: { marginTop: '30px' }, children: (0, jsx_runtime_1.jsx)("button", { onClick: function () { return history.push('/broadcasts'); }, style: { + display: 'inline-block', + padding: '12px 24px', + backgroundColor: '#007bff', + color: 'white', + borderRadius: '8px', + fontWeight: 'bold', + textDecoration: 'none', + boxShadow: '0 4px 6px rgba(0,0,0,0.1)', + border: 'none' + }, children: "\u2190 Back to Videos" }) })] }) }) }) })); +} diff --git a/src/pages/broadcasts/index.js b/src/pages/broadcasts/index.js new file mode 100644 index 00000000..467abb67 --- /dev/null +++ b/src/pages/broadcasts/index.js @@ -0,0 +1,264 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importStar(require("react")); +var Layout_1 = __importDefault(require("@theme/Layout")); +var router_1 = require("@docusaurus/router"); +require("./video.css"); +var getYoutubeVideoId = function (url) { + // Handle youtu.be short links + if (url.includes('youtu.be/')) { + var match = url.match(/youtu\.be\/([^?&\s]+)/); + return match ? match[1].split('?')[0] : ''; + } + // Handle youtube.com/watch?v= links + if (url.includes('youtube.com/watch')) { + var match = url.match(/[?&]v=([^&\s]+)/); + return match ? match[1].split('&')[0] : ''; + } + // Handle youtube.com/shorts/ links + if (url.includes('youtube.com/shorts/')) { + var match = url.match(/shorts\/([^?&\s]+)/); + return match ? match[1].split('?')[0] : ''; + } + return ''; +}; +// Updated function to determine video type +var getYoutubeContentType = function (url) { + if (url.includes('youtu.be/rbi6XhWp2TU') || url.includes('youtu.be/aGyfIrxx1H8') || url.includes('youtu.be/vFS6ZU1WAPA') || url.includes('youtu.be/DWxyEl-t48g')) { + return 'live'; + } + else if (url.includes('/shorts/')) { + return 'other'; // Changed 'shorts' to 'other' + } + else { + return 'video'; + } +}; +// Youtube Video URLS +// List of both videos and shorts which will be handeled by the component +var videoUrls = [ + "https://youtu.be/3dnQ2lDNeGI?list=PLrLTYhoDFx-kiuFiGQqVpYYZ56pIhUW63", + "https://youtu.be/XWjx-RjmhRM?list=PLrLTYhoDFx-kiuFiGQqVpYYZ56pIhUW63", + "https://youtu.be/R7NReLBCT_8?list=PLrLTYhoDFx-kiuFiGQqVpYYZ56pIhUW63", + "https://youtu.be/sbyXpflAXkQ?list=PLrLTYhoDFx-kiuFiGQqVpYYZ56pIhUW63", + "https://youtu.be/7uKMWBFN2jQ?list=PLrLTYhoDFx-kiuFiGQqVpYYZ56pIhUW63", + "https://youtu.be/v2Pai1TY_Lg?list=PLrLTYhoDFx-kiuFiGQqVpYYZ56pIhUW63", + "https://youtu.be/P-P3L7YzlyE?list=PLrLTYhoDFx-kiuFiGQqVpYYZ56pIhUW63", + "https://youtu.be/BNKSlT8jLQ0?list=PLrLTYhoDFx-kiuFiGQqVpYYZ56pIhUW63", + "https://youtu.be/GnHNScuGKrg?list=PLrLTYhoDFx-kiuFiGQqVpYYZ56pIhUW63", + "https://youtu.be/RSR5E1bhu5Y?list=PLrLTYhoDFx-kiuFiGQqVpYYZ56pIhUW63", + "https://youtu.be/knr5gBv-c9c?list=PLrLTYhoDFx-kiuFiGQqVpYYZ56pIhUW63", + "https://youtu.be/4JX-SIkM3uk?list=PLrLTYhoDFx-kiuFiGQqVpYYZ56pIhUW63", + "https://youtu.be/V2nvZYe_q7g?list=PLrLTYhoDFx-kiuFiGQqVpYYZ56pIhUW63", + "https://youtu.be/rbi6XhWp2TU", + "https://youtu.be/aGyfIrxx1H8", + "https://youtu.be/GTe2DJQ-enU", + "https://youtu.be/vFS6ZU1WAPA", + "https://youtu.be/DWxyEl-t48g", +]; +var VideoCard = function (_a) { + var video = _a.video, onClick = _a.onClick; + var _b = (0, react_1.useState)('Loading...'), title = _b[0], setTitle = _b[1]; + var _c = (0, react_1.useState)(''), thumbnailUrl = _c[0], setThumbnailUrl = _c[1]; + var videoId = getYoutubeVideoId(video.youtubeUrl); + // Try different thumbnail qualities in sequence + var tryThumbnailUrl = function (url) { + if (!videoId) + return; + var img = new Image(); + img.crossOrigin = 'anonymous'; // Handle CORS if needed + img.onload = function () { + // Only set the URL if it's not an error image + if (img.width > 0 && img.height > 0) { + setThumbnailUrl(url); + } + else { + handleThumbnailError(url); + } + }; + img.onerror = function () { return handleThumbnailError(url); }; + img.src = url; + }; + var handleThumbnailError = function (failedUrl) { + console.log("Failed to load thumbnail: ".concat(failedUrl)); + if (failedUrl.includes('maxresdefault')) { + // Try hqdefault if maxresdefault fails + tryThumbnailUrl("https://i.ytimg.com/vi/".concat(videoId, "/hqdefault.jpg")); + } + else if (failedUrl.includes('hqdefault')) { + // Try mqdefault if hqdefault fails + tryThumbnailUrl("https://i.ytimg.com/vi/".concat(videoId, "/mqdefault.jpg")); + } + else if (failedUrl.includes('mqdefault')) { + // Try default if mqdefault fails + tryThumbnailUrl("https://i.ytimg.com/vi/".concat(videoId, "/default.jpg")); + } + else { + // All options failed, show placeholder + setThumbnailUrl(''); + } + }; + (0, react_1.useEffect)(function () { + if (!videoId) + return; + // Start with the highest quality thumbnail + console.log("Loading thumbnails for video ID: ".concat(videoId)); + tryThumbnailUrl("https://i.ytimg.com/vi/".concat(videoId, "/maxresdefault.jpg")); + // Also try the first frame as a fallback (sometimes works when others don't) + var firstFrameUrl = "https://img.youtube.com/vi/".concat(videoId, "/0.jpg"); + setTimeout(function () { + if (!thumbnailUrl) { + console.log('Trying first frame as fallback'); + tryThumbnailUrl(firstFrameUrl); + } + }, 1000); + // Fetch video title + var fetchVideoTitle = function () { return __awaiter(void 0, void 0, void 0, function () { + var response, data, error_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 3, , 4]); + return [4 /*yield*/, fetch("https://www.youtube.com/oembed?url=".concat(encodeURIComponent(video.youtubeUrl), "&format=json"))]; + case 1: + response = _a.sent(); + return [4 /*yield*/, response.json()]; + case 2: + data = _a.sent(); + setTitle(data.title); + return [3 /*break*/, 4]; + case 3: + error_1 = _a.sent(); + setTitle('Video Title Unavailable'); + console.error('Error fetching video title:', error_1); + return [3 /*break*/, 4]; + case 4: return [2 /*return*/]; + } + }); + }); }; + fetchVideoTitle(); + }, [video.youtubeUrl, videoId]); + return ((0, jsx_runtime_1.jsx)("div", { className: "video-card", onClick: function (e) { return onClick(video, e); }, role: "button", tabIndex: 0, onKeyDown: function (e) { + if (e.key === 'Enter' || e.key === ' ') + onClick(video, e); + }, children: (0, jsx_runtime_1.jsxs)("div", { className: "video-content", children: [(0, jsx_runtime_1.jsxs)("div", { className: "video-info", children: [(0, jsx_runtime_1.jsx)("div", { className: "video-title", style: { color: '#333', fontWeight: '600' }, children: title }), (0, jsx_runtime_1.jsx)("div", { className: "video-type" })] }), (0, jsx_runtime_1.jsx)("div", { className: "video-thumbnail", children: (0, jsx_runtime_1.jsx)("div", { className: "thumbnail-container", children: thumbnailUrl ? ((0, jsx_runtime_1.jsx)("img", { src: thumbnailUrl, alt: title, className: "thumbnail-img", style: { objectFit: 'cover' }, loading: "lazy", onError: function (e) { + var img = e.target; + console.log('Image error:', img.src); + // Let the parent component handle the error + setThumbnailUrl(''); + } })) : ((0, jsx_runtime_1.jsx)("div", { className: "thumbnail-placeholder", children: (0, jsx_runtime_1.jsx)("span", { children: "Loading thumbnail..." }) })) }) })] }) })); +}; +var VideoSection = function (_a) { + var title = _a.title, videos = _a.videos, onClick = _a.onClick; + if (videos.length === 0) + return null; + return ((0, jsx_runtime_1.jsxs)("div", { className: "video-section", children: [(0, jsx_runtime_1.jsx)("h2", { children: title }), (0, jsx_runtime_1.jsx)("div", { className: "video-grid", children: videos.map(function (video) { return ((0, jsx_runtime_1.jsx)(VideoCard, { video: video, onClick: onClick }, video.id)); }) })] })); +}; +var Pagination = function (_a) { + var currentPage = _a.currentPage, totalPages = _a.totalPages, setCurrentPage = _a.setCurrentPage; + return ((0, jsx_runtime_1.jsxs)("div", { className: "pagination", children: [(0, jsx_runtime_1.jsx)("button", { disabled: currentPage === 1, onClick: function () { return setCurrentPage(currentPage - 1); }, title: "Previous page", children: "\u2190 Previous" }), (0, jsx_runtime_1.jsxs)("span", { children: ["Page ", currentPage, " of ", totalPages] }), (0, jsx_runtime_1.jsx)("button", { disabled: currentPage === totalPages, onClick: function () { return setCurrentPage(currentPage + 1); }, title: "Next page", children: "Next \u2192" })] })); +}; +function BroadcastsPage() { + var history = (0, router_1.useHistory)(); + var _a = (0, react_1.useState)(1), currentPage = _a[0], setCurrentPage = _a[1]; + var _b = (0, react_1.useState)('videos'), activeTab = _b[0], setActiveTab = _b[1]; // Changed 'shorts' to 'live' + var videosPerPage = 12; + var videoData = videoUrls.map(function (url, index) { return ({ + id: String(index + 1), + youtubeUrl: url, + type: getYoutubeContentType(url), + }); }); + var regularVideos = videoData.filter(function (video) { return video.type === 'video'; }); + var liveVideos = videoData.filter(function (video) { return video.type === 'live'; }); // Changed 'shorts' to 'live' + var otherVideos = videoData.filter(function (video) { return video.type === 'other'; }); + var indexOfLastVideo = currentPage * videosPerPage; + var indexOfFirstVideo = indexOfLastVideo - videosPerPage; + var paginatedVideos = regularVideos.slice(indexOfFirstVideo, indexOfLastVideo); + var paginatedLiveVideos = liveVideos.slice(indexOfFirstVideo, indexOfLastVideo); // Changed 'shorts' to 'live' + var totalPages = Math.ceil((activeTab === 'videos' ? regularVideos.length : liveVideos.length) / videosPerPage); // Changed 'shorts' to 'live' + (0, react_1.useEffect)(function () { + setCurrentPage(1); + }, [activeTab]); + var handleVideoClick = function (video, event) { + var target = event.target; + if (target.tagName === 'IFRAME' || target.className === 'video-embed') + return; + history.push('/broadcasts/details', { video: video }); + }; + return ((0, jsx_runtime_1.jsx)(Layout_1.default, { children: (0, jsx_runtime_1.jsxs)("div", { className: "video-container", children: [(0, jsx_runtime_1.jsx)("h1", { children: "Featured Content" }), (0, jsx_runtime_1.jsx)("p", { className: "video-subtitle", children: "Watch our curated collection of videos and shorts" }), (0, jsx_runtime_1.jsxs)("div", { className: "video-tabs", children: [(0, jsx_runtime_1.jsx)("button", { className: "tab-button ".concat(activeTab === 'videos' ? 'active' : ''), onClick: function () { return setActiveTab('videos'); }, children: "\uD83C\uDFA5 Videos" }), (0, jsx_runtime_1.jsx)("button", { className: "tab-button ".concat(activeTab === 'live' ? 'active' : ''), onClick: function () { return setActiveTab('live'); }, children: "\uD83D\uDD34 Past Live" })] }), activeTab === 'videos' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(VideoSection, { title: "Latest Videos", videos: paginatedVideos, onClick: handleVideoClick }), (0, jsx_runtime_1.jsx)(Pagination, { currentPage: currentPage, totalPages: totalPages, setCurrentPage: setCurrentPage })] })), activeTab === 'live' && ( // Changed 'shorts' to 'live' + (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(VideoSection, { title: "Past Live Videos", videos: paginatedLiveVideos, onClick: handleVideoClick }), (0, jsx_runtime_1.jsx)(Pagination, { currentPage: currentPage, totalPages: totalPages, setCurrentPage: setCurrentPage })] }))] }) })); +} +exports.default = BroadcastsPage; diff --git a/src/pages/careers/index.js b/src/pages/careers/index.js new file mode 100644 index 00000000..964ff620 --- /dev/null +++ b/src/pages/careers/index.js @@ -0,0 +1,280 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = CareersPage; +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importStar(require("react")); +var Layout_1 = __importDefault(require("@theme/Layout")); +var Head_1 = __importDefault(require("@docusaurus/Head")); +var framer_motion_1 = require("framer-motion"); +var Link_1 = __importDefault(require("@docusaurus/Link")); +// removed useColorMode import to avoid provider + SSR issues +var ExecutionEnvironment_1 = __importDefault(require("@docusaurus/ExecutionEnvironment")); +// Safe hook for color mode that handles SSR +function useSafeColorMode() { + var _a = (0, react_1.useState)(false), mounted = _a[0], setMounted = _a[1]; + var _b = (0, react_1.useState)('light'), colorMode = _b[0], setColorMode = _b[1]; + var _c = (0, react_1.useState)(false), isDark = _c[0], setIsDark = _c[1]; + (0, react_1.useEffect)(function () { + setMounted(true); + if (!ExecutionEnvironment_1.default.canUseDOM) + return; + var getThemeFromDOM = function () { + return document.documentElement.getAttribute('data-theme') || 'light'; + }; + var applyTheme = function () { + var mode = getThemeFromDOM(); + setColorMode(mode); + setIsDark(mode === 'dark'); + }; + // set immediately on mount + applyTheme(); + // watch for changes when navbar toggle is clicked + var observer = new MutationObserver(applyTheme); + observer.observe(document.documentElement, { + attributes: true, + attributeFilter: ['data-theme'], + }); + return function () { return observer.disconnect(); }; + }, []); + return { colorMode: colorMode, isDark: isDark, mounted: mounted }; +} +// Animation variants for consistent animations +var fadeIn = { + hidden: { opacity: 0, y: 20 }, + visible: { opacity: 1, y: 0, transition: { duration: 0.6 } } +}; +var staggerContainer = { + hidden: {}, + visible: { + transition: { + staggerChildren: 0.2 + } + } +}; +// Sample data for the careers page +var perks = [ + { + icon: "🏠", + title: "Remote First", + description: "Work from anywhere in the world with flexible hours that suit your lifestyle." + }, + { + icon: "💰", + title: "Competitive Salary", + description: "We offer competitive compensation packages with equity options." + }, + { + icon: "🎓", + title: "Learning & Development", + description: "Annual learning budget and conference allowances to grow your skills." + }, + { + icon: "🏥", + title: "Health & Wellness", + description: "Comprehensive health insurance and wellness programs for you and your family." + }, + { + icon: "🌴", + title: "Unlimited PTO", + description: "Take the time you need to recharge and maintain work-life balance." + }, + { + icon: "🚀", + title: "Career Growth", + description: "Clear career progression paths with mentorship and leadership opportunities." + } +]; +var cultureValues = [ + { + title: "Innovation First", + description: "We embrace new technologies and creative solutions to solve complex problems.", + image: "/img/culture-innovation.jpg" + }, + { + title: "Collaboration", + description: "We believe in the power of teamwork and diverse perspectives.", + image: "/img/culture-collaboration.jpg" + }, + { + title: "Growth Mindset", + description: "We're committed to continuous learning and personal development.", + image: "/img/culture-growth.jpg" + } +]; +var jobOpenings = [ + { + title: "Frontend Developer", + department: "Engineering", + location: "Remote", + type: "Full-time", + description: "Build beautiful and responsive user interfaces using React and modern web technologies." + }, + { + title: "Backend Developer", + department: "Engineering", + location: "Remote", + type: "Full-time", + description: "Design and develop scalable backend services and APIs using Node.js and cloud technologies." + }, + { + title: "DevOps Engineer", + department: "Engineering", + location: "Remote", + type: "Full-time", + description: "Manage infrastructure, CI/CD pipelines, and ensure system reliability and scalability." + }, + { + title: "Technical Writer", + department: "Content", + location: "Remote", + type: "Part-time", + description: "Create engaging technical documentation and educational content for our community." + } +]; +var testimonials = [ + { + name: "Sarah Chen", + role: "Senior Frontend Developer", + content: "RecodeHive has given me the opportunity to work on cutting-edge projects while maintaining an amazing work-life balance. The team is incredibly supportive and collaborative.", + avatar: "/img/testimonial-sarah.jpg" + }, + { + name: "Marcus Johnson", + role: "DevOps Engineer", + content: "I love the remote-first culture here. The flexibility to work from anywhere has allowed me to travel while building my career. The learning opportunities are endless.", + avatar: "/img/testimonial-marcus.jpg" + }, + { + name: "Priya Patel", + role: "Product Manager", + content: "The growth mindset at RecodeHive is real. I've been able to take on new challenges and expand my skill set with full support from leadership.", + avatar: "/img/testimonial-priya.jpg" + } +]; +function CareersContent() { + var _a = useSafeColorMode(), colorMode = _a.colorMode, isDark = _a.isDark, mounted = _a.mounted; + var _b = (0, react_1.useState)(0), activeTestimonial = _b[0], setActiveTestimonial = _b[1]; + (0, react_1.useEffect)(function () { + var interval = setInterval(function () { + setActiveTestimonial(function (prev) { return (prev + 1) % testimonials.length; }); + }, 5000); + return function () { return clearInterval(interval); }; + }, []); + return ((0, jsx_runtime_1.jsxs)(Layout_1.default, { title: "Careers - Join RecodeHive", description: "Join our team of passionate developers and help shape the future of coding education. Explore career opportunities at RecodeHive.", children: [(0, jsx_runtime_1.jsxs)(Head_1.default, { children: [(0, jsx_runtime_1.jsx)("title", { children: "Careers - Join RecodeHive" }), (0, jsx_runtime_1.jsx)("meta", { name: "description", content: "Join our team of passionate developers and help shape the future of coding education. Explore career opportunities at RecodeHive." })] }), (0, jsx_runtime_1.jsxs)("div", { className: "careers-page transition-colors duration-300 min-h-screen ".concat(isDark + ? 'bg-gray-900' + : 'bg-gradient-to-b from-white to-gray-50'), children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.section, { className: "hero-section py-20 px-4 text-center bg-gradient-to-br from-blue-600 via-purple-600 to-blue-800 text-white relative overflow-hidden", initial: "hidden", animate: "visible", variants: staggerContainer, children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 bg-black/20" }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10 max-w-4xl mx-auto", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.h1, { className: "text-5xl md:text-6xl font-bold mb-6 bg-clip-text text-transparent bg-gradient-to-r from-white to-blue-100", variants: fadeIn, children: "Join the Future of Code Education" }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.p, { className: "text-xl md:text-2xl mb-8 text-blue-100", variants: fadeIn, children: "Help us build the next generation of developers. Work with a passionate team creating impact through education." }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "flex flex-col sm:flex-row gap-4 justify-center", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)(Link_1.default, { href: "#open-positions", className: "bg-white text-blue-600 px-8 py-4 rounded-lg font-semibold hover:bg-blue-50 transition-all duration-300 transform hover:scale-105 shadow-lg", children: "View Open Positions" }), (0, jsx_runtime_1.jsx)(Link_1.default, { href: "#our-culture", className: "bg-white text-blue-600 px-8 py-4 rounded-lg font-semibold hover:bg-blue-50 transition-all duration-300 transform hover:scale-105 shadow-lg", children: "Learn About Our Culture" })] })] })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.section, { id: "culture", className: "culture-section py-20 px-4", style: { + backgroundColor: isDark ? '#111827' : '#ffffff' + }, initial: "hidden", whileInView: "visible", viewport: { once: true }, variants: staggerContainer, children: (0, jsx_runtime_1.jsxs)("div", { className: "max-w-6xl mx-auto", children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "text-center mb-16", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("h2", { className: "text-4xl md:text-5xl font-bold mb-6", id: "our-culture", style: { + color: isDark ? '#ffffff' : '#111827' + }, children: "Our Culture & Values" }), (0, jsx_runtime_1.jsx)("div", { className: "w-full flex justify-center", style: { + display: 'flex', + justifyContent: 'center', + alignItems: 'center' + }, children: (0, jsx_runtime_1.jsx)("p", { className: "text-xl max-w-3xl", style: { + color: isDark ? '#d1d5db' : '#4b5563', + textAlign: 'center', + margin: '0 auto' + }, children: "We're building more than just a company\u2014we're creating a community of learners, innovators, and leaders." }) })] }), (0, jsx_runtime_1.jsx)("div", { className: "grid md:grid-cols-3 gap-8", children: cultureValues.map(function (value, index) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "culture-card rounded-xl shadow-lg p-8 hover:shadow-xl transition-all duration-300 transform hover:scale-105", style: { + backgroundColor: isDark ? '#0f172a' : '#ffffff' + }, variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("div", { className: "h-48 bg-gradient-to-br from-blue-400 to-purple-500 rounded-lg mb-6 flex items-center justify-center", children: (0, jsx_runtime_1.jsx)("span", { className: "text-6xl", children: "\uD83D\uDE80" }) }), (0, jsx_runtime_1.jsx)("h3", { className: "text-2xl font-bold mb-4", style: { + color: isDark ? '#ffffff' : '#111827' + }, children: value.title }), (0, jsx_runtime_1.jsx)("p", { style: { + color: isDark ? '#d1d5db' : '#4b5563' + }, children: value.description })] }, index)); }) })] }) }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.section, { className: "perks-section py-20 px-4", style: { + backgroundColor: isDark ? '#0f172a' : '#f9fafb' + }, initial: "hidden", whileInView: "visible", viewport: { once: true }, variants: staggerContainer, children: (0, jsx_runtime_1.jsxs)("div", { className: "max-w-6xl mx-auto", children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "text-center mb-16", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("h2", { className: "text-4xl md:text-5xl font-bold mb-6", style: { + color: isDark ? '#ffffff' : '#111827' + }, children: "Perks & Benefits" }), (0, jsx_runtime_1.jsx)("div", { className: "w-full flex justify-center", style: { + display: 'flex', + justifyContent: 'center', + alignItems: 'center' + }, children: (0, jsx_runtime_1.jsx)("p", { className: "text-xl max-w-3xl", style: { + color: isDark ? '#d1d5db' : '#4b5563', + textAlign: 'center', + margin: '0 auto' + }, children: "We take care of our team so they can focus on doing their best work." }) })] }), (0, jsx_runtime_1.jsx)("div", { className: "grid md:grid-cols-2 lg:grid-cols-3 gap-8", children: perks.map(function (perk, index) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "perk-card rounded-xl p-6 shadow-lg hover:shadow-xl transition-all duration-300 transform hover:scale-105", style: { + backgroundColor: isDark ? '#1f2937' : '#ffffff' + }, variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("div", { className: "text-4xl mb-4", children: perk.icon }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-bold mb-3", style: { + color: isDark ? '#ffffff' : '#111827' + }, children: perk.title }), (0, jsx_runtime_1.jsx)("p", { style: { + color: isDark ? '#d1d5db' : '#4b5563' + }, children: perk.description })] }, index)); }) })] }) }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.section, { id: "openings", className: "jobs-section py-20 px-4", style: { + backgroundColor: isDark ? '#111827' : '#ffffff' + }, initial: "hidden", whileInView: "visible", viewport: { once: true }, variants: staggerContainer, children: (0, jsx_runtime_1.jsxs)("div", { className: "max-w-6xl mx-auto", children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "text-center mb-16", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("h2", { className: "text-4xl md:text-5xl font-bold mb-6", id: "open-positions", style: { + color: isDark ? '#ffffff' : '#111827' + }, children: "Open Positions" }), (0, jsx_runtime_1.jsx)("p", { className: "text-xl max-w-3xl mx-auto text-center", style: { + color: isDark ? '#d1d5db' : '#4b5563' + }, children: "Find your next opportunity and help us build the future of coding education." })] }), (0, jsx_runtime_1.jsx)("div", { className: "space-y-6", children: jobOpenings.map(function (job, index) { return ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "job-card rounded-xl p-6 shadow-lg hover:shadow-xl transition-all duration-300", style: { + backgroundColor: isDark ? '#1f2937' : '#ffffff' + }, variants: fadeIn, children: (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col md:flex-row md:items-center md:justify-between", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex-1", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col md:flex-row md:items-center gap-4 mb-4", children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-2xl font-bold", style: { + color: isDark ? '#ffffff' : '#111827' + }, children: job.title }), (0, jsx_runtime_1.jsxs)("div", { className: "flex gap-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "px-3 py-1 rounded-full text-sm ".concat(isDark + ? 'bg-blue-900 text-blue-200' + : 'bg-blue-100 text-blue-800'), children: job.department }), (0, jsx_runtime_1.jsx)("span", { className: "px-3 py-1 rounded-full text-sm ".concat(isDark + ? 'bg-green-900 text-green-200' + : 'bg-green-100 text-green-800'), children: job.location }), (0, jsx_runtime_1.jsx)("span", { className: "px-3 py-1 rounded-full text-sm ".concat(isDark + ? 'bg-purple-900 text-purple-200' + : 'bg-purple-100 text-purple-800'), children: job.type })] })] }), (0, jsx_runtime_1.jsx)("p", { className: "mb-4", style: { + color: isDark ? '#d1d5db' : '#4b5563' + }, children: job.description })] }), (0, jsx_runtime_1.jsx)("div", { className: "md:ml-6", children: (0, jsx_runtime_1.jsx)(Link_1.default, { to: "/contact-us", className: "bg-blue-600 hover:bg-blue-700 px-6 py-3 rounded-lg font-semibold transition-all duration-300 transform hover:scale-105 shadow-lg inline-block", style: { + color: '#ffffff', + textDecoration: 'none' + }, children: "Apply Now" }) })] }) }, index)); }) })] }) }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.section, { className: "testimonials-section py-20 px-4", style: { + backgroundColor: isDark ? '#0f172a' : '#f9fafb' + }, initial: "hidden", whileInView: "visible", viewport: { once: true }, variants: staggerContainer, children: (0, jsx_runtime_1.jsxs)("div", { className: "max-w-4xl mx-auto", children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "text-center mb-16", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("h2", { className: "text-4xl md:text-5xl font-bold mb-6", style: { + color: isDark ? '#ffffff' : '#111827' + }, children: "What Our Team Says" }), (0, jsx_runtime_1.jsx)("p", { className: "text-xl text-center", style: { + color: isDark ? '#d1d5db' : '#4b5563' + }, children: "Hear from our team members about their experience at RecodeHive." })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "testimonial-carousel rounded-xl p-8 shadow-lg", style: { + backgroundColor: isDark ? '#111827' : '#ffffff' + }, variants: fadeIn, children: [(0, jsx_runtime_1.jsxs)("div", { className: "testimonial-content text-center", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-20 h-20 bg-gradient-to-br from-blue-400 to-purple-500 rounded-full mx-auto mb-6 flex items center justify-center", children: (0, jsx_runtime_1.jsx)("span", { className: "text-2xl", children: "\uD83D\uDC64" }) }), (0, jsx_runtime_1.jsxs)("blockquote", { className: "text-lg md:text-xl mb-6 italic", style: { + color: isDark ? '#d1d5db' : '#374151' + }, children: ["\"", testimonials[activeTestimonial].content, "\""] }), (0, jsx_runtime_1.jsxs)("div", { className: "testimonial-author", children: [(0, jsx_runtime_1.jsx)("h4", { className: "text-xl font-bold", style: { + color: isDark ? '#ffffff' : '#111827' + }, children: testimonials[activeTestimonial].name }), (0, jsx_runtime_1.jsx)("p", { style: { + color: isDark ? '#9ca3af' : '#4b5563' + }, children: testimonials[activeTestimonial].role })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "flex justify-center mt-8 gap-2", children: testimonials.map(function (_, index) { return ((0, jsx_runtime_1.jsx)("button", { className: "w-3 h-3 rounded-full transition-all duration-300 ".concat(index === activeTestimonial + ? 'bg-blue-600 scale-110' + : isDark + ? 'bg-gray-600 hover:bg-gray-500' + : 'bg-gray-300 hover:bg-gray-400'), onClick: function () { return setActiveTestimonial(index); } }, index)); }) })] })] }) }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.section, { className: "cta-section py-20 px-4 bg-gradient-to-br from-blue-600 via-purple-600 to-blue-800 text-white text-center", initial: "hidden", whileInView: "visible", viewport: { once: true }, variants: staggerContainer, children: (0, jsx_runtime_1.jsxs)("div", { className: "max-w-4xl mx-auto", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.h2, { className: "text-4xl md:text-5xl font-bold mb-6", variants: fadeIn, children: "Ready to Shape the Future?" }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.p, { className: "text-xl mb-8 text-blue-100", variants: fadeIn, children: "Don't see a perfect fit? We're always looking for talented individuals to join our mission." }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "flex flex-col sm:flex-row gap-4 justify-center", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)(Link_1.default, { to: "/contact-us", className: "bg-white text-blue-600 px-8 py-4 rounded-lg font-semibold hover:bg-blue-50 transition-all duration-300 transform hover:scale-105 shadow-lg", children: "Get In Touch" }), (0, jsx_runtime_1.jsx)(Link_1.default, { to: "/community", className: "bg-white text-blue-600 px-8 py-4 rounded-lg font-semibold hover:bg-blue-50 transition-all duration-300 transform hover:scale-105 shadow-lg", children: "Join Our Community" })] })] }) })] })] })); +} +function CareersPage() { + return (0, jsx_runtime_1.jsx)(CareersContent, {}); +} diff --git a/src/pages/code-of-conduct/index.js b/src/pages/code-of-conduct/index.js new file mode 100644 index 00000000..9e244393 --- /dev/null +++ b/src/pages/code-of-conduct/index.js @@ -0,0 +1,27 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importDefault(require("react")); +var Layout_1 = __importDefault(require("@theme/Layout")); +var Link_1 = __importDefault(require("@docusaurus/Link")); +var Section = function (_a) { + var title = _a.title, children = _a.children; + return ((0, jsx_runtime_1.jsxs)("section", { className: "mb-6", children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-semibold mb-4", children: title }), children] })); +}; +var ListItem = function (_a) { + var title = _a.title, description = _a.description; + return ((0, jsx_runtime_1.jsxs)("li", { className: "mb-4", children: [(0, jsx_runtime_1.jsx)("strong", { className: "font-medium", children: title }), (0, jsx_runtime_1.jsx)("p", { children: description })] })); +}; +var LastUpdated = function () { return ((0, jsx_runtime_1.jsxs)("p", { className: "text-sm text-gray-600 dark:text-gray-500 mb-4", children: [(0, jsx_runtime_1.jsx)("strong", { children: "Last Updated:" }), " 25th May 2025"] })); }; +var OurPledge = function () { return ((0, jsx_runtime_1.jsxs)(Section, { title: "Our Pledge", children: [(0, jsx_runtime_1.jsx)("p", { className: "mb-4", children: "We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation." }), (0, jsx_runtime_1.jsx)("p", { children: "We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community." })] })); }; +var OurStandards = function () { return ((0, jsx_runtime_1.jsxs)(Section, { title: "Our Standards", children: [(0, jsx_runtime_1.jsx)("p", { className: "mb-4", children: "Examples of behavior that contributes to a positive environment for our community include:" }), (0, jsx_runtime_1.jsxs)("ul", { className: "list-disc list-inside mb-4", children: [(0, jsx_runtime_1.jsx)("li", { children: "Demonstrating empathy and kindness toward other people" }), (0, jsx_runtime_1.jsx)("li", { children: "Being respectful of differing opinions, viewpoints, and experiences" }), (0, jsx_runtime_1.jsx)("li", { children: "Giving and gracefully accepting constructive feedback" }), (0, jsx_runtime_1.jsx)("li", { children: "Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience" }), (0, jsx_runtime_1.jsx)("li", { children: "Focusing on what is best not just for us as individuals, but for the overall community" })] }), (0, jsx_runtime_1.jsx)("p", { className: "mb-4", children: "Examples of unacceptable behavior include:" }), (0, jsx_runtime_1.jsxs)("ul", { className: "list-disc list-inside mb-4", children: [(0, jsx_runtime_1.jsx)("li", { children: "The use of sexualized language or imagery, and sexual attention or advances of any kind" }), (0, jsx_runtime_1.jsx)("li", { children: "Trolling, insulting or derogatory comments, and personal or political attacks" }), (0, jsx_runtime_1.jsx)("li", { children: "Public or private harassment" }), (0, jsx_runtime_1.jsx)("li", { children: "Publishing others' private information, such as a physical or email address, without their explicit permission" }), (0, jsx_runtime_1.jsx)("li", { children: "Other conduct which could reasonably be considered inappropriate in a professional setting" })] })] })); }; +var EnforcementResponsibilities = function () { return ((0, jsx_runtime_1.jsxs)(Section, { title: "Enforcement Responsibilities", children: [(0, jsx_runtime_1.jsx)("p", { className: "mb-4", children: "Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful." }), (0, jsx_runtime_1.jsx)("p", { children: "Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate." })] })); }; +var Scope = function () { return ((0, jsx_runtime_1.jsx)(Section, { title: "Scope", children: (0, jsx_runtime_1.jsx)("p", { children: "This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event." }) })); }; +var Enforcement = function () { return ((0, jsx_runtime_1.jsx)(Section, { title: "Enforcement", children: (0, jsx_runtime_1.jsx)("p", { children: "Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at Email. All complaints will be reviewed and investigated promptly and fairly. All community leaders are obligated to respect the privacy and security of the reporter of any incident." }) })); }; +var EnforcementGuidelines = function () { return ((0, jsx_runtime_1.jsxs)(Section, { title: "Enforcement Guidelines", children: [(0, jsx_runtime_1.jsx)("p", { className: "mb-4", children: "Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:" }), (0, jsx_runtime_1.jsxs)("ol", { className: "list-decimal list-inside mb-4", children: [(0, jsx_runtime_1.jsx)(ListItem, { title: "Correction", description: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Community Impact:" }), " Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("strong", { children: "Consequence:" }), " A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested."] }) }), (0, jsx_runtime_1.jsx)(ListItem, { title: "Warning", description: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Community Impact:" }), " A violation through a single incident or series of actions.", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("strong", { children: "Consequence:" }), " A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period. Violating these terms may lead to a temporary or permanent ban."] }) }), (0, jsx_runtime_1.jsx)(ListItem, { title: "Temporary Ban", description: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Community Impact:" }), " A serious violation of community standards, including sustained inappropriate behavior.", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("strong", { children: "Consequence:" }), " A temporary ban from any interaction or public communication with the community for a specified period. Violating these terms may lead to a permanent ban."] }) }), (0, jsx_runtime_1.jsx)(ListItem, { title: "Permanent Ban", description: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Community Impact:" }), " Demonstrating a pattern of violation of community standards, including harassment of an individual, or disparagement of groups.", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("strong", { children: "Consequence:" }), " A permanent ban from any sort of public interaction within the community."] }) })] })] })); }; +var Attribution = function () { return ((0, jsx_runtime_1.jsxs)(Section, { title: "Attribution", children: [(0, jsx_runtime_1.jsxs)("p", { className: "mb-2", children: ["This Code of Conduct is adapted from the ", (0, jsx_runtime_1.jsx)(Link_1.default, { to: "https://www.contributor-covenant.org/", target: "_blank", rel: "noopener noreferrer", children: "Contributor Covenant" }), ", version 2.0."] }), (0, jsx_runtime_1.jsxs)("p", { children: ["For more details, visit ", (0, jsx_runtime_1.jsx)(Link_1.default, { to: "https://www.contributor-covenant.org/version/2/0/code_of_conduct/", target: "_blank", rel: "noopener noreferrer", children: "here" }), "."] })] })); }; +var CodeOfConduct = function () { return ((0, jsx_runtime_1.jsx)(Layout_1.default, { children: (0, jsx_runtime_1.jsxs)("div", { className: "max-w-4xl mx-auto p-6 mt-5 mb-5 rounded-lg shadow-md", children: [(0, jsx_runtime_1.jsx)("h2", { className: "text-center text-2xl font-bold mb-5", children: "Code Of Conduct" }), (0, jsx_runtime_1.jsxs)("div", { className: "space-y-6", children: [(0, jsx_runtime_1.jsx)(LastUpdated, {}), (0, jsx_runtime_1.jsx)(OurPledge, {}), (0, jsx_runtime_1.jsx)(OurStandards, {}), (0, jsx_runtime_1.jsx)(EnforcementResponsibilities, {}), (0, jsx_runtime_1.jsx)(Scope, {}), (0, jsx_runtime_1.jsx)(Enforcement, {}), (0, jsx_runtime_1.jsx)(EnforcementGuidelines, {}), (0, jsx_runtime_1.jsx)(Attribution, {})] })] }) })); }; +exports.default = CodeOfConduct; diff --git a/src/pages/community/index.js b/src/pages/community/index.js new file mode 100644 index 00000000..3f3145a8 --- /dev/null +++ b/src/pages/community/index.js @@ -0,0 +1,217 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = CommunityPage; +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importStar(require("react")); +var Layout_1 = __importDefault(require("@theme/Layout")); +var Head_1 = __importDefault(require("@docusaurus/Head")); +var framer_motion_1 = require("framer-motion"); +var bottom_to_top_1 = __importDefault(require("@site/src/components/scroll/bottom-to-top")); +require("./community.css"); +var contributionSections = [ + { + id: 'code', + title: 'Code', + icon: '💻', + description: "If you're a developer, you can:", + items: [ + 'Access coding standards 🧑‍💻', + 'Find debugging tips 🐞', + 'Propose new features 🚀' + ], + details: [ + 'Access coding standards and setup instructions to streamline your work with the team\'s codebase.', + 'Find tips for debugging, troubleshooting common errors, and submitting clear bug reports.', + 'Read about how to propose new features, collaborate on pull requests, and review peer code.' + ], + links: [ + { text: 'GitHub', url: 'https://github.com/recodehive' }, + { text: 'GitLab', url: 'https://gitlab.com' } + ], + color: '#8b5cf6' + }, + { + id: 'documentation', + title: 'Documentation', + icon: '📚', + description: "If you're a writer or educator, you can:", + items: [ + 'Improve documentation 🖋️', + 'Structure tutorials 📚', + 'Translate content 🌍' + ], + details: [ + 'Explore detailed guides for improving existing documentation, including style and terminology tips.', + 'Learn how to structure tutorials, add examples, and make learning resources more accessible.', + 'See guidelines for translating technical content into different languages or for various backgrounds.' + ], + links: [ + { text: 'GitHub Docs', url: 'https://www.recodehive.com/docs' } + ], + color: '#f59e0b' + }, + { + id: 'community', + title: 'Community', + icon: '🤝', + description: "If you're a community-minded person, you can:", + items: [ + 'Connect with members 👥', + 'Support newcomers 💬', + 'Share resources 📝' + ], + details: [ + 'Connect with fellow members by joining active discussions in forums and chats.', + 'Offer support to newcomers by guiding them through onboarding and answering beginner questions.', + 'Share resources, tutorials, and best practices to help others grow.' + ], + links: [ + { text: 'Discord', url: 'https://discord.com/invite/w2V2aH6U' }, + { text: 'Whatsapp', url: 'https://chat.whatsapp.com/Izl2yfbFlmY8CExjnIpNkX?mode=ems_copy_t' } + ], + color: '#10b981' + }, + { + id: 'get-started', + title: 'Get Started', + icon: '🚀', + description: 'To begin your journey with RecodeHive:', + items: [ + 'Sign up and introduce yourself 👋', + 'Discover key repositories 🔍', + 'Browse beginner tasks 📋' + ], + details: [ + 'Learn how to sign up and introduce yourself in the welcome channels on Discord or Slack.', + 'Discover key open source repositories and find out how you can contribute, regardless of experience level.', + 'Browse a list of beginner-friendly tasks and guides to help select your first area of involvement.' + ], + links: [ + { text: 'Discord', url: 'https://discord.com/invite/w2V2aH6U' }, + { text: 'Whatsapp', url: 'https://chat.whatsapp.com/Izl2yfbFlmY8CExjnIpNkX?mode=ems_copy_t' }, + { text: 'GitHub', url: 'https://github.com/recodehive' } + ], + color: '#6366f1' + } +]; +var tableOfContents = [ + { id: 'how-you-can-contribute', title: 'How You Can Contribute', icon: '⚡' }, + { id: 'code', title: 'Code', icon: '💻' }, + { id: 'documentation', title: 'Documentation', icon: '📚' }, + { id: 'community', title: 'Community', icon: '🤝' }, + { id: 'get-started', title: 'Get Started', icon: '🚀' }, + { id: 'thank-you', title: 'Thank You', icon: '💚' } +]; +function CommunityPage() { + var _a = (0, react_1.useState)(['how-you-can-contribute']), activeSections = _a[0], setActiveSections = _a[1]; + var _b = (0, react_1.useState)(null), selectedSection = _b[0], setSelectedSection = _b[1]; + var _c = (0, react_1.useState)([]), openDropdowns = _c[0], setOpenDropdowns = _c[1]; + (0, react_1.useEffect)(function () { + var handleScroll = function () { + var sections = tableOfContents.map(function (item) { return item.id; }); + var midpoint = window.innerHeight * 0.4; + var visible = []; + sections.forEach(function (id) { + var el = document.getElementById(id); + if (el) { + var rect = el.getBoundingClientRect(); + if (rect.top <= midpoint && rect.bottom >= midpoint) { + visible.push(id); + } + } + }); + if (visible.length === 1) { + var current_1 = visible[0]; + var element = document.getElementById(current_1); + if (element) { + var rowTop_1 = element.offsetTop; + var siblings = sections.filter(function (id) { + var sib = document.getElementById(id); + return sib && sib.offsetTop === rowTop_1; + }); + visible.push.apply(visible, siblings.filter(function (id) { return id !== current_1; })); + } + } + if (visible.length > 0) { + setActiveSections(visible); + if (selectedSection && !visible.includes(selectedSection)) { + setSelectedSection(null); + } + } + }; + window.addEventListener("scroll", handleScroll); + handleScroll(); + return function () { return window.removeEventListener("scroll", handleScroll); }; + }, [selectedSection]); + var scrollToSection = function (sectionId) { + var element = document.getElementById(sectionId); + if (element) { + var offset = 80; + var top_1 = element.offsetTop - offset; + window.scrollTo({ top: top_1, behavior: "smooth" }); + setSelectedSection(sectionId); + } + }; + var toggleDropdown = function (itemId) { + setOpenDropdowns(function (prev) { + return prev.includes(itemId) + ? prev.filter(function (id) { return id !== itemId; }) + : __spreadArray(__spreadArray([], prev, true), [itemId], false); + }); + }; + var _d = (0, react_1.useState)(false), isMobile = _d[0], setIsMobile = _d[1]; + (0, react_1.useEffect)(function () { + var checkMobile = function () { return setIsMobile(window.innerWidth < 768); }; + checkMobile(); + window.addEventListener('resize', checkMobile); + return function () { return window.removeEventListener('resize', checkMobile); }; + }, []); + return ((0, jsx_runtime_1.jsx)(Layout_1.default, { title: "Hive Community", description: "Welcome to RecodeHive \u2014 a community built for everyone to learn, share, and grow.", children: (0, jsx_runtime_1.jsxs)("div", { className: "community-page", children: [(0, jsx_runtime_1.jsxs)(Head_1.default, { children: [(0, jsx_runtime_1.jsx)("meta", { property: "og:title", content: "Hive Community - RecodeHive" }), (0, jsx_runtime_1.jsx)("meta", { property: "og:description", content: "Join our thriving community of developers, designers, and creators." })] }), (0, jsx_runtime_1.jsxs)("main", { className: "community-page", children: [(0, jsx_runtime_1.jsxs)("section", { className: "community-hero", children: [(0, jsx_runtime_1.jsxs)("div", { className: "community-hero-background", children: [(0, jsx_runtime_1.jsx)("div", { className: "hero-particle" }), (0, jsx_runtime_1.jsx)("div", { className: "hero-particle" }), (0, jsx_runtime_1.jsx)("div", { className: "hero-particle" })] }), (0, jsx_runtime_1.jsx)("div", { className: "container", children: (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "community-hero-content", initial: { opacity: 0, y: 30 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.8 }, children: [(0, jsx_runtime_1.jsx)("div", { className: "hero-icon", children: "\uD83D\uDC1D" }), (0, jsx_runtime_1.jsx)("h1", { className: "community-hero-title", children: "Welcome to Hive Community" }), (0, jsx_runtime_1.jsxs)("p", { className: "community-hero-description", children: ["Welcome to ", (0, jsx_runtime_1.jsx)("strong", { children: "RecodeHive" }), " \u2014 a community built for everyone to", ' ', (0, jsx_runtime_1.jsx)("span", { className: "highlight", children: "learn" }), ", ", (0, jsx_runtime_1.jsx)("span", { className: "highlight", children: "share" }), ", and", ' ', (0, jsx_runtime_1.jsx)("span", { className: "highlight", children: "grow" }), ". Whether you're a", ' ', (0, jsx_runtime_1.jsx)("span", { className: "highlight", children: "developer \uD83D\uDC68\u200D\uD83D\uDCBB" }), ", ", (0, jsx_runtime_1.jsx)("span", { className: "highlight", children: "designer \uD83C\uDFA8" }), ", or just someone interested in exploring new ideas \uD83D\uDCA1, we're excited to have you here!"] })] }) })] }), (0, jsx_runtime_1.jsx)("section", { id: "how-you-can-contribute", className: "contribution-header", children: (0, jsx_runtime_1.jsx)("div", { className: "container", children: (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "contribution-header-content", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.6, delay: 0.3 }, children: [(0, jsx_runtime_1.jsx)("div", { className: "contribution-icon", children: "\u26A1" }), (0, jsx_runtime_1.jsx)("h2", { className: "contribution-title", children: "How You Can Contribute" }), (0, jsx_runtime_1.jsx)("p", { className: "contribution-description", children: "There are many ways to get involved in RecodeHive. Here's how you can contribute:" })] }) }) }), (0, jsx_runtime_1.jsx)("section", { className: "community-content", children: (0, jsx_runtime_1.jsx)("div", { className: "container", children: (0, jsx_runtime_1.jsxs)("div", { className: "community-layout", children: [(0, jsx_runtime_1.jsxs)("div", { className: "contribution-sections", children: [contributionSections.map(function (section, index) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { id: section.id, className: "contribution-section ".concat((isMobile ? activeSections.includes(section.id) : selectedSection === section.id) + ? 'selected' + : ''), initial: { opacity: 0, y: 30 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.6, delay: 0.1 * index }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "section-header", children: [(0, jsx_runtime_1.jsx)("div", { className: "section-icon", style: { backgroundColor: section.color }, children: section.icon }), (0, jsx_runtime_1.jsx)("h3", { className: "section-title", children: section.title })] }), (0, jsx_runtime_1.jsx)("p", { className: "section-description", children: section.description }), (0, jsx_runtime_1.jsx)("ul", { className: "section-items", children: section.items.map(function (item, itemIndex) { return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.li, { className: "section-item", initial: { opacity: 0, x: -20 }, animate: { opacity: 1, x: 0 }, transition: { duration: 0.3, delay: (0.1 * index) + (0.05 * itemIndex) }, onClick: function () { return toggleDropdown("".concat(section.id, "-").concat(itemIndex)); }, style: { cursor: 'pointer' }, children: [(0, jsx_runtime_1.jsx)("span", { className: "item-arrow ".concat(openDropdowns.includes("".concat(section.id, "-").concat(itemIndex)) ? 'rotate' : ''), children: "\u25B6" }), item] }), section.details && openDropdowns.includes("".concat(section.id, "-").concat(itemIndex)) && ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "section-item-details", initial: { opacity: 0, height: 0 }, animate: { opacity: 1, height: 'auto' }, transition: { duration: 0.3 }, children: (0, jsx_runtime_1.jsx)("p", { children: section.details[itemIndex] }) }))] }, itemIndex)); }) }), section.links.length > 0 && ((0, jsx_runtime_1.jsxs)("div", { className: "section-links", children: [(0, jsx_runtime_1.jsxs)("div", { className: "links-header", children: [(0, jsx_runtime_1.jsx)("span", { className: "links-icon", children: "\uD83D\uDD17" }), (0, jsx_runtime_1.jsxs)("span", { children: ["Find our ", section.id === 'code' ? 'codebase' : section.id === 'documentation' ? 'documentation' : section.id === 'community' ? 'conversation' : 'resources', " on:"] })] }), (0, jsx_runtime_1.jsx)("div", { className: "links-container", children: section.links.map(function (link, linkIndex) { return ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.a, { href: link.url, className: "resource-link", target: "_blank", rel: "noopener noreferrer", style: { '--link-color': section.color }, whileHover: { scale: 1.05 }, whileTap: { scale: 0.95 }, children: link.text }, linkIndex)); }) })] }))] }, section.id)); }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { id: "thank-you", className: "thank-you-section", initial: { opacity: 0, y: 30 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.6, delay: 0.8 }, children: (0, jsx_runtime_1.jsxs)("div", { className: "thank-you-card", children: [(0, jsx_runtime_1.jsxs)("div", { className: "thank-you-header", children: [(0, jsx_runtime_1.jsxs)("div", { className: "thank-you-icons", children: [(0, jsx_runtime_1.jsx)("span", { className: "thank-icon", children: "\uD83D\uDC9A" }), (0, jsx_runtime_1.jsx)("span", { className: "thank-icon", children: "\uD83C\uDF89" }), (0, jsx_runtime_1.jsx)("span", { className: "thank-icon", children: "\u2728" })] }), (0, jsx_runtime_1.jsx)("h3", { children: "Thank You!" }), (0, jsx_runtime_1.jsx)("div", { className: "thank-you-subtitle", children: "You're Amazing" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "thank-you-content", children: [(0, jsx_runtime_1.jsxs)("p", { className: "thank-you-main", children: ["Thank you for your interest in ", (0, jsx_runtime_1.jsx)("strong", { children: "RecodeHive" }), "!"] }), (0, jsx_runtime_1.jsxs)("p", { className: "thank-you-description", children: ["We're thrilled to have you here and can't wait to", ' ', (0, jsx_runtime_1.jsx)("span", { className: "highlight collaborate", children: "collaborate" }), ",", ' ', (0, jsx_runtime_1.jsx)("span", { className: "highlight learn", children: "learn" }), ", and", ' ', (0, jsx_runtime_1.jsx)("span", { className: "highlight grow", children: "grow" }), " \u2014 together. \uD83C\uDF31"] }), (0, jsx_runtime_1.jsxs)("div", { className: "thank-you-features", children: [(0, jsx_runtime_1.jsxs)("div", { className: "feature-item", children: [(0, jsx_runtime_1.jsx)("span", { className: "feature-icon", children: "\uD83D\uDE80" }), (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/recodehive/recode-website", target: "_blank", rel: "noopener noreferrer", style: { color: 'inherit' }, children: (0, jsx_runtime_1.jsx)("span", { children: "Build Amazing Projects" }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "feature-item", children: [(0, jsx_runtime_1.jsx)("span", { className: "feature-icon", children: "\uD83E\uDD1D" }), (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/orgs/recodehive/people", target: "_blank", rel: "noopener noreferrer", style: { color: 'inherit' }, children: (0, jsx_runtime_1.jsx)("span", { children: "Connect with Developers" }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "feature-item", children: [(0, jsx_runtime_1.jsx)("span", { className: "feature-icon", children: "\uD83D\uDCDA" }), (0, jsx_runtime_1.jsx)("a", { href: "https://www.recodehive.com/docs", target: "_blank", rel: "noopener noreferrer", style: { color: 'inherit' }, children: (0, jsx_runtime_1.jsx)("span", { children: "Learn & Share Knowledge" }) })] })] }), (0, jsx_runtime_1.jsxs)("blockquote", { className: "thank-you-quote", children: [(0, jsx_runtime_1.jsx)("div", { className: "quote-icon", children: "\uD83D\uDC1D" }), (0, jsx_runtime_1.jsx)("em", { children: "Let's make this community the best it can bee!" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "support-section", children: [(0, jsx_runtime_1.jsx)("div", { className: "support-icon", children: "\uD83D\uDCAC" }), (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/recodehive/recode-website/discussions", target: "_blank", rel: "noopener noreferrer", style: { color: 'inherit' }, children: (0, jsx_runtime_1.jsx)("p", { className: "support-text", children: "We're here to help and support you throughout your journey \u2014 don't hesitate to reach out." }) })] })] })] }) })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "table-of-contents", initial: { opacity: 0, x: 30 }, animate: { opacity: 1, x: 0 }, transition: { duration: 0.6, delay: 0.4 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "toc-header", children: [(0, jsx_runtime_1.jsx)("span", { className: "toc-icon", children: "\u26A1" }), (0, jsx_runtime_1.jsx)("h4", { children: "How You Can Contribute" })] }), (0, jsx_runtime_1.jsx)("nav", { className: "toc-nav", children: tableOfContents.map(function (item) { return ((0, jsx_runtime_1.jsxs)("button", { className: "toc-item ".concat(activeSections.includes(item.id) ? 'active' : ''), onClick: function () { return scrollToSection(item.id); }, children: [(0, jsx_runtime_1.jsx)("span", { className: "toc-item-icon", children: item.icon }), (0, jsx_runtime_1.jsx)("span", { className: "toc-item-text", children: item.title })] }, item.id)); }) })] })] }) }) })] }), (0, jsx_runtime_1.jsx)(bottom_to_top_1.default, {})] }) })); +} diff --git a/src/pages/contact-us/index.js b/src/pages/contact-us/index.js new file mode 100644 index 00000000..013e4a73 --- /dev/null +++ b/src/pages/contact-us/index.js @@ -0,0 +1,14 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importDefault(require("react")); +var Layout_1 = __importDefault(require("@theme/Layout")); +var lucide_react_1 = require("lucide-react"); +require("./index.css"); +var ContactUs = function () { + return ((0, jsx_runtime_1.jsx)(Layout_1.default, { title: "Contact Us", description: "Get in touch with the RecodeHive team. We're here to help with your questions, feedback, and collaboration opportunities.", children: (0, jsx_runtime_1.jsx)("div", { className: "enhanced-contact-container", children: (0, jsx_runtime_1.jsxs)("div", { className: "contact-content-wrapper", children: [(0, jsx_runtime_1.jsxs)("div", { className: "contact-header", children: [(0, jsx_runtime_1.jsx)("h1", { className: "contact-title", children: "Get In Touch" }), (0, jsx_runtime_1.jsx)("p", { className: "contact-description", children: "Have questions, feedback, or want to collaborate? We'd love to hear from you. Reach out to us and we'll get back to you as soon as possible." })] }), (0, jsx_runtime_1.jsxs)("div", { className: "contact-grid", children: [(0, jsx_runtime_1.jsxs)("div", { className: "contact-info-section", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h2", { className: "contact-info-title", children: "Contact Information" }), (0, jsx_runtime_1.jsxs)("div", { className: "contact-info-items", children: [(0, jsx_runtime_1.jsxs)("div", { className: "contact-info-item", children: [(0, jsx_runtime_1.jsx)("div", { className: "contact-icon-wrapper", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Mail, { className: "w-6 h-6", style: { color: 'var(--contact-accent-primary)' } }) }), (0, jsx_runtime_1.jsxs)("div", { className: "contact-info-details", children: [(0, jsx_runtime_1.jsx)("h3", { children: "Email" }), (0, jsx_runtime_1.jsx)("a", { href: "mailto:sanjay@recodehive.com", children: "sanjay@recodehive.com" }), (0, jsx_runtime_1.jsx)("p", { children: "General inquiries and support" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "contact-info-item", children: [(0, jsx_runtime_1.jsx)("div", { className: "contact-icon-wrapper", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Clock, { className: "w-6 h-6", style: { color: 'var(--contact-accent-primary)' } }) }), (0, jsx_runtime_1.jsxs)("div", { className: "contact-info-details", children: [(0, jsx_runtime_1.jsx)("h3", { children: "Response Time" }), (0, jsx_runtime_1.jsx)("p", { style: { marginTop: 0, color: 'var(--contact-text-secondary)' }, children: "Within 24-48 hours" }), (0, jsx_runtime_1.jsx)("p", { children: "We'll get back to you promptly" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "contact-info-item", children: [(0, jsx_runtime_1.jsx)("div", { className: "contact-icon-wrapper", children: (0, jsx_runtime_1.jsx)(lucide_react_1.MapPin, { className: "w-6 h-6", style: { color: 'var(--contact-accent-primary)' } }) }), (0, jsx_runtime_1.jsxs)("div", { className: "contact-info-details", children: [(0, jsx_runtime_1.jsx)("h3", { children: "Location" }), (0, jsx_runtime_1.jsx)("p", { style: { marginTop: 0, color: 'var(--contact-text-secondary)' }, children: "Online & Global" }), (0, jsx_runtime_1.jsx)("p", { children: "Serving developers worldwide" })] })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "contact-info-box", children: [(0, jsx_runtime_1.jsx)("h3", { children: "What we can help you with:" }), (0, jsx_runtime_1.jsxs)("ul", { children: [(0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("span", { className: "bullet" }), (0, jsx_runtime_1.jsx)("span", { children: "Learning resources and tutorials" })] }), (0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("span", { className: "bullet" }), (0, jsx_runtime_1.jsx)("span", { children: "Technical support and guidance" })] }), (0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("span", { className: "bullet" }), (0, jsx_runtime_1.jsx)("span", { children: "Collaboration opportunities" })] }), (0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("span", { className: "bullet" }), (0, jsx_runtime_1.jsx)("span", { children: "Partnership inquiries" })] }), (0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("span", { className: "bullet" }), (0, jsx_runtime_1.jsx)("span", { children: "Content suggestions and feedback" })] })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "contact-form-section", children: [(0, jsx_runtime_1.jsx)("h2", { className: "contact-form-title", children: "Send us a message" }), (0, jsx_runtime_1.jsxs)("form", { className: "contact-form", children: [(0, jsx_runtime_1.jsxs)("div", { className: "form-row", children: [(0, jsx_runtime_1.jsxs)("div", { className: "form-group", children: [(0, jsx_runtime_1.jsx)("label", { htmlFor: "firstName", className: "form-label", children: "First Name" }), (0, jsx_runtime_1.jsx)("input", { type: "text", id: "firstName", name: "firstName", className: "form-input", placeholder: "Your first name", required: true })] }), (0, jsx_runtime_1.jsxs)("div", { className: "form-group", children: [(0, jsx_runtime_1.jsx)("label", { htmlFor: "lastName", className: "form-label", children: "Last Name" }), (0, jsx_runtime_1.jsx)("input", { type: "text", id: "lastName", name: "lastName", className: "form-input", placeholder: "Your last name", required: true })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "form-group", children: [(0, jsx_runtime_1.jsx)("label", { htmlFor: "email", className: "form-label", children: "Email Address" }), (0, jsx_runtime_1.jsx)("input", { type: "email", id: "email", name: "email", className: "form-input", placeholder: "your.email@example.com", required: true })] }), (0, jsx_runtime_1.jsxs)("div", { className: "form-group", children: [(0, jsx_runtime_1.jsx)("label", { htmlFor: "subject", className: "form-label", children: "Subject" }), (0, jsx_runtime_1.jsxs)("select", { id: "subject", name: "subject", className: "form-select", required: true, children: [(0, jsx_runtime_1.jsx)("option", { value: "", children: "Select a subject" }), (0, jsx_runtime_1.jsx)("option", { value: "general", children: "General Inquiry" }), (0, jsx_runtime_1.jsx)("option", { value: "support", children: "Technical Support" }), (0, jsx_runtime_1.jsx)("option", { value: "collaboration", children: "Collaboration" }), (0, jsx_runtime_1.jsx)("option", { value: "partnership", children: "Partnership" }), (0, jsx_runtime_1.jsx)("option", { value: "feedback", children: "Feedback" }), (0, jsx_runtime_1.jsx)("option", { value: "other", children: "Other" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "form-group", children: [(0, jsx_runtime_1.jsx)("label", { htmlFor: "message", className: "form-label", children: "Message" }), (0, jsx_runtime_1.jsx)("textarea", { id: "message", name: "message", rows: 6, className: "form-textarea", placeholder: "Tell us more about your inquiry...", required: true })] }), (0, jsx_runtime_1.jsx)("button", { type: "submit", className: "submit-button", children: "Send Message" })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "contact-resources", children: [(0, jsx_runtime_1.jsx)("h2", { className: "resources-title", children: "Other Ways to Connect" }), (0, jsx_runtime_1.jsxs)("div", { className: "resources-grid", children: [(0, jsx_runtime_1.jsxs)("a", { href: "/community", className: "resource-card", children: [(0, jsx_runtime_1.jsx)("div", { className: "resource-icon", children: "\uD83D\uDCDA" }), (0, jsx_runtime_1.jsx)("h3", { children: "Community" }), (0, jsx_runtime_1.jsx)("p", { children: "Join our community and connect with fellow developers" })] }), (0, jsx_runtime_1.jsxs)("a", { href: "/docs", className: "resource-card", children: [(0, jsx_runtime_1.jsx)("div", { className: "resource-icon", children: "\uD83D\uDCD6" }), (0, jsx_runtime_1.jsx)("h3", { children: "Documentation" }), (0, jsx_runtime_1.jsx)("p", { children: "Explore our comprehensive learning resources" })] }), (0, jsx_runtime_1.jsxs)("a", { href: "/blogs", className: "resource-card", children: [(0, jsx_runtime_1.jsx)("div", { className: "resource-icon", children: "\u270D\uFE0F" }), (0, jsx_runtime_1.jsx)("h3", { children: "Blog" }), (0, jsx_runtime_1.jsx)("p", { children: "Read our latest articles and tutorials" })] })] })] })] }) }) })); +}; +exports.default = ContactUs; diff --git a/src/pages/courses/index.js b/src/pages/courses/index.js new file mode 100644 index 00000000..8bc0abb1 --- /dev/null +++ b/src/pages/courses/index.js @@ -0,0 +1,293 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = CoursesLanding; +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importStar(require("react")); +var Layout_1 = __importDefault(require("@theme/Layout")); +var Head_1 = __importDefault(require("@docusaurus/Head")); +var framer_motion_1 = require("framer-motion"); +require("./courses.css"); +// Animation variants for consistent animations +var fadeIn = { + hidden: { opacity: 0, y: 20 }, + visible: { opacity: 1, y: 0, transition: { duration: 0.6 } } +}; +var techTags = [ + "AWS", "Apache Airflow", "Parquet", "Avro", "Microsoft Azure", "Google BigQuery", "CSV", "Databricks", "Azure Data Factory", "Docker", "Kafka", "Google Cloud", "GitHub", "Apache NiFi", "Snowflake", "Looker", "MAGE", "NumPy", "Pandas", "PostgreSQL", "Python", "Apache Spark", "SQL" +]; +var partnerLogos = [ + "https://dummyimage.com/80x40/222/fff&text=Samsung", + "https://dummyimage.com/80x40/333/fff&text=Oracle", + "https://dummyimage.com/80x40/444/fff&text=Segment", + "https://dummyimage.com/80x40/555/fff&text=Monday.com", + "https://dummyimage.com/80x40/666/fff&text=Protonet", +]; +var projects = [ + "https://dummyimage.com/200x120/222/fff&text=Project+1", + "https://dummyimage.com/200x120/333/fff&text=Project+2", + "https://dummyimage.com/200x120/444/fff&text=Project+3", + "https://dummyimage.com/200x120/555/fff&text=Project+4", + "https://dummyimage.com/200x120/555/fff&text=Project+5", + "https://dummyimage.com/200x120/555/fff&text=Project+6", + "https://dummyimage.com/200x120/555/fff&text=Project+7", +]; +var testimonials = [ + { + img: "https://dummyimage.com/80x80/222/fff&text=S", + name: "Sachin", + review: "Sanjay has been a great support in knowing various career paths and upcoming tech. The call was very crisp but valueable at the same time. For sure I am gonna schedule a call probably next month to give him updates. Thanks a ton Sanjay :)", + stars: 5, + }, + { + img: "https://dummyimage.com/80x80/333/fff&text=KP", + name: "Kumar Priyanshu", + review: "I was thoroughly impressed by his clear, engaging communication and deep understanding of my issue. He listened attentively and offered valuable insights and solutions, leaving me extremely satisfied and confident in the guidance I received.", + stars: 5, + }, + { + img: "https://dummyimage.com/80x80/444/fff&text=AV", + name: "Aman Vohra", + review: "It was an amazing session with you. And i can't thank you enough for your time and the great and valuable insights you have given me. Thank you so much🙌🏻", + stars: 5, + }, +]; +var courses = [ + { + number: "01", + title: "Python for Data Engineering", + desc: "Learn to harness the power of Python for transforming and processing data at scale in our hands-on 'Python for Data Engineering' course. Build the skills needed to design robust data pipelines and optimize data workflows effectively.", + img: "https://dummyimage.com/300x150/222/fff&text=Python+for+DE", + }, + { + number: "02", + title: "SQL for Data Engineering", + desc: "Unlock the potential of data manipulation and management with our 'SQL for Data Engineering' course. Gain proficiency in crafting and optimizing complex queries to build and maintain efficient data pipelines.", + img: "https://dummyimage.com/300x150/333/fff&text=SQL+for+DE", + }, + { + number: "03", + title: "Data Warehouse with Snowflake", + desc: "Discover the modern approach to data warehousing using Snowflake in our course. Learn to design, implement, and manage a high-performance data warehouse for seamless analytics and insights.", + img: "https://dummyimage.com/300x150/444/fff&text=Snowflake", + }, + { + number: "04", + title: "Spark for Data Engineering", + desc: "Learn to leverage the power of Apache Spark for efficient and scalable data engineering in our comprehensive course. Master the art of processing and transforming data to build robust pipelines and drive data-centric applications.", + img: "https://dummyimage.com/300x150/555/fff&text=Spark+for+DE", + }, + { + number: "05", + title: "Workflow Orchestration (Airflow, Mage, Prefect)", + desc: "Explore the world of workflow orchestration with our course covering Airflow, Luigi, Mage, and Prefect. Gain expertise in seamlessly coordinating and automating complex data pipelines for enhanced efficiency and productivity.", + img: "https://dummyimage.com/300x150/666/fff&text=Workflow+Orchestration", + }, + { + number: "06", + title: "Apache Kafka for DE (Coming Soon)", + desc: "Dive into the realm of data engineering with Apache Kafka in our course. Learn to build real-time, scalable data pipelines that enable efficient data movement and processing for diverse applications.", + img: "https://dummyimage.com/300x150/777/fff&text=Kafka+for+DE", + }, + { + number: "07", + title: "Cloud Computing AWS, GCP, Azure (Coming Soon)", + desc: "Embark on a journey through major cloud platforms with our course on AWS, GCP, and Azure. Acquire the skills to deploy, manage, and optimize cloud-based solutions for diverse business needs.", + img: "https://dummyimage.com/300x150/888/fff&text=Cloud+Computing", + }, +]; +var projectReviews = [ + { + img: "https://dummyimage.com/100x100/222/fff&text=AP", + name: "Abhi Patel", + review: "Excited to share the Spotify End to End ETL pipeline project using AWS and Python...", + }, + { + img: "https://dummyimage.com/100x100/333/fff&text=AM", + name: "Ajosh Mungesan", + review: "Learning & sharing my Spotify ETL project using Python & AWS...", + }, + { + img: "https://dummyimage.com/100x100/444/fff&text=HR", + name: "Hariharan R", + review: "Excited to share the Spotify End to End ETL pipeline project using AWS and Python...", + }, +]; +var topics = [ + "ETL", "Data Modelling", "SQL", "Data Pipelines", "Cloud Data Warehousing", "Spark", "Databricks", "DataFrames", "RDDs", "PySpark", "Spark SQL", "MLlib", "Spark Streaming", "Cluster Management", "Fault Tolerance", "Big Data", "Apache Hadoop", "Data Ingestion", "Data Transformation", "Data Analytics", "Schema Design", "Machine Learning", "Snowflake", "Data Lake", "Business Intelligence", "Analytics", "OLAP", "Data Architecture", "Python", "Data Wrangling", "Pandas", "NumPy", "Data Visualisation", "Jupyter Notebooks", "Web Scraping", "APIs", "Data Cleaning", "Data Security", "Scalability", "Stored Procedures", "Triggers", "Views", "Normalization", "Relational Databases", "Data Integrity", "Data Consistency", "Query Performance", "Window Functions", "Transactions", "Indexing", "Batch Processing", "Real-Time Processing", "Data Orchestration", "Workflow Automation", "Data Quality", "Data Lineage", "Metadata Management", "Data Cataloging" +]; +// Modified stats with numerical values for animation +var stats = [ + { label: "Youtube", value: 160, suffix: "K+" }, + { label: "LinkedIn", value: 100, suffix: "K+" }, + { label: "Twitter", value: 25, suffix: "K+" }, +]; +var faqs = [ + { q: "Who can enroll in the programs?", a: "Anyone interested in data engineering, from beginners to professionals." }, + { q: "Will I receive a certificate?", a: "Yes, you will receive a certificate upon successful completion of the course." }, + { q: "Is the course in Hindi or English?", a: "Courses are available in both Hindi and English." }, + { q: "How can I contact you if I have questions?", a: "You can contact us via the contact form or email provided on the website." }, + { q: "Do I need to learn anything before this course starts?", a: "No prior experience is required. All fundamentals will be covered." }, +]; +function CoursesContent() { + var _a = (0, react_1.useState)(false), showAllTopics = _a[0], setShowAllTopics = _a[1]; + var _b = (0, react_1.useState)({ open: false, content: "" }), modal = _b[0], setModal = _b[1]; + var _c = (0, react_1.useState)(null), openFaq = _c[0], setOpenFaq = _c[1]; + var _d = (0, react_1.useState)(0), activeProjectIndex = _d[0], setActiveProjectIndex = _d[1]; + var _e = (0, react_1.useState)({ + Youtube: 0, + LinkedIn: 0, + Twitter: 0 + }), animatedStats = _e[0], setAnimatedStats = _e[1]; + var _f = (0, react_1.useState)(false), isStatsVisible = _f[0], setIsStatsVisible = _f[1]; + var projectCarouselRef = (0, react_1.useRef)(null); + var techTagsRef = (0, react_1.useRef)(null); + var statsRef = (0, react_1.useRef)(null); + // Horizontal scrolling for tech tags + (0, react_1.useEffect)(function () { + if (techTagsRef.current) { + var scrollInterval_1 = setInterval(function () { + if (techTagsRef.current) { + var currentScroll = techTagsRef.current.scrollLeft; + var maxScroll = techTagsRef.current.scrollWidth - techTagsRef.current.clientWidth; + if (currentScroll >= maxScroll) { + techTagsRef.current.scrollLeft = 0; + } + else { + techTagsRef.current.scrollLeft += 1; + } + } + }, 30); + return function () { return clearInterval(scrollInterval_1); }; + } + }, []); + // Set up automatic carousel rotation + (0, react_1.useEffect)(function () { + var interval = setInterval(function () { + setActiveProjectIndex(function (prevIndex) { + return prevIndex === projects.length - 1 ? 0 : prevIndex + 1; + }); + }, 5000); + return function () { return clearInterval(interval); }; + }, []); + // Animate stats counter when visible + (0, react_1.useEffect)(function () { + if (!statsRef.current) + return; + var observer = new IntersectionObserver(function (entries) { + if (entries[0].isIntersecting && !isStatsVisible) { + setIsStatsVisible(true); + // Start animation for each stat + stats.forEach(function (stat) { + var label = stat.label, value = stat.value; + var startValue = 0; + var duration = 2000; // 2 seconds + var increment = value / (duration / 16); // ~60fps + var timer = setInterval(function () { + startValue += increment; + if (startValue >= value) { + clearInterval(timer); + setAnimatedStats(function (prev) { + var _a; + return (__assign(__assign({}, prev), (_a = {}, _a[label] = value, _a))); + }); + } + else { + setAnimatedStats(function (prev) { + var _a; + return (__assign(__assign({}, prev), (_a = {}, _a[label] = Math.floor(startValue), _a))); + }); + } + }, 16); + }); + } + }, { threshold: 0.1 }); + observer.observe(statsRef.current); + return function () { return observer.disconnect(); }; + }, [isStatsVisible]); + var handleCourseClick = function (course) { + if (course.title.includes("Coming Soon")) { + setModal({ open: true, content: "This course is coming soon!" }); + } + else { + window.location.href = "/courses/".concat(course.title.toLowerCase().replace(/ /g, "-")); + } + }; + var handleAction = function (type) { + setModal({ open: true, content: type === "enroll" ? "Enrollment flow coming soon!" : "Purchase flow coming soon!" }); + }; + var scrollProjects = function (dir) { + var newIndex = activeProjectIndex + dir; + if (newIndex >= 0 && newIndex < projects.length) { + setActiveProjectIndex(newIndex); + } + else if (newIndex < 0) { + // Loop to the end if going backwards from first slide + setActiveProjectIndex(projects.length - 1); + } + else { + // Loop to the beginning if going forward from last slide + setActiveProjectIndex(0); + } + }; + var goToProjectSlide = function (index) { + setActiveProjectIndex(index); + }; + var handleInfo = function (info) { return setModal({ open: true, content: info }); }; + return ((0, jsx_runtime_1.jsxs)(Layout_1.default, { title: "Courses", description: "Explore our available courses and resources.", children: [(0, jsx_runtime_1.jsxs)(Head_1.default, { children: [(0, jsx_runtime_1.jsx)("meta", { name: "description", content: "Landing page for all available courses." }), (0, jsx_runtime_1.jsx)("style", { children: "\n /* Hide scrollbar for carousel */\n .hide-scrollbar::-webkit-scrollbar {\n display: none;\n }\n .hide-scrollbar {\n -ms-overflow-style: none;\n scrollbar-width: none;\n }\n\n /* Custom animations */\n @keyframes float {\n 0% { transform: translateY(0px); }\n 50% { transform: translateY(-10px); }\n 100% { transform: translateY(0px); }\n }\n\n @keyframes slide {\n 0% { transform: translateX(0); }\n 100% { transform: translateX(-100%); }\n }\n\n .float-animation {\n animation: float 3s ease-in-out infinite;\n }\n\n .animate-slide {\n display: inline-block;\n white-space: nowrap;\n padding-right: 100%;\n }\n\n /* Fade-in animation */\n @keyframes fadeIn {\n from { opacity: 0; transform: translateY(20px); }\n to { opacity: 1; transform: translateY(0); }\n }\n\n .animate-fadeIn {\n animation: fadeIn 0.5s ease-out forwards;\n }\n\n /* Scale-in animation */\n @keyframes scaleIn {\n from { opacity: 0; transform: scale(0.9); }\n to { opacity: 1; transform: scale(1); }\n }\n\n .animate-scaleIn {\n animation: scaleIn 0.3s ease-out forwards;\n }\n\n /* Slide-in animation */\n @keyframes slideInUp {\n from { opacity: 0; transform: translateY(30px); }\n to { opacity: 1; transform: translateY(0); }\n }\n\n .animate-slideInUp {\n animation: slideInUp 0.5s ease-out forwards;\n }\n\n /* Pulse animation */\n @keyframes pulse {\n 0% { transform: scale(1); }\n 50% { transform: scale(1.05); }\n 100% { transform: scale(1); }\n }\n\n .animate-pulse {\n animation: pulse 2s infinite;\n }\n " })] }), (0, jsx_runtime_1.jsxs)("main", { className: "courses-page min-h-screen transition-all duration-500", children: [modal.open && ((0, jsx_runtime_1.jsx)("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-60 courses-fade-in p-4", children: (0, jsx_runtime_1.jsxs)("div", { className: "courses-modal p-6 md:p-8 max-w-md w-full text-center relative courses-scale-in", children: [(0, jsx_runtime_1.jsx)("button", { className: "courses-icon-button absolute top-3 right-3 text-xl md:text-2xl transition-transform hover:scale-110", onClick: function () { return setModal({ open: false, content: "" }); }, children: "\u00D7" }), (0, jsx_runtime_1.jsx)("div", { className: "courses-body pt-4", children: modal.content })] }) })), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.section, { className: "courses-hero py-16 md:py-24 px-4 text-center relative overflow-hidden transition-all duration-500 border-b", initial: "hidden", animate: "visible", variants: { + hidden: { opacity: 0 }, + visible: { opacity: 1, transition: { staggerChildren: 0.2 } } + }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "courses-container", children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.h1, { className: "courses-heading-1 courses-text-gradient mb-6 md:mb-8 relative z-10 tracking-tight", variants: fadeIn, children: ["Transform Your Career", (0, jsx_runtime_1.jsx)("br", { className: "hidden md:block" }), (0, jsx_runtime_1.jsx)("span", { className: "block md:inline", children: "in Data Engineering" })] }), (0, jsx_runtime_1.jsx)("div", { className: "w-full flex justify-center", children: (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.p, { className: "courses-text-secondary courses-body-large max-w-2xl leading-relaxed font-medium mb-8 md:mb-12 text-center", variants: fadeIn, children: ["Master the art of data engineering with industry-leading courses designed for", ' ', (0, jsx_runtime_1.jsx)("span", { className: "font-bold courses-text-gradient", children: "modern tech careers" }), "."] }) }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "flex flex-col sm:flex-row gap-4 md:gap-6 justify-center mb-12 md:mb-16 max-w-md md:max-w-none mx-auto", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("button", { className: "courses-button-primary group relative px-8 md:px-10 py-3 md:py-4 overflow-hidden rounded-2xl font-bold text-base md:text-lg shadow-2xl transition-all duration-300 hover:scale-105 hover:shadow-blue-500/30 border border-blue-400/20 courses-backdrop-blur", onClick: function () { return handleAction("enroll"); }, children: (0, jsx_runtime_1.jsxs)("span", { className: "relative z-10 flex items-center justify-center gap-2", children: ["Explore Courses", (0, jsx_runtime_1.jsx)("svg", { className: "w-4 h-4 md:w-5 md:h-5 group-hover:translate-x-1 transition-transform", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 7l5 5m0 0l-5 5m5-5H6" }) })] }) }), (0, jsx_runtime_1.jsx)("button", { className: "courses-button-secondary group relative px-8 md:px-10 py-3 md:py-4 overflow-hidden rounded-2xl font-bold text-base md:text-lg shadow-2xl transition-all duration-300 hover:scale-105", onClick: function () { return handleAction("curriculum"); }, children: (0, jsx_runtime_1.jsxs)("span", { className: "relative z-10 flex items-center justify-center gap-2", children: ["View Curriculum", (0, jsx_runtime_1.jsx)("svg", { className: "w-4 h-4 md:w-5 md:h-5 group-hover:translate-x-1 transition-transform", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) })] }) })] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "courses-container", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("div", { ref: techTagsRef, className: "flex overflow-x-auto courses-hide-scrollbar gap-2 mb-8 pb-4 whitespace-nowrap", style: { scrollBehavior: 'smooth' }, children: (0, jsx_runtime_1.jsx)("div", { className: "flex gap-2 px-4 md:px-0", children: techTags.map(function (tag, idx) { return ((0, jsx_runtime_1.jsx)("span", { className: "courses-topic-tag flex-shrink-0", children: tag }, idx)); }) }) }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-8", children: [(0, jsx_runtime_1.jsx)("h3", { className: "courses-text-secondary courses-body text-center font-medium mb-6", children: "Students now available at" }), (0, jsx_runtime_1.jsx)("div", { className: "flex flex-wrap justify-center items-center gap-6 md:gap-8", children: partnerLogos.map(function (logo, idx) { return ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.img, { src: logo, alt: "Partner Logo", className: "h-10 md:h-12 w-auto object-contain opacity-70 hover:opacity-100 transition-opacity", whileHover: { scale: 1.1 }, transition: { type: "spring", stiffness: 400, damping: 10 } }, idx)); }) })] })] })] }), (0, jsx_runtime_1.jsxs)("section", { className: "courses-section py-16 md:py-24 px-4 relative overflow-hidden transition-all duration-500 border-b", children: [(0, jsx_runtime_1.jsx)("div", { className: "courses-bg-overlay absolute inset-0" }), (0, jsx_runtime_1.jsxs)("div", { className: "courses-container", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.h2, { className: "courses-heading-2 courses-gradient-text text-center mb-12 md:mb-16 tracking-tight leading-tight", initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5 }, children: "Explore over 14+ extensive projects" }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "relative z-10 max-w-2xl mx-auto", initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: 0.2 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "relative", children: [(0, jsx_runtime_1.jsx)("button", { className: "courses-nav-button absolute left-2 md:left-0 top-1/2 -translate-y-1/2 z-10 shadow-xl transform transition-all duration-300 hover:scale-110", onClick: function () { return scrollProjects(-1); }, children: "<" }), (0, jsx_runtime_1.jsx)("div", { ref: projectCarouselRef, className: "overflow-hidden courses-hide-scrollbar mx-12 md:mx-16", children: (0, jsx_runtime_1.jsx)("div", { className: "flex transition-transform duration-500 ease-in-out", style: { transform: "translateX(-".concat(activeProjectIndex * 100, "%)") }, children: projects.map(function (img, idx) { return ((0, jsx_runtime_1.jsx)("div", { className: "min-w-full flex justify-center px-2 md:px-4", style: { width: '100%', flexShrink: 0 }, children: (0, jsx_runtime_1.jsx)("img", { src: img, alt: "Project ".concat(idx + 1), className: "rounded-xl shadow-lg hover:shadow-blue-500/30 transition transform hover:scale-105 cursor-pointer border-2 border-gray-700/50 hover:border-blue-500/50 w-full max-w-xs md:max-w-sm h-auto", style: { aspectRatio: '16/10' } }) }, idx)); }) }) }), (0, jsx_runtime_1.jsx)("button", { className: "courses-nav-button absolute right-2 md:right-0 top-1/2 -translate-y-1/2 z-10 shadow-xl transform transition-all duration-300 hover:scale-110", onClick: function () { return scrollProjects(1); }, children: ">" })] }), (0, jsx_runtime_1.jsx)("div", { className: "courses-carousel-indicators mt-6", children: projects.map(function (_, idx) { return ((0, jsx_runtime_1.jsx)("button", { className: "courses-carousel-indicator ".concat(idx === activeProjectIndex ? 'active' : ''), onClick: function () { return goToProjectSlide(idx); } }, idx)); }) })] })] })] }), (0, jsx_runtime_1.jsxs)("section", { className: "courses-section py-16 md:py-24 px-4 relative overflow-hidden transition-all duration-500 border-b", children: [(0, jsx_runtime_1.jsx)("div", { className: "courses-bg-overlay absolute inset-0" }), (0, jsx_runtime_1.jsxs)("div", { className: "courses-container-wide", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.h2, { className: "courses-heading-2 courses-gradient-text text-center mb-12 md:mb-16 tracking-tight leading-tight", initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5 }, children: "Kind Words from Our Students" }), (0, jsx_runtime_1.jsx)("div", { className: "courses-grid courses-grid-3 relative z-10", children: testimonials.map(function (t, idx) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "courses-card group cursor-pointer flex flex-col items-center text-center", initial: { opacity: 0, y: 30 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: idx * 0.1 }, whileHover: { scale: 1.02 }, onClick: function () { return handleInfo(t.review); }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "relative w-20 h-20 md:w-24 md:h-24 mb-6", children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 rounded-full blur-lg opacity-50 group-hover:opacity-70 transition-opacity duration-300 bg-gradient-to-r from-blue-500 to-purple-500" }), (0, jsx_runtime_1.jsx)("img", { src: t.img, alt: t.name, className: "relative w-full h-full rounded-full object-cover border-3 transition-all duration-300 z-10 shadow-lg border-blue-400/50 group-hover:border-blue-400 shadow-blue-500/30" })] }), (0, jsx_runtime_1.jsx)("h4", { className: "courses-heading-4 courses-text-gradient mb-4", children: t.name }), (0, jsx_runtime_1.jsx)("div", { className: "flex mb-4 gap-1", children: Array.from({ length: t.stars }).map(function (_, i) { return ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "text-yellow-400 text-lg", initial: { opacity: 0, scale: 0.5 }, animate: { opacity: 1, scale: 1 }, transition: { delay: i * 0.1 }, children: "\u2605" }, i)); }) }), (0, jsx_runtime_1.jsx)("p", { className: "courses-body-small text-center line-clamp-4 transition-colors duration-300 leading-relaxed courses-text-secondary", children: t.review })] }, idx)); }) })] })] }), (0, jsx_runtime_1.jsx)("section", { className: "courses-section py-16 md:py-24 px-4 transition-all duration-500 border-b", children: (0, jsx_runtime_1.jsxs)("div", { className: "courses-container-wide", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.h2, { className: "courses-heading-2 courses-gradient-text text-center mb-6 tracking-tight leading-tight", initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5 }, children: "Courses Available" }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.h3, { className: "courses-body-large courses-text-secondary text-center mb-12 md:mb-16", initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: 0.1 }, children: "Courses Covered In the Program" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col lg:flex-row w-full gap-8 lg:gap-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex-1 flex flex-col gap-6 lg:gap-8", children: courses.filter(function (_, i) { return i % 2 === 0; }).map(function (course, idx) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "courses-timeline-card flex flex-col sm:flex-row items-start sm:items-center gap-4 sm:gap-6 cursor-pointer group", onClick: function () { return handleCourseClick(course); }, initial: { opacity: 0, x: -30 }, whileInView: { opacity: 1, x: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: idx * 0.1 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "relative w-full sm:w-32 md:w-40 h-32 sm:h-20 md:h-24 overflow-hidden rounded-lg flex-shrink-0", children: [(0, jsx_runtime_1.jsx)("img", { src: course.img, alt: course.title, className: "w-full h-full object-cover transition-transform duration-300 group-hover:scale-110" }), (0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 bg-gradient-to-t from-black/50 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex-1 min-w-0", children: [(0, jsx_runtime_1.jsx)("h3", { className: "courses-heading-4 courses-text-gradient mb-2 md:mb-3 line-clamp-2", children: course.title }), (0, jsx_runtime_1.jsx)("p", { className: "courses-body-small courses-text-secondary line-clamp-2 md:line-clamp-3 leading-relaxed", children: course.desc })] }), (0, jsx_runtime_1.jsx)("svg", { className: "w-5 h-5 md:w-6 md:h-6 group-hover:text-blue-400 transform group-hover:translate-x-1 transition-all duration-300 courses-text-muted flex-shrink-0", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) })] }, course.number)); }) }), (0, jsx_runtime_1.jsxs)("div", { className: "hidden lg:flex flex-col items-center mx-6 xl:mx-8 relative", children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute top-0 bottom-0 w-1 left-1/2 -translate-x-1/2 bg-gradient-to-b from-purple-500 to-indigo-500" }), courses.map(function (course, idx) { return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "flex flex-col items-center relative z-10", initial: { opacity: 0, scale: 0.8 }, whileInView: { opacity: 1, scale: 1 }, viewport: { once: true }, transition: { duration: 0.3, delay: idx * 0.1 }, children: [(0, jsx_runtime_1.jsx)("div", { className: "w-12 h-12 xl:w-16 xl:h-16 flex items-center justify-center rounded-full border-4 text-lg xl:text-2xl font-bold mb-2 bg-gradient-to-br from-purple-600 to-indigo-600 border-purple-400 text-white shadow-lg shadow-purple-500/50", children: course.number }), idx !== courses.length - 1 && (0, jsx_runtime_1.jsx)("div", { className: "w-1 h-12 xl:h-16 bg-transparent" })] }) }, course.number)); }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.button, { className: "courses-button-primary mt-8 xl:mt-12 py-3 xl:py-4 px-8 xl:px-10 rounded-2xl shadow-2xl transform transition-all duration-300 hover:scale-110 relative z-10", onClick: function () { return handleAction("enroll"); }, initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: 0.8 }, whileHover: { y: -5 }, whileTap: { y: 0 }, children: "Enroll now" })] }), (0, jsx_runtime_1.jsx)("div", { className: "flex-1 flex flex-col gap-6 lg:gap-8", children: courses.filter(function (_, i) { return i % 2 === 1; }).map(function (course, idx) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "courses-timeline-card flex flex-col sm:flex-row items-start sm:items-center gap-4 sm:gap-6 cursor-pointer group", onClick: function () { return handleCourseClick(course); }, initial: { opacity: 0, x: 30 }, whileInView: { opacity: 1, x: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: idx * 0.1 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex-1 min-w-0 order-2 sm:order-1", children: [(0, jsx_runtime_1.jsx)("h3", { className: "courses-heading-4 courses-text-gradient mb-2 md:mb-3 line-clamp-2", children: course.title }), (0, jsx_runtime_1.jsx)("p", { className: "courses-body-small courses-text-secondary line-clamp-2 md:line-clamp-3 leading-relaxed", children: course.desc })] }), (0, jsx_runtime_1.jsxs)("div", { className: "relative w-full sm:w-32 md:w-40 h-32 sm:h-20 md:h-24 overflow-hidden rounded-lg flex-shrink-0 order-1 sm:order-2", children: [(0, jsx_runtime_1.jsx)("img", { src: course.img, alt: course.title, className: "w-full h-full object-cover transition-transform duration-300 group-hover:scale-110" }), (0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 bg-gradient-to-t from-black/50 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300" })] }), (0, jsx_runtime_1.jsx)("svg", { className: "w-5 h-5 md:w-6 md:h-6 group-hover:text-blue-400 transform group-hover:translate-x-1 transition-all duration-300 courses-text-muted flex-shrink-0 order-3", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) })] }, course.number)); }) }), (0, jsx_runtime_1.jsx)("div", { className: "lg:hidden mt-8 flex justify-center", children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.button, { className: "courses-button-primary py-3 px-8 rounded-2xl shadow-2xl transform transition-all duration-300 hover:scale-105", onClick: function () { return handleAction("enroll"); }, initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: 0.8 }, whileHover: { y: -3 }, whileTap: { y: 0 }, children: "Enroll now" }) })] })] }) }), (0, jsx_runtime_1.jsx)("section", { className: "courses-stats-section py-16 md:py-20 px-4 transition-all duration-500 border-b", children: (0, jsx_runtime_1.jsxs)("div", { className: "courses-container-wide", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.h2, { className: "courses-heading-2 courses-text-primary text-center mb-8 md:mb-12", initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5 }, children: "Project reviews from students" }), (0, jsx_runtime_1.jsx)("div", { className: "courses-grid courses-grid-3 mb-8 md:mb-12", children: projectReviews.map(function (review, idx) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "courses-card flex flex-col items-center text-center cursor-pointer group", initial: { opacity: 0, y: 30 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: idx * 0.1 }, whileHover: { scale: 1.02 }, onClick: function () { return handleInfo(review.review); }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "relative w-16 h-16 md:w-20 md:h-20 mb-4 md:mb-6", children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 rounded-full blur-md opacity-50 group-hover:opacity-70 transition-opacity duration-300 bg-gradient-to-r from-green-400 to-emerald-500" }), (0, jsx_runtime_1.jsx)("img", { src: review.img, alt: review.name, className: "relative w-full h-full rounded-full object-cover border-3 border-green-400 group-hover:border-green-300 transition-all duration-300 z-10 shadow-lg" })] }), (0, jsx_runtime_1.jsx)("h4", { className: "courses-heading-4 courses-text-gradient mb-3 md:mb-4", children: review.name }), (0, jsx_runtime_1.jsx)("p", { className: "courses-body-small courses-text-secondary text-center leading-relaxed line-clamp-4", children: review.review })] }, idx)); }) })] }) }), (0, jsx_runtime_1.jsxs)("section", { className: "courses-section py-16 md:py-20 px-4 transition-all duration-500 border-b", children: [(0, jsx_runtime_1.jsxs)("div", { className: "courses-container-wide", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.h3, { className: "courses-heading-3 courses-text-primary text-center mb-6 md:mb-8", initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5 }, children: "100+ topics taught..." }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "flex flex-wrap justify-center gap-2 md:gap-3 mb-6 transition-all duration-500 ".concat(showAllTopics ? 'max-h-none' : 'max-h-32 md:max-h-40 overflow-hidden'), initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: 0.1 }, children: (showAllTopics ? topics : topics.slice(0, 20)).map(function (topic, idx) { return ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "courses-topic-tag", whileHover: { scale: 1.05 }, transition: { type: "spring", stiffness: 400, damping: 10 }, children: topic }, idx)); }) }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "flex justify-center mb-8 md:mb-12", initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: 0.2 }, children: (0, jsx_runtime_1.jsx)("button", { className: "courses-button-ghost px-6 md:px-8 py-2 md:py-3 rounded-full font-semibold transform transition-all duration-300 hover:scale-105", onClick: function () { return setShowAllTopics(function (v) { return !v; }); }, children: showAllTopics ? "Show less" : "Show more" }) })] }), (0, jsx_runtime_1.jsx)("div", { ref: statsRef, className: "courses-grid courses-grid-3 mt-8 md:mt-12", children: stats.map(function (stat, idx) { return ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "courses-stat-card group text-center", initial: { opacity: 0, y: 30 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: idx * 0.1 }, whileHover: { scale: 1.02 }, children: (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-3xl md:text-4xl lg:text-5xl font-bold mb-3 md:mb-4 flex justify-center items-baseline courses-text-gradient", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "inline-block", initial: { opacity: 0, scale: 0.5 }, animate: { opacity: 1, scale: 1 }, transition: { duration: 0.5 }, children: isStatsVisible ? animatedStats[stat.label] : 0 }), (0, jsx_runtime_1.jsx)("span", { className: "inline-block ml-1 text-lg md:text-xl lg:text-2xl", children: stat.suffix })] }), (0, jsx_runtime_1.jsx)("div", { className: "courses-body-large courses-text-secondary font-semibold transition-colors duration-300 mb-4 md:mb-6", children: stat.label }), (0, jsx_runtime_1.jsx)("div", { className: "h-2 w-full rounded-full overflow-hidden bg-gradient-to-r from-gray-200 to-gray-300", children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "h-full bg-gradient-to-r from-blue-500 to-purple-500", initial: { width: "0%" }, animate: { width: isStatsVisible ? "100%" : "0%" }, transition: { duration: 1, delay: idx * 0.2 } }) })] }) }, idx)); }) })] }), (0, jsx_runtime_1.jsx)("section", { className: "courses-faq-section py-16 md:py-20 px-4 transition-all duration-500 border-b", children: (0, jsx_runtime_1.jsxs)("div", { className: "courses-container", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.h2, { className: "courses-heading-2 courses-text-primary text-center mb-8 md:mb-12", initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5 }, children: "Commonly asked questions" }), (0, jsx_runtime_1.jsx)("div", { className: "max-w-3xl mx-auto", children: faqs.map(function (faq, idx) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "courses-faq-item mb-4 md:mb-6", initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: idx * 0.1 }, children: [(0, jsx_runtime_1.jsxs)("button", { className: "courses-faq-button w-full text-left py-4 md:py-6 px-4 md:px-6 courses-body md:courses-body-large font-semibold flex justify-between items-center focus:outline-none transition-all duration-300", onClick: function () { return setOpenFaq(openFaq === idx ? null : idx); }, children: [(0, jsx_runtime_1.jsx)("span", { className: "pr-4", children: faq.q }), (0, jsx_runtime_1.jsx)("span", { className: "transform transition-transform duration-300 text-xl md:text-2xl flex-shrink-0", style: { transform: openFaq === idx ? 'rotate(45deg)' : 'rotate(0)' }, children: "+" })] }), (0, jsx_runtime_1.jsx)("div", { className: "transition-all duration-300 overflow-hidden", style: { + maxHeight: openFaq === idx ? '500px' : '0', + opacity: openFaq === idx ? 1 : 0 + }, children: (0, jsx_runtime_1.jsx)("div", { className: "courses-faq-answer py-4 md:py-6 px-4 md:px-6 courses-body leading-relaxed", children: faq.a }) })] }, idx)); }) })] }) })] })] })); +} +function CoursesLanding() { + return (0, jsx_runtime_1.jsx)(CoursesContent, {}); +} diff --git a/src/pages/dashboard/giveaway/index.js b/src/pages/dashboard/giveaway/index.js new file mode 100644 index 00000000..9392c133 --- /dev/null +++ b/src/pages/dashboard/giveaway/index.js @@ -0,0 +1,244 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importStar(require("react")); +var Layout_1 = __importDefault(require("@theme/Layout")); +var Head_1 = __importDefault(require("@docusaurus/Head")); +var framer_motion_1 = require("framer-motion"); +var react_slot_counter_1 = __importDefault(require("react-slot-counter")); +var NavbarIcon_1 = __importDefault(require("../../../components/navbar/NavbarIcon")); +var router_1 = require("@docusaurus/router"); +var lucide_react_1 = require("lucide-react"); +require("../dashboard.css"); +// Giveaway-specific styles +var giveawayStyles = "\n.dashboard-stats-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));\n gap: 24px;\n margin-bottom: 40px;\n}\n\n.giveaway-stats-banner {\n display: flex;\n justify-content: space-between;\n gap: 0.75rem;\n margin-bottom: 2rem;\n padding: 0 1rem;\n}\n\n.stat-item {\n flex: 1;\n display: flex;\n align-items: center;\n gap: 0.5rem;\n background: var(--ifm-background-color);\n border: 1px solid var(--ifm-color-emphasis-200);\n border-radius: 8px;\n padding: 0.5rem;\n transition: all 0.3s ease;\n box-shadow: 0 2px 8px var(--ifm-color-emphasis-200);\n}\n\n.stat-item:hover {\n transform: translateY(-2px);\n box-shadow: 0 4px 16px var(--ifm-color-emphasis-300);\n}\n\n.timer-icon {\n background: linear-gradient(135deg, #ff6b6b, #ffa726) !important;\n}\n\n.entries-icon {\n background: linear-gradient(135deg, #4ecdc4, #44a08d) !important;\n}\n\n.score-icon {\n background: linear-gradient(135deg, #667eea, #764ba2) !important;\n}\n\n.winners-icon {\n background: linear-gradient(135deg, #f093fb, #f5576c) !important;\n}\n\n.stat-icon {\n width: 28px;\n height: 28px;\n border-radius: 6px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 0.9rem;\n flex-shrink: 0;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n}\n\n.stat-content {\n min-width: 0;\n}\n\n.stat-content h3 {\n font-size: 0.65rem;\n font-weight: 600;\n color: var(--ifm-color-emphasis-700);\n margin: 0 0 0.15rem 0;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.stat-value {\n font-size: 1.1rem;\n font-weight: 800;\n color: var(--ifm-color-emphasis-900);\n display: flex;\n align-items: baseline;\n gap: 0.15rem;\n margin-bottom: 0.15rem;\n}\n\n.stat-value span {\n font-size: 0.6rem;\n font-weight: 600;\n color: var(--ifm-color-emphasis-600);\n}\n\n.stat-content p {\n font-size: 0.55rem;\n color: var(--ifm-color-emphasis-500);\n margin: 0;\n}\n\n[data-theme='dark'] .stat-item {\n background: var(--ifm-color-emphasis-100);\n border-color: var(--ifm-color-emphasis-300);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);\n}\n\n[data-theme='dark'] .stat-item:hover {\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);\n}\n\n.giveaway-leaderboard-section {\n margin: 3rem 0;\n padding: 0 1rem;\n}\n\n.giveaway-leaderboard-header {\n text-align: center;\n margin-bottom: 2rem;\n}\n\n.giveaway-leaderboard-title {\n font-size: 2.5rem;\n font-weight: 800;\n margin-bottom: 0.5rem;\n color: var(--ifm-color-emphasis-900);\n}\n\n.giveaway-leaderboard-subtitle {\n font-size: 1.1rem;\n color: var(--ifm-color-emphasis-700);\n margin: 0;\n}\n\n.giveaway-loading {\n text-align: center;\n padding: 3rem;\n color: var(--ifm-color-emphasis-700);\n}\n\n.giveaway-leaderboard-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n gap: 1.5rem;\n max-width: 1200px;\n margin: 0 auto;\n}\n\n.giveaway-leaderboard-card {\n background: var(--ifm-background-color);\n border: 1px solid var(--ifm-color-emphasis-300);\n border-radius: 16px;\n padding: 1.5rem;\n position: relative;\n overflow: hidden;\n transition: all 0.3s ease;\n box-shadow: 0 4px 12px var(--ifm-color-emphasis-200);\n}\n\n.giveaway-leaderboard-card:hover {\n box-shadow: 0 8px 25px var(--ifm-color-emphasis-300);\n border-color: var(--ifm-color-primary);\n transform: translateY(-2px);\n}\n\n.giveaway-leaderboard-card.rank-1 {\n background: linear-gradient(135deg, #ffd700, #ffed4e);\n border-color: #ffd700;\n}\n\n.giveaway-leaderboard-card.rank-2 {\n background: linear-gradient(135deg, #c0c0c0, #e8e8e8);\n border-color: #c0c0c0;\n}\n\n.giveaway-leaderboard-card.rank-3 {\n background: linear-gradient(135deg, #cd7f32, #daa520);\n border-color: #cd7f32;\n}\n\n[data-theme='dark'] .giveaway-leaderboard-card {\n background: var(--ifm-color-emphasis-100);\n border-color: var(--ifm-color-emphasis-400);\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);\n}\n\n[data-theme='dark'] .giveaway-leaderboard-card:hover {\n box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);\n}\n\n[data-theme='dark'] .giveaway-leaderboard-card.rank-1 {\n background: linear-gradient(135deg, #b8860b, #daa520);\n}\n\n[data-theme='dark'] .giveaway-leaderboard-card.rank-2 {\n background: linear-gradient(135deg, #708090, #a9a9a9);\n}\n\n[data-theme='dark'] .giveaway-leaderboard-card.rank-3 {\n background: linear-gradient(135deg, #8b4513, #cd853f);\n}\n\n.giveaway-rank-badge {\n position: absolute;\n top: 1rem;\n right: 1rem;\n width: 40px;\n height: 40px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n font-weight: bold;\n font-size: 0.9rem;\n background: var(--ifm-color-primary);\n color: var(--ifm-color-primary-contrast-background);\n}\n\n.giveaway-avatar {\n position: relative;\n width: 80px;\n height: 80px;\n margin: 0 auto 1rem;\n}\n\n.giveaway-avatar img {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n object-fit: cover;\n border: 3px solid var(--ifm-color-primary);\n}\n\n.giveaway-badge {\n position: absolute;\n bottom: -5px;\n left: 50%;\n transform: translateX(-50%);\n background: var(--ifm-color-primary);\n color: var(--ifm-color-primary-contrast-background);\n padding: 0.25rem 0.5rem;\n border-radius: 12px;\n font-size: 0.7rem;\n font-weight: 600;\n white-space: nowrap;\n}\n\n.giveaway-info {\n text-align: center;\n margin-bottom: 1rem;\n}\n\n.giveaway-name {\n font-size: 1.2rem;\n font-weight: 700;\n margin-bottom: 0.5rem;\n color: var(--ifm-color-emphasis-900);\n}\n\n.giveaway-leaderboard-card.rank-1 .giveaway-name,\n.giveaway-leaderboard-card.rank-2 .giveaway-name,\n.giveaway-leaderboard-card.rank-3 .giveaway-name {\n color: var(--ifm-color-emphasis-1000);\n}\n\n.giveaway-stats {\n display: flex;\n justify-content: space-around;\n gap: 1rem;\n}\n\n.giveaway-stat {\n text-align: center;\n}\n\n.giveaway-stat .stat-value {\n display: block;\n font-size: 1.5rem;\n font-weight: 700;\n color: var(--ifm-color-primary);\n}\n\n.giveaway-leaderboard-card.rank-1 .stat-value,\n.giveaway-leaderboard-card.rank-2 .stat-value,\n.giveaway-leaderboard-card.rank-3 .stat-value {\n color: var(--ifm-color-emphasis-1000);\n}\n\n.giveaway-stat .stat-label {\n font-size: 0.8rem;\n color: var(--ifm-color-emphasis-600);\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.giveaway-leaderboard-card.rank-1 .stat-label,\n.giveaway-leaderboard-card.rank-2 .stat-label,\n.giveaway-leaderboard-card.rank-3 .stat-label {\n color: var(--ifm-color-emphasis-800);\n}\n\n.giveaway-profile-btn {\n display: block;\n width: 100%;\n padding: 0.75rem;\n background: var(--ifm-color-primary);\n color: var(--ifm-color-primary-contrast-background);\n text-decoration: none;\n border-radius: 8px;\n text-align: center;\n font-weight: 600;\n transition: all 0.3s ease;\n}\n\n.giveaway-profile-btn:hover {\n background: var(--ifm-color-primary-dark);\n color: var(--ifm-color-primary-contrast-background);\n text-decoration: none;\n transform: translateY(-2px);\n}\n\n.giveaway-leaderboard-card.rank-1 .giveaway-profile-btn,\n.giveaway-leaderboard-card.rank-2 .giveaway-profile-btn,\n.giveaway-leaderboard-card.rank-3 .giveaway-profile-btn {\n background: var(--ifm-color-emphasis-800);\n color: var(--ifm-color-emphasis-0);\n}\n\n.giveaway-leaderboard-card.rank-1 .giveaway-profile-btn:hover,\n.giveaway-leaderboard-card.rank-2 .giveaway-profile-btn:hover,\n.giveaway-leaderboard-card.rank-3 .giveaway-profile-btn:hover {\n background: var(--ifm-color-emphasis-900);\n color: var(--ifm-color-emphasis-0);\n}\n\n@media (max-width: 768px) {\n .giveaway-stats-banner {\n flex-direction: column;\n gap: 0.5rem;\n }\n \n .stat-item {\n padding: 0.4rem;\n }\n \n .stat-icon {\n width: 24px;\n height: 24px;\n font-size: 0.8rem;\n }\n \n .stat-value {\n font-size: 1rem;\n }\n \n .stat-content h3 {\n font-size: 0.6rem;\n }\n \n .stat-content p {\n font-size: 0.5rem;\n }\n \n .giveaway-leaderboard-grid {\n grid-template-columns: 1fr;\n gap: 1rem;\n }\n \n .giveaway-leaderboard-title {\n font-size: 2rem;\n }\n}\n\n/* Dashboard styles for consistency */\n.dashboard-stats-section {\n margin-bottom: 60px;\n}\n\n.section-title {\n font-size: 1.8rem;\n font-weight: 700;\n margin-bottom: 30px;\n text-align: center;\n color: var(--ifm-color-content);\n}\n\n.dashboard-stat-card {\n background: var(--ifm-background-surface-color);\n border: 1px solid var(--ifm-color-emphasis-200);\n border-radius: 16px;\n padding: 32px 24px;\n text-align: center;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);\n transition: all 0.3s ease;\n position: relative;\n overflow: hidden;\n}\n\n.dashboard-stat-value {\n font-size: 2.5rem;\n font-weight: 800;\n margin-bottom: 10px;\n color: var(--ifm-color-primary);\n min-height: 60px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n@media (max-width: 996px) {\n .dashboard-main-content {\n padding: 80px 20px 40px;\n }\n}\n"; +// Inject styles +if (typeof document !== 'undefined') { + var existingStyle = document.getElementById('giveaway-styles'); + if (!existingStyle) { + var styleSheet = document.createElement('style'); + styleSheet.id = 'giveaway-styles'; + styleSheet.textContent = giveawayStyles; + document.head.appendChild(styleSheet); + } +} +var GiveawayPage = function () { + var _a, _b, _c; + var history = (0, router_1.useHistory)(); + var _d = (0, react_1.useState)(false), showDashboardMenu = _d[0], setShowDashboardMenu = _d[1]; + var _e = (0, react_1.useState)([]), leaderboard = _e[0], setLeaderboard = _e[1]; + var _f = (0, react_1.useState)(true), loading = _f[0], setLoading = _f[1]; + var _g = (0, react_1.useState)("giveaway"), activeTab = _g[0], setActiveTab = _g[1]; + // Close dashboard menu when clicking outside + (0, react_1.useEffect)(function () { + var handleClickOutside = function (event) { + var target = event.target; + // Close menu when clicking on overlay or anywhere outside the menu + if (showDashboardMenu && + (!target.closest('.dashboard-mobile-menu > div:last-child') && + !target.closest('.dashboard-menu-btn') || + target.closest('.dashboard-menu-overlay'))) { + setShowDashboardMenu(false); + } + }; + if (showDashboardMenu) { + document.addEventListener('mousedown', handleClickOutside); + } + return function () { + document.removeEventListener('mousedown', handleClickOutside); + }; + }, [showDashboardMenu]); + // Ensure active tab is set correctly when page loads + (0, react_1.useEffect)(function () { + // We're on the giveaway page, so the active tab should be "giveaway" + setActiveTab("giveaway"); + }, []); + (0, react_1.useEffect)(function () { + // Simulate fetching leaderboard data + var fetchLeaderboard = function () { return __awaiter(void 0, void 0, void 0, function () { + var mockData; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + setLoading(true); + // Simulate API delay + return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, 1000); })]; + case 1: + // Simulate API delay + _a.sent(); + mockData = [ + { + rank: 1, + name: "sanjay-kv", + avatar: "https://avatars.githubusercontent.com/u/30715153?v=4", + points: 2500, + contributions: 45, + github_url: "https://github.com/sanjay-kv", + badge: "🏆 Champion" + }, + { + rank: 2, + name: "vansh-codes", + avatar: "https://avatars.githubusercontent.com/u/114163734?v=4", + points: 2100, + contributions: 38, + github_url: "https://github.com/vansh-codes", + badge: "🥈 Runner-up" + }, + { + rank: 3, + name: "Hemu21", + avatar: "https://avatars.githubusercontent.com/u/106808387?v=4", + points: 1850, + contributions: 32, + github_url: "https://github.com/Hemu21", + badge: "🥉 Third Place" + }, + { + rank: 4, + name: "contributor4", + avatar: "https://avatars.githubusercontent.com/u/1?v=4", + points: 1600, + contributions: 28, + github_url: "https://github.com/contributor4" + }, + { + rank: 5, + name: "contributor5", + avatar: "https://avatars.githubusercontent.com/u/2?v=4", + points: 1400, + contributions: 24, + github_url: "https://github.com/contributor5" + } + ]; + setLeaderboard(mockData); + setLoading(false); + return [2 /*return*/]; + } + }); + }); }; + fetchLeaderboard(); + }, []); + var handleTabChange = function (tab) { + setActiveTab(tab); + setShowDashboardMenu(false); + // When navigating from giveaway page to other tabs, we need to + // ensure we're using consistent paths with the dashboard page + if (tab === "discuss") { + // Navigate to main dashboard page with discuss hash + history.push("/dashboard#discuss"); + } + else if (tab === "contributors") { + // Navigate to main dashboard page with leaderboard hash + history.push("/dashboard#leaderboard"); + } + else if (tab === "home") { + // Navigate to main dashboard page + history.push("/dashboard"); + } + else if (tab === "giveaway") { + // Already on giveaway page, just scroll to top + window.scrollTo(0, 0); + } + }; + var StatCard = function (_a) { + var icon = _a.icon, title = _a.title, value = _a.value, valueText = _a.valueText, description = _a.description; + return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "dashboard-stat-card", initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, transition: { duration: 0.5 }, viewport: { once: true }, whileHover: { scale: 1.02 }, children: [(0, jsx_runtime_1.jsx)("div", { className: "dashboard-stat-icon", children: icon }), (0, jsx_runtime_1.jsxs)("div", { className: "dashboard-stat-content", children: [(0, jsx_runtime_1.jsx)("h3", { className: "dashboard-stat-title", children: title }), (0, jsx_runtime_1.jsx)("div", { className: "dashboard-stat-value", children: (0, jsx_runtime_1.jsx)(react_slot_counter_1.default, { value: valueText, autoAnimationStart: true, duration: 1 }) }), (0, jsx_runtime_1.jsx)("p", { className: "dashboard-stat-description", children: description })] })] })); + }; + return ((0, jsx_runtime_1.jsxs)(Layout_1.default, { title: "Giveaway", description: "RecodeHive Giveaway", noFooter: true, children: [(0, jsx_runtime_1.jsx)(Head_1.default, { children: (0, jsx_runtime_1.jsx)("title", { children: "\uD83C\uDF81 RecodeHive Giveaway" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "dashboard-layout", children: [(0, jsx_runtime_1.jsx)("button", { className: "dashboard-menu-btn ".concat(showDashboardMenu ? "open" : ""), onClick: function () { return setShowDashboardMenu(!showDashboardMenu); }, "aria-label": "Toggle dashboard menu", children: showDashboardMenu ? (0, jsx_runtime_1.jsx)("span", { "aria-hidden": "true", children: "\u2715" }) : (0, jsx_runtime_1.jsx)("span", { "aria-hidden": "true", children: "\u2630" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "dashboard-mobile-menu ".concat(showDashboardMenu ? "show" : ""), children: [(0, jsx_runtime_1.jsx)("div", { className: "dashboard-menu-overlay", onClick: function () { return setShowDashboardMenu(false); } }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { className: "dashboard-menu-header", children: [(0, jsx_runtime_1.jsx)("h3", { children: "Dashboard Menu" }), (0, jsx_runtime_1.jsx)("button", { className: "close-menu-btn", onClick: function () { return setShowDashboardMenu(false); }, "aria-label": "Close menu", children: "\u2715" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "dashboard-menu-items", children: [(0, jsx_runtime_1.jsxs)("div", { className: "menu-item ".concat(activeTab === "home" ? "active" : ""), onClick: function () { + handleTabChange("home"); + setShowDashboardMenu(false); + }, children: [(0, jsx_runtime_1.jsx)("span", { className: "menu-icon", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Home, { size: 18 }) }), " Home"] }), (0, jsx_runtime_1.jsxs)("div", { className: "menu-item ".concat(activeTab === "discuss" ? "active" : ""), onClick: function () { + handleTabChange("discuss"); + setShowDashboardMenu(false); + }, children: [(0, jsx_runtime_1.jsx)("span", { className: "menu-icon", children: (0, jsx_runtime_1.jsx)(lucide_react_1.MessageCircle, { size: 18 }) }), " Discussions"] }), (0, jsx_runtime_1.jsxs)("div", { className: "menu-item ".concat(activeTab === "contributors" ? "active" : ""), onClick: function () { + handleTabChange("contributors"); + setShowDashboardMenu(false); + }, children: [(0, jsx_runtime_1.jsx)("span", { className: "menu-icon", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Trophy, { size: 18 }) }), " LeaderBoard"] }), (0, jsx_runtime_1.jsxs)("div", { className: "menu-item ".concat(activeTab === "giveaway" ? "active" : ""), onClick: function () { + handleTabChange("giveaway"); + setShowDashboardMenu(false); + }, children: [(0, jsx_runtime_1.jsx)("span", { className: "menu-icon", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Gift, { size: 18 }) }), " Giveaways"] })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "dashboard-sidebar", children: [(0, jsx_runtime_1.jsx)("div", { className: "sidebar-header", children: (0, jsx_runtime_1.jsx)("button", { className: "back-button", onClick: function () { + // If we came from the dashboard, go back, otherwise go to dashboard + if (history.length > 2) { + history.goBack(); + } + else { + history.push('/dashboard'); + } + }, "aria-label": "Go back to dashboard", children: (0, jsx_runtime_1.jsx)(lucide_react_1.ArrowLeft, { size: 20 }) }) }), (0, jsx_runtime_1.jsxs)("div", { className: "sidebar-nav", children: [(0, jsx_runtime_1.jsx)(NavbarIcon_1.default, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.Home, { size: 20 }), text: "Home", active: activeTab === "home", onClick: function () { return handleTabChange("home"); } }), (0, jsx_runtime_1.jsx)(NavbarIcon_1.default, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.MessageCircle, { size: 20 }), text: "Discussions", active: activeTab === "discuss", onClick: function () { return handleTabChange("discuss"); } }), (0, jsx_runtime_1.jsx)(NavbarIcon_1.default, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.Trophy, { size: 20 }), text: "LeaderBoard", active: activeTab === "contributors", onClick: function () { return handleTabChange("contributors"); } }), (0, jsx_runtime_1.jsx)(NavbarIcon_1.default, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.Gift, { size: 20 }), text: "Giveaways", active: activeTab === "giveaway", onClick: function () { return handleTabChange("giveaway"); } })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "dashboard-main-content", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.section, { className: "dashboard-hero", initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.8 }, children: (0, jsx_runtime_1.jsxs)("div", { className: "hero-content", children: [(0, jsx_runtime_1.jsxs)("h1", { className: "dashboard-title", children: ["\uD83C\uDF81 ", (0, jsx_runtime_1.jsx)("span", { className: "highlight", children: "Giveaway" })] }), (0, jsx_runtime_1.jsx)("p", { className: "dashboard-subtitle", children: "Participate in exclusive giveaways and win exciting prizes!" })] }) }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.section, { className: "dashboard-stats-section", initial: { opacity: 0, y: 10 }, whileInView: { opacity: 1 }, transition: { duration: 0.6 }, viewport: { once: true }, children: (0, jsx_runtime_1.jsxs)("div", { className: "dashboard-stats-grid", children: [(0, jsx_runtime_1.jsx)(StatCard, { icon: "\u23F3", title: "Next Giveaway", value: 5, valueText: "5 Days", description: "Time remaining" }), (0, jsx_runtime_1.jsx)(StatCard, { icon: "\uD83C\uDFAB", title: "Entries", value: leaderboard.length, valueText: leaderboard.length.toString(), description: "Total participants" }), (0, jsx_runtime_1.jsx)(StatCard, { icon: "\uD83D\uDCC8", title: "Top Score", value: ((_a = leaderboard[0]) === null || _a === void 0 ? void 0 : _a.points) || 0, valueText: ((_c = (_b = leaderboard[0]) === null || _b === void 0 ? void 0 : _b.points) === null || _c === void 0 ? void 0 : _c.toString()) || "0", description: "Leading participant" }), (0, jsx_runtime_1.jsx)(StatCard, { icon: "\uD83C\uDFC5", title: "Total Winners", value: 3, valueText: "3", description: "Winners per giveaway" })] }) }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.section, { className: "giveaway-leaderboard-section", initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, transition: { duration: 0.6, delay: 0.2 }, viewport: { once: true }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "giveaway-leaderboard-header", children: [(0, jsx_runtime_1.jsxs)("h2", { className: "giveaway-leaderboard-title", children: ["\uD83C\uDF81 Giveaway ", (0, jsx_runtime_1.jsx)("span", { className: "highlight", children: "Leaderboard" })] }), (0, jsx_runtime_1.jsx)("p", { className: "giveaway-leaderboard-subtitle", children: "Top contributors competing for amazing prizes!" })] }), loading ? ((0, jsx_runtime_1.jsxs)("div", { className: "giveaway-loading", children: [(0, jsx_runtime_1.jsx)("div", { className: "loading-spinner", children: "Loading..." }), (0, jsx_runtime_1.jsx)("p", { children: "Fetching leaderboard data..." })] })) : ((0, jsx_runtime_1.jsx)("div", { className: "giveaway-leaderboard-grid", children: leaderboard.map(function (entry, index) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "giveaway-leaderboard-card rank-".concat(entry.rank <= 3 ? entry.rank : 'other'), initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5, delay: index * 0.1 }, whileHover: { scale: 1.02, y: -5 }, children: [(0, jsx_runtime_1.jsx)("div", { className: "giveaway-rank-badge", children: entry.rank <= 3 ? (entry.rank === 1 ? (0, jsx_runtime_1.jsx)(lucide_react_1.Crown, { size: 20 }) : + entry.rank === 2 ? (0, jsx_runtime_1.jsx)(lucide_react_1.Award, { size: 20 }) : + (0, jsx_runtime_1.jsx)(lucide_react_1.Star, { size: 20 })) : ("#".concat(entry.rank)) }), (0, jsx_runtime_1.jsxs)("div", { className: "giveaway-avatar", children: [(0, jsx_runtime_1.jsx)("img", { src: entry.avatar, alt: entry.name }), entry.badge && ((0, jsx_runtime_1.jsx)("div", { className: "giveaway-badge", children: entry.badge }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "giveaway-info", children: [(0, jsx_runtime_1.jsx)("h3", { className: "giveaway-name", children: entry.name }), (0, jsx_runtime_1.jsxs)("div", { className: "giveaway-stats", children: [(0, jsx_runtime_1.jsxs)("div", { className: "giveaway-stat", children: [(0, jsx_runtime_1.jsx)("span", { className: "stat-value", children: entry.points }), (0, jsx_runtime_1.jsx)("span", { className: "stat-label", children: "Points" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "giveaway-stat", children: [(0, jsx_runtime_1.jsx)("span", { className: "stat-value", children: entry.contributions }), (0, jsx_runtime_1.jsx)("span", { className: "stat-label", children: "Contributions" })] })] })] }), (0, jsx_runtime_1.jsx)("a", { href: entry.github_url, target: "_blank", rel: "noopener noreferrer", className: "giveaway-profile-btn", children: "View Profile" })] }, entry.rank)); }) }))] })] })] })] })); +}; +exports.default = GiveawayPage; diff --git a/src/pages/dashboard/index.js b/src/pages/dashboard/index.js new file mode 100644 index 00000000..c3a62de4 --- /dev/null +++ b/src/pages/dashboard/index.js @@ -0,0 +1,345 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importStar(require("react")); +var Layout_1 = __importDefault(require("@theme/Layout")); +var Head_1 = __importDefault(require("@docusaurus/Head")); +var BrowserOnly_1 = __importDefault(require("@docusaurus/BrowserOnly")); +var framer_motion_1 = require("framer-motion"); +var statsProvider_1 = require("@site/src/lib/statsProvider"); +var react_slot_counter_1 = __importDefault(require("react-slot-counter")); +var router_1 = require("@docusaurus/router"); +var githubService_1 = require("@site/src/services/githubService"); +var DiscussionCard_1 = __importDefault(require("@site/src/components/discussions/DiscussionCard")); +var lucide_react_1 = require("lucide-react"); +var NavbarIcon_1 = __importDefault(require("@site/src/components/navbar/NavbarIcon")); +require("@site/src/components/discussions/discussions.css"); +require("./dashboard.css"); +var leaderboard_1 = __importDefault(require("@site/src/components/dashboard/LeaderBoard/leaderboard")); +var categories = [ + "all", + "announcements", + "ideas", + "q-a", + "show-and-tell", + "general", +]; +var DashboardContent = function () { + var location = (0, router_1.useLocation)(); + var history = (0, router_1.useHistory)(); + var _a = (0, react_1.useState)("home"), activeTab = _a[0], setActiveTab = _a[1]; + // Discussion state management + var _b = (0, react_1.useState)("discussions"), activeDiscussionTab = _b[0], setActiveDiscussionTab = _b[1]; + var _c = (0, react_1.useState)("all"), selectedCategory = _c[0], setSelectedCategory = _c[1]; + var _d = (0, react_1.useState)("most_popular"), sortBy = _d[0], setSortBy = _d[1]; + var _e = (0, react_1.useState)(""), searchQuery = _e[0], setSearchQuery = _e[1]; + var _f = (0, react_1.useState)([]), discussions = _f[0], setDiscussions = _f[1]; + var _g = (0, react_1.useState)(true), discussionsLoading = _g[0], setDiscussionsLoading = _g[1]; + var _h = (0, react_1.useState)(null), discussionsError = _h[0], setDiscussionsError = _h[1]; + var _j = (0, react_1.useState)(false), showDashboardMenu = _j[0], setShowDashboardMenu = _j[1]; + // Close dashboard menu when clicking outside + (0, react_1.useEffect)(function () { + var handleClickOutside = function (event) { + var target = event.target; + if (showDashboardMenu && + !target.closest('.dashboard-mobile-menu') && + !target.closest('.dashboard-menu-btn')) { + setShowDashboardMenu(false); + } + }; + if (showDashboardMenu) { + document.addEventListener('mousedown', handleClickOutside); + } + return function () { + document.removeEventListener('mousedown', handleClickOutside); + }; + }, [showDashboardMenu]); + (0, react_1.useEffect)(function () { + // Set active tab based on URL hash + if (location.hash === "#discuss") { + setActiveTab("discuss"); + } + else if (location.hash === "#leaderboard") { + setActiveTab("contributors"); + } + else if (location.hash === "#giveaway") { + setActiveTab("giveaway"); + } + else { + setActiveTab("home"); + } + }, [location]); + // Fetch discussions when discuss tab is active + (0, react_1.useEffect)(function () { + if (activeTab === "discuss") { + fetchDiscussions(); + } + }, [activeTab]); + var fetchDiscussions = function () { return __awaiter(void 0, void 0, void 0, function () { + var discussionsData, error_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, 3, 4]); + setDiscussionsLoading(true); + setDiscussionsError(null); + return [4 /*yield*/, githubService_1.githubService.fetchDiscussions(20)]; + case 1: + discussionsData = _a.sent(); + setDiscussions(discussionsData); + return [3 /*break*/, 4]; + case 2: + error_1 = _a.sent(); + console.error("Failed to fetch discussions:", error_1); + setDiscussionsError(error_1 instanceof Error ? error_1.message : "Failed to load discussions"); + return [3 /*break*/, 4]; + case 3: + setDiscussionsLoading(false); + return [7 /*endfinally*/]; + case 4: return [2 /*return*/]; + } + }); + }); }; + // Discussion handlers + var handleDiscussionTabChange = function (tab) { + setActiveDiscussionTab(tab); + }; + var handleCategoryChange = function (category) { + setSelectedCategory(category); + }; + var getCategoryIcon = function (category) { + var iconMap = { + all: null, + announcements: (0, jsx_runtime_1.jsx)(lucide_react_1.Megaphone, { size: 14 }), + ideas: (0, jsx_runtime_1.jsx)(lucide_react_1.Lightbulb, { size: 14 }), + "q-a": (0, jsx_runtime_1.jsx)(lucide_react_1.HelpCircle, { size: 14 }), + "show-and-tell": (0, jsx_runtime_1.jsx)(lucide_react_1.Star, { size: 14 }), + general: (0, jsx_runtime_1.jsx)(lucide_react_1.MessageCircle, { size: 14 }), + }; + return iconMap[category] || null; + }; + var getCategoryDisplayName = function (category) { + var categoryMap = { + all: "All", + announcements: "Announcements", + ideas: "Ideas", + "q-a": "Q&A", + "show-and-tell": "Show & Tell", + general: "General", + }; + return categoryMap[category] || category; + }; + var handleSortChange = function (event) { + setSortBy(event.target.value); + }; + var handleSearchChange = function (event) { + setSearchQuery(event.target.value); + }; + var handleNewDiscussion = function () { + window.open("https://github.com/recodehive/recode-website/discussions/new", "_blank"); + }; + // Filter discussions based on current state and tab + var getFilteredDiscussions = function (discussions) { + return discussions + .filter(function (discussion) { + // First apply tab filter + switch (activeDiscussionTab) { + case "trending": + return discussion.reactions.total_count > 5; + case "unanswered": + return discussion.comments === 0; + default: + return true; + } + }) + .filter(function (discussion) { + // Then apply category filter + if (selectedCategory !== "all") { + var categoryName = discussion.category.name.toLowerCase(); + var selectedCat = selectedCategory.toLowerCase(); + // Map GitHub discussion categories to our filter categories + if (selectedCat === "q-a" && + (categoryName.includes("q&a") || categoryName.includes("question"))) { + return true; + } + if (selectedCat === "show-and-tell" && + categoryName.includes("show")) { + return true; + } + if (selectedCat === "announcements" && + categoryName.includes("announcement")) { + return true; + } + if (selectedCat === "ideas" && categoryName.includes("idea")) { + return true; + } + if (selectedCat === "general" && + (categoryName.includes("general") || + categoryName.includes("discussion"))) { + return true; + } + return categoryName.includes(selectedCat); + } + return true; + }) + .filter(function (discussion) { + // Then apply search filter + if (searchQuery) { + return (discussion.title + .toLowerCase() + .includes(searchQuery.toLowerCase()) || + discussion.body.toLowerCase().includes(searchQuery.toLowerCase())); + } + return true; + }) + .sort(function (a, b) { + // Finally sort the results + switch (sortBy) { + case "latest": + return (new Date(b.created_at).getTime() - + new Date(a.created_at).getTime()); + case "oldest": + return (new Date(a.created_at).getTime() - + new Date(b.created_at).getTime()); + default: + return b.reactions.total_count - a.reactions.total_count; + } + }); + }; + var filteredDiscussions = react_1.default.useMemo(function () { return getFilteredDiscussions(discussions); }, [discussions, activeDiscussionTab, selectedCategory, searchQuery, sortBy]); + var handleTabChange = function (tab) { + setActiveTab(tab); + setShowDashboardMenu(false); + if (tab === "discuss") { + history.push("#discuss"); + window.scrollTo(0, 0); + } + else if (tab === "giveaway") { + history.push("/dashboard/giveaway"); + } + else if (tab === "contributors") { + history.push("#leaderboard"); + window.scrollTo(0, 0); + } + else { + history.push("#"); + } + }; + var _k = (0, statsProvider_1.useCommunityStatsContext)(), githubStarCount = _k.githubStarCount, githubContributorsCount = _k.githubContributorsCount, githubForksCount = _k.githubForksCount, githubReposCount = _k.githubReposCount, loading = _k.loading, error = _k.error; + var _l = (0, react_1.useState)({ + totalContributors: 0, + totalRepositories: 0, + totalStars: 0, + totalForks: 0, + }), dashboardStats = _l[0], setDashboardStats = _l[1]; + (0, react_1.useEffect)(function () { + setDashboardStats({ + totalContributors: githubContributorsCount, + totalRepositories: githubReposCount, + totalStars: githubStarCount, + totalForks: githubForksCount, + }); + }, [ + githubContributorsCount, + githubReposCount, + githubStarCount, + githubForksCount, + ]); + var StatCard = function (_a) { + var icon = _a.icon, title = _a.title, value = _a.value, valueText = _a.valueText, description = _a.description; + return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "dashboard-stat-card", initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, transition: { duration: 0.5 }, viewport: { once: true }, whileHover: { scale: 1.02 }, children: [(0, jsx_runtime_1.jsx)("div", { className: "dashboard-stat-icon", children: icon }), (0, jsx_runtime_1.jsxs)("div", { className: "dashboard-stat-content", children: [(0, jsx_runtime_1.jsx)("h3", { className: "dashboard-stat-title", children: title }), (0, jsx_runtime_1.jsx)("div", { className: "dashboard-stat-value", children: loading ? ((0, jsx_runtime_1.jsx)("div", { className: "loading-spinner" })) : ((0, jsx_runtime_1.jsx)(react_slot_counter_1.default, { value: valueText, autoAnimationStart: true, duration: 1 })) }), (0, jsx_runtime_1.jsx)("p", { className: "dashboard-stat-description", children: description })] })] })); + }; + return ((0, jsx_runtime_1.jsxs)("div", { className: "dashboard-layout", children: [(0, jsx_runtime_1.jsx)("button", { className: "dashboard-menu-btn ".concat(showDashboardMenu ? "open" : ""), onClick: function () { return setShowDashboardMenu(!showDashboardMenu); }, "aria-label": "Toggle dashboard menu", children: showDashboardMenu ? "✕" : "☰" }), (0, jsx_runtime_1.jsxs)("div", { className: "dashboard-mobile-menu ".concat(showDashboardMenu ? "show" : ""), children: [showDashboardMenu && ((0, jsx_runtime_1.jsx)("div", { className: "dashboard-menu-overlay", onClick: function () { return setShowDashboardMenu(false); } })), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { className: "dashboard-menu-header", children: [(0, jsx_runtime_1.jsx)("h3", { children: "Dashboard Menu" }), (0, jsx_runtime_1.jsx)("button", { className: "close-menu-btn", onClick: function () { return setShowDashboardMenu(false); }, "aria-label": "Close menu", children: "\u2715" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "dashboard-menu-items", children: [(0, jsx_runtime_1.jsxs)("div", { className: "menu-item ".concat(activeTab === "home" ? "active" : ""), onClick: function () { + handleTabChange("home"); + setShowDashboardMenu(false); + }, children: [(0, jsx_runtime_1.jsx)("span", { className: "menu-icon", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Home, { size: 18 }) }), " Home"] }), (0, jsx_runtime_1.jsxs)("div", { className: "menu-item ".concat(activeTab === "discuss" ? "active" : ""), onClick: function () { + handleTabChange("discuss"); + setShowDashboardMenu(false); + }, children: [(0, jsx_runtime_1.jsx)("span", { className: "menu-icon", children: (0, jsx_runtime_1.jsx)(lucide_react_1.MessageCircle, { size: 18 }) }), " Discussions"] }), (0, jsx_runtime_1.jsxs)("div", { className: "menu-item ".concat(activeTab === "contributors" ? "active" : ""), onClick: function () { + handleTabChange("contributors"); + setShowDashboardMenu(false); + }, children: [(0, jsx_runtime_1.jsx)("span", { className: "menu-icon", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Users, { size: 18 }) }), " LeaderBoard"] }), (0, jsx_runtime_1.jsxs)("div", { className: "menu-item ".concat(activeTab === "giveaway" ? "active" : ""), onClick: function () { + handleTabChange("giveaway"); + setShowDashboardMenu(false); + }, children: [(0, jsx_runtime_1.jsx)("span", { className: "menu-icon", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Gift, { size: 18 }) }), " Giveaways"] })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "dashboard-sidebar", children: [(0, jsx_runtime_1.jsx)("div", { className: "sidebar-header", children: (0, jsx_runtime_1.jsx)("button", { className: "back-button", onClick: function () { return history.goBack(); }, "aria-label": "Go back", children: (0, jsx_runtime_1.jsx)(lucide_react_1.ArrowLeft, { size: 20 }) }) }), (0, jsx_runtime_1.jsxs)("div", { className: "sidebar-nav", children: [(0, jsx_runtime_1.jsx)(NavbarIcon_1.default, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.Home, { size: 20 }), text: "Home", active: activeTab === "home", onClick: function () { return handleTabChange("home"); } }), (0, jsx_runtime_1.jsx)(NavbarIcon_1.default, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.MessageCircle, { size: 20 }), text: "Discussions", active: activeTab === "discuss", onClick: function () { return handleTabChange("discuss"); } }), (0, jsx_runtime_1.jsx)(NavbarIcon_1.default, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.Users, { size: 20 }), text: "LeaderBoard\n", active: activeTab === "contributors", onClick: function () { return handleTabChange("contributors"); } }), (0, jsx_runtime_1.jsx)(NavbarIcon_1.default, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.Gift, { size: 20 }), text: "Giveaways", active: activeTab === "giveaway", onClick: function () { return handleTabChange("giveaway"); } })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "dashboard-main-content", children: [(0, jsx_runtime_1.jsx)(Head_1.default, { children: (0, jsx_runtime_1.jsx)("title", { children: "Dashboard | Recode Hive" }) }), activeTab === "home" && ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "dashboard-home-container", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5 }, children: [(0, jsx_runtime_1.jsx)("h1", { className: "dashboard-main-title", children: "Recode Hive Community Dashboard" }), (0, jsx_runtime_1.jsx)("p", { className: "dashboard-description", children: "Welcome to the Recode Hive community hub! Explore our stats, engage in discussions, and connect with fellow contributors." }), (0, jsx_runtime_1.jsxs)("section", { className: "dashboard-stats-section", children: [(0, jsx_runtime_1.jsx)("h2", { className: "section-title", children: "Community At a Glance" }), (0, jsx_runtime_1.jsxs)("div", { className: "stat-cards-container", children: [(0, jsx_runtime_1.jsx)(StatCard, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.Star, { size: 24 }), title: "Total Stars", value: dashboardStats.totalStars, valueText: (0, statsProvider_1.useCommunityStatsContext)().githubStarCountText || "937", description: "Stars across all our public repositories" }), (0, jsx_runtime_1.jsx)(StatCard, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.Users, { size: 24 }), title: "Contributors", value: dashboardStats.totalContributors, valueText: (0, statsProvider_1.useCommunityStatsContext)().githubContributorsCountText || "444", description: "Amazing community members" }), (0, jsx_runtime_1.jsx)(StatCard, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.GitFork, { size: 24 }), title: "Forks", value: dashboardStats.totalForks, valueText: (0, statsProvider_1.useCommunityStatsContext)().githubForksCountText || "1.03K", description: "Community contributions" })] })] })] })), activeTab === "discuss" && ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "dashboard-discussions", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "discussions-header", children: [(0, jsx_runtime_1.jsx)("h1", { children: "Community Discussions" }), (0, jsx_runtime_1.jsx)("p", { children: "Engage with the community, ask questions, and share your projects." })] }), (0, jsx_runtime_1.jsxs)("div", { className: "discussions-controls", children: [(0, jsx_runtime_1.jsxs)("div", { className: "discussion-tabs", children: [(0, jsx_runtime_1.jsxs)("button", { onClick: function () { return handleDiscussionTabChange("discussions"); }, className: "tab-button ".concat(activeDiscussionTab === "discussions" ? "active" : ""), children: [(0, jsx_runtime_1.jsx)(lucide_react_1.MessageCircle, { size: 18 }), " All Discussions"] }), (0, jsx_runtime_1.jsxs)("button", { onClick: function () { return handleDiscussionTabChange("trending"); }, className: "tab-button ".concat(activeDiscussionTab === "trending" ? "active" : ""), children: [(0, jsx_runtime_1.jsx)(lucide_react_1.TrendingUp, { size: 18 }), " Trending"] }), (0, jsx_runtime_1.jsxs)("button", { onClick: function () { return handleDiscussionTabChange("unanswered"); }, className: "tab-button ".concat(activeDiscussionTab === "unanswered" ? "active" : ""), children: [(0, jsx_runtime_1.jsx)(lucide_react_1.HelpCircle, { size: 18 }), " Unanswered"] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "search-and-sort", children: [(0, jsx_runtime_1.jsxs)("div", { className: "search-bar", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Search, { size: 16 }), (0, jsx_runtime_1.jsx)("input", { type: "text", placeholder: "Search discussions...", value: searchQuery, onChange: handleSearchChange })] }), (0, jsx_runtime_1.jsxs)("select", { onChange: handleSortChange, value: sortBy, children: [(0, jsx_runtime_1.jsx)("option", { value: "most_popular", children: "Most Popular" }), (0, jsx_runtime_1.jsx)("option", { value: "latest", children: "Latest" }), (0, jsx_runtime_1.jsx)("option", { value: "oldest", children: "Oldest" })] }), (0, jsx_runtime_1.jsx)("button", { className: "new-discussion-btn", onClick: handleNewDiscussion, children: "New Discussion" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "discussions-main-content", children: [(0, jsx_runtime_1.jsxs)("div", { className: "category-sidebar", children: [(0, jsx_runtime_1.jsx)("h3", { children: "Categories" }), (0, jsx_runtime_1.jsx)("ul", { children: categories.map(function (cat) { return ((0, jsx_runtime_1.jsxs)("li", { className: selectedCategory === cat ? "active" : "", onClick: function () { return handleCategoryChange(cat); }, children: [getCategoryIcon(cat), " ", getCategoryDisplayName(cat)] }, cat)); }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "discussion-list", children: [discussionsLoading && ((0, jsx_runtime_1.jsx)("div", { className: "loading-spinner-container", children: (0, jsx_runtime_1.jsx)("div", { className: "loading-spinner" }) })), discussionsError && ((0, jsx_runtime_1.jsx)("div", { className: "discussions-error-message", children: (0, jsx_runtime_1.jsx)("p", { children: discussionsError }) })), !discussionsLoading && + !discussionsError && + filteredDiscussions.length === 0 && ((0, jsx_runtime_1.jsx)("div", { className: "no-discussions-found", children: (0, jsx_runtime_1.jsx)("p", { children: "No discussions found matching your criteria." }) })), !discussionsLoading && + !discussionsError && + filteredDiscussions.map(function (discussion) { return ((0, jsx_runtime_1.jsx)(DiscussionCard_1.default, { discussion: discussion }, discussion.id)); })] })] })] })), activeTab === "contributors" && ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "dashboard-contributors", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5 }, children: (0, jsx_runtime_1.jsx)(leaderboard_1.default, {}) })), activeTab === "giveaway" && ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5 }, className: "giveaway-section", children: [(0, jsx_runtime_1.jsx)("h1", { children: "Giveaways" }), (0, jsx_runtime_1.jsx)("p", { children: "Participate in our exciting giveaways for a chance to win awesome prizes!" }), (0, jsx_runtime_1.jsx)("div", { className: "giveaway-content", children: (0, jsx_runtime_1.jsx)("p", { children: "Stay tuned for our next giveaway. Follow our social media channels for updates!" }) })] }))] })] })); +}; +var Dashboard = function () { + return ((0, jsx_runtime_1.jsxs)(Layout_1.default, { children: [(0, jsx_runtime_1.jsxs)(Head_1.default, { children: [(0, jsx_runtime_1.jsx)("link", { rel: "preconnect", href: "https://fonts.googleapis.com" }), (0, jsx_runtime_1.jsx)("link", { rel: "preconnect", href: "https://fonts.gstatic.com", crossOrigin: "anonymous" }), (0, jsx_runtime_1.jsx)("link", { href: "https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap", rel: "stylesheet" })] }), (0, jsx_runtime_1.jsx)(BrowserOnly_1.default, { fallback: (0, jsx_runtime_1.jsx)("div", { children: "Loading Dashboard..." }), children: function () { return ((0, jsx_runtime_1.jsx)(statsProvider_1.CommunityStatsProvider, { children: (0, jsx_runtime_1.jsx)(DashboardContent, {}) })); } })] })); +}; +exports.default = Dashboard; diff --git a/src/pages/get-started/index.js b/src/pages/get-started/index.js new file mode 100644 index 00000000..3c8f1daf --- /dev/null +++ b/src/pages/get-started/index.js @@ -0,0 +1,429 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = GetStarted; +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importStar(require("react")); +var Layout_1 = __importDefault(require("@theme/Layout")); +var Link_1 = __importDefault(require("@docusaurus/Link")); +var useDocusaurusContext_1 = __importDefault(require("@docusaurus/useDocusaurusContext")); +var framer_motion_1 = require("framer-motion"); +var Head_1 = __importDefault(require("@docusaurus/Head")); +var ExecutionEnvironment_1 = __importDefault(require("@docusaurus/ExecutionEnvironment")); +// Safe hook for color mode that handles SSR +function useSafeColorMode() { + var _a = (0, react_1.useState)(false), mounted = _a[0], setMounted = _a[1]; + (0, react_1.useEffect)(function () { + setMounted(true); + }, []); + var colorMode = "light"; + var isDark = false; + if (mounted && ExecutionEnvironment_1.default.canUseDOM) { + try { + var useColorModeHook = require("@docusaurus/theme-common").useColorMode; + var colorModeResult = useColorModeHook(); + colorMode = colorModeResult.colorMode; + isDark = colorMode === "dark"; + } + catch (error) { + console.warn("Failed to get color mode:", error); + } + } + return { colorMode: colorMode, isDark: isDark, mounted: mounted }; +} +var styles_module_css_1 = __importDefault(require("./styles.module.css")); +// Animated component for staggered animations +var AnimatedSection = function (_a) { + var children = _a.children, _b = _a.delay, delay = _b === void 0 ? 0 : _b; + var controls = (0, framer_motion_1.useAnimation)(); + var ref = (0, react_1.useRef)(null); + var isInView = (0, framer_motion_1.useInView)(ref, { once: true }); + (0, react_1.useEffect)(function () { + if (isInView) { + controls.start({ + opacity: 1, + y: 0, + transition: { + duration: 0.8, + delay: delay * 0.15, + ease: [0.16, 1, 0.3, 1], + staggerChildren: 0.1, + }, + }); + } + }, [controls, isInView, delay]); + return ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { ref: ref, initial: { opacity: 0, y: 30 }, animate: controls, style: { + willChange: "opacity, transform", + backfaceVisibility: "hidden", + WebkitFontSmoothing: "subpixel-antialiased", + }, children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: { opacity: 0 }, animate: isInView ? { opacity: 1 } : { opacity: 0 }, transition: { duration: 0.5, delay: 0.2 + delay * 0.1 }, children: children }) })); +}; +function GetStartedHeader() { + var siteConfig = (0, useDocusaurusContext_1.default)().siteConfig; + // Remove unused siteConfig or use it if needed + var _a = (0, react_1.useState)(0), textIndex = _a[0], setTextIndex = _a[1]; + var texts = ["Code", "Build", "Deploy", "Learn"]; + (0, react_1.useEffect)(function () { + var interval = setInterval(function () { + setTextIndex(function (prevIndex) { return (prevIndex + 1) % texts.length; }); + }, 2000); + return function () { return clearInterval(interval); }; + }, []); + return ((0, jsx_runtime_1.jsxs)("header", { className: styles_module_css_1.default.heroBanner, children: [(0, jsx_runtime_1.jsx)("div", { className: styles_module_css_1.default.heroOverlay }), (0, jsx_runtime_1.jsx)("div", { className: "container", children: (0, jsx_runtime_1.jsxs)("div", { className: styles_module_css_1.default.heroContent, children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.h1, { className: "hero__title ".concat(styles_module_css_1.default.heroTitle), initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.8, ease: "easeOut" }, children: ["Transform Your Career in", " ", (0, jsx_runtime_1.jsx)("span", { className: styles_module_css_1.default.highlight, children: "Tech" })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.p, { className: "hero__subtitle ".concat(styles_module_css_1.default.heroSubtitle), initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.8, delay: 0.2, ease: "easeOut" }, children: "Master the art of coding with our comprehensive learning paths and hands-on challenges" }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: styles_module_css_1.default.typingContainer, initial: { opacity: 0 }, animate: { opacity: 1 }, transition: { delay: 0.4 }, children: (0, jsx_runtime_1.jsxs)("div", { className: styles_module_css_1.default.staticText, children: [(0, jsx_runtime_1.jsx)("span", { className: styles_module_css_1.default.staticText, children: "Start\u00A0" }), (0, jsx_runtime_1.jsxs)("span", { className: styles_module_css_1.default.dynamicText, children: [(0, jsx_runtime_1.jsx)("span", { className: styles_module_css_1.default.typingWord, children: "Code" }), (0, jsx_runtime_1.jsx)("span", { className: styles_module_css_1.default.typingWord, children: "Build" }), (0, jsx_runtime_1.jsx)("span", { className: styles_module_css_1.default.typingWord, children: "Deploy" }), (0, jsx_runtime_1.jsx)("span", { className: styles_module_css_1.default.typingWord, children: "Learn" })] }), (0, jsx_runtime_1.jsx)("span", { className: styles_module_css_1.default.staticText, children: "\u00A0Today" })] }) }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: styles_module_css_1.default.heroButtons, initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.8, delay: 0.6, ease: "easeOut" }, children: [(0, jsx_runtime_1.jsxs)(Link_1.default, { className: "".concat(styles_module_css_1.default.button, " ").concat(styles_module_css_1.default.buttonPrimary), to: "/courses/", children: ["Start Learning Now", (0, jsx_runtime_1.jsx)("span", { className: styles_module_css_1.default.buttonIcon, "aria-hidden": "true", children: (0, jsx_runtime_1.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: (0, jsx_runtime_1.jsx)("path", { d: "M5 12h14M12 5l7 7-7 7" }) }) })] }), (0, jsx_runtime_1.jsxs)(Link_1.default, { className: "".concat(styles_module_css_1.default.button, " ").concat(styles_module_css_1.default.buttonOutline), to: "/docs/GitHub/intro-github", children: ["Explore Docs", (0, jsx_runtime_1.jsx)("span", { className: styles_module_css_1.default.buttonIcon, "aria-hidden": "true", children: (0, jsx_runtime_1.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [(0, jsx_runtime_1.jsx)("path", { d: "M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z" }), (0, jsx_runtime_1.jsx)("path", { d: "M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z" })] }) })] })] })] }) })] })); +} +var features = [ + { + title: "Hands-on Coding Challenges", + description: "Master programming through practical coding challenges with real-world applications", + icon: "💻", + color: "#3b82f6", + }, + { + title: "Real Interview Practice", + description: "Prepare with questions from top tech companies like Google, Amazon, and Microsoft", + icon: "🎯", + color: "#8b5cf6", + }, + { + title: "Structured Learning Paths", + description: "Follow expert-designed roadmaps for different tech stacks and skill levels", + icon: "🛣️", + color: "#10b981", + }, + { + title: "Interactive Environment", + description: "Code directly in your browser with instant feedback and debugging tools", + icon: "⚡", + color: "#f59e0b", + }, + { + title: "100+ Problems", + description: "Curated collection of real-world coding interview questions and solutions", + icon: "🔢", + color: "#ec4899", + }, + { + title: "Multiple Languages", + description: "Support for popular programming languages including Python, JavaScript, and more", + icon: "🌐", + color: "#06b6d4", + }, +]; +var stats = [ + { value: "10,000+", label: "Active Learners" }, + { value: "100+", label: "Hours of Content" }, + { value: "24/7", label: "Community Support" }, + { value: "4.9/5", label: "Average Rating" }, +]; +var learningPaths = [ + { + title: "Web Development", + description: "Master full-stack development with modern frameworks like React, Node.js, and databases. Build responsive, interactive web applications.", + icon: "🖥️", + color: "#4f46e5", + }, + { + title: "Data Science", + description: "Learn data analysis, visualization, and machine learning with Python, Pandas, and TensorFlow. Turn data into actionable insights.", + icon: "📊", + color: "#8b5cf6", + }, + { + title: "Mobile Apps", + description: "Create beautiful, performant cross-platform mobile applications using React Native and modern mobile development practices.", + icon: "📱", + color: "#10b981", + }, + { + title: "DevOps", + description: "Master CI/CD, Docker, Kubernetes, and cloud deployment to build scalable, reliable infrastructure and deployment pipelines.", + icon: "⚙️", + color: "#f59e0b", + }, +]; +function Feature(_a) { + var title = _a.title, description = _a.description, icon = _a.icon, color = _a.color; + var _b = (0, react_1.useState)(false), isHovered = _b[0], setIsHovered = _b[1]; + // Create a ref to apply the custom property + var featureRef = (0, react_1.useRef)(null); + // Apply the color as a CSS variable when the component mounts or color changes + (0, react_1.useEffect)(function () { + if (featureRef.current) { + featureRef.current.style.setProperty("--feature-color", color); + } + }, [color]); + var iconStyle = { + background: "linear-gradient(135deg, ".concat(color, "10, ").concat(color, "20)"), + color: color, + }; + return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.article, { ref: featureRef, className: styles_module_css_1.default.feature, onHoverStart: function () { return setIsHovered(true); }, onHoverEnd: function () { return setIsHovered(false); }, whileHover: { + y: -10, + boxShadow: "0 20px 40px ".concat(color, "20"), + }, "aria-label": title, children: [(0, jsx_runtime_1.jsx)("div", { className: styles_module_css_1.default.featureIcon, style: iconStyle, "aria-hidden": "true", children: icon }), (0, jsx_runtime_1.jsx)("h3", { className: styles_module_css_1.default.featureTitle, children: title }), (0, jsx_runtime_1.jsx)("p", { className: styles_module_css_1.default.featureDescription, children: description }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: styles_module_css_1.default.featureHover, initial: { width: 0 }, animate: { width: isHovered ? "100%" : 0 }, transition: { duration: 0.3, ease: "easeInOut" }, "aria-hidden": "true" })] })); +} +function StatCard(_a) { + var value = _a.value, label = _a.label, _b = _a.index, index = _b === void 0 ? 0 : _b; + return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.article, { className: styles_module_css_1.default.statCard, initial: { opacity: 0, y: 30 }, whileInView: { + opacity: 1, + y: 0, + transition: { + duration: 0.6, + delay: index * 0.1, + ease: "easeOut", + }, + }, viewport: { once: true, margin: "-50px" }, whileHover: { + y: -5, + boxShadow: "0 15px 30px rgba(0, 0, 0, 0.2)", + }, children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: styles_module_css_1.default.statValue, "aria-label": value, initial: { scale: 0.9 }, whileInView: { + scale: 1, + transition: { + delay: 0.2 + index * 0.05, + type: "spring", + stiffness: 100, + }, + }, viewport: { once: true }, children: value }), (0, jsx_runtime_1.jsx)("div", { className: styles_module_css_1.default.statLabel, children: label }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: styles_module_css_1.default.statGlow, initial: { opacity: 0 }, whileInView: { + opacity: 0.3, + transition: { delay: 0.3 + index * 0.1 }, + }, viewport: { once: true } })] })); +} +var LearningPath = function (_a) { + var title = _a.title, description = _a.description, icon = _a.icon, _b = _a.color, color = _b === void 0 ? "#3b82f6" : _b, _c = _a.index, index = _c === void 0 ? 0 : _c, _d = _a.isCompleted, isCompleted = _d === void 0 ? false : _d, _e = _a.onToggleComplete, onToggleComplete = _e === void 0 ? function () { } : _e; + var isEven = index % 2 === 0; + var delay = index * 0.15; + var _f = react_1.default.useState(false), isHovered = _f[0], setIsHovered = _f[1]; + // State for responsive position and layout + var _g = react_1.default.useState({ + isMobile: false, + isTablet: false, + isLargeTablet: false, + spacing: 200, + cardWidth: "calc(50% - 1.5rem)", + }), layout = _g[0], setLayout = _g[1]; + // Update position on window resize + react_1.default.useEffect(function () { + var handleResize = function () { + var width = window.innerWidth; + var isMobileView = width < 768; + var isTableView = width >= 768 && width < 960; + var isLargeTableView = width >= 960 && width < 1024; + // Calculate spacing based on viewport + var spacing, cardWidth; + if (isMobileView) { + spacing = 160; + cardWidth = "100%"; + } + else if (isTableView) { + spacing = 180; + cardWidth = "calc(50% - 1rem)"; + } + else if (isLargeTableView) { + spacing = 200; + cardWidth = "calc(50% - 1.25rem)"; + } + else { + spacing = 220; + cardWidth = "calc(50% - 2rem)"; + } + setLayout({ + isMobile: isMobileView, + isTablet: isTableView || isLargeTableView, + isLargeTablet: isLargeTableView, + spacing: spacing, + cardWidth: cardWidth, + }); + }; + var resizeObserver = new ResizeObserver(handleResize); + resizeObserver.observe(document.body); + handleResize(); + window.addEventListener("resize", handleResize); + return function () { + window.removeEventListener("resize", handleResize); + resizeObserver.disconnect(); + }; + }, [index]); + return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.article, { className: "".concat(styles_module_css_1.default.pathCard, " group relative overflow-hidden"), style: __assign({ "--card-color": color, "--card-color-light": "".concat(color, "20"), "--card-color-dark": "".concat(color, "80"), position: layout.isMobile ? "relative" : "absolute", margin: layout.isMobile ? "0 auto 1.25rem" : "0", maxWidth: "100%", width: layout.isMobile ? "100%" : layout.cardWidth, top: layout.isMobile ? "auto" : "".concat(80 + index * layout.spacing, "px"), left: layout.isMobile ? "auto" : isEven ? "50%" : "auto", right: layout.isMobile ? "auto" : isEven ? "auto" : "50%", transform: layout.isMobile + ? "none" + : isEven + ? "none" + : "translateX(50%)", marginLeft: layout.isMobile ? "auto" : isEven ? 0 : "auto", marginRight: layout.isMobile ? "auto" : isEven ? "auto" : 0, opacity: isCompleted ? 0.9 : 1, filter: isCompleted ? "saturate(0.9)" : "none", transition: "all 0.3s ease-in-out", border: "1px solid ".concat(isCompleted ? "".concat(color, "40") : "rgba(255, 255, 255, 0.1)"), background: "linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98))", boxShadow: "0 8px 20px -5px rgba(0, 0, 0, 0.15)", transformOrigin: "center", zIndex: isHovered ? 10 : 1 }, (!layout.isMobile && { + "@media (min-width: 960px)": { + width: "calc(50% - 1.5rem)", + }, + "@media (min-width: 1024px)": { + width: "calc(50% - 2rem)", + }, + "@media (min-width: 1280px)": { + width: "calc(50% - 3rem)", + }, + "@media (min-width: 1440px)": { + width: "calc(50% - 4rem)", + }, + })), initial: { opacity: 0, x: isEven ? -100 : 100, y: 20 }, animate: { + opacity: 1, + x: 0, + y: 0, + scale: isHovered ? 1.02 : 1, + boxShadow: isHovered + ? "0 20px 40px -10px rgba(0, 0, 0, 0.3)" + : "0 10px 25px -5px rgba(0, 0, 0, 0.1)", + transition: { + type: "spring", + damping: 15, + stiffness: 100, + delay: delay, + }, + }, whileHover: { + scale: 1.02, + transition: { duration: 0.2 }, + }, onHoverStart: function () { return setIsHovered(true); }, onHoverEnd: function () { return setIsHovered(false); }, children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "absolute inset-0 bg-gradient-to-br from-transparent via-transparent to-black/20 opacity-0 group-hover:opacity-100 transition-opacity duration-300 z-0", style: { + background: "radial-gradient(circle at 70% 30%, ".concat(color, "10 0%, transparent 70%)"), + } }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col sm:flex-row items-start gap-3 sm:gap-4 p-4 sm:p-5 md:p-6", children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "flex-shrink-0 w-10 h-10 sm:w-12 sm:h-12 md:w-14 md:h-14 flex items-center justify-center rounded-xl text-lg sm:text-xl md:text-2xl relative overflow-hidden", style: { + background: "linear-gradient(135deg, ".concat(color, ", ").concat(color, "80)"), + boxShadow: "0 4px 15px -5px ".concat(color, "80"), + opacity: isCompleted ? 0.9 : 1, + }, whileHover: { + scale: 1.1, + rotate: isCompleted ? 0 : 5, + transition: { duration: 0.2 }, + }, children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 bg-gradient-to-br from-white/10 to-transparent opacity-50" }), (0, jsx_runtime_1.jsx)("span", { className: "relative z-10", children: icon })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex-1", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between w-full gap-2", children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-base sm:text-lg md:text-xl font-bold text-white break-words leading-tight", children: title }), isCompleted && ((0, jsx_runtime_1.jsxs)("div", { className: "ml-2 px-2 py-0.5 bg-green-500/20 text-green-400 text-xs font-medium rounded-full flex items-center whitespace-nowrap", children: [(0, jsx_runtime_1.jsx)("svg", { className: "w-3 h-3 mr-1 flex-shrink-0", fill: "currentColor", viewBox: "0 0 20 20", children: (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z", clipRule: "evenodd" }) }), (0, jsx_runtime_1.jsx)("span", { className: "hidden sm:inline", children: "Completed" }), (0, jsx_runtime_1.jsx)("span", { className: "sm:hidden", children: "\u2713" })] }))] }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-300 mb-4 leading-relaxed", children: description }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between mt-4 pt-3 border-t border-gray-700/50", children: [(0, jsx_runtime_1.jsxs)(Link_1.default, { to: "/docs/GitHub/intro-github", className: "inline-flex items-center text-sm font-medium transition-all duration-200 ".concat(isCompleted + ? "text-green-400 hover:text-green-300" + : "text-blue-400 hover:text-blue-300", " group-hover:underline"), children: [isCompleted ? "Continue Learning" : "Start Learning", (0, jsx_runtime_1.jsx)("svg", { className: "w-4 h-4 ml-2 transition-transform duration-300 group-hover:translate-x-1 ".concat(isCompleted ? "text-green-400" : "text-blue-400"), fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.button, { onClick: function (e) { + e.preventDefault(); + onToggleComplete(); + }, className: "relative inline-flex items-center h-6 rounded-full w-11 transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 ".concat(isCompleted + ? "bg-green-500 focus:ring-green-500" + : "bg-gray-600 hover:bg-gray-500 focus:ring-blue-500"), whileTap: { scale: 0.95 }, "aria-pressed": isCompleted, "aria-label": isCompleted ? "Mark as incomplete" : "Mark as complete", children: [(0, jsx_runtime_1.jsx)("span", { className: "sr-only", children: isCompleted ? "Mark as incomplete" : "Mark as complete" }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "inline-block w-4 h-4 transform bg-white rounded-full transition-all duration-200 ease-in-out flex items-center justify-center ".concat(isCompleted ? "translate-x-6" : "translate-x-1"), layout: true, children: isCompleted && ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.svg, { className: "w-3 h-3 text-green-500", fill: "currentColor", viewBox: "0 0 20 20", xmlns: "http://www.w3.org/2000/svg", initial: { scale: 0 }, animate: { scale: 1 }, transition: { + type: "spring", + stiffness: 500, + damping: 30, + }, children: (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z", clipRule: "evenodd" }) })) })] })] })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "absolute bottom-0 left-0 right-0 h-px bg-gray-700/50" }), (0, jsx_runtime_1.jsx)("div", { className: "absolute -inset-1 bg-gradient-to-r from-blue-500 to-purple-500 rounded-lg opacity-0 group-hover:opacity-10 blur transition-opacity duration-300 -z-10" })] }), (0, jsx_runtime_1.jsx)("div", { className: "absolute top-0 right-0 w-16 h-16 -mr-8 -mt-8 bg-gradient-to-br from-blue-500/20 to-transparent rounded-full" }), (0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 opacity-5", style: { + backgroundImage: "url(\"data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E\")", + backgroundSize: "60px 60px", + } })] })); +}; +function GetStartedContent() { + var siteConfig = (0, useDocusaurusContext_1.default)().siteConfig; + var _a = useSafeColorMode(), colorMode = _a.colorMode, isDark = _a.isDark, mounted = _a.mounted; + var _b = (0, react_1.useState)(function () { + if (typeof window !== "undefined") { + try { + var saved = localStorage.getItem("completedPaths"); + return saved ? JSON.parse(saved) : {}; + } + catch (e) { + console.error("Failed to parse completedPaths from localStorage", e); + return {}; + } + } + return {}; + }), completedPaths = _b[0], setCompletedPaths = _b[1]; + // Toggle completion status for a path + var togglePathCompletion = react_1.default.useCallback(function (pathTitle) { + setCompletedPaths(function (prev) { + var _a; + return (__assign(__assign({}, prev), (_a = {}, _a[pathTitle] = !prev[pathTitle], _a))); + }); + }, []); + // Calculate completion percentage + var completionPercentage = Math.round((Object.values(completedPaths).filter(Boolean).length / + learningPaths.length) * + 100) || 0; + // Save to localStorage whenever completedPaths changes + (0, react_1.useEffect)(function () { + if (typeof window !== "undefined") { + try { + localStorage.setItem("completedPaths", JSON.stringify(completedPaths)); + } + catch (e) { + console.error("Failed to save completedPaths to localStorage", e); + } + } + }, [completedPaths]); + return ((0, jsx_runtime_1.jsxs)(Layout_1.default, { title: "Get Started | ".concat((siteConfig === null || siteConfig === void 0 ? void 0 : siteConfig.title) || "Recode Hive"), description: "Start your coding journey with Recode Hive. Learn to code with our interactive platform and structured learning paths.", children: [(0, jsx_runtime_1.jsxs)(Head_1.default, { children: [(0, jsx_runtime_1.jsx)("meta", { name: "theme-color", content: "#1e40af" }), (0, jsx_runtime_1.jsx)("link", { rel: "preconnect", href: "https://fonts.googleapis.com" }), (0, jsx_runtime_1.jsx)("link", { rel: "preconnect", href: "https://fonts.gstatic.com", crossOrigin: "anonymous" }), (0, jsx_runtime_1.jsx)("link", { href: "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@700;800&display=swap", rel: "stylesheet" })] }), (0, jsx_runtime_1.jsx)(GetStartedHeader, {}), (0, jsx_runtime_1.jsxs)("main", { className: "transition-colors duration-300 ".concat(isDark ? "dark-bg-primary dark-text-primary" : "bg-white text-black"), children: [(0, jsx_runtime_1.jsx)("section", { className: styles_module_css_1.default.features, children: (0, jsx_runtime_1.jsxs)("div", { className: "container", children: [(0, jsx_runtime_1.jsxs)(AnimatedSection, { children: [(0, jsx_runtime_1.jsxs)("div", { className: styles_module_css_1.default.sectionHeader, children: [(0, jsx_runtime_1.jsx)("h2", { children: "Why Choose Recode Hive?" }), (0, jsx_runtime_1.jsx)("p", { children: "Discover the perfect learning experience tailored for your coding journey" })] }), (0, jsx_runtime_1.jsx)("div", { className: styles_module_css_1.default.featuresGrid, children: features.map(function (props, idx) { return ((0, jsx_runtime_1.jsx)(Feature, __assign({}, props), idx)); }) })] }), (0, jsx_runtime_1.jsx)(AnimatedSection, { delay: 1, children: (0, jsx_runtime_1.jsx)("div", { className: styles_module_css_1.default.section, children: (0, jsx_runtime_1.jsx)("div", { className: styles_module_css_1.default.container, children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: styles_module_css_1.default.statsSection, initial: "hidden", whileInView: "visible", viewport: { once: true, amount: 0.5 }, variants: { + hidden: { opacity: 0 }, + visible: { + opacity: 1, + transition: { + staggerChildren: 0.1, + }, + }, + }, children: stats.map(function (stat, index) { return ((0, jsx_runtime_1.jsx)(StatCard, { value: stat.value, label: stat.label, index: index }, index)); }) }) }) }) })] }) }), (0, jsx_runtime_1.jsx)(AnimatedSection, { delay: 2, children: (0, jsx_runtime_1.jsxs)("section", { className: styles_module_css_1.default.learningPaths, style: { + width: "100vw", + marginLeft: "50%", + transform: "translateX(-50%)", + }, children: [(0, jsx_runtime_1.jsx)("div", { className: "w-full bg-gray-900 py-16", children: (0, jsx_runtime_1.jsx)("div", { className: "container mx-auto", children: (0, jsx_runtime_1.jsx)("div", { className: "text-center mb-16", children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.h2, { className: "text-3xl md:text-4xl font-bold mb-4 px-6 py-3 inline-block rounded-xl bg-blue-100 text-gray-900", initial: { opacity: 0, y: 20 }, whileInView: { + opacity: 1, + y: 0, + transition: { + duration: 0.8, + ease: "easeOut", + }, + }, viewport: { once: true, margin: "-100px 0px -100px 0px" }, style: { + textShadow: "0 0 10px rgba(255, 213, 0, 0.5)", + }, children: "Start Your Journey" }) }) }) }), (0, jsx_runtime_1.jsxs)("div", { className: "container mx-auto -mt-10 relative", children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "mb-12 p-6 bg-gray-800/50 backdrop-blur-sm rounded-2xl border border-gray-700/50 shadow-lg", initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true, margin: "-50px 0px -50px 0px" }, transition: { duration: 0.5, delay: 0.2 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col md:flex-row md:items-center md:justify-between gap-4 mb-4", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-bold mb-4 px-6 py-3 inline-block rounded-xl bg-gradient-to-r from-blue-200 to-purple-200 text-gray-800 shadow-md", children: "Your Learning Progress" }), (0, jsx_runtime_1.jsxs)("p", { className: "text-gray-300 text-sm", children: [completionPercentage, "% Complete \u2022", " ", Object.values(completedPaths).filter(Boolean).length, " of", " ", learningPaths.length, " paths started"] })] }), (0, jsx_runtime_1.jsx)("div", { className: "text-right", children: (0, jsx_runtime_1.jsxs)("span", { className: "text-2xl font-bold bg-gradient-to-r from-blue-400 to-purple-400 bg-clip-text text-transparent", children: [completionPercentage, "%"] }) })] }), (0, jsx_runtime_1.jsx)("div", { className: "w-full h-3 bg-gray-700/50 rounded-full overflow-hidden", children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "h-full bg-gradient-to-r from-blue-500 to-purple-500 rounded-full relative", initial: { width: 0 }, animate: { width: "".concat(completionPercentage, "%") }, transition: { duration: 1, ease: "easeOut" }, children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "absolute inset-0 bg-white/20", animate: { + left: ["0%", "100%"], + }, transition: { + duration: 1.5, + repeat: Infinity, + repeatType: "loop", + ease: "easeInOut", + }, style: { + width: "20%", + height: "100%", + background: "linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent)", + transform: "skewX(-20deg)", + } }) }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: styles_module_css_1.default.timelineContainer, children: [(0, jsx_runtime_1.jsx)("div", { className: styles_module_css_1.default.timeline, children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "absolute left-0 top-0 w-1 bg-gradient-to-b from-blue-400 to-purple-500 h-0", initial: { height: 0 }, animate: { + height: "".concat((completionPercentage / 100) * 100, "%"), + }, transition: { duration: 1.5, ease: "easeInOut" } }) }), (0, jsx_runtime_1.jsx)("div", { className: styles_module_css_1.default.pathsContainer, children: learningPaths.map(function (path, idx) { return ((0, jsx_runtime_1.jsx)(LearningPath, { title: path.title, description: path.description, icon: path.icon, color: path.color, index: idx, isCompleted: !!completedPaths[path.title], onToggleComplete: function () { return togglePathCompletion(path.title); } }, path.title)); }) })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "text-center mt-12 pb-12", initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true, margin: "-50px 0px -50px 0px" }, transition: { duration: 0.5, delay: 0.3 }, children: (0, jsx_runtime_1.jsxs)(Link_1.default, { to: "/courses", className: "group inline-flex items-center px-8 py-4 bg-gradient-to-r from-blue-200 to-blue-300 font-semibold text-lg rounded-xl hover:from-blue-300 hover:to-blue-400 transition-all duration-300 shadow-lg hover:shadow-xl hover:-translate-y-1 hover:no-underline", style: { + textShadow: "0 2px 4px rgba(0, 0, 0, 0.2)", + }, children: [(0, jsx_runtime_1.jsx)("span", { className: "relative z-10 text-gray-900 group-hover:text-gray-900", children: "Explore All Paths" }), (0, jsx_runtime_1.jsx)("svg", { className: "w-6 h-6 ml-3 transform text-gray-900 group-hover:translate-x-1 group-hover:text-gray-900 transition-transform duration-300", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2.5, children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M14 5l7 7m0 0l-7 7m7-7H3" }) })] }) })] })] }) })] })] })); +} +function GetStarted() { + return (0, jsx_runtime_1.jsx)(GetStartedContent, {}); +} diff --git a/src/pages/index.js b/src/pages/index.js new file mode 100644 index 00000000..165656e5 --- /dev/null +++ b/src/pages/index.js @@ -0,0 +1,81 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = Home; +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importStar(require("react")); +var useDocusaurusContext_1 = __importDefault(require("@docusaurus/useDocusaurusContext")); +var Layout_1 = __importDefault(require("@theme/Layout")); +var Head_1 = __importDefault(require("@docusaurus/Head")); +var header_1 = __importDefault(require("../components/header/header")); +var bottom_to_top_1 = __importDefault(require("../components/scroll/bottom-to-top")); +var top_to_bottom_1 = __importDefault(require("../components/scroll/top-to-bottom")); +var blogCarousel_1 = require("../components/blogCarousel/blogCarousel"); +var projects_1 = __importDefault(require("../database/projects/projects")); +var ourProjects_1 = __importDefault(require("../components/ourProjects")); +var TopMateSection_1 = __importDefault(require("../components/topmate/TopMateSection")); +var TestimonialCarousel_1 = require("../components/testimonials/TestimonialCarousel"); +var statsProvider_1 = require("../lib/statsProvider"); +var Community_1 = require("../components/Community"); +var faqs_1 = __importDefault(require("../components/faqs/faqs")); +function Home() { + var siteConfig = (0, useDocusaurusContext_1.default)().siteConfig; + var _a = (0, react_1.useState)(true), showTopmate = _a[0], setShowTopmate = _a[1]; + (0, react_1.useEffect)(function () { + // Add page transition animation on mount + var mainElement = document.querySelector("main"); + if (mainElement) { + mainElement.style.opacity = "0"; + mainElement.style.transform = "translateY(20px)"; + mainElement.style.transition = + "opacity 0.6s ease-out, transform 0.6s ease-out"; + // Trigger animation after a brief delay + setTimeout(function () { + mainElement.style.opacity = "1"; + mainElement.style.transform = "translateY(0)"; + }, 100); + } + }, []); + return ((0, jsx_runtime_1.jsxs)(Layout_1.default, { title: "".concat(siteConfig.title), description: "Welcome to Recodehive. Learn the basics to advanced concepts of web development. sql, python, Cloud, GitHub and more.", children: [(0, jsx_runtime_1.jsx)(Head_1.default, { children: (0, jsx_runtime_1.jsx)("script", { async: true, "custom-element": "amp-auto-ads", src: "https://cdn.ampproject.org/v0/amp-auto-ads-0.1.js" }) }), (0, jsx_runtime_1.jsx)("div", { className: "transition-colors duration-300", style: { + backgroundColor: "var(--ifm-background-color)", + color: "var(--ifm-font-color-base)", + }, children: (0, jsx_runtime_1.jsxs)("main", { className: "transition-colors duration-300 page-enter", style: { + backgroundColor: "var(--ifm-background-color)", + color: "var(--ifm-font-color-base)", + }, children: [(0, jsx_runtime_1.jsx)("div", { className: "m-4", children: (0, jsx_runtime_1.jsx)(header_1.default, {}) }), (0, jsx_runtime_1.jsx)("div", { className: "blog-carousel-section", children: (0, jsx_runtime_1.jsx)(blogCarousel_1.BlogCarousel, {}) }), (0, jsx_runtime_1.jsx)("div", { className: "m-4", onClick: function () { return (window.location.href = "https://www.sanjaykv.com/"); }, children: (0, jsx_runtime_1.jsx)("img", { src: "/selfhero.png", alt: "recodehive", className: "w-full h-full object-cover rounded-2xl cursor-pointer" }) }), (0, jsx_runtime_1.jsx)("div", { className: "m-4", children: (0, jsx_runtime_1.jsx)(ourProjects_1.default, { OurProjectsData: projects_1.default }) }), (0, jsx_runtime_1.jsxs)("div", { className: "m-4 grid grid-cols-1 md:grid-cols-3 gap-4 md:gap-8", children: [showTopmate && ((0, jsx_runtime_1.jsx)("div", { className: "col-span-1", children: (0, jsx_runtime_1.jsx)(TopMateSection_1.default, { setShowTopmate: setShowTopmate }) })), (0, jsx_runtime_1.jsx)("div", { className: showTopmate ? "col-span-2" : "col-span-3", children: (0, jsx_runtime_1.jsx)(TestimonialCarousel_1.TestimonialCarousel, {}) })] }), (0, jsx_runtime_1.jsx)("div", { className: "m-4", children: (0, jsx_runtime_1.jsx)(statsProvider_1.CommunityStatsProvider, { children: (0, jsx_runtime_1.jsx)(Community_1.LandingCommunity, { className: "recodehive" }) }) }), (0, jsx_runtime_1.jsx)("div", { className: "m-4", children: (0, jsx_runtime_1.jsx)(faqs_1.default, {}) }), (0, jsx_runtime_1.jsx)(top_to_bottom_1.default, {}), (0, jsx_runtime_1.jsx)(bottom_to_top_1.default, {})] }) })] })); +} diff --git a/src/pages/interview-prep/BehavioralTab.js b/src/pages/interview-prep/BehavioralTab.js new file mode 100644 index 00000000..6172d645 --- /dev/null +++ b/src/pages/interview-prep/BehavioralTab.js @@ -0,0 +1,133 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importDefault(require("react")); +var framer_motion_1 = require("framer-motion"); +var Link_1 = __importDefault(require("@docusaurus/Link")); +var fadeIn = { hidden: { opacity: 0, y: 20 }, visible: { opacity: 1, y: 0, transition: { duration: 0.6 } } }; +var staggerContainer = { hidden: {}, visible: { transition: { staggerChildren: 0.2 } } }; +var BehavioralTab = function (_a) { + var _b = _a.behavioralQuestions, behavioralQuestions = _b === void 0 ? [] : _b, _c = _a.expandedCategories, expandedCategories = _c === void 0 ? [] : _c, toggleCategory = _a.toggleCategory; + return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { initial: "hidden", animate: "visible", variants: staggerContainer, children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "text-center mb-12", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("h2", { className: "text-4xl font-bold mb-4 text-white", children: "Behavioral Interview Preparation" }), (0, jsx_runtime_1.jsx)("p", { className: "text-xl text-center ml-3 text-gray-600 dark:text-gray-300 ", children: "Master the art of storytelling and showcase your soft skills with confidence" })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "bg-gradient-to-r from-blue-50 to-purple-50 dark:from-blue-900/20 dark:to-purple-900/20 rounded-xl p-8 mb-12", variants: fadeIn, children: (0, jsx_runtime_1.jsxs)("div", { className: "max-w-4xl mx-auto", children: [(0, jsx_runtime_1.jsxs)("h3", { className: "text-2xl font-bold mb-6 text-white flex items-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-3xl mr-3", children: "\uD83E\uDD1D" }), "What are Behavioral Interviews?"] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid md:grid-cols-2 gap-12", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("p", { className: "text-gray-700 dark:text-gray-300 mb-4", children: "Behavioral interviews focus on how you've handled situations in the past to predict your future performance. These questions typically start with phrases like \"Tell me about a time when...\" or \"Describe a situation where...\"" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-700 dark:text-gray-300", children: "Unlike technical interviews that test your coding skills, behavioral interviews evaluate your soft skills, cultural fit, and ability to work in a team environment." })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white dark:bg-gray-800 rounded-lg p-6 -mt-10", children: [(0, jsx_runtime_1.jsx)("h4", { className: "font-bold text-gray-900 dark:text-white mb-4", children: "Why They Matter" }), (0, jsx_runtime_1.jsxs)("ul", { className: "space-y-2 text-sm", children: [(0, jsx_runtime_1.jsxs)("li", { className: "flex items-start", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-blue-500 rounded-full mt-2 mr-3 flex-shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-gray-600 dark:text-gray-300", children: "70% of hiring decisions are based on cultural fit" })] }), (0, jsx_runtime_1.jsxs)("li", { className: "flex items-start", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-blue-500 rounded-full mt-2 mr-3 flex-shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-gray-600 dark:text-gray-300", children: "Assess leadership and communication skills" })] }), (0, jsx_runtime_1.jsxs)("li", { className: "flex items-start", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-blue-500 rounded-full mt-2 mr-3 flex-shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-gray-600 dark:text-gray-300", children: "Evaluate problem-solving approach" })] }), (0, jsx_runtime_1.jsxs)("li", { className: "flex items-start", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-blue-500 rounded-full mt-2 mr-3 flex-shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-gray-600 dark:text-gray-300", children: "Determine team collaboration ability" })] })] })] })] })] }) }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-gradient-to-r from-green-50 to-blue-50 dark:from-green-900/20 dark:to-blue-900/20 rounded-xl p-8 mb-12", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-2xl font-bold mb-6 text-gray-900 dark:text-white text-center", children: "The STAR Method Framework" }), (0, jsx_runtime_1.jsx)("div", { className: "grid md:grid-cols-4 gap-6 mb-8", children: [ + { + letter: "S", + word: "Situation", + desc: "Set the context and background of your story", + color: "bg-red-500", + }, + { + letter: "T", + word: "Task", + desc: "Describe your responsibility or goal", + color: "bg-yellow-500", + }, + { + letter: "A", + word: "Action", + desc: "Explain the specific steps you took", + color: "bg-green-500", + }, + { + letter: "R", + word: "Result", + desc: "Share the outcome and what you learned", + color: "bg-blue-500", + }, + ].map(function (item, i) { return ((0, jsx_runtime_1.jsxs)("div", { className: "text-center", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-16 h-16 ".concat(item.color, " text-white rounded-full flex items-center justify-center text-2xl font-bold mx-auto mb-3 shadow-lg"), children: item.letter }), (0, jsx_runtime_1.jsx)("h4", { className: "font-bold text-gray-900 dark:text-white mb-2", children: item.word }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300", children: item.desc })] }, i)); }) }), (0, jsx_runtime_1.jsxs)("div", { className: "grid md:grid-cols-2 gap-8", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-white dark:bg-gray-800 rounded-lg p-6", children: [(0, jsx_runtime_1.jsxs)("h4", { className: "font-bold text-gray-900 dark:text-white mb-4 flex items-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-xl mr-2", children: "\uD83D\uDCA1" }), "Example 1: Leadership Challenge"] }), (0, jsx_runtime_1.jsxs)("div", { className: "space-y-3 text-sm", children: [(0, jsx_runtime_1.jsxs)("div", { className: "border-l-4 border-red-500 star-border-red pl-4", children: [(0, jsx_runtime_1.jsx)("strong", { className: "text-red-600 dark:text-red-400", children: "Situation:" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 mt-1", children: "\"During my internship, our team was behind schedule on a critical project with only 2 weeks left before the deadline.\"" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "border-l-4 border-yellow-500 star-border-yellow pl-4", children: [(0, jsx_runtime_1.jsx)("strong", { className: "text-yellow-600 dark:text-yellow-400", children: "Task:" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 mt-1", children: "\"As the junior developer, I needed to help coordinate efforts and find ways to accelerate our progress.\"" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "border-l-4 border-green-500 star-border-green pl-4", children: [(0, jsx_runtime_1.jsx)("strong", { className: "text-green-600 dark:text-green-400", children: "Action:" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 mt-1", children: "\"I organized daily stand-ups, created a shared task board, and volunteered to work extra hours on critical features.\"" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "border-l-4 border-blue-500 star-border-blue pl-4", children: [(0, jsx_runtime_1.jsx)("strong", { className: "text-blue-600 dark:text-blue-400", children: "Result:" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 mt-1", children: "\"We delivered the project on time, and my manager praised my initiative. I learned the importance of proactive communication.\"" })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white dark:bg-gray-800 rounded-lg p-6", children: [(0, jsx_runtime_1.jsxs)("h4", { className: "font-bold text-gray-900 dark:text-white mb-4 flex items-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-xl mr-2", children: "\uD83D\uDD27" }), "Example 2: Problem Solving"] }), (0, jsx_runtime_1.jsxs)("div", { className: "space-y-3 text-sm", children: [(0, jsx_runtime_1.jsxs)("div", { className: "border-l-4 border-red-500 star-border-red pl-4", children: [(0, jsx_runtime_1.jsx)("strong", { className: "text-red-600 dark:text-red-400", children: "Situation:" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 mt-1", children: "\"Our main application was experiencing frequent crashes affecting 30% of users during peak hours.\"" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "border-l-4 border-yellow-500 star-border-yellow pl-4", children: [(0, jsx_runtime_1.jsx)("strong", { className: "text-yellow-600 dark:text-yellow-400", children: "Task:" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 mt-1", children: "\"I was assigned to identify the root cause and implement a solution within 48 hours.\"" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "border-l-4 border-green-500 star-border-green pl-4", children: [(0, jsx_runtime_1.jsx)("strong", { className: "text-green-600 dark:text-green-400", children: "Action:" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 mt-1", children: "\"I analyzed logs, reproduced the issue, and discovered a memory leak in our caching system. I implemented a fix and added monitoring.\"" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "border-l-4 border-blue-500 star-border-blue pl-4", children: [(0, jsx_runtime_1.jsx)("strong", { className: "text-blue-600 dark:text-blue-400", children: "Result:" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 mt-1", children: "\"Crashes reduced by 95%, user satisfaction improved, and we prevented similar issues with better monitoring.\"" })] })] })] })] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "mb-12", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-2xl font-bold mb-8 text-gray-900 dark:text-white text-center", children: "Common Behavioral Questions by Category" }), (0, jsx_runtime_1.jsx)("div", { className: "space-y-6", children: [ + { + category: "Leadership & Initiative", + icon: "👑", + color: "from-purple-500 to-pink-500", + questions: [ + "Tell me about yourself", + "Tell me about a time you led a team through a difficult project", + "Describe a situation where you had to influence others without authority", + "How do you handle team conflicts?", + "Give an example of when you took initiative on a project", + ], + }, + { + category: "Problem Solving & Challenges", + icon: "🧩", + color: "from-blue-500 to-cyan-500", + questions: [ + "Describe a challenging situation you faced and how you handled it", + "Tell me about the most challenging technical problem you've solved", + "Describe a time you failed and what you learned", + "How do you approach debugging complex issues?", + "Tell me about a time you had to make a decision with incomplete information", + ], + }, + { + category: "Teamwork & Communication", + icon: "🤝", + color: "from-green-500 to-teal-500", + questions: [ + "How do you handle conflict with team members?", + "Explain a complex technical concept to a non-technical person", + "Tell me about a time you had to give difficult feedback", + "Describe a time you disagreed with your manager", + "How do you handle disagreements with stakeholders?", + ], + }, + { + category: "Growth & Learning", + icon: "📚", + color: "from-orange-500 to-red-500", + questions: [ + "How do you stay updated with new technologies?", + "Tell me about a time you had to learn something completely new", + "What's the most important thing you've learned in your career?", + "Describe a time you received constructive criticism", + "How do you handle tight deadlines and pressure?", + ], + }, + ].map(function (section, index) { return ((0, jsx_runtime_1.jsxs)("div", { className: "bg-white dark:bg-gray-800 rounded-xl shadow-lg overflow-hidden", children: [(0, jsx_runtime_1.jsx)("button", { onClick: function () { return toggleCategory(index); }, className: "w-full bg-gradient-to-r ".concat(section.color, " p-6 text-left hover:opacity-90 transition-opacity"), children: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between", children: [(0, jsx_runtime_1.jsxs)("h4", { className: "text-xl font-bold text-white flex items-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-2xl mr-3", children: section.icon }), section.category] }), (0, jsx_runtime_1.jsx)("span", { className: "text-white text-2xl transform transition-transform duration-200", style: { transform: expandedCategories[index] ? "rotate(180deg)" : "rotate(0deg)" }, children: "\u25BC" })] }) }), expandedCategories[index] && ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "p-6", initial: { opacity: 0, height: 0 }, animate: { opacity: 1, height: "auto" }, exit: { opacity: 0, height: 0 }, transition: { duration: 0.3 }, children: (0, jsx_runtime_1.jsx)("div", { className: "grid gap-3", children: section.questions.map(function (question, i) { return ((0, jsx_runtime_1.jsx)("div", { className: "p-4 interview-prep-sidebar bg-gray-50 dark:bg-gray-700 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-600 transition-colors cursor-pointer border-l-4 border-gray-300 dark:border-gray-600 hover:border-blue-500", children: (0, jsx_runtime_1.jsxs)("p", { className: "text-gray-700 dark:text-gray-300 font-medium", children: ["\"", question, "\""] }) }, i)); }) }) }))] }, index)); }) })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-white dark:bg-gray-800 rounded-xl shadow-lg p-8 mb-12", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-2xl font-bold mb-8 text-gray-900 dark:text-white text-center", children: "Do's and Don'ts for Behavioral Interviews" }), (0, jsx_runtime_1.jsxs)("div", { className: "grid md:grid-cols-2 gap-8", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-green-50 dark:bg-green-900/20 rounded-lg p-6", children: [(0, jsx_runtime_1.jsxs)("h4", { className: "text-xl font-bold text-green-800 dark:text-green-300 mb-6 flex items-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-2xl mr-2", children: "\u2705" }), "Do's"] }), (0, jsx_runtime_1.jsx)("div", { className: "space-y-4", children: [ + "Practice with real scenarios from your experience", + "Be concise and specific in your answers", + "Show enthusiasm and passion for your work", + "Use the STAR method to structure responses", + "Prepare 5-7 strong examples beforehand", + "Focus on your individual contributions", + "Quantify results whenever possible", + "Show what you learned from each experience", + ].map(function (item, i) { return ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-start", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-green-500 rounded-full mt-2 mr-3 flex-shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-gray-700 dark:text-gray-300", children: item })] }, i)); }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-red-50 dark:bg-red-900/20 rounded-lg p-6", children: [(0, jsx_runtime_1.jsxs)("h4", { className: "text-xl font-bold text-red-800 dark:text-red-300 mb-6 flex items-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-2xl mr-2", children: "\u274C" }), "Don'ts"] }), (0, jsx_runtime_1.jsx)("div", { className: "space-y-4", children: [ + "Memorize robotic, scripted answers", + "Be vague or over-explain situations", + "Appear disinterested or unenthusiastic", + "Speak negatively about previous employers", + "Make up stories or exaggerate experiences", + "Focus only on team achievements without your role", + "Give answers without clear structure", + "Forget to mention the results or outcomes", + ].map(function (item, i) { return ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-start", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-red-500 rounded-full mt-2 mr-3 flex-shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-gray-700 dark:text-gray-300", children: item })] }, i)); }) })] })] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-gradient-to-r from-indigo-50 to-purple-50 dark:from-indigo-900/20 dark:to-purple-900/20 rounded-xl p-8 mb-12", variants: fadeIn, children: [(0, jsx_runtime_1.jsxs)("h3", { className: "text-2xl font-bold mb-8 text-gray-900 dark:text-white text-center flex items-center justify-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-3xl mr-3", children: "\uD83C\uDFA5" }), "Video Resources & Learning Materials"] }), (0, jsx_runtime_1.jsx)("div", { className: "grid md:grid-cols-3 gap-6 mb-8", children: [ + { + title: "Behavioral Interview Masterclass", + channel: "CareerVidz", + duration: "25 min", + description: "Complete guide to behavioral interviews with real examples", + url: "https://www.youtube.com/watch?v=PJKYqLP6MRE", + thumbnail: "../../img/Behavioural_Interviews1.png", + }, + { + title: "STAR Method Explained", + channel: "Interview Success", + duration: "15 min", + description: "Step-by-step breakdown of the STAR method with practice", + url: "https://www.youtube.com/watch?v=V0jktOX8Jog", + thumbnail: "../../img/Behavioural_Interviews2.png", + }, + { + title: "Mock Behavioral Interview", + channel: "Tech Interview Pro", + duration: "30 min", + description: "Real behavioral interview simulation with feedback", + url: "https://www.youtube.com/watch?v=1qw5ITr3k9E", + thumbnail: "../../img/Behavioural_Interviews3.png", + }, + ].map(function (video, i) { return ((0, jsx_runtime_1.jsxs)("div", { className: "bg-white dark:bg-gray-800 rounded-lg overflow-hidden shadow-lg hover:shadow-xl transition-all duration-300 transform hover:scale-105", children: [(0, jsx_runtime_1.jsx)("img", { src: video.thumbnail || "/placeholder.svg", alt: video.title, className: "w-full h-40 object-cover" }), (0, jsx_runtime_1.jsxs)("div", { className: "p-4", children: [(0, jsx_runtime_1.jsx)("h4", { className: "font-bold text-gray-900 dark:text-white mb-2", children: video.title }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300 mb-2", children: video.description }), (0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-center text-xs text-gray-500 dark:text-gray-400 mb-3", children: [(0, jsx_runtime_1.jsx)("span", { children: video.channel }), (0, jsx_runtime_1.jsx)("span", { children: video.duration })] }), (0, jsx_runtime_1.jsxs)("a", { href: video.url, target: "_blank", rel: "noopener noreferrer", className: "watch-video-btn", children: [(0, jsx_runtime_1.jsx)("span", { className: "mr-2", children: "\u25B6\uFE0F" }), "Watch Video"] })] })] }, i)); }) }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white dark:bg-gray-800 rounded-lg p-6", children: [(0, jsx_runtime_1.jsx)("h4", { className: "font-bold text-gray-900 dark:text-white mb-4", children: "Additional Learning Resources" }), (0, jsx_runtime_1.jsxs)("div", { className: "grid md:grid-cols-2 gap-4", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h5", { className: "font-semibold text-gray-800 dark:text-gray-200 mb-2", children: "\uD83D\uDCDA Recommended Books" }), (0, jsx_runtime_1.jsxs)("ul", { className: "space-y-1 text-sm text-gray-600 dark:text-gray-300", children: [(0, jsx_runtime_1.jsx)("li", { children: "\u2022 \"Cracking the Coding Interview\" by Gayle McDowell" }), (0, jsx_runtime_1.jsx)("li", { children: "\u2022 \"The Behavioral Interview Handbook\" by Lewis Lin" }), (0, jsx_runtime_1.jsx)("li", { children: "\u2022 \"What Color Is Your Parachute?\" by Richard N. Bolles" })] })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h5", { className: "font-semibold text-gray-800 dark:text-gray-200 mb-2", children: "\uD83C\uDF10 Online Platforms" }), (0, jsx_runtime_1.jsxs)("ul", { className: "space-y-1 text-sm text-gray-600 dark:text-gray-300", children: [(0, jsx_runtime_1.jsx)("li", { children: "\u2022 Pramp - Free mock interviews" }), (0, jsx_runtime_1.jsx)("li", { children: "\u2022 InterviewBit - Behavioral question bank" }), (0, jsx_runtime_1.jsx)("li", { children: "\u2022 Glassdoor - Company-specific questions" })] })] })] })] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-gradient-to-r interview-prep-join-comm from-yellow-50 to-orange-50 dark:from-yellow-900/20 dark:to-orange-900/20 rounded-xl p-8 border-2 border-yellow-200 dark:border-yellow-800 dark:outline dark:outline-2 dark:outline-yellow-800", variants: fadeIn, children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-center mb-6", children: [(0, jsx_runtime_1.jsxs)("h3", { className: "text-2xl font-bold text-gray-900 dark:text-white flex items-center justify-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-3xl mr-3", children: "\uD83E\uDD1D" }), "Join Our Community & Contribute"] }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 mt-2", children: "Help make this resource better for everyone in the RecodeHive community" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid md:grid-cols-3 gap-6 mb-8", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-center p-4 bg-white dark:bg-gray-800 rounded-lg", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-3xl mb-3", children: "\uD83D\uDCAC" }), (0, jsx_runtime_1.jsx)("h4", { className: "font-bold text-gray-900 dark:text-white mb-2", children: "Share Your Experience" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300", children: "Share your behavioral interview experiences, both successes and challenges" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-center p-4 bg-white dark:bg-gray-800 rounded-lg", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-3xl mb-3", children: "\uD83D\uDCDD" }), (0, jsx_runtime_1.jsx)("h4", { className: "font-bold text-gray-900 dark:text-white mb-2", children: "Suggest Resources" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300", children: "Recommend helpful videos, articles, or tools you've found useful" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-center p-4 bg-white dark:bg-gray-800 rounded-lg", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-3xl mb-3", children: "\uD83D\uDD27" }), (0, jsx_runtime_1.jsx)("h4", { className: "font-bold text-gray-900 dark:text-white mb-2", children: "Improve Content" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300", children: "Help us add more examples, questions, or improve existing content" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white dark:bg-gray-800 rounded-lg p-6", children: [(0, jsx_runtime_1.jsx)("h4", { className: "font-bold text-gray-900 dark:text-white mb-4 text-center", children: "How to Contribute" }), (0, jsx_runtime_1.jsxs)("div", { className: "grid md:grid-cols-2 gap-6", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h5", { className: "font-semibold text-gray-800 dark:text-gray-200 mb-3", children: "\uD83D\uDE80 Quick Ways to Help" }), (0, jsx_runtime_1.jsxs)("ul", { className: "space-y-2 text-sm", children: [(0, jsx_runtime_1.jsxs)("li", { className: "flex items-start", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-blue-500 rounded-full mt-2 mr-3 flex-shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-gray-600 dark:text-gray-300", children: "Join our Discord community and share tips" })] }), (0, jsx_runtime_1.jsxs)("li", { className: "flex items-start", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-blue-500 rounded-full mt-2 mr-3 flex-shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-gray-600 dark:text-gray-300", children: "Submit interview questions you've encountered" })] }), (0, jsx_runtime_1.jsxs)("li", { className: "flex items-start", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-blue-500 rounded-full mt-2 mr-3 flex-shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-gray-600 dark:text-gray-300", children: "Review and suggest improvements to examples" })] }), (0, jsx_runtime_1.jsxs)("li", { className: "flex items-start", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-blue-500 rounded-full mt-2 mr-3 flex-shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-gray-600 dark:text-gray-300", children: "Share company-specific behavioral interview tips" })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h5", { className: "font-semibold text-gray-800 dark:text-gray-200 mb-3", children: "\uD83D\uDCCB Getting Started" }), (0, jsx_runtime_1.jsxs)("div", { className: "space-y-3", children: [(0, jsx_runtime_1.jsx)(Link_1.default, { to: "/community", className: "block interview-prep-discord-btn text-white bg-blue-600 px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors text-center font-medium", children: "Join Discord Community" }), (0, jsx_runtime_1.jsx)(Link_1.default, { to: "/get-started", className: "block text-blue-600 dark:text-blue-400 px-4 py-2 rounded-lg dark:hover:bg-yellow-800/20 transition-colors text-center font-medium dark:outline dark:outline-2 dark:outline-yellow-800", children: "Contributing Guide" })] })] })] })] })] })] })); +}; +exports.default = BehavioralTab; diff --git a/src/pages/interview-prep/CompaniesTab.js b/src/pages/interview-prep/CompaniesTab.js new file mode 100644 index 00000000..a960b69b --- /dev/null +++ b/src/pages/interview-prep/CompaniesTab.js @@ -0,0 +1,167 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importDefault(require("react")); +var react_2 = require("react"); +var framer_motion_1 = require("framer-motion"); +var Link_1 = __importDefault(require("@docusaurus/Link")); +var lucide_react_1 = require("lucide-react"); +var button_1 = require("../../components/ui/button"); +var input_1 = require("../../components/ui/input"); +var badge_1 = require("../../components/ui/badge"); +var card_1 = require("../../components/ui/card"); +var collapsible_1 = require("../../components/ui/collapsible"); +var fadeIn = { hidden: { opacity: 0, y: 20 }, visible: { opacity: 1, y: 0, transition: { duration: 0.6 } } }; +var staggerContainer = { hidden: {}, visible: { transition: { staggerChildren: 0.1 } } }; +var CompaniesTab = function (_a) { + var _b, _c; + var _d = _a.companyTips, companyTips = _d === void 0 ? [] : _d; + var _e = (0, react_2.useState)(""), searchTerm = _e[0], setSearchTerm = _e[1]; + var _f = (0, react_2.useState)(""), selectedIndustry = _f[0], setSelectedIndustry = _f[1]; + var _g = (0, react_2.useState)(""), selectedRole = _g[0], setSelectedRole = _g[1]; + var _h = (0, react_2.useState)({}), expandedQuestions = _h[0], setExpandedQuestions = _h[1]; + var filteredCompanies = (0, react_2.useMemo)(function () { + return (companyTips || []).filter(function (company) { + var matchesSearch = company.company.toLowerCase().includes(searchTerm.toLowerCase()) || + company.focus.toLowerCase().includes(searchTerm.toLowerCase()) || + company.focusAreas.some(function (area) { return area.toLowerCase().includes(searchTerm.toLowerCase()); }); + var matchesIndustry = !selectedIndustry || company.industry === selectedIndustry; + var matchesRole = !selectedRole || company.roleTypes.includes(selectedRole); + return matchesSearch && matchesIndustry && matchesRole; + }); + }, [companyTips, searchTerm, selectedIndustry, selectedRole]); + var industries = __spreadArray([], new Set((companyTips || []).map(function (c) { return c.industry; })), true); + var roles = __spreadArray([], new Set((companyTips || []).flatMap(function (c) { return c.roleTypes; })), true); + var toggleQuestion = function (companyIndex, questionIndex) { + var key = "".concat(companyIndex, "-").concat(questionIndex); + setExpandedQuestions(function (prev) { + var _a; + return (__assign(__assign({}, prev), (_a = {}, _a[key] = !prev[key], _a))); + }); + }; + var _j = (0, react_2.useState)({}), expandedCompanies = _j[0], setExpandedCompanies = _j[1]; + var toggleCompany = function (index) { + setExpandedCompanies(function (prev) { + var _a; + return (__assign(__assign({}, prev), (_a = {}, _a[index] = !prev[index], _a))); + }); + }; + return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { initial: "hidden", animate: "visible", variants: staggerContainer, className: "space-y-8", children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "text-center mb-16", variants: fadeIn, children: [(0, jsx_runtime_1.jsxs)("div", { className: "inline-flex items-center px-4 py-2 bg-blue-100 dark:bg-blue-900/30 rounded-full text-blue-600 dark:text-blue-400 text-sm font-medium mb-6", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-blue-500 rounded-full mr-2 animate-pulse" }), "Master FAANG+ Company Interviews"] }), (0, jsx_runtime_1.jsx)("h2", { className: "text-5xl font-bold mb-6 text-gray-900 dark:text-white", children: "Company-Specific Interview Prep" }), (0, jsx_runtime_1.jsx)("p", { className: "text-xl text-gray-600 dark:text-gray-300 leading-relaxed", children: "Get insider knowledge, real interview questions, and proven strategies for landing your dream job at top tech companies" })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "relative bg-gradient-to-br from-slate-50 via-blue-50 to-indigo-50 dark:from-slate-900/50 dark:via-blue-900/20 dark:to-indigo-900/20 rounded-3xl p-12 mb-16 overflow-hidden border company-blue-border", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 opacity-5", children: (0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0", style: { + backgroundImage: "radial-gradient(circle at 1px 1px, rgba(59, 130, 246, 0.3) 1px, transparent 0)", + backgroundSize: "20px 20px", + } }) }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10 max-w-6xl mx-auto", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-center mb-12", children: [(0, jsx_runtime_1.jsxs)("h3", { className: "text-3xl font-bold mb-4 text-gray-900 dark:text-white flex items-center justify-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-4xl mr-4", children: "\uD83C\uDFE2" }), "FAANG+ Companies Overview"] }), (0, jsx_runtime_1.jsx)("p", { className: "text-lg text-gray-600 dark:text-gray-300", children: "Navigate the unique interview processes of the world's most competitive tech companies" })] }), (0, jsx_runtime_1.jsx)("div", { className: "grid md:grid-cols-2 lg:grid-cols-4 gap-6 mb-12", children: (_b = [ + { + title: "Big Tech Focus", + icon: "🎯", + description: "Google, Amazon, Meta, Apple, Netflix, Microsoft + emerging unicorns", + color: "from-blue-500 to-blue-600", + bgColor: "bg-blue-500", + stats: "6+ Companies", + }, + { + title: "Interview Styles", + icon: "💼", + description: "System Design, Behavioral, Coding, Product Sense, Leadership", + color: "from-green-500 to-green-600", + bgColor: "bg-green-500", + stats: "5 Categories", + }, + { + title: "Success Factors", + icon: "⭐", + description: "Company culture fit, technical excellence, leadership principles", + color: "from-purple-500 to-purple-600", + bgColor: "bg-purple-500", + stats: "95% Success", + }, + { + title: "Real Questions", + icon: "❓", + description: "Actual questions from recent interviews with detailed answers", + color: "from-orange-500 to-orange-600", + bgColor: "bg-orange-500", + stats: "100+ Questions", + }, + ]) === null || _b === void 0 ? void 0 : _b.map(function (item, i) { return (item ? ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-white dark:bg-gray-800 rounded-2xl p-6 text-center shadow-lg hover:shadow-xl transition-all duration-300 transform hover:scale-105", whileHover: { y: -5 }, initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5, delay: i * 0.1 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "w-16 h-16 bg-gradient-to-br ".concat(item.color, " text-white rounded-2xl flex items-center justify-center text-2xl font-bold mx-auto mb-4 shadow-lg relative overflow-hidden"), children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "absolute inset-0 bg-white opacity-20 rounded-2xl", animate: { scale: [1, 1.2, 1] }, transition: { duration: 2, repeat: Number.POSITIVE_INFINITY, ease: "easeInOut" } }), (0, jsx_runtime_1.jsx)("span", { className: "relative z-10", children: item.icon })] }), (0, jsx_runtime_1.jsx)("h4", { className: "font-bold text-gray-900 dark:text-white mb-3 text-lg", children: item.title }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300 mb-3 leading-relaxed", children: item.description }), (0, jsx_runtime_1.jsx)("div", { className: "inline-flex items-center px-3 py-1 bg-gray-100 dark:bg-gray-700 rounded-full text-xs font-semibold text-gray-700 dark:text-gray-300", children: item.stats })] }, i)) : null); }) }), (0, jsx_runtime_1.jsx)("div", { className: "grid md:grid-cols-3 gap-8 rounded-xl", children: (_c = [ + { metric: "92%", label: "Interview Success Rate", icon: "📈", color: "text-green-600" }, + { metric: "150+", label: "Companies Covered", icon: "🏢", color: "text-blue-600" }, + { metric: "50K+", label: "Successful Candidates", icon: "👥", color: "text-purple-600" }, + ]) === null || _c === void 0 ? void 0 : _c.map(function (stat, i) { return (stat ? ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "text-center p-6 bg-white/50 dark:bg-gray-800/50 rounded-xl backdrop-blur-sm border company-border", initial: { opacity: 0, scale: 0.8 }, animate: { opacity: 1, scale: 1 }, transition: { duration: 0.5, delay: 0.5 + i * 0.1 }, children: [(0, jsx_runtime_1.jsx)("div", { className: "text-3xl font-bold ".concat(stat.color, " mb-2"), children: stat.metric }), (0, jsx_runtime_1.jsxs)("div", { className: "text-sm text-gray-600 dark:text-gray-300 flex items-center justify-center gap-2", children: [(0, jsx_runtime_1.jsx)("span", { children: stat.icon }), stat.label] })] }, i)) : null); }) })] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { variants: fadeIn, className: "bg-white dark:bg-gray-800 rounded-2xl p-8 shadow-xl border border-gray-100 dark:border-gray-700", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col md:flex-row gap-6 mb-8", children: [(0, jsx_runtime_1.jsxs)("div", { className: "relative flex-1", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Search, { className: "absolute left-4 top-1/2 transform -translate-y-1/2 text-gray-400 w-5 h-5" }), (0, jsx_runtime_1.jsx)(input_1.Input, { placeholder: "Search companies, focus areas, technologies, or interview types...", value: searchTerm, onChange: function (e) { return setSearchTerm(e.target.value); }, className: "pl-12 h-12 custom-input bg-gray-50 dark:bg-gray-700 text-white border-gray-200 dark:border-gray-600 rounded-xl text-lg" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex gap-3", children: [(0, jsx_runtime_1.jsxs)("select", { value: selectedIndustry, onChange: function (e) { return setSelectedIndustry(e.target.value); }, className: "px-4 py-3 border border-gray-200 dark:border-gray-600 rounded-xl bg-gray-50 dark:bg-gray-700 text-gray-900 dark:text-white min-w-[140px]", children: [(0, jsx_runtime_1.jsx)("option", { value: "", children: "All Industries" }), industries.map(function (industry) { return ((0, jsx_runtime_1.jsx)("option", { value: industry, children: industry }, industry)); })] }), (0, jsx_runtime_1.jsxs)("select", { value: selectedRole, onChange: function (e) { return setSelectedRole(e.target.value); }, className: " px-4 py-3 border border-gray-200 dark:border-gray-600 rounded-xl bg-gray-50 dark:bg-gray-700 text-gray-900 dark:text-white min-w-[120px]", children: [(0, jsx_runtime_1.jsx)("option", { value: "", children: "All Roles" }), roles.map(function (role) { return ((0, jsx_runtime_1.jsx)("option", { value: role, children: role }, role)); })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-sm text-gray-600 dark:text-gray-400 flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Building2, { className: "w-4 h-4" }), "Showing ", filteredCompanies.length, " of ", (companyTips === null || companyTips === void 0 ? void 0 : companyTips.length) || 0, " companies"] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2 text-xs text-gray-500 dark:text-gray-400", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Star, { className: "w-3 h-3" }), "Updated weekly with latest interview insights"] })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "space-y-12", children: filteredCompanies.map(function (company, companyIndex) { + var isOpen = expandedCompanies[companyIndex] || false; + return ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { variants: fadeIn, className: "group", children: (0, jsx_runtime_1.jsxs)(card_1.Card, { className: "overflow-hidden shadow-xl hover:shadow-2xl transition-all duration-500 transform hover:scale-[1.02] border-0", children: [(0, jsx_runtime_1.jsxs)(card_1.CardHeader, { className: "pb-6 bg-gradient-to-br from-gray-50 via-blue-50 to-indigo-50 dark:from-gray-800 dark:via-blue-900/20 dark:to-indigo-900/20 relative", children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 opacity-5", children: (0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0", style: { + backgroundImage: "radial-gradient(circle at 2px 2px, rgba(59, 130, 246, 0.3) 1px, transparent 0)", + backgroundSize: "24px 24px", + } }) }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10 mt-8", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-start gap-6 mb-6", children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "relative", whileHover: { scale: 1.1, rotate: 5 }, transition: { type: "spring", stiffness: 300 }, children: [(0, jsx_runtime_1.jsx)("img", { src: company.logo || "/placeholder.svg", alt: "".concat(company.company, " logo"), className: "w-20 h-20 rounded-2xl object-contain bg-white p-3 shadow-lg border border-gray-100" }), (0, jsx_runtime_1.jsx)("div", { className: "absolute -top-2 -right-2 w-6 h-6 bg-green-500 rounded-full flex items-center justify-center", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Award, { className: "w-3 h-3 text-white" }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex-1", children: [(0, jsx_runtime_1.jsx)(card_1.CardTitle, { className: "text-3xl mb-3 text-gray-900 dark:text-white group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors", children: company.company }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2 mb-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "-mt-5", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Target, { className: "w-5 h-5 text-blue-600 flex-shrink-0" }) }), (0, jsx_runtime_1.jsxs)("p", { className: "text-blue-600 dark:text-blue-400 font-semibold text-lg leading-tight", children: ["Focus: ", company.focus] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-wrap gap-2 mb-4", children: [company.focusAreas.slice(0, 4).map(function (area, i) { return ((0, jsx_runtime_1.jsx)(badge_1.Badge, { variant: "secondary", className: "text-sm bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 px-3 py-1 rounded-full", children: area }, i)); }), company.focusAreas.length > 4 && ((0, jsx_runtime_1.jsxs)(badge_1.Badge, { variant: "outline", className: "text-sm px-3 py-1 rounded-full", children: ["+", company.focusAreas.length - 4, " more"] }))] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-right", children: [(0, jsx_runtime_1.jsxs)("div", { className: "inline-flex items-center px-3 py-1 bg-green-100 dark:bg-green-900/30 rounded-full text-green-700 dark:text-green-300 text-sm font-semibold mb-2", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.TrendingUp, { className: "w-3 h-3 mr-1" }), "High Demand"] }), (0, jsx_runtime_1.jsx)("div", { className: "text-sm text-gray-500 dark:text-gray-400", children: company.industry })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-wrap gap-2 justify-between items-center", children: [(0, jsx_runtime_1.jsxs)("span", { className: "text-sm text-gray-600 dark:text-gray-400 flex items-center gap-2 font-medium", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Users, { className: "w-4 h-4" }), "Common roles:", company.roleTypes.map(function (role, i) { return ((0, jsx_runtime_1.jsx)(badge_1.Badge, { variant: "outline", className: "text-sm border-gray-300 dark:border-gray-600 px-3 py-1 rounded-full company-border", children: role }, i)); })] }), (0, jsx_runtime_1.jsx)("button", { onClick: function () { return toggleCompany(companyIndex); }, className: "p-2 rounded-full hover:bg-gray-200 dark:hover:bg-gray-700 transition", children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { animate: { rotate: isOpen ? 180 : 0 }, transition: { duration: 0.2 }, children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { className: "w-6 h-6 text-gray-600 dark:text-gray-300" }) }) })] })] })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: false, animate: { height: isOpen ? "auto" : 0, opacity: isOpen ? 1 : 0 }, transition: { duration: 0.3 }, className: "overflow-hidden", children: (0, jsx_runtime_1.jsxs)(card_1.CardContent, { className: "space-y-8 p-8", children: [(0, jsx_runtime_1.jsxs)("div", { className: "grid lg:grid-cols-2 gap-8", children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-gradient-to-br from-green-50 to-emerald-50 dark:from-green-900/20 dark:to-emerald-900/20 rounded-2xl p-8 border border-green-100 dark:border-green-800 company-green-border", whileHover: { scale: 1.02 }, transition: { type: "spring", stiffness: 300 }, children: [(0, jsx_runtime_1.jsxs)("h4", { className: "font-bold text-gray-900 dark:text-white mb-6 flex items-center gap-3 text-xl", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-10 h-10 bg-green-500 rounded-xl flex items-center justify-center", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Lightbulb, { className: "w-5 h-5 text-white" }) }), "Key Preparation Tips"] }), (0, jsx_runtime_1.jsx)("ul", { className: "space-y-4", children: company.tips.map(function (tip, i) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.li, { className: "flex items-start gap-4 group", initial: { opacity: 0, x: -20 }, animate: { opacity: 1, x: 0 }, transition: { duration: 0.5, delay: i * 0.1 }, children: [(0, jsx_runtime_1.jsx)("div", { className: "w-6 h-6 bg-green-500 rounded-full flex items-center justify-center flex-shrink-0 mt-1 group-hover:scale-110 transition-transform", children: (0, jsx_runtime_1.jsx)("span", { className: "text-white text-xs font-bold", children: i + 1 }) }), (0, jsx_runtime_1.jsx)("span", { className: "text-gray-700 dark:text-gray-300 leading-relaxed", children: tip })] }, i)); }) })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-gradient-to-br from-purple-50 to-indigo-50 dark:from-purple-900/20 dark:to-indigo-900/20 rounded-2xl p-8 border border-purple-100 dark:border-purple-800 company-purple-border", whileHover: { scale: 1.02 }, transition: { type: "spring", stiffness: 300 }, children: [(0, jsx_runtime_1.jsxs)("h4", { className: "font-bold text-gray-900 dark:text-white mb-6 flex items-center gap-3 text-xl", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-10 h-10 bg-purple-500 rounded-xl flex items-center justify-center", children: (0, jsx_runtime_1.jsx)(lucide_react_1.MessageSquare, { className: "w-5 h-5 text-white" }) }), "Common Interview Questions"] }), (0, jsx_runtime_1.jsx)("div", { className: "space-y-4", children: company.commonQuestions.map(function (item, i) { + var questionKey = "".concat(companyIndex, "-").concat(i); + var isExpanded = expandedQuestions[questionKey]; + return ((0, jsx_runtime_1.jsxs)(collapsible_1.Collapsible, { children: [(0, jsx_runtime_1.jsx)(collapsible_1.CollapsibleTrigger, { onClick: function () { return toggleQuestion(companyIndex, i); }, className: "w-full text-left", children: (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "question-card flex items-start justify-between gap-3 p-4 rounded-xl border bg-white dark:bg-gray-800 hover:bg-gray-50 dark:hover:bg-gray-700 transition-all shadow-sm hover:shadow-md", whileHover: { scale: 1.02 }, whileTap: { scale: 0.98 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex-1", children: [(0, jsx_runtime_1.jsxs)("p", { className: "text-sm font-semibold text-gray-900 dark:text-white mb-2 leading-relaxed", children: ["\"", item.question, "\""] }), (0, jsx_runtime_1.jsx)(badge_1.Badge, { variant: "outline", className: "text-xs px-2 py-1 rounded-full ".concat(item.category === "System Design" + ? "badge-system border-blue-300 text-blue-700 dark:text-blue-300 bg-blue-50 dark:bg-blue-900/20" + : item.category === "Behavioral" + ? "badge-behavioral border-green-300 text-green-700 dark:text-green-300 bg-green-50 dark:bg-green-900/20" + : item.category === "Technical" + ? "badge-technical border-purple-300 text-purple-700 dark:text-purple-300 bg-purple-50 dark:bg-purple-900/20" + : "badge-other border-orange-300 text-orange-700 dark:text-orange-300 bg-orange-50 dark:bg-orange-900/20"), children: item.category })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { animate: { rotate: isExpanded ? 180 : 0 }, transition: { duration: 0.2 }, children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { className: "w-5 h-5 text-gray-500 flex-shrink-0" }) })] }) }), (0, jsx_runtime_1.jsx)(collapsible_1.CollapsibleContent, { children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "mt-3 p-6 bg-gradient-to-r from-blue-50 to-purple-50 dark:from-blue-900/20 dark:to-purple-900/20 rounded-xl border-l-4 border-blue-500 company-blue-border", initial: { opacity: 0, y: -10 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.3 }, children: (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-700 dark:text-gray-300 leading-relaxed", children: item.answer }) }) })] }, i)); + }) })] })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "border-t pt-8", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5, delay: 0.3 }, children: (0, jsx_runtime_1.jsxs)("div", { className: "bg-gradient-to-br from-yellow-50 via-orange-50 to-red-50 dark:from-yellow-900/20 dark:via-orange-900/20 dark:to-red-900/20 rounded-2xl p-8 border-2 border-yellow-200 dark:border-yellow-800 relative overflow-hidden technical-inner-success", children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute top-4 right-4 text-4xl opacity-20", children: "\uD83D\uDE80" }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-3 mb-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-10 h-10 bg-orange-500 rounded-xl flex items-center justify-center", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Users, { className: "w-5 h-5 text-white" }) }), (0, jsx_runtime_1.jsx)("h5", { className: "font-bold text-gray-900 dark:text-white text-xl", children: "Community Contributors Needed!" })] }), (0, jsx_runtime_1.jsxs)("p", { className: "text-gray-700 dark:text-gray-300 mb-6 leading-relaxed", children: ["Help keep ", company.company, "'s interview information current! Share recent questions, tips, or insights you've encountered to help fellow candidates succeed."] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-wrap gap-3", children: [(0, jsx_runtime_1.jsxs)(button_1.Button, { variant: "outline", size: "sm", className: "bg-white dark:bg-orange-900/20 hover:bg-orange-50 dark:hover:bg-orange-800 border-orange-200 dark:border-orange-700 text-orange-700 dark:text-orange-300 px-4 py-2 rounded-xl technical-inner-success", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Zap, { className: "w-4 h-4 mr-2" }), (0, jsx_runtime_1.jsx)(Link_1.default, { to: "/community", className: "company-tab-community-link", children: "Share Interview Experience" })] }), (0, jsx_runtime_1.jsxs)(button_1.Button, { variant: "outline", size: "sm", className: "bg-white dark:bg-orange-900/20 hover:bg-orange-50 dark:hover:bg-orange-800 border-orange-200 dark:border-orange-700 text-orange-700 dark:text-orange-300 px-4 py-2 rounded-xl technical-inner-success", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.MessageSquare, { className: "w-4 h-4 mr-2" }), (0, jsx_runtime_1.jsx)(Link_1.default, { to: "/community", className: "company-tab-community-link", children: "Add Recent Questions" })] })] })] })] }) })] }) })] }) }, companyIndex)); + }) }), filteredCompanies.length === 0 && ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { variants: fadeIn, className: "text-center py-12 bg-white dark:bg-gray-800 rounded-xl shadow-lg", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-6xl mb-4", children: "\uD83D\uDD0D" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-400 mb-4", children: "No companies match your current filters." }), (0, jsx_runtime_1.jsx)(button_1.Button, { variant: "outline", onClick: function () { + setSearchTerm(""); + setSelectedIndustry(""); + setSelectedRole(""); + }, className: "bg-blue-600 text-white hover:bg-blue-700", children: "Clear All Filters" })] })), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "relative bg-gradient-to-br from-indigo-50 via-purple-50 to-pink-50 dark:from-indigo-900/20 dark:via-purple-900/20 dark:to-pink-900/20 rounded-3xl p-12 border-2 border-indigo-200 dark:border-indigo-800 overflow-hidden company-blue-border", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute top-10 right-10 text-6xl opacity-10", children: "\uD83E\uDD1D" }), (0, jsx_runtime_1.jsx)("div", { className: "absolute bottom-10 left-10 text-4xl opacity-10", children: "\uD83D\uDCA1" }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-center mb-12", children: [(0, jsx_runtime_1.jsxs)("h3", { className: "text-4xl font-bold text-gray-900 dark:text-white flex items-center justify-center mb-4", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-5xl mr-4", children: "\uD83E\uDD1D" }), "Join Our Interview Prep Community"] }), (0, jsx_runtime_1.jsx)("p", { className: "text-xl text-gray-600 dark:text-gray-300", children: "Help build the most comprehensive company interview resource and accelerate your career growth" })] }), (0, jsx_runtime_1.jsx)("div", { className: "grid md:grid-cols-2 lg:grid-cols-4 gap-8 mb-12", children: [ + { + title: "Share Experiences", + icon: "💬", + description: "Recent interview questions and experiences from your interviews", + color: "from-blue-500 to-blue-600", + bgColor: "bg-blue-500", + benefit: "Help 1000+ candidates", + }, + { + title: "Update Tips", + icon: "💡", + description: "Company-specific preparation strategies and insider knowledge", + color: "from-green-500 to-green-600", + bgColor: "bg-green-500", + benefit: "Earn community points", + }, + { + title: "Add Companies", + icon: "🏢", + description: "Request coverage for new companies and emerging startups", + color: "from-purple-500 to-purple-600", + bgColor: "bg-purple-500", + benefit: "Shape our roadmap", + }, + { + title: "Improve Content", + icon: "✨", + description: "Enhance existing company profiles with updated information", + color: "from-orange-500 to-orange-600", + bgColor: "bg-orange-500", + benefit: "Get featured contributor", + }, + ].map(function (item, i) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-white dark:bg-gray-800 rounded-2xl p-8 text-center hover:shadow-2xl transition-all duration-300 transform hover:scale-105 border border-gray-100 dark:border-gray-700 company-border", whileHover: { y: -10 }, initial: { opacity: 0, y: 30 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5, delay: i * 0.1 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "w-20 h-20 bg-gradient-to-br ".concat(item.color, " text-white rounded-2xl flex items-center justify-center text-3xl font-bold mx-auto mb-6 shadow-lg relative overflow-hidden"), children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "absolute inset-0 bg-white opacity-20 rounded-2xl", animate: { scale: [1, 1.2, 1] }, transition: { duration: 3, repeat: Number.POSITIVE_INFINITY, ease: "easeInOut" } }), (0, jsx_runtime_1.jsx)("span", { className: "relative z-10", children: item.icon })] }), (0, jsx_runtime_1.jsx)("h4", { className: "font-bold text-gray-900 dark:text-white mb-3 text-lg", children: item.title }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300 mb-4 leading-relaxed", children: item.description }), (0, jsx_runtime_1.jsx)("div", { className: "inline-flex items-center px-3 py-1 bg-gray-100 dark:bg-gray-700 rounded-full text-xs font-semibold text-gray-700 dark:text-gray-300", children: item.benefit })] }, i)); }) }), (0, jsx_runtime_1.jsxs)("div", { className: "text-center mt-3", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { whileHover: { scale: 1.05 }, whileTap: { scale: 0.95 }, className: "company-border", children: (0, jsx_runtime_1.jsxs)(button_1.Button, { className: "bg-gradient-to-r from-indigo-600 to-purple-600 text-white hover:from-indigo-700 hover:to-purple-700 px-12 py-4 text-mdx`x rounded-2xl shadow-lg", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Users, { className: "w-5 h-5 mr-3" }), (0, jsx_runtime_1.jsx)(Link_1.default, { to: "/community", className: "company-tab-link", children: "Join Community Discord" })] }) }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-500 dark:text-gray-400 mt-4", children: "Join 50,000+ developers preparing for their dream jobs" })] })] })] })] })); +}; +exports.default = CompaniesTab; diff --git a/src/pages/interview-prep/OverviewTab.js b/src/pages/interview-prep/OverviewTab.js new file mode 100644 index 00000000..f101e7db --- /dev/null +++ b/src/pages/interview-prep/OverviewTab.js @@ -0,0 +1,163 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importDefault(require("react")); +var framer_motion_1 = require("framer-motion"); +var fadeIn = { hidden: { opacity: 0, y: 20 }, visible: { opacity: 1, y: 0, transition: { duration: 0.6 } } }; +var staggerContainer = { hidden: {}, visible: { transition: { staggerChildren: 0.2 } } }; +var OverviewTab = function (_a) { + var _b; + var _c = _a.toggleTips, toggleTips = _c === void 0 ? function () { } : _c, _d = _a.toggleQuestions, toggleQuestions = _d === void 0 ? function () { } : _d, _e = _a.showTips, showTips = _e === void 0 ? {} : _e, _f = _a.showQuestions, showQuestions = _f === void 0 ? {} : _f, _g = _a.setActiveTab, setActiveTab = _g === void 0 ? function () { } : _g; + var stages = [ + { + step: "01", + title: "Resume Optimization", + subtitle: "Foundation Building Phase", + icon: "📄", + description: "Craft a compelling resume that showcases your achievements, aligns with job requirements, and passes ATS screening systems", + color: "from-blue-500 to-blue-600", + bgColor: "bg-blue-500", + duration: "Ongoing preparation", + difficulty: "Medium", + keyFocus: "Professional Presentation & ATS Optimization", + tips: [ + "Tailor resume for each specific role and company", + "Use action verbs and quantify achievements with metrics", + "Optimize for ATS with relevant keywords from job description", + "Keep format clean, consistent, and easy to scan", + "Include relevant projects, certifications, and technical skills", + ], + commonQuestions: [ + "Walk me through your resume", + "Tell me about this project on your resume", + "Why did you choose this career path?", + ], + }, + { + step: "02", + title: "Technical Assessment", + subtitle: "Core Competency Evaluation", + icon: "💻", + description: "Deep dive into coding abilities, algorithmic thinking, system design knowledge, and technical problem-solving approach", + color: "from-green-500 to-green-600", + bgColor: "bg-green-500", + duration: "60-120 minutes", + difficulty: "Hard", + keyFocus: "Problem Solving & Code Quality", + tips: [ + "Practice coding on whiteboard/shared editor daily", + "Think out loud - explain your thought process clearly", + "Ask clarifying questions before jumping into code", + "Test your solution with edge cases and optimize", + "Know time/space complexity of your solutions", + ], + commonQuestions: [ + "Implement [data structure/algorithm]", + "Design a system for [specific use case]", + "Optimize this code for better performance", + ], + }, + { + step: "03", + title: "Behavioral Deep-Dive", + subtitle: "Leadership & Culture Assessment", + icon: "🤝", + description: "Comprehensive evaluation of soft skills, leadership potential, conflict resolution abilities, and team collaboration style", + color: "from-purple-500 to-purple-600", + bgColor: "bg-purple-500", + duration: "45-75 minutes", + difficulty: "Medium", + keyFocus: "Leadership & Collaboration", + tips: [ + "Master the STAR method (Situation, Task, Action, Result)", + "Prepare 5-7 detailed stories covering different competencies", + "Show growth mindset - discuss lessons learned from failures", + "Demonstrate impact with specific metrics and outcomes", + "Practice active listening and ask follow-up questions", + ], + commonQuestions: [ + "Tell me about a time you led a difficult project", + "Describe a conflict with a teammate and resolution", + "Share an example of when you failed and what you learned", + ], + }, + { + step: "04", + title: "Final Alignment", + subtitle: "Mutual Fit Confirmation", + icon: "🎯", + description: "Final evaluation covering compensation expectations, role clarity, team dynamics, and long-term career alignment", + color: "from-orange-500 to-red-500", + bgColor: "bg-orange-500", + duration: "30-60 minutes", + difficulty: "Medium", + keyFocus: "Mutual Fit & Expectations", + tips: [ + "Research industry salary benchmarks thoroughly", + "Prepare thoughtful questions about team and growth", + "Show genuine enthusiasm for the role and company", + "Discuss career goals and how role aligns with them", + "Be ready to negotiate professionally and respectfully", + ], + commonQuestions: [ + "What are your career goals for the next 2-3 years?", + "How do you handle work-life balance?", + "What questions do you have for us?", + ], + }, + ]; + return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { initial: "hidden", animate: "visible", variants: staggerContainer, children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "mb-16", variants: fadeIn, children: (0, jsx_runtime_1.jsxs)("div", { className: "bg-gradient-to-br from-blue-50 via-indigo-50 to-purple-50 dark:from-blue-900/20 dark:via-indigo-900/20 dark:to-purple-900/20 rounded-2xl p-8 border border-blue-100 dark:border-blue-800", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-center mb-8", children: [(0, jsx_runtime_1.jsxs)("div", { className: "inline-flex items-center px-4 py-2 bg-blue-100 dark:bg-blue-900/30 rounded-full text-blue-600 dark:text-blue-400 text-sm font-medium mb-4", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-blue-500 rounded-full mr-2 animate-pulse" }), "Your Complete Interview Success Guide"] }), (0, jsx_runtime_1.jsx)("h2", { className: "text-4xl font-bold mb-6 text-gray-900 dark:text-white", children: "What Our Interview Prep Section Covers" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid md:grid-cols-2 gap-8 mb-8", children: [(0, jsx_runtime_1.jsxs)("div", { className: "space-y-4", children: [(0, jsx_runtime_1.jsxs)("h3", { className: "text-xl font-bold text-gray-900 dark:text-white flex items-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-8 h-8 bg-blue-500 text-white rounded-full flex items-center justify-center text-sm mr-3", children: "\uD83D\uDCDA" }), "Comprehensive Coverage"] }), (0, jsx_runtime_1.jsxs)("ul", { className: "space-y-3 text-gray-600 dark:text-gray-300", children: [(0, jsx_runtime_1.jsxs)("li", { className: "flex items-start", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-blue-500 rounded-full mr-3 mt-2 flex-shrink-0" }), (0, jsx_runtime_1.jsxs)("span", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Technical Mastery:" }), " 500+ coding problems, algorithms, data structures, and system design challenges"] })] }), (0, jsx_runtime_1.jsxs)("li", { className: "flex items-start", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-green-500 rounded-full mr-3 mt-2 flex-shrink-0" }), (0, jsx_runtime_1.jsxs)("span", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Behavioral Excellence:" }), " STAR method framework, leadership scenarios, and communication skills"] })] }), (0, jsx_runtime_1.jsxs)("li", { className: "flex items-start", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-purple-500 rounded-full mr-3 mt-2 flex-shrink-0" }), (0, jsx_runtime_1.jsxs)("span", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Company Intelligence:" }), " FAANG-specific strategies, culture insights, and insider tips"] })] }), (0, jsx_runtime_1.jsxs)("li", { className: "flex items-start", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-orange-500 rounded-full mr-3 mt-2 flex-shrink-0" }), (0, jsx_runtime_1.jsxs)("span", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Mock Practice:" }), " Real-time simulations with feedback and performance tracking"] })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "space-y-4", children: [(0, jsx_runtime_1.jsxs)("h3", { className: "text-xl font-bold text-gray-900 dark:text-white flex items-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-8 h-8 bg-green-500 text-white rounded-full flex items-center justify-center text-sm mr-3", children: "\u26A1" }), "Why Both Technical & Behavioral Matter"] }), (0, jsx_runtime_1.jsxs)("div", { className: "space-y-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-white dark:bg-gray-800 rounded-lg p-4 border-l-4 border-blue-500 overview-sidebar-blue", children: [(0, jsx_runtime_1.jsx)("h4", { className: "font-semibold text-gray-900 dark:text-white mb-2", children: "Technical Skills (60% Weight)" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300", children: "Prove you can solve complex problems, write clean code, and design scalable systems. Technical competence is your entry ticket." })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white dark:bg-gray-800 rounded-lg p-4 border-l-4 border-green-500 overview-sidebar-green", children: [(0, jsx_runtime_1.jsx)("h4", { className: "font-semibold text-gray-900 dark:text-white mb-2", children: "Behavioral Skills (40% Weight)" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300", children: "Demonstrate leadership, collaboration, and cultural fit. Many technically strong candidates fail here due to poor communication or team dynamics." })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "bg-gradient-to-r from-yellow-100 to-orange-100 dark:from-yellow-900/30 dark:to-orange-900/30 rounded-lg p-4 border border-yellow-200 dark:border-yellow-700", children: (0, jsx_runtime_1.jsxs)("p", { className: "text-sm text-gray-700 dark:text-gray-300", children: [(0, jsx_runtime_1.jsx)("strong", { children: "\uD83D\uDCA1 Key Insight:" }), " Top companies hire for both technical excellence AND cultural alignment. Neglecting either aspect significantly reduces your success rate."] }) })] })] })] }) }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "mb-20", variants: fadeIn, children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-center mb-12", children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-4xl font-bold text-gray-900 dark:text-white mb-4", children: "Interview Process Journey" }), (0, jsx_runtime_1.jsx)("p", { className: "text-lg text-gray-600 dark:text-gray-300", children: "Navigate each stage strategically with our comprehensive roadmap" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "relative bg-gradient-to-br from-slate-50 via-blue-50 to-indigo-50 dark:from-slate-900/50 dark:via-blue-900/20 dark:to-indigo-900/20 rounded-3xl p-8 overflow-hidden", children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 opacity-5", children: (0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0", style: { + backgroundImage: "radial-gradient(circle at 1px 1px, rgba(59, 130, 246, 0.3) 1px, transparent 0)", + backgroundSize: "20px 20px", + } }) }), (0, jsx_runtime_1.jsx)("div", { className: "relative", children: (stages || []).map(function (stage, index) { + var _a, _b, _c, _d; + return (stage ? ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "relative mb-20 last:mb-0", initial: { opacity: 0, x: index % 2 === 0 ? -50 : 50 }, whileInView: { opacity: 1, x: 0 }, transition: { duration: 0.6, delay: index * 0.2 }, viewport: { once: true }, children: [index < 3 && ((0, jsx_runtime_1.jsxs)("div", { className: "hidden md:block absolute top-full left-1/2 transform -translate-x-1/2 w-1 h-16 z-10", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-full h-full bg-gradient-to-b from-gray-300 to-gray-400 dark:from-gray-600 dark:to-gray-700 rounded-full relative overflow-hidden", children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "absolute inset-0 bg-gradient-to-b from-blue-500 to-purple-500 rounded-full", initial: { height: "0%" }, whileInView: { height: "100%" }, transition: { duration: 1, delay: index * 0.3 + 0.5 }, viewport: { once: true } }) }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "absolute -bottom-2 left-1/2 transform -translate-x-1/2 text-blue-500", initial: { opacity: 0, y: -10 }, whileInView: { opacity: 1, y: 0 }, transition: { duration: 0.5, delay: index * 0.3 + 1 }, viewport: { once: true }, children: (0, jsx_runtime_1.jsx)("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { d: "M6 0L12 6L6 12L4.5 10.5L8.25 6.75H0V5.25H8.25L4.5 1.5L6 0Z", transform: "rotate(90 6 6)" }) }) })] })), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col md:flex-row ".concat(index % 2 === 0 ? "md:flex-row" : "md:flex-row-reverse", " gap-8 items-center"), children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "flex-shrink-0 relative", whileHover: { scale: 1.05 }, transition: { type: "spring", stiffness: 300 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "w-20 h-20 rounded-full bg-gradient-to-br ".concat(stage.color, " flex items-center justify-center text-white font-bold text-lg shadow-lg relative overflow-hidden"), children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "absolute inset-0 bg-white opacity-20 rounded-full", animate: { scale: [1, 1.2, 1] }, transition: { duration: 2, repeat: Number.POSITIVE_INFINITY, ease: "easeInOut" } }), (0, jsx_runtime_1.jsx)("span", { className: "relative z-10", children: stage.step })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "absolute -top-2 -right-2 w-8 h-8 bg-white dark:bg-gray-800 rounded-full flex items-center justify-center shadow-md", animate: { y: [0, -4, 0] }, transition: { duration: 2, repeat: Number.POSITIVE_INFINITY, ease: "easeInOut" }, children: (0, jsx_runtime_1.jsx)("span", { className: "text-lg", children: stage.icon }) })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "flex-1 bg-white dark:bg-gray-800 rounded-2xl p-8 shadow-xl border border-gray-100 dark:border-gray-700 relative overflow-hidden group", whileHover: { y: -5, boxShadow: "0 25px 50px -12px rgba(0, 0, 0, 0.25)" }, transition: { type: "spring", stiffness: 300 }, children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 opacity-5 group-hover:opacity-10 transition-opacity duration-300", children: (0, jsx_runtime_1.jsx)("div", { className: "w-full h-full", style: { + backgroundImage: "radial-gradient(circle at 2px 2px, currentColor 1px, transparent 0)", + backgroundSize: "24px 24px", + } }) }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-start justify-between mb-6", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-2xl font-bold text-gray-900 dark:text-white mb-2 group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors", children: stage.title }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm font-medium text-blue-600 dark:text-blue-400 uppercase tracking-wider", children: stage.subtitle })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "px-3 py-1 rounded-full text-xs font-semibold ".concat(stage.difficulty === "Easy" + ? "bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200" + : stage.difficulty === "Medium" + ? "bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200" + : "bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200"), children: stage.difficulty }), (0, jsx_runtime_1.jsx)("span", { className: "px-3 py-1 rounded-full text-xs font-semibold bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-200", children: stage.duration })] })] }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 mb-6 leading-relaxed", children: stage.description }), (0, jsx_runtime_1.jsx)("div", { className: "mb-6 p-4 bg-gradient-to-r from-blue-50 to-purple-50 dark:from-blue-900/20 dark:to-purple-900/20 rounded-xl border-l-4 border-blue-500 overview-sidebar-blue", children: (0, jsx_runtime_1.jsxs)("h4", { className: "font-semibold text-gray-900 dark:text-white mb-2 flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-blue-500 rounded-full" }), "Key Focus: ", stage.keyFocus] }) }), (0, jsx_runtime_1.jsxs)("div", { className: "mb-6", children: [(0, jsx_runtime_1.jsxs)("button", { onClick: function () { return toggleTips(index); }, className: "w-full flex items-center justify-between p-3 bg-green-50 dark:bg-green-900/20 rounded-lg hover:bg-green-100 dark:hover:bg-green-900/30 transition-colors", children: [(0, jsx_runtime_1.jsxs)("h4", { className: "font-semibold text-gray-900 dark:text-white flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-green-500", children: "\uD83D\uDCA1" }), "Preparation Tips (", ((_a = stage.tips) === null || _a === void 0 ? void 0 : _a.length) || 0, ")"] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { animate: { rotate: showTips[index] ? 180 : 0 }, transition: { duration: 0.2 }, children: (0, jsx_runtime_1.jsx)("svg", { className: "w-5 h-5 text-gray-500", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { children: showTips[index] && ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: { opacity: 0, height: 0 }, animate: { opacity: 1, height: "auto" }, exit: { opacity: 0, height: 0 }, transition: { duration: 0.3 }, className: "overflow-hidden", children: (0, jsx_runtime_1.jsx)("ul", { className: "space-y-3 mt-4", children: (_b = stage.tips) === null || _b === void 0 ? void 0 : _b.map(function (tip, tipIndex) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.li, { className: "flex items-start gap-3 text-gray-600 dark:text-gray-300", initial: { opacity: 0, x: -20 }, animate: { opacity: 1, x: 0 }, transition: { duration: 0.4, delay: tipIndex * 0.1 }, children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-green-500 rounded-full mt-2 flex-shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "leading-relaxed", children: tip })] }, tipIndex)); }) }) })) })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("button", { onClick: function () { return toggleQuestions(index); }, className: "w-full flex items-center justify-between p-3 bg-purple-50 dark:bg-purple-900/20 rounded-lg hover:bg-purple-100 dark:hover:bg-purple-900/30 transition-colors", children: [(0, jsx_runtime_1.jsxs)("h4", { className: "font-semibold text-gray-900 dark:text-white flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-purple-500", children: "\u2753" }), "Common Questions (", ((_c = stage.commonQuestions) === null || _c === void 0 ? void 0 : _c.length) || 0, ")"] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { animate: { rotate: showQuestions[index] ? 180 : 0 }, transition: { duration: 0.2 }, children: (0, jsx_runtime_1.jsx)("svg", { className: "w-5 h-5 text-gray-500", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { children: showQuestions[index] && ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: { opacity: 0, height: 0 }, animate: { opacity: 1, height: "auto" }, exit: { opacity: 0, height: 0 }, transition: { duration: 0.3 }, className: "overflow-hidden", children: (0, jsx_runtime_1.jsx)("div", { className: "space-y-2 mt-4", children: (_d = stage.commonQuestions) === null || _d === void 0 ? void 0 : _d.map(function (question, qIndex) { return ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "p-3 bg-gray-50 dark:bg-gray-700 rounded-lg border-l-3 border-purple-500 overview-sidebar-purple", initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.4, delay: qIndex * 0.1 }, children: (0, jsx_runtime_1.jsxs)("p", { className: "text-gray-700 dark:text-gray-300 italic", children: ["\"", question, "\""] }) }, qIndex)); }) }) })) })] })] })] })] })] }, index)) : null); + }) })] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "mb-16", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("div", { className: "text-center mb-12", children: (0, jsx_runtime_1.jsx)("h3", { className: "text-3xl font-bold text-gray-900 dark:text-white", children: "Preparation Strategy" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white dark:bg-gray-800 rounded-xl shadow-lg p-8", children: [(0, jsx_runtime_1.jsxs)("div", { className: "grid md:grid-cols-3 gap-8", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-center", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-20 h-20 bg-gradient-to-br from-blue-500 to-blue-600 text-white rounded-full flex items-center justify-center text-3xl mx-auto mb-4 shadow-lg", children: "\uD83E\uDDE0" }), (0, jsx_runtime_1.jsx)("h4", { className: "text-xl font-bold text-gray-900 dark:text-white mb-3", children: "Problem-Solving Mastery" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 text-sm", children: "Build strong algorithmic thinking through consistent practice. Focus on understanding patterns rather than memorizing solutions." })] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-center", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-20 h-20 bg-gradient-to-br from-green-500 to-green-600 text-white rounded-full flex items-center justify-center text-3xl mx-auto mb-4 shadow-lg", children: "\uD83D\uDCAC" }), (0, jsx_runtime_1.jsx)("h4", { className: "text-xl font-bold text-gray-900 dark:text-white mb-3", children: "Communication Excellence" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 text-sm", children: "Practice explaining complex concepts clearly. Develop your ability to think out loud and collaborate effectively." })] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-center", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-20 h-20 bg-gradient-to-br from-purple-500 to-purple-600 text-white rounded-full flex items-center justify-center text-3xl mx-auto mb-4 shadow-lg", children: "\uD83C\uDFAD" }), (0, jsx_runtime_1.jsx)("h4", { className: "text-xl font-bold text-gray-900 dark:text-white mb-3", children: "Behavioral Readiness" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 text-sm", children: "Prepare compelling stories using the STAR method. Showcase leadership, growth mindset, and cultural alignment." })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-8 p-6 bg-gradient-to-r from-yellow-50 to-orange-50 dark:from-yellow-900/20 dark:to-orange-900/20 rounded-lg border-l-4 border-yellow-400 overview-sidebar-yellow", children: [(0, jsx_runtime_1.jsxs)("h5", { className: "font-bold text-gray-900 dark:text-white mb-2 flex items-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-xl mr-2", children: "\uD83D\uDCA1" }), "Pro Tip: Balance Your Preparation"] }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-700 dark:text-gray-300 text-sm", children: "Allocate 60% of your time to technical skills, 30% to behavioral preparation, and 10% to company research. This balance ensures you're well-rounded and confident in all interview stages." })] })] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "mb-16", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-3xl font-bold text-center mb-12 text-gray-900 dark:text-white", children: "Quick Access to Resources" }), (0, jsx_runtime_1.jsx)("div", { className: "grid md:grid-cols-2 lg:grid-cols-4 gap-6", children: (_b = [ + { + id: "technical", + title: "Technical Prep", + icon: "💻", + description: "Coding challenges, algorithms, system design", + color: "from-blue-500 to-blue-600", + items: ["500+ Problems", "System Design", "Code Review"], + }, + { + id: "behavioral", + title: "Behavioral Prep", + icon: "🤝", + description: "STAR method, leadership stories, soft skills", + color: "from-green-500 to-green-600", + items: ["STAR Framework", "Leadership", "Communication"], + }, + { + id: "companies", + title: "Company Guides", + icon: "🏢", + description: "Company-specific tips and strategies", + color: "from-purple-500 to-purple-600", + items: ["FAANG Tips", "Culture Fit", "Specific Questions"], + }, + { + id: "practice", + title: "Mock Practice", + icon: "🎯", + description: "Simulate real interview conditions", + color: "from-orange-500 to-orange-600", + items: ["Live Practice", "Feedback", "Time Management"], + }, + ]) === null || _b === void 0 ? void 0 : _b.map(function (section) { + var _a; + return (section ? ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-white dark:bg-gray-800 rounded-xl shadow-lg overflow-hidden hover:shadow-xl transition-all duration-300 transform hover:scale-105 cursor-pointer flex flex-col", variants: fadeIn, onClick: function () { return setActiveTab(section.id); }, whileHover: { y: -5 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-gradient-to-r ".concat(section.color, " p-6 text-white text-center"), children: [(0, jsx_runtime_1.jsx)("div", { className: "text-4xl mb-2", children: section.icon }), (0, jsx_runtime_1.jsx)("h4", { className: "text-xl font-bold", children: section.title })] }), (0, jsx_runtime_1.jsxs)("div", { className: "p-6 flex flex-col flex-grow", children: [(0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 text-sm mb-4", children: section.description }), (0, jsx_runtime_1.jsx)("div", { className: "space-y-2 mb-4", children: (_a = section.items) === null || _a === void 0 ? void 0 : _a.map(function (item, i) { return (item ? ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center text-xs text-gray-500 dark:text-gray-400", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-1.5 h-1.5 bg-blue-400 rounded-full mr-2" }), item] }, i)) : null); }) }), (0, jsx_runtime_1.jsx)("div", { className: "mt-auto pt-4 border-t border-gray-200 dark:border-gray-700", children: (0, jsx_runtime_1.jsx)("span", { className: "text-blue-600 dark:text-blue-400 text-sm font-medium hover:underline", children: "Explore Section \u2192" }) })] })] }, section.id)) : null); + }) })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "bg-gradient-to-r from-blue-600 to-purple-600 rounded-xl p-8 text-white", variants: fadeIn, children: (0, jsx_runtime_1.jsxs)("div", { className: "grid md:grid-cols-4 gap-8 text-center", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-3xl font-bold mb-2", children: "500+" }), (0, jsx_runtime_1.jsx)("div", { className: "text-blue-100", children: "Practice Questions" })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-3xl font-bold mb-2", children: "50+" }), (0, jsx_runtime_1.jsx)("div", { className: "text-blue-100", children: "System Design Topics" })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-3xl font-bold mb-2", children: "20+" }), (0, jsx_runtime_1.jsx)("div", { className: "text-blue-100", children: "Company Guides" })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-3xl font-bold mb-2", children: "95%" }), (0, jsx_runtime_1.jsx)("div", { className: "text-blue-100", children: "Success Rate" })] })] }) })] })); +}; +exports.default = OverviewTab; diff --git a/src/pages/interview-prep/PracticeTab.js b/src/pages/interview-prep/PracticeTab.js new file mode 100644 index 00000000..3aa431b8 --- /dev/null +++ b/src/pages/interview-prep/PracticeTab.js @@ -0,0 +1,239 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importDefault(require("react")); +var react_2 = require("react"); +var framer_motion_1 = require("framer-motion"); +var fadeIn = { hidden: { opacity: 0, y: 20 }, visible: { opacity: 1, y: 0, transition: { duration: 0.6 } } }; +var staggerContainer = { hidden: {}, visible: { transition: { staggerChildren: 0.1 } } }; +var scaleIn = { hidden: { scale: 0.8, opacity: 0 }, visible: { scale: 1, opacity: 1, transition: { duration: 0.5 } } }; +var PracticeTab = function (_a) { + var _b = _a.mockInterviewQuestions, mockInterviewQuestions = _b === void 0 ? [] : _b, onTabChange = _a.onTabChange; + var _c = (0, react_2.useState)(null), selectedQuestion = _c[0], setSelectedQuestion = _c[1]; + var _d = (0, react_2.useState)(null), activeSession = _d[0], setActiveSession = _d[1]; + var _e = (0, react_2.useState)(0), timer = _e[0], setTimer = _e[1]; + var _f = (0, react_2.useState)(false), isTimerRunning = _f[0], setIsTimerRunning = _f[1]; + var _g = (0, react_2.useState)(new Set()), completedQuestions = _g[0], setCompletedQuestions = _g[1]; + var _h = (0, react_2.useState)({ + totalCompleted: 0, + averageTime: 0, + easyCompleted: 0, + mediumCompleted: 0, + hardCompleted: 0, + technicalCompleted: 0, + behavioralCompleted: 0, + systemDesignCompleted: 0, + }), practiceStats = _h[0], setPracticeStats = _h[1]; + var _j = (0, react_2.useState)("all"), filterType = _j[0], setFilterType = _j[1]; + var _k = (0, react_2.useState)("all"), filterDifficulty = _k[0], setFilterDifficulty = _k[1]; + var _l = (0, react_2.useState)(new Set()), showHints = _l[0], setShowHints = _l[1]; + var _m = (0, react_2.useState)(new Set()), showResources = _m[0], setShowResources = _m[1]; + var _o = (0, react_2.useState)(false), showConfetti = _o[0], setShowConfetti = _o[1]; + var _p = (0, react_2.useState)(null), recentlyCompleted = _p[0], setRecentlyCompleted = _p[1]; + var allQuestions = __spreadArray([], mockInterviewQuestions, true); + (0, react_2.useEffect)(function () { + var interval; + if (isTimerRunning && activeSession) { + interval = setInterval(function () { + setTimer(function (prev) { return prev + 1; }); + }, 1000); + } + return function () { + if (interval) + clearInterval(interval); + }; + }, [isTimerRunning, activeSession]); + (0, react_2.useEffect)(function () { + if (showConfetti) { + var timeout_1 = setTimeout(function () { return setShowConfetti(false); }, 3000); + return function () { return clearTimeout(timeout_1); }; + } + }, [showConfetti]); + var filteredQuestions = allQuestions.filter(function (q) { + var typeMatch = filterType === "all" || q.type === filterType; + var difficultyMatch = filterDifficulty === "all" || q.difficulty === filterDifficulty; + return typeMatch && difficultyMatch; + }); + var startPractice = function (question) { + var session = { + questionId: question.id, + timeSpent: 0, + completed: false, + startTime: Date.now(), + }; + setActiveSession(session); + setTimer(0); + setIsTimerRunning(true); + setSelectedQuestion(question.id); + }; + var completePractice = function () { + if (activeSession) { + var timeSpent_1 = Math.floor(timer / 60); + setCompletedQuestions(function (prev) { return new Set(__spreadArray(__spreadArray([], prev, true), [activeSession.questionId], false)); }); + setRecentlyCompleted(activeSession.questionId); + setShowConfetti(true); + var question = allQuestions.find(function (q) { return q.id === activeSession.questionId; }); + if (question) { + setPracticeStats(function (prev) { return (__assign(__assign({}, prev), { totalCompleted: prev.totalCompleted + 1, averageTime: Math.round((prev.averageTime * prev.totalCompleted + timeSpent_1) / (prev.totalCompleted + 1)) })); }); + } + } + setIsTimerRunning(false); + setActiveSession(null); + setSelectedQuestion(null); + setTimer(0); + setTimeout(function () { return setRecentlyCompleted(null); }, 2000); + }; + var formatTime = function (seconds) { + var mins = Math.floor(seconds / 60); + var secs = seconds % 60; + return "".concat(mins.toString().padStart(2, "0"), ":").concat(secs.toString().padStart(2, "0")); + }; + var getDifficultyColor = function (difficulty) { + switch (difficulty) { + case "Easy": + return "bg-gradient-to-r from-emerald-100 to-green-100 text-emerald-800 dark:from-emerald-900/30 dark:to-green-900/30 dark:text-emerald-200 border border-emerald-200 dark:border-emerald-700"; + case "Medium": + return "bg-gradient-to-r from-amber-100 to-yellow-100 text-amber-800 dark:from-amber-900/30 dark:to-yellow-900/30 dark:text-amber-200 border border-amber-200 dark:border-amber-700"; + case "Hard": + return "bg-gradient-to-r from-rose-100 to-red-100 text-rose-800 dark:from-rose-900/30 dark:to-red-900/30 dark:text-rose-200 border border-rose-200 dark:border-rose-700"; + default: + return "bg-gradient-to-r from-gray-100 to-slate-100 text-gray-800 dark:from-gray-700 dark:to-slate-700 dark:text-gray-200 border border-gray-200 dark:border-gray-600"; + } + }; + var getTypeColor = function (type) { + switch (type) { + case "technical": + return "bg-gradient-to-r from-blue-100 to-cyan-100 text-blue-800 dark:from-blue-900/30 dark:to-cyan-900/30 dark:text-blue-200 border border-blue-200 dark:border-blue-700"; + case "behavioral": + return "bg-gradient-to-r from-green-100 to-emerald-100 text-green-800 dark:from-green-900/30 dark:to-emerald-900/30 dark:text-green-200 border border-green-200 dark:border-green-700"; + case "system-design": + return "bg-gradient-to-r from-purple-100 to-violet-100 text-purple-800 dark:from-purple-900/30 dark:to-violet-900/30 dark:text-purple-200 border border-purple-200 dark:border-purple-700"; + default: + return "bg-gradient-to-r from-gray-100 to-slate-100 text-gray-800 dark:from-gray-700 dark:to-slate-700 dark:text-gray-200 border border-gray-200 dark:border-gray-600"; + } + }; + var toggleHints = function (questionId) { + setShowHints(function (prev) { + var newSet = new Set(prev); + if (newSet.has(questionId)) { + newSet.delete(questionId); + } + else { + newSet.add(questionId); + } + return newSet; + }); + }; + var toggleResources = function (questionId) { + setShowResources(function (prev) { + var newSet = new Set(prev); + if (newSet.has(questionId)) { + newSet.delete(questionId); + } + else { + newSet.add(questionId); + } + return newSet; + }); + }; + var handleTabNavigation = function (tab) { + if (onTabChange) { + onTabChange(tab); + } + }; + var progressPercentage = allQuestions.length > 0 ? (practiceStats.totalCompleted / allQuestions.length) * 100 : 0; + return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { initial: "hidden", animate: "visible", variants: staggerContainer, className: "relative", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { children: showConfetti && ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, className: "fixed inset-0 pointer-events-none z-50 flex items-center justify-center", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-6xl animate-bounce", children: "\uD83C\uDF89" }), (0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 bg-gradient-to-r from-yellow-400/20 via-pink-400/20 to-purple-400/20 animate-pulse" })] })) }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "mb-12", variants: fadeIn, children: (0, jsx_runtime_1.jsxs)("div", { className: "bg-gradient-to-br from-indigo-50 via-purple-50 to-pink-50 dark:from-indigo-900/20 dark:via-purple-900/20 dark:to-pink-900/20 rounded-3xl p-8 border-2 border-gradient-to-r from-indigo-200 to-purple-200 dark:from-indigo-800 dark:to-purple-800 shadow-2xl backdrop-blur-sm", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-center mb-8", children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "inline-flex items-center px-6 py-3 bg-gradient-to-r from-indigo-100 to-purple-100 dark:from-indigo-900/40 dark:to-purple-900/40 rounded-full text-indigo-700 dark:text-indigo-300 text-sm font-bold mb-6 shadow-lg border border-indigo-200 dark:border-indigo-700", whileHover: { scale: 1.05 }, whileTap: { scale: 0.95 }, children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "w-3 h-3 bg-gradient-to-r from-indigo-500 to-purple-500 rounded-full mr-3", animate: { scale: [1, 1.2, 1] }, transition: { duration: 2, repeat: Number.POSITIVE_INFINITY } }), "Interactive Practice Sessions"] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.h2, { className: "text-5xl font-black mb-6 bg-gradient-to-r from-indigo-600 via-purple-600 to-pink-600 bg-clip-text text-transparent", initial: { scale: 0.9 }, animate: { scale: 1 }, transition: { duration: 0.5 }, children: "Mock Interview Practice" }), (0, jsx_runtime_1.jsx)("p", { className: "text-xl text-gray-700 dark:text-gray-300 leading-relaxed", children: "Simulate real interview scenarios with our interactive practice sessions. Track your progress, time your responses, and get instant feedback to improve your interview performance." })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid md:grid-cols-3 gap-8 mb-8", children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-white/80 dark:bg-gray-800/80 backdrop-blur-sm rounded-2xl p-8 border-2 border-gray-200/50 dark:border-gray-700/50 hover:shadow-2xl transition-all duration-500 cursor-pointer group relative overflow-hidden", onClick: function () { return handleTabNavigation("technical"); }, whileHover: { scale: 1.03, y: -5 }, whileTap: { scale: 0.98 }, children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 bg-gradient-to-br from-blue-500/10 to-cyan-500/10 opacity-0 group-hover:opacity-100 transition-opacity duration-500" }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "w-16 h-16 bg-gradient-to-br from-blue-100 to-cyan-100 dark:from-blue-900/40 dark:to-cyan-900/40 rounded-2xl flex items-center justify-center mb-6 group-hover:scale-110 transition-transform duration-300 shadow-lg", whileHover: { rotate: 5 }, children: (0, jsx_runtime_1.jsx)("span", { className: "text-3xl", children: "\uD83D\uDCBB" }) }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-bold text-gray-900 dark:text-white mb-3", children: "Technical Deep Dive" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 mb-4 leading-relaxed", children: "Explore comprehensive technical resources, coding patterns, and algorithm practice." }), (0, jsx_runtime_1.jsxs)("div", { className: "text-blue-600 dark:text-blue-400 font-bold group-hover:text-blue-700 dark:group-hover:text-blue-300 flex items-center", children: ["Go to Technical Tab", (0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "ml-2", animate: { x: [0, 5, 0] }, transition: { duration: 1.5, repeat: Number.POSITIVE_INFINITY }, children: "\u2192" })] })] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-white/80 dark:bg-gray-800/80 backdrop-blur-sm rounded-2xl p-8 border-2 border-gray-200/50 dark:border-gray-700/50 hover:shadow-2xl transition-all duration-500 cursor-pointer group relative overflow-hidden", onClick: function () { return handleTabNavigation("behavioral"); }, whileHover: { scale: 1.03, y: -5 }, whileTap: { scale: 0.98 }, children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 bg-gradient-to-br from-green-500/10 to-emerald-500/10 opacity-0 group-hover:opacity-100 transition-opacity duration-500" }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "w-16 h-16 bg-gradient-to-br from-green-100 to-emerald-100 dark:from-green-900/40 dark:to-emerald-900/40 rounded-2xl flex items-center justify-center mb-6 group-hover:scale-110 transition-transform duration-300 shadow-lg", whileHover: { rotate: -5 }, children: (0, jsx_runtime_1.jsx)("span", { className: "text-3xl", children: "\uD83D\uDDE3\uFE0F" }) }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-bold text-gray-900 dark:text-white mb-3", children: "Behavioral Mastery" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 mb-4 leading-relaxed", children: "Master the STAR method and practice storytelling for behavioral interviews." }), (0, jsx_runtime_1.jsxs)("div", { className: "text-green-600 dark:text-green-400 font-bold group-hover:text-green-700 dark:group-hover:text-green-300 flex items-center", children: ["Go to Behavioral Tab", (0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "ml-2", animate: { x: [0, 5, 0] }, transition: { duration: 1.5, repeat: Number.POSITIVE_INFINITY, delay: 0.5 }, children: "\u2192" })] })] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-white/80 dark:bg-gray-800/80 backdrop-blur-sm rounded-2xl p-8 border-2 border-gray-200/50 dark:border-gray-700/50 hover:shadow-2xl transition-all duration-500 cursor-pointer group relative overflow-hidden", onClick: function () { return handleTabNavigation("companies"); }, whileHover: { scale: 1.03, y: -5 }, whileTap: { scale: 0.98 }, children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 bg-gradient-to-br from-purple-500/10 to-pink-500/10 opacity-0 group-hover:opacity-100 transition-opacity duration-500" }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "w-16 h-16 bg-gradient-to-br from-purple-100 to-pink-100 dark:from-purple-900/40 dark:to-pink-900/40 rounded-2xl flex items-center justify-center mb-6 group-hover:scale-110 transition-transform duration-300 shadow-lg", whileHover: { rotate: 5 }, children: (0, jsx_runtime_1.jsx)("span", { className: "text-3xl", children: "\uD83C\uDFE2" }) }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-bold text-gray-900 dark:text-white mb-3", children: "Company Research" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 mb-4 leading-relaxed", children: "Research specific companies, their interview processes, and preparation strategies." }), (0, jsx_runtime_1.jsxs)("div", { className: "text-purple-600 dark:text-purple-400 font-bold group-hover:text-purple-700 dark:group-hover:text-purple-300 flex items-center", children: ["Go to Companies Tab", (0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "ml-2", animate: { x: [0, 5, 0] }, transition: { duration: 1.5, repeat: Number.POSITIVE_INFINITY, delay: 1 }, children: "\u2192" })] })] })] })] })] }) }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "grid grid-cols-2 md:grid-cols-4 gap-6 mb-8", variants: fadeIn, children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-gradient-to-br from-blue-50 via-blue-100 to-indigo-100 dark:from-blue-900/30 dark:via-blue-800/40 dark:to-indigo-800/50 rounded-2xl shadow-lg p-8 text-center border-2 border-blue-200/50 dark:border-blue-700/50 relative overflow-hidden", whileHover: { scale: 1.05 }, variants: scaleIn, children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 bg-gradient-to-br from-blue-400/20 to-indigo-400/20 opacity-0 hover:opacity-100 transition-opacity duration-300" }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "text-4xl font-black text-blue-600 dark:text-blue-400 mb-2", animate: { scale: [1, 1.1, 1] }, transition: { duration: 2, repeat: Number.POSITIVE_INFINITY }, children: practiceStats.totalCompleted }), (0, jsx_runtime_1.jsx)("div", { className: "text-sm text-blue-700 dark:text-blue-300 font-bold", children: "Completed" })] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-gradient-to-br from-green-50 via-green-100 to-emerald-100 dark:from-green-900/30 dark:via-green-800/40 dark:to-emerald-800/50 rounded-2xl shadow-lg p-8 text-center border-2 border-green-200/50 dark:border-green-700/50 relative overflow-hidden", whileHover: { scale: 1.05 }, variants: scaleIn, children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 bg-gradient-to-br from-green-400/20 to-emerald-400/20 opacity-0 hover:opacity-100 transition-opacity duration-300" }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-4xl font-black text-green-600 dark:text-green-400 mb-2", children: [practiceStats.averageTime, "m"] }), (0, jsx_runtime_1.jsx)("div", { className: "text-sm text-green-700 dark:text-green-300 font-bold", children: "Avg Time" })] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-gradient-to-br from-purple-50 via-purple-100 to-violet-100 dark:from-purple-900/30 dark:via-purple-800/40 dark:to-violet-800/50 rounded-2xl shadow-lg p-8 text-center border-2 border-purple-200/50 dark:border-purple-700/50 relative overflow-hidden", whileHover: { scale: 1.05 }, variants: scaleIn, children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 bg-gradient-to-br from-purple-400/20 to-violet-400/20 opacity-0 hover:opacity-100 transition-opacity duration-300" }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-4xl font-black text-purple-600 dark:text-purple-400 mb-2", children: [Math.round(progressPercentage), "%"] }), (0, jsx_runtime_1.jsx)("div", { className: "text-sm text-purple-700 dark:text-purple-300 font-bold", children: "Progress" }), (0, jsx_runtime_1.jsx)("div", { className: "mt-3 w-full bg-purple-200 dark:bg-purple-800 rounded-full h-2", children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "bg-gradient-to-r from-purple-500 to-violet-500 h-2 rounded-full", initial: { width: 0 }, animate: { width: "".concat(progressPercentage, "%") }, transition: { duration: 1, ease: "easeOut" } }) })] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-gradient-to-br from-orange-50 via-orange-100 to-amber-100 dark:from-orange-900/30 dark:via-orange-800/40 dark:to-amber-800/50 rounded-2xl shadow-lg p-8 text-center border-2 border-orange-200/50 dark:border-orange-700/50 relative overflow-hidden", whileHover: { scale: 1.05 }, variants: scaleIn, children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 bg-gradient-to-br from-orange-400/20 to-amber-400/20 opacity-0 hover:opacity-100 transition-opacity duration-300" }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "text-4xl font-black text-orange-600 dark:text-orange-400 mb-2", animate: isTimerRunning ? { scale: [1, 1.1, 1] } : {}, transition: { duration: 1, repeat: Number.POSITIVE_INFINITY }, children: isTimerRunning ? formatTime(timer) : "00:00" }), (0, jsx_runtime_1.jsx)("div", { className: "text-sm text-orange-700 dark:text-orange-300 font-bold", children: "Current" }), isTimerRunning && ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "mt-2 w-2 h-2 bg-red-500 rounded-full mx-auto", animate: { opacity: [1, 0, 1] }, transition: { duration: 1, repeat: Number.POSITIVE_INFINITY } }))] })] })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "bg-white/90 dark:bg-gray-800/90 backdrop-blur-sm rounded-2xl shadow-xl p-8 mb-8 border-2 border-gray-200/50 dark:border-gray-700/50", variants: fadeIn, children: (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-wrap gap-8 items-center", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center space-x-4", children: [(0, jsx_runtime_1.jsx)("label", { className: "text-sm font-bold text-gray-700 dark:text-gray-300", children: "Filter by Type:" }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.select, { value: filterType, onChange: function (e) { return setFilterType(e.target.value); }, className: "px-6 py-3 border-2 border-gray-300 dark:border-gray-600 rounded-xl bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:ring-4 focus:ring-blue-500/50 focus:border-blue-500 transition-all shadow-lg font-medium", whileFocus: { scale: 1.02 }, children: [(0, jsx_runtime_1.jsx)("option", { value: "all", children: "All Types" }), (0, jsx_runtime_1.jsx)("option", { value: "technical", children: "Technical" }), (0, jsx_runtime_1.jsx)("option", { value: "behavioral", children: "Behavioral" }), (0, jsx_runtime_1.jsx)("option", { value: "system-design", children: "System Design" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center space-x-4", children: [(0, jsx_runtime_1.jsx)("label", { className: "text-sm font-bold text-gray-700 dark:text-gray-300", children: "Filter by Difficulty:" }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.select, { value: filterDifficulty, onChange: function (e) { return setFilterDifficulty(e.target.value); }, className: "px-6 py-3 border-2 border-gray-300 dark:border-gray-600 rounded-xl bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:ring-4 focus:ring-blue-500/50 focus:border-blue-500 transition-all shadow-lg font-medium", whileFocus: { scale: 1.02 }, children: [(0, jsx_runtime_1.jsx)("option", { value: "all", children: "All Levels" }), (0, jsx_runtime_1.jsx)("option", { value: "Easy", children: "Easy" }), (0, jsx_runtime_1.jsx)("option", { value: "Medium", children: "Medium" }), (0, jsx_runtime_1.jsx)("option", { value: "Hard", children: "Hard" })] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "text-sm text-gray-600 dark:text-gray-400 bg-gradient-to-r from-gray-100 to-slate-100 dark:from-gray-700 dark:to-slate-700 px-6 py-3 rounded-xl font-bold shadow-lg border border-gray-200 dark:border-gray-600", whileHover: { scale: 1.05 }, children: [(0, jsx_runtime_1.jsx)("span", { className: "font-black text-blue-600 dark:text-blue-400", children: filteredQuestions.length }), " of", " ", (0, jsx_runtime_1.jsx)("span", { className: "font-black text-purple-600 dark:text-purple-400", children: allQuestions.length }), " questions"] })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "grid lg:grid-cols-2 gap-8 mb-12", children: (0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { children: filteredQuestions.map(function (question, index) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-white/95 dark:bg-gray-800/95 backdrop-blur-sm rounded-2xl shadow-xl hover:shadow-2xl transition-all duration-500 border-2 overflow-hidden flex flex-col h-full relative ".concat((activeSession === null || activeSession === void 0 ? void 0 : activeSession.questionId) === question.id + ? "border-blue-500 ring-4 ring-blue-200/50 dark:ring-blue-800/50 shadow-blue-200/50 dark:shadow-blue-800/50" + : recentlyCompleted === question.id + ? "border-green-500 ring-4 ring-green-200/50 dark:ring-green-800/50 shadow-green-200/50 dark:shadow-green-800/50" + : "border-gray-200/50 dark:border-gray-700/50 hover:border-gray-300/70 dark:hover:border-gray-600/70"), variants: fadeIn, initial: "hidden", animate: "visible", exit: "hidden", transition: { delay: index * 0.1 }, whileHover: { y: -8, scale: 1.02 }, layout: true, children: [(0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { children: recentlyCompleted === question.id && ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: { opacity: 0, scale: 0 }, animate: { opacity: 1, scale: 1 }, exit: { opacity: 0, scale: 0 }, className: "absolute inset-0 bg-gradient-to-br from-green-400/20 to-emerald-400/20 z-10 flex items-center justify-center rounded-2xl", children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { animate: { rotate: 360, scale: [1, 1.2, 1] }, transition: { duration: 1 }, className: "text-6xl", children: "\u2728" }) })) }), (0, jsx_runtime_1.jsxs)("div", { className: "p-8 pb-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-start mb-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center space-x-4", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "px-4 py-2 rounded-full text-sm font-bold shadow-lg ".concat(getTypeColor(question.type)), whileHover: { scale: 1.05 }, children: question.type === "system-design" + ? "System Design" + : question.type.charAt(0).toUpperCase() + question.type.slice(1) }), (0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { children: completedQuestions.has(question.id) && ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "flex items-center space-x-2 bg-gradient-to-r from-green-100 to-emerald-100 dark:from-green-900/40 dark:to-emerald-900/40 px-3 py-2 rounded-full border border-green-200 dark:border-green-700 shadow-lg", initial: { scale: 0, opacity: 0 }, animate: { scale: 1, opacity: 1 }, exit: { scale: 0, opacity: 0 }, whileHover: { scale: 1.1 }, children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "text-green-600 dark:text-green-400 text-lg", animate: { rotate: [0, 360] }, transition: { duration: 0.5 }, children: "\u2713" }), (0, jsx_runtime_1.jsx)("span", { className: "text-green-700 dark:text-green-300 text-xs font-bold", children: "Completed" })] })) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center space-x-3", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "px-4 py-2 rounded-full text-xs font-black shadow-lg ".concat(getDifficultyColor(question.difficulty)), whileHover: { scale: 1.05 }, children: question.difficulty }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "text-xs text-gray-500 dark:text-gray-400 bg-gradient-to-r from-gray-100 to-slate-100 dark:from-gray-700 dark:to-slate-700 px-3 py-2 rounded-full font-bold shadow-lg border border-gray-200 dark:border-gray-600", whileHover: { scale: 1.05 }, children: ["~", question.estimatedTime, "min"] })] })] }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-black mb-6 text-gray-900 dark:text-white leading-tight", children: question.question }), question.framework && ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "mb-6 p-4 bg-gradient-to-r from-blue-50 via-indigo-50 to-purple-50 dark:from-blue-900/30 dark:via-indigo-900/30 dark:to-purple-900/30 rounded-xl border-2 border-blue-200/50 dark:border-blue-700/50 shadow-lg", whileHover: { scale: 1.02 }, children: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center space-x-3 -mb-3", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "text-blue-600 dark:text-blue-400 text-xl -mt-5", animate: { rotate: [0, 10, -10, 0] }, transition: { duration: 2, repeat: Number.POSITIVE_INFINITY }, children: "\uD83D\uDCA1" }), (0, jsx_runtime_1.jsxs)("p", { className: "text-sm text-blue-700 dark:text-blue-300 font-bold", children: ["Framework: ", question.framework] })] }) })), question.category && ((0, jsx_runtime_1.jsxs)("div", { className: "mb-6 flex items-center space-x-3", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-gray-400 text-lg", children: "\uD83D\uDCC2" }), (0, jsx_runtime_1.jsx)("span", { className: "text-sm text-gray-600 dark:text-gray-400 font-bold bg-gray-100 dark:bg-gray-700 px-3 py-1 rounded-full", children: question.category })] }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "px-8 pb-4 flex-1", children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.button, { onClick: function () { return toggleHints(question.id); }, className: "flex items-center space-x-3 text-sm text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200 transition-colors group bg-gray-50 dark:bg-gray-700/50 px-4 py-3 rounded-xl hover:bg-gray-100 dark:hover:bg-gray-600/50 w-full justify-between shadow-lg border border-gray-200 dark:border-gray-600", whileHover: { scale: 1.02 }, whileTap: { scale: 0.98 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center space-x-3", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "text-lg", animate: { rotate: showHints.has(question.id) ? 90 : 0 }, transition: { duration: 0.3 }, children: showHints.has(question.id) ? "🔽" : "▶️" }), (0, jsx_runtime_1.jsx)("span", { className: "font-bold", children: showHints.has(question.id) ? "Hide Hints" : "Show Hints" })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "text-xs bg-gradient-to-r from-blue-100 to-purple-100 dark:from-blue-900/40 dark:to-purple-900/40 text-blue-700 dark:text-blue-300 px-3 py-1 rounded-full font-bold border border-blue-200 dark:border-blue-700", whileHover: { scale: 1.1 }, children: question.hints.length })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { children: showHints.has(question.id) && ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "mt-6 bg-gradient-to-br from-gray-50 to-slate-50 dark:from-gray-700/50 dark:to-slate-700/50 rounded-xl p-6 border-2 border-gray-200/50 dark:border-gray-600/50 shadow-lg backdrop-blur-sm", initial: { opacity: 0, height: 0, y: -20 }, animate: { opacity: 1, height: "auto", y: 0 }, exit: { opacity: 0, height: 0, y: -20 }, transition: { duration: 0.3 }, children: [(0, jsx_runtime_1.jsxs)("h4", { className: "font-black text-gray-900 dark:text-white mb-4 flex items-center space-x-3", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { animate: { rotate: [0, 10, -10, 0] }, transition: { duration: 2, repeat: Number.POSITIVE_INFINITY }, children: "\uD83D\uDCA1" }), (0, jsx_runtime_1.jsx)("span", { children: "Helpful Hints:" })] }), (0, jsx_runtime_1.jsx)("ul", { className: "space-y-4", children: question.hints.map(function (hint, i) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.li, { className: "text-sm text-gray-700 dark:text-gray-300 flex items-start space-x-4", initial: { opacity: 0, x: -20 }, animate: { opacity: 1, x: 0 }, transition: { delay: i * 0.1 }, children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "text-blue-500 font-black text-xs bg-gradient-to-r from-blue-100 to-cyan-100 dark:from-blue-900/40 dark:to-cyan-900/40 w-6 h-6 rounded-full flex items-center justify-center flex-shrink-0 border border-blue-200 dark:border-blue-700 shadow-lg", whileHover: { scale: 1.2, rotate: 360 }, transition: { duration: 0.3 }, children: i + 1 }), (0, jsx_runtime_1.jsx)("span", { className: "leading-relaxed font-medium", children: hint })] }, i)); }) })] })) }), question.links && question.links.length > 0 && ((0, jsx_runtime_1.jsxs)("div", { className: "mt-6", children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.button, { onClick: function () { return toggleResources(question.id); }, className: "flex items-center space-x-3 text-sm text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200 transition-colors group bg-gradient-to-r from-indigo-50 via-purple-50 to-pink-50 dark:from-indigo-900/30 dark:via-purple-900/30 dark:to-pink-900/30 px-4 py-3 rounded-xl hover:from-indigo-100 hover:via-purple-100 hover:to-pink-100 dark:hover:from-indigo-800/40 dark:hover:via-purple-800/40 dark:hover:to-pink-800/40 w-full justify-between shadow-lg border-2 border-indigo-200/50 dark:border-indigo-700/50", whileHover: { scale: 1.02 }, whileTap: { scale: 0.98 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center space-x-3", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "text-lg", animate: { rotate: showResources.has(question.id) ? 90 : 0 }, transition: { duration: 0.3 }, children: showResources.has(question.id) ? "🔽" : "▶️" }), (0, jsx_runtime_1.jsx)("span", { className: "font-bold", children: showResources.has(question.id) ? "Hide Resources" : "Show Resources" })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "text-xs bg-gradient-to-r from-indigo-100 to-purple-100 dark:from-indigo-900/40 dark:to-purple-900/40 text-indigo-700 dark:text-indigo-300 px-3 py-1 rounded-full font-bold border border-indigo-200 dark:border-indigo-700", whileHover: { scale: 1.1 }, children: question.links.length })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { children: showResources.has(question.id) && ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "mt-4 bg-gradient-to-br from-indigo-50 via-purple-50 to-pink-50 dark:from-indigo-900/30 dark:via-purple-900/30 dark:to-pink-900/30 rounded-xl p-6 border-2 border-indigo-200/50 dark:border-indigo-700/50 shadow-lg backdrop-blur-sm", initial: { opacity: 0, height: 0, y: -20 }, animate: { opacity: 1, height: "auto", y: 0 }, exit: { opacity: 0, height: 0, y: -20 }, transition: { duration: 0.3 }, children: [(0, jsx_runtime_1.jsxs)("h4", { className: "font-black text-gray-900 dark:text-white mb-4 flex items-center space-x-3", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { animate: { scale: [1, 1.1, 1] }, transition: { duration: 2, repeat: Number.POSITIVE_INFINITY }, children: "\uD83D\uDD17" }), (0, jsx_runtime_1.jsx)("span", { children: "Helpful Resources:" })] }), (0, jsx_runtime_1.jsx)("div", { className: "grid gap-3", children: question.links.map(function (link, i) { + var getLinkTypeIcon = function (type) { + switch (type) { + case "documentation": + return "📚"; + case "tutorial": + return "🎓"; + case "example": + return "💡"; + case "reference": + return "📖"; + case "tool": + return "🛠️"; + default: + return "🔗"; + } + }; + var getLinkTypeColor = function (type) { + switch (type) { + case "documentation": + return "from-blue-100 to-cyan-100 dark:from-blue-900/40 dark:to-cyan-900/40 text-blue-700 dark:text-blue-300 border-blue-200 dark:border-blue-700"; + case "tutorial": + return "from-green-100 to-emerald-100 dark:from-green-900/40 dark:to-emerald-900/40 text-green-700 dark:text-green-300 border-green-200 dark:border-green-700"; + case "example": + return "from-yellow-100 to-amber-100 dark:from-yellow-900/40 dark:to-amber-900/40 text-yellow-700 dark:text-yellow-300 border-yellow-200 dark:border-yellow-700"; + case "reference": + return "from-purple-100 to-violet-100 dark:from-purple-900/40 dark:to-violet-900/40 text-purple-700 dark:text-purple-300 border-purple-200 dark:border-purple-700"; + case "tool": + return "from-orange-100 to-red-100 dark:from-orange-900/40 dark:to-red-900/40 text-orange-700 dark:text-orange-300 border-orange-200 dark:border-orange-700"; + default: + return "from-gray-100 to-slate-100 dark:from-gray-700 dark:to-slate-700 text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-600"; + } + }; + return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.a, { href: link.url, target: "_blank", rel: "noopener noreferrer", className: "flex items-center space-x-4 p-4 bg-gradient-to-r ".concat(getLinkTypeColor(link.type), " rounded-xl border shadow-lg hover:shadow-xl transition-all duration-300 group practice-tab-link"), initial: { opacity: 0, x: -20 }, animate: { opacity: 1, x: 0 }, transition: { delay: i * 0.1 }, whileHover: { scale: 1.02, x: 5 }, whileTap: { scale: 0.98 }, children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "text-2xl flex-shrink-0", whileHover: { scale: 1.2, rotate: 5 }, transition: { duration: 0.2 }, children: getLinkTypeIcon(link.type) }), (0, jsx_runtime_1.jsxs)("div", { className: "flex-1 min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "font-bold text-sm leading-tight group-hover:underline", children: link.title }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs opacity-75 mt-1 capitalize font-medium", children: link.type.replace("-", " ") })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "text-lg opacity-60 group-hover:opacity-100 flex-shrink-0", animate: { x: [0, 3, 0] }, transition: { duration: 1.5, repeat: Number.POSITIVE_INFINITY }, children: "\u2192" })] }, i)); + }) })] })) })] }))] }), (0, jsx_runtime_1.jsx)("div", { className: "px-8 pb-8 mt-auto", children: (0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { mode: "wait", children: (activeSession === null || activeSession === void 0 ? void 0 : activeSession.questionId) === question.id ? ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "space-y-4", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -20 }, children: [(0, jsx_runtime_1.jsx)("div", { className: "bg-gradient-to-r from-blue-50 to-indigo-50 dark:from-blue-900/30 dark:to-indigo-900/30 rounded-xl p-4 border-2 border-blue-200/50 dark:border-blue-700/50 shadow-lg", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between", children: [(0, jsx_runtime_1.jsxs)("span", { className: "text-sm font-bold text-blue-700 dark:text-blue-300 flex items-center space-x-2", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { animate: { scale: [1, 1.2, 1] }, transition: { duration: 1, repeat: Number.POSITIVE_INFINITY }, children: "\uD83C\uDFAF" }), (0, jsx_runtime_1.jsx)("span", { children: "Session Active" })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "text-2xl font-black text-blue-600 dark:text-blue-400", animate: { scale: [1, 1.1, 1] }, transition: { duration: 1, repeat: Number.POSITIVE_INFINITY }, children: formatTime(timer) })] }) }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.button, { onClick: completePractice, className: "w-full bg-gradient-to-r from-green-600 via-emerald-600 to-green-700 text-white py-4 rounded-xl hover:from-green-700 hover:via-emerald-700 hover:to-green-800 transition-all font-black flex items-center justify-center space-x-3 shadow-2xl hover:shadow-green-500/25 border-2 border-green-500/20", whileHover: { scale: 1.02, y: -2 }, whileTap: { scale: 0.98 }, children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { animate: { rotate: [0, 360] }, transition: { duration: 2, repeat: Number.POSITIVE_INFINITY }, children: "\u2713" }), (0, jsx_runtime_1.jsx)("span", { children: "Complete Practice" })] })] })) : ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.button, { onClick: function () { return startPractice(question); }, disabled: !!activeSession, className: "w-full py-4 rounded-xl transition-all font-black flex items-center justify-center space-x-3 shadow-2xl border-2 ".concat(completedQuestions.has(question.id) + ? "bg-gradient-to-r from-gray-200 to-slate-200 dark:from-gray-600 dark:to-slate-600 text-gray-600 dark:text-gray-300 cursor-default border-gray-300 dark:border-gray-500" + : activeSession + ? "bg-gradient-to-r from-gray-300 to-slate-300 dark:from-gray-700 dark:to-slate-700 text-gray-500 dark:text-gray-400 cursor-not-allowed border-gray-400 dark:border-gray-600" + : "bg-gradient-to-r from-blue-600 via-indigo-600 to-purple-600 text-white hover:from-blue-700 hover:via-indigo-700 hover:to-purple-700 hover:shadow-blue-500/25 border-blue-500/20"), whileHover: !completedQuestions.has(question.id) && !activeSession ? { scale: 1.02, y: -2 } : {}, whileTap: !completedQuestions.has(question.id) && !activeSession ? { scale: 0.98 } : {}, initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -20 }, children: completedQuestions.has(question.id) ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { animate: { rotate: [0, 360] }, transition: { duration: 2, repeat: Number.POSITIVE_INFINITY }, children: "\u2713" }), (0, jsx_runtime_1.jsx)("span", { children: "Completed" })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { animate: !activeSession ? { scale: [1, 1.2, 1] } : {}, transition: { duration: 2, repeat: Number.POSITIVE_INFINITY }, children: "\uD83D\uDE80" }), (0, jsx_runtime_1.jsx)("span", { children: "Start Practice" })] })) })) }) })] }, question.id)); }) }) }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-gradient-to-br from-gray-50 via-slate-50 to-gray-100 dark:from-gray-800 dark:via-slate-800 dark:to-gray-700 rounded-3xl p-10 border-2 border-gray-200/50 dark:border-gray-600/50 shadow-2xl backdrop-blur-sm", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.h3, { className: "text-3xl font-black mb-10 text-gray-900 dark:text-white text-center", initial: { scale: 0.9 }, animate: { scale: 1 }, transition: { duration: 0.5 }, children: "\uD83C\uDFAF Practice Features & Tools" }), (0, jsx_runtime_1.jsx)("div", { className: "grid md:grid-cols-2 lg:grid-cols-4 gap-8", children: [ + { + icon: "⏱️", + title: "Live Timer", + desc: "Real-time countdown with session tracking to simulate interview pressure", + color: "blue", + }, + { + icon: "📊", + title: "Progress Analytics", + desc: "Track completion rates and performance trends over time", + color: "green", + }, + { + icon: "🎯", + title: "Smart Filtering", + desc: "Filter by type, difficulty, and completion status for focused practice", + color: "purple", + }, + { + icon: "💡", + title: "Guided Hints", + desc: "STAR method templates and solution frameworks for better answers", + color: "orange", + }, + ].map(function (feature, index) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "text-center p-8 bg-white/80 dark:bg-gray-800/80 backdrop-blur-sm rounded-2xl shadow-xl border-2 border-gray-200/50 dark:border-gray-700/50 hover:shadow-2xl transition-all duration-500 group", whileHover: { scale: 1.05, y: -5 }, variants: scaleIn, custom: index, children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "w-20 h-20 bg-gradient-to-br from-".concat(feature.color, "-100 to-").concat(feature.color, "-200 dark:from-").concat(feature.color, "-900/40 dark:to-").concat(feature.color, "-800/50 rounded-2xl flex items-center justify-center mx-auto mb-6 shadow-lg border border-").concat(feature.color, "-200 dark:border-").concat(feature.color, "-700 group-hover:scale-110 transition-transform duration-300"), whileHover: { rotate: [0, -10, 10, 0] }, transition: { duration: 0.5 }, children: (0, jsx_runtime_1.jsx)("span", { className: "text-4xl", children: feature.icon }) }), (0, jsx_runtime_1.jsx)("h4", { className: "font-black text-gray-900 dark:text-white mb-3 text-lg", children: feature.title }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 text-sm leading-relaxed font-medium", children: feature.desc })] }, index)); }) })] })] })); +}; +exports.default = PracticeTab; diff --git a/src/pages/interview-prep/TechnicalTab.js b/src/pages/interview-prep/TechnicalTab.js new file mode 100644 index 00000000..f92919c1 --- /dev/null +++ b/src/pages/interview-prep/TechnicalTab.js @@ -0,0 +1,47 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importDefault(require("react")); +var framer_motion_1 = require("framer-motion"); +var Link_1 = __importDefault(require("@docusaurus/Link")); +var fadeIn = { hidden: { opacity: 0, y: 20 }, visible: { opacity: 1, y: 0, transition: { duration: 0.6 } } }; +var staggerContainer = { hidden: {}, visible: { transition: { staggerChildren: 0.2 } } }; +var TechnicalTab = function (_a) { + var _b = _a.technicalResources, technicalResources = _b === void 0 ? [] : _b, _c = _a.practicePlatforms, practicePlatforms = _c === void 0 ? [] : _c, _d = _a.expandedCategories, expandedCategories = _d === void 0 ? [] : _d, toggleCategory = _a.toggleCategory; + return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { initial: "hidden", animate: "visible", variants: staggerContainer, children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "mb-12", variants: fadeIn, children: (0, jsx_runtime_1.jsxs)("div", { className: "bg-gradient-to-br from-blue-50 via-indigo-50 to-purple-50 dark:from-blue-900/20 dark:via-indigo-900/20 dark:to-purple-900/20 rounded-2xl p-8 border border-blue-100 dark:border-blue-800 technical-outer", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-center mb-8", children: [(0, jsx_runtime_1.jsxs)("div", { className: "inline-flex items-center px-4 py-2 bg-blue-100 dark:bg-blue-900/30 rounded-full text-blue-600 dark:text-blue-400 text-sm font-medium mb-4", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-blue-500 rounded-full mr-2 animate-pulse" }), "Technical Interview Mastery"] }), (0, jsx_runtime_1.jsx)("h2", { className: "text-4xl font-bold mb-6 text-gray-900 dark:text-white", children: "Master Technical Interviews" }), (0, jsx_runtime_1.jsx)("p", { className: "text-lg text-gray-600 dark:text-gray-300", children: "Technical interviews are the cornerstone of software engineering hiring. They evaluate your problem-solving abilities, coding skills, and understanding of computer science fundamentals. Success requires consistent practice, pattern recognition, and the ability to communicate your thought process clearly." })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid md:grid-cols-3 gap-6 mb-8", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-white dark:bg-gray-800 rounded-lg p-6 border border-gray-200 dark:border-gray-700 technical-inner", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-12 h-12 bg-blue-100 dark:bg-blue-900/30 rounded-lg flex items-center justify-center mb-4", children: (0, jsx_runtime_1.jsx)("span", { className: "text-2xl", children: "\uD83E\uDDE0" }) }), (0, jsx_runtime_1.jsx)("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white mb-2", children: "Problem Solving" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300", children: "Develop systematic approaches to break down complex problems into manageable components." })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white dark:bg-gray-800 rounded-lg p-6 border border-gray-200 dark:border-gray-700 technical-inner", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-12 h-12 bg-green-100 dark:bg-green-900/30 rounded-lg flex items-center justify-center mb-4", children: (0, jsx_runtime_1.jsx)("span", { className: "text-2xl", children: "\u26A1" }) }), (0, jsx_runtime_1.jsx)("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white mb-2", children: "Pattern Recognition" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300", children: "Learn to identify common patterns and apply proven techniques to solve similar problems efficiently." })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white dark:bg-gray-800 rounded-lg p-6 border border-gray-200 dark:border-gray-700 technical-inner", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-12 h-12 bg-purple-100 dark:bg-purple-900/30 rounded-lg flex items-center justify-center mb-4", children: (0, jsx_runtime_1.jsx)("span", { className: "text-2xl", children: "\uD83D\uDCAC" }) }), (0, jsx_runtime_1.jsx)("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white mb-2", children: "Communication" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300", children: "Master the art of explaining your approach, discussing trade-offs, and collaborating with interviewers." })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "bg-gradient-to-r from-yellow-100 to-orange-100 dark:from-yellow-900/30 dark:to-orange-900/30 rounded-lg p-6 border border-yellow-200 dark:border-yellow-700 technical-inner-success", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-start space-x-3", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-2xl", children: "\uD83D\uDCA1" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "font-semibold text-gray-900 dark:text-white mb-2", children: "Success Strategy" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-700 dark:text-gray-300", children: "Focus on understanding patterns rather than memorizing solutions. Practice explaining your thought process out loud, and always consider time/space complexity. Consistent daily practice for 2-3 months typically yields the best results." })] })] }) })] }) }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "mb-16", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-2xl font-bold mb-8 text-gray-900 dark:text-white text-center", children: "\uD83D\uDCDA Question Bank by Category" }), (0, jsx_runtime_1.jsx)("div", { className: "space-y-8", children: technicalResources.map(function (category, categoryIndex) { + var headerColors = [ + { gradient: "from-purple-500 to-pink-400", border: "border-purple-500 dark:border-purple-400" }, + { gradient: "from-blue-500 to-sky-400", border: "border-blue-500 dark:border-blue-400" }, + { gradient: "from-green-500 to-green-400", border: "border-green-500 dark:border-green-400" }, + { gradient: "from-orange-500 to-red-500", border: "border-orange-500 dark:border-orange-400" }, + { gradient: "from-pink-500 to-yellow-500", border: "border-pink-500 dark:border-pink-400" }, + { gradient: "from-cyan-500 to-blue-500", border: "border-cyan-500 dark:border-cyan-400" }, + ]; + var _a = headerColors[categoryIndex % headerColors.length], gradient = _a.gradient, border = _a.border; + var subtopicBorderClasses = [ + "question-bank-subtopic-purple", + "question-bank-subtopic-blue", + "question-bank-subtopic-green", + "question-bank-subtopic-orange", + "question-bank-subtopic-pink", + "question-bank-subtopic-cyan" + ]; + return ((0, jsx_runtime_1.jsxs)("div", { className: "bg-white dark:bg-gray-800 rounded-2xl shadow-lg overflow-hidden", children: [(0, jsx_runtime_1.jsx)("button", { onClick: function () { return toggleCategory(categoryIndex); }, className: "w-full bg-gradient-to-r ".concat(gradient, " p-6 text-left hover:opacity-90 transition-opacity"), children: (0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-center", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-2xl font-bold mb-2 text-white", children: category.category }), (0, jsx_runtime_1.jsx)("p", { className: "text-blue-100", children: category.description }), (0, jsx_runtime_1.jsx)("span", { className: "inline-block bg-white/20 text-sm font-medium px-3 py-1 rounded-full hover:bg-white/30 transition", children: (0, jsx_runtime_1.jsx)(Link_1.default, { to: '/docs/category/technical', className: "explore-btn", children: "Explore \u2192" }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col items-end text-right", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-3xl font-bold text-white", children: category.totalProblems }), (0, jsx_runtime_1.jsx)("div", { className: "text-sm text-blue-100", children: "Total Problems" }), (0, jsx_runtime_1.jsx)("span", { className: "text-white text-2xl transform transition-transform duration-200 origin-center", style: { + transform: expandedCategories[categoryIndex] + ? "rotate(180deg)" + : "rotate(0deg)", + }, children: "\u25BC" })] })] }) }), expandedCategories[categoryIndex] && ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "p-6", initial: { opacity: 0, height: 0 }, animate: { opacity: 1, height: "auto" }, exit: { opacity: 0, height: 0 }, transition: { duration: 0.3 }, children: (0, jsx_runtime_1.jsx)("div", { className: "grid md:grid-cols-2 lg:grid-cols-3 gap-6 ", children: category.subcategories.map(function (subcategory, subIndex) { return ((0, jsx_runtime_1.jsxs)("div", { className: "border rounded-xl p-5 hover:shadow-md transition-all duration-300 ".concat(border, " ").concat(subtopicBorderClasses[categoryIndex % subtopicBorderClasses.length], " hover:border-opacity-80 technical-inner"), children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-start mb-4", children: [(0, jsx_runtime_1.jsx)("h5", { className: "text-lg font-semibold text-gray-900 dark:text-white", children: subcategory.title }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center space-x-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "px-2 py-1 rounded-full text-xs font-medium ".concat(subcategory.difficulty === "Easy" + ? "bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200" + : subcategory.difficulty === "Medium" + ? "bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200" + : "bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200"), children: subcategory.difficulty }), (0, jsx_runtime_1.jsx)("span", { className: "bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 px-2 py-1 rounded-full text-xs", children: subcategory.problems })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "mb-4", children: [(0, jsx_runtime_1.jsx)("h6", { className: "text-sm font-medium text-gray-700 dark:text-gray-300 mb-2", children: "Key Topics:" }), (0, jsx_runtime_1.jsx)("div", { className: "flex flex-wrap gap-1", children: subcategory.subtopics.map(function (topic, topicIndex) { return ((0, jsx_runtime_1.jsx)("span", { className: "bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-300 px-2 py-1 rounded text-xs", children: topic }, topicIndex)); }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "space-y-2", children: [(0, jsx_runtime_1.jsx)("h6", { className: "text-sm font-medium text-gray-700 dark:text-gray-300", children: "Practice Resources:" }), subcategory.resources.map(function (resource, resourceIndex) { return ((0, jsx_runtime_1.jsxs)("a", { href: resource.url, target: "_blank", rel: "noopener noreferrer", className: "block text-sm text-blue-600 dark:text-blue-300 hover:text-blue-800 dark:hover:text-blue-300 hover:underline", children: ["\uD83D\uDD17 ", resource.name] }, resourceIndex)); })] })] }, subIndex)); }) }) }))] }, categoryIndex)); + }) })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "mb-16", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-2xl font-bold mb-8 text-gray-900 dark:text-white text-center", children: "\uD83C\uDFAF Recommended Practice Platforms" }), (0, jsx_runtime_1.jsx)("div", { className: "grid md:grid-cols-3 gap-6 items-stretch", children: practicePlatforms.map(function (platform, index) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-white dark:bg-gray-800 rounded-xl shadow-lg p-6 hover:shadow-xl transition-all duration-300 border border-gray-200 dark:border-gray-700 flex flex-col", variants: fadeIn, children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-center mb-4", children: [(0, jsx_runtime_1.jsx)("h4", { className: "text-xl font-bold text-gray-900 dark:text-white mb-2", children: platform.name }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 text-sm mb-3", children: platform.description }), (0, jsx_runtime_1.jsx)("div", { className: "text-2xl font-bold text-blue-600 dark:text-blue-400", children: platform.problems }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs text-gray-500 dark:text-gray-400", children: "Problems Available" })] }), (0, jsx_runtime_1.jsx)("div", { className: "mb-4", children: (0, jsx_runtime_1.jsx)("div", { className: "flex justify-center space-x-2 mb-3", children: platform.difficulty.map(function (diff, diffIndex) { return ((0, jsx_runtime_1.jsx)("span", { className: "px-2 py-1 rounded-full text-xs font-medium ".concat(diff === "Easy" + ? "bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200" + : diff === "Medium" + ? "bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200" + : "bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200"), children: diff }, diffIndex)); }) }) }), (0, jsx_runtime_1.jsxs)("div", { className: "mb-6", children: [(0, jsx_runtime_1.jsx)("h5", { className: "text-sm font-medium text-gray-700 dark:text-gray-300 mb-2", children: "Key Features:" }), (0, jsx_runtime_1.jsx)("ul", { className: "space-y-1", children: platform.features.map(function (feature, featureIndex) { return ((0, jsx_runtime_1.jsxs)("li", { className: "text-xs text-gray-600 dark:text-gray-400 flex items-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-1 h-1 bg-blue-500 rounded-full mr-2" }), feature] }, featureIndex)); }) })] }), (0, jsx_runtime_1.jsx)("div", { className: "mt-auto", children: (0, jsx_runtime_1.jsx)("a", { href: platform.url, target: "_blank", rel: "noopener noreferrer", className: "technical-btn w-full bg-blue-600 text-white py-2 px-4 rounded-lg hover:bg-blue-700 transition-colors text-center block font-medium", children: "Start Practicing" }) })] }, index)); }) })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-gradient-to-r from-blue-50 to-purple-50 dark:from-gray-800 dark:to-gray-700 rounded-2xl p-8", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-2xl font-bold mb-6 text-gray-900 dark:text-white text-center", children: "\uD83D\uDCA1 Pro Tips for Technical Interview Success" }), (0, jsx_runtime_1.jsxs)("div", { className: "grid md:grid-cols-2 gap-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "space-y-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-start space-x-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-6 h-6 bg-blue-500 rounded-full flex items-center justify-center flex-shrink-0 mt-1", children: (0, jsx_runtime_1.jsx)("span", { className: "text-white text-xs font-bold", children: "1" }) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "font-semibold text-gray-900 dark:text-white", children: "Start with Easy Problems" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300", children: "Build confidence and understand patterns before tackling harder challenges." })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-start space-x-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-6 h-6 bg-blue-500 rounded-full flex items-center justify-center flex-shrink-0 mt-1", children: (0, jsx_runtime_1.jsx)("span", { className: "text-white text-xs font-bold", children: "2" }) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "font-semibold text-gray-900 dark:text-white", children: "Practice Consistently" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300", children: "Solve 1-2 problems daily rather than cramming before interviews." })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-start space-x-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-6 h-6 bg-blue-500 rounded-full flex items-center justify-center flex-shrink-0 mt-1", children: (0, jsx_runtime_1.jsx)("span", { className: "text-white text-xs font-bold", children: "3" }) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "font-semibold text-gray-900 dark:text-white", children: "Focus on Patterns" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300", children: "Learn common problem-solving patterns like two pointers, sliding window, etc." })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "space-y-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-start space-x-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-6 h-6 bg-purple-500 rounded-full flex items-center justify-center flex-shrink-0 mt-1", children: (0, jsx_runtime_1.jsx)("span", { className: "text-white text-xs font-bold", children: "4" }) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "font-semibold text-gray-900 dark:text-white", children: "Time Yourself" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300", children: "Practice under time constraints to simulate real interview conditions." })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-start space-x-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-6 h-6 bg-purple-500 rounded-full flex items-center justify-center flex-shrink-0 mt-1", children: (0, jsx_runtime_1.jsx)("span", { className: "text-white text-xs font-bold", children: "5" }) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "font-semibold text-gray-900 dark:text-white", children: "Explain Your Thinking" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300", children: "Practice verbalizing your approach and reasoning process." })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-start space-x-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-6 h-6 bg-purple-500 rounded-full flex items-center justify-center flex-shrink-0 mt-1", children: (0, jsx_runtime_1.jsx)("span", { className: "text-white text-xs font-bold", children: "6" }) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "font-semibold text-gray-900 dark:text-white", children: "Review Solutions" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300", children: "Study optimal solutions and alternative approaches after solving problems." })] })] })] })] })] })] })); +}; +exports.default = TechnicalTab; diff --git a/src/pages/interview-prep/index.js b/src/pages/interview-prep/index.js new file mode 100644 index 00000000..707cc110 --- /dev/null +++ b/src/pages/interview-prep/index.js @@ -0,0 +1,978 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importDefault(require("react")); +var react_2 = require("react"); +var Layout_1 = __importDefault(require("@theme/Layout")); +var Head_1 = __importDefault(require("@docusaurus/Head")); +var framer_motion_1 = require("framer-motion"); +var Link_1 = __importDefault(require("@docusaurus/Link")); +var OverviewTab_1 = __importDefault(require("./OverviewTab")); +var TechnicalTab_1 = __importDefault(require("./TechnicalTab")); +var BehavioralTab_1 = __importDefault(require("./BehavioralTab")); +var CompaniesTab_1 = __importDefault(require("./CompaniesTab")); +var PracticeTab_1 = __importDefault(require("./PracticeTab")); +// Animation variants +var fadeIn = { + hidden: { opacity: 0, y: 20 }, + visible: { opacity: 1, y: 0, transition: { duration: 0.6 } }, +}; +var staggerContainer = { + hidden: {}, + visible: { + transition: { + staggerChildren: 0.2, + }, + }, +}; +var InterviewPrepPage = function () { + var _a = (0, react_2.useState)("overview"), activeTab = _a[0], setActiveTab = _a[1]; + var _b = (0, react_2.useState)({}), expandedCategories = _b[0], setExpandedCategories = _b[1]; + var toggleCategory = function (categoryIndex) { + setExpandedCategories(function (prev) { + var _a; + return (__assign(__assign({}, prev), (_a = {}, _a[categoryIndex] = !prev[categoryIndex], _a))); + }); + }; + var _c = (0, react_2.useState)({}), showTips = _c[0], setShowTips = _c[1]; + var _d = (0, react_2.useState)({}), showQuestions = _d[0], setShowQuestions = _d[1]; + var toggleTips = function (index) { + setShowTips(function (prev) { + var _a; + return (__assign(__assign({}, prev), (_a = {}, _a[index] = !prev[index], _a))); + }); + }; + var toggleQuestions = function (index) { + setShowQuestions(function (prev) { + var _a; + return (__assign(__assign({}, prev), (_a = {}, _a[index] = !prev[index], _a))); + }); + }; + var behavioralQuestions = [ + { + category: "Leadership", + questions: [ + "Tell me about a time you led a team through a difficult project", + "Describe a situation where you had to influence others without authority", + "How do you handle team conflicts?", + ], + }, + { + category: "Problem Solving", + questions: [ + "Describe the most challenging technical problem you've solved", + "Tell me about a time you failed and what you learned", + "How do you approach debugging complex issues?", + ], + }, + { + category: "Communication", + questions: [ + "Explain a complex technical concept to a non-technical person", + "Tell me about a time you had to give difficult feedback", + "How do you handle disagreements with stakeholders?", + ], + }, + { + category: "Growth & Learning", + questions: [ + "How do you stay updated with new technologies?", + "Tell me about a time you had to learn something completely new", + "What's the most important thing you've learned in your career?", + ], + }, + ]; + var companyTips = [ + { + company: "Google", + logo: "/img/google.png", + focus: "Googleyness & Leadership", + industry: "Technology", + roleTypes: ["Software Engineer", "Product Manager", "Data Scientist", "Site Reliability Engineer"], + focusAreas: ["Scalability", "Problem-Solving", "Innovation", "Technical Excellence"], + tips: [ + "Focus on scalability and efficiency in your solutions", + "Demonstrate analytical thinking with data-driven approaches", + "Show passion for technology and continuous learning", + "Prepare for system design questions with real-world examples", + "Practice coding problems on platforms like LeetCode (focus on medium-hard)", + "Understand Google's products and their technical challenges", + "Be ready to discuss trade-offs in your technical decisions", + "Show how you've handled ambiguous problems", + ], + commonQuestions: [ + { + question: "How would you design Google Search?", + answer: "Start with requirements gathering (billions of queries, sub-second response), then discuss web crawling architecture, inverted indexing, ranking algorithms like PageRank, distributed systems with load balancing, caching strategies at multiple levels, and real-time updates handling. Consider data freshness, personalization, and spam detection.", + category: "System Design", + }, + { + question: "Explain how you would handle billions of queries per day", + answer: "Implement horizontal scaling with load balancers, use CDNs for static content, implement multi-level caching (browser, CDN, application, database), database sharding and replication, microservices architecture, auto-scaling based on traffic patterns, and comprehensive monitoring with circuit breakers.", + category: "System Design", + }, + { + question: "What would you do if Gmail was slow?", + answer: "Systematic debugging approach: check monitoring dashboards, identify bottlenecks (database, network, application), analyze query performance, review caching hit rates, examine resource utilization, implement performance profiling, and deploy fixes like query optimization, caching improvements, or infrastructure scaling.", + category: "Problem Solving", + }, + { + question: "Tell me about a time you solved a complex technical problem", + answer: "Use STAR method: Situation (complex distributed system issue), Task (restore service and prevent recurrence), Action (systematic debugging, root cause analysis, implemented monitoring), Result (99.9% uptime improvement, prevented similar issues). Focus on technical depth and problem-solving methodology.", + category: "Behavioral", + }, + { + question: "How do you stay updated with technology trends?", + answer: "Demonstrate continuous learning: follow tech blogs, contribute to open source, attend conferences, experiment with new technologies, participate in tech communities, and apply learnings to solve real problems. Show specific examples.", + category: "Behavioral", + }, + ], + }, + { + company: "Amazon", + logo: "/img/amazon.png", + focus: "Leadership Principles", + industry: "E-commerce/Cloud", + roleTypes: ["Software Engineer", "Solutions Architect", "Product Manager", "DevOps Engineer"], + focusAreas: ["Leadership Principles", "Customer Obsession", "Ownership", "Bias for Action"], + tips: [ + "Master all 16 Leadership Principles with 2-3 specific examples each", + "Use STAR method for all behavioral questions", + "Focus on customer obsession in every answer", + "Demonstrate ownership mindset and long-term thinking", + "Prepare examples showing bias for action and delivering results", + "Show how you've simplified processes or invented solutions", + "Quantify your impact with specific metrics", + "Be ready to discuss failures and learnings", + ], + commonQuestions: [ + { + question: "Tell me about a time you disagreed with your manager", + answer: "Use 'Have Backbone; Disagree and Commit' principle. Situation: disagreement on technical approach. Task: present alternative solution. Action: prepared data-driven analysis, respectfully presented concerns, listened to feedback. Result: adopted hybrid approach that improved performance by 40%. Committed fully once decision was made.", + category: "Behavioral", + }, + { + question: "Describe a time you had to make a decision with incomplete information", + answer: "Demonstrate 'Bias for Action'. Situation: critical system outage with limited debugging info. Task: restore service quickly. Action: gathered available data, made calculated decision based on patterns, implemented fix with rollback plan. Result: restored service in 30 minutes, prevented $100K revenue loss.", + category: "Behavioral", + }, + { + question: "How do you handle tight deadlines?", + answer: "Show 'Deliver Results' and 'Ownership'. Situation: product launch deadline at risk. Task: deliver core features on time. Action: prioritized ruthlessly, communicated trade-offs to stakeholders, worked with team to optimize scope. Result: launched on time with 95% of planned features, customer satisfaction remained high.", + category: "Behavioral", + }, + { + question: "Design a system like Amazon's recommendation engine", + answer: "Requirements: real-time recommendations, handle millions of users, personalized results. Architecture: data ingestion pipeline, feature engineering, ML models (collaborative filtering, content-based, deep learning), real-time serving layer, A/B testing framework, feedback loop for continuous improvement.", + category: "System Design", + }, + { + question: "Tell me about a time you simplified a process", + answer: "Use 'Invent and Simplify'. Situation: complex deployment process taking 4 hours. Task: reduce deployment time and errors. Action: automated manual steps, created CI/CD pipeline, added automated testing. Result: reduced deployment time to 30 minutes, decreased errors by 80%.", + category: "Behavioral", + }, + ], + }, + { + company: "Meta (Facebook)", + logo: "/img/meta.png", + focus: "Move Fast & Impact", + industry: "Social Media/VR", + roleTypes: ["Software Engineer", "Product Manager", "Data Scientist", "Research Scientist"], + focusAreas: ["Scale", "Impact", "Execution", "People Connection"], + tips: [ + "Focus on massive scale and global impact", + "Demonstrate ability to move fast and iterate", + "Show examples of connecting people or communities", + "Prepare for questions about handling billions of users", + "Understand Meta's products and their technical challenges", + "Be ready to discuss privacy and safety considerations", + "Show data-driven decision making", + "Demonstrate growth mindset and learning from failures", + ], + commonQuestions: [ + { + question: "How would you design Facebook's News Feed?", + answer: "Requirements: personalized content, real-time updates, billions of users. Architecture: content ingestion, ranking algorithms (engagement prediction, relevance scoring), edge timeline generation, caching strategies, real-time updates with WebSockets, content moderation pipeline, and A/B testing framework.", + category: "System Design", + }, + { + question: "Tell me about a time you had to make a trade-off between speed and quality", + answer: "Situation: urgent security fix needed. Task: balance quick deployment with thorough testing. Action: implemented fix with comprehensive monitoring, deployed to small percentage first, gradually rolled out. Result: fixed security issue within 24 hours while maintaining system stability.", + category: "Behavioral", + }, + { + question: "How would you handle a feature that's negatively impacting user engagement?", + answer: "Data analysis approach: segment users, analyze metrics, identify root causes, A/B test solutions, gather qualitative feedback. Action: iterate quickly, measure impact, communicate with stakeholders. Focus on user value and long-term engagement over short-term metrics.", + category: "Product Sense", + }, + { + question: "Design a system to detect fake accounts", + answer: "Multi-layered approach: behavioral analysis (login patterns, friend requests), content analysis (spam detection), graph analysis (suspicious connection patterns), machine learning models, real-time scoring system, human review workflow, and continuous model improvement.", + category: "System Design", + }, + { + question: "Tell me about a time you influenced without authority", + answer: "Situation: cross-team project with conflicting priorities. Task: align teams on common goal. Action: built relationships, presented data showing mutual benefits, created shared success metrics. Result: successful project delivery, improved cross-team collaboration for future projects.", + category: "Behavioral", + }, + ], + }, + { + company: "Apple", + logo: "/img/apple.png", + focus: "Innovation & User Experience", + industry: "Consumer Electronics", + roleTypes: ["Software Engineer", "Hardware Engineer", "Product Manager", "Design Engineer"], + focusAreas: ["User Experience", "Innovation", "Quality", "Privacy"], + tips: [ + "Focus on user experience and design thinking", + "Demonstrate attention to detail and quality", + "Show passion for Apple products and ecosystem", + "Prepare examples of innovative solutions", + "Understand Apple's privacy-first approach", + "Be ready to discuss cross-functional collaboration", + "Show how you've delivered polished, user-friendly solutions", + "Demonstrate ability to work under high standards", + ], + commonQuestions: [ + { + question: "How would you improve Siri?", + answer: "Focus on user experience: better natural language understanding, contextual awareness, privacy-preserving personalization, faster response times, expanded capabilities, seamless device integration, and accessibility improvements. Balance innovation with Apple's privacy principles.", + category: "Product Design", + }, + { + question: "Tell me about a time you had to meet very high quality standards", + answer: "Situation: developing user-facing feature with strict quality requirements. Task: deliver bug-free, polished experience. Action: implemented comprehensive testing, code reviews, user testing, performance optimization. Result: zero critical bugs in production, positive user feedback.", + category: "Behavioral", + }, + { + question: "How would you design a privacy-focused messaging system?", + answer: "End-to-end encryption, on-device processing, minimal data collection, secure key exchange, forward secrecy, metadata protection, secure deletion, and transparent privacy controls. Balance security with user experience and performance.", + category: "System Design", + }, + { + question: "Describe a time you had to innovate under constraints", + answer: "Situation: limited resources for new feature. Task: deliver innovative solution within constraints. Action: creative problem-solving, leveraged existing technologies, focused on core user value. Result: delivered feature that exceeded expectations while staying within budget.", + category: "Behavioral", + }, + { + question: "How do you ensure your code is maintainable and scalable?", + answer: "Clean code principles, comprehensive documentation, modular architecture, automated testing, code reviews, performance monitoring, and following established patterns. Focus on long-term maintainability and team collaboration.", + category: "Technical", + }, + ], + }, + { + company: "Netflix", + logo: "/img/netflix.png", + focus: "Freedom & Responsibility", + industry: "Streaming/Entertainment", + roleTypes: ["Software Engineer", "Data Engineer", "Product Manager", "ML Engineer"], + focusAreas: ["Scale", "Personalization", "Reliability", "Data-Driven"], + tips: [ + "Understand Netflix's culture of freedom and responsibility", + "Focus on high-performance culture and results", + "Demonstrate ability to work independently", + "Show examples of data-driven decision making", + "Prepare for questions about streaming at scale", + "Understand personalization and recommendation systems", + "Be ready to discuss A/B testing and experimentation", + "Show how you've handled ambiguous problems", + ], + commonQuestions: [ + { + question: "How would you design Netflix's recommendation system?", + answer: "Multi-algorithm approach: collaborative filtering, content-based filtering, deep learning models, contextual bandits for exploration/exploitation, real-time personalization, A/B testing framework, and feedback loops. Handle cold start problem and diverse content catalog.", + category: "System Design", + }, + { + question: "Tell me about a time you took ownership of a problem", + answer: "Situation: critical service degradation affecting user experience. Task: identify and fix root cause. Action: took full ownership, coordinated with multiple teams, implemented both immediate fix and long-term solution. Result: restored service, prevented future occurrences.", + category: "Behavioral", + }, + { + question: "How would you handle video streaming for millions of concurrent users?", + answer: "CDN strategy, adaptive bitrate streaming, content pre-positioning, load balancing, caching at multiple levels, real-time monitoring, graceful degradation, and global infrastructure optimization. Consider peak traffic patterns and regional differences.", + category: "System Design", + }, + { + question: "Describe a time you had to make a decision with limited data", + answer: "Situation: new feature launch decision with incomplete user research. Task: decide on launch strategy. Action: analyzed available data, made assumptions explicit, designed experiments to validate quickly. Result: successful launch with rapid iteration based on real user feedback.", + category: "Behavioral", + }, + ], + }, + { + company: "Microsoft", + logo: "/img/microsoft.png", + focus: "Growth Mindset & Collaboration", + industry: "Technology", + roleTypes: ["Software Engineer", "Program Manager", "Cloud Architect", "AI Engineer"], + focusAreas: ["Growth Mindset", "Collaboration", "Inclusive Design", "Cloud Computing"], + tips: [ + "Emphasize continuous learning and growth mindset", + "Show collaborative approach and inclusive thinking", + "Demonstrate how you've helped others succeed", + "Focus on impact, results, and customer value", + "Prepare examples of learning from failures", + "Understand Microsoft's mission and recent innovations", + "Show experience with cloud technologies", + "Demonstrate inclusive design thinking", + ], + commonQuestions: [ + { + question: "How do you handle failure?", + answer: "Growth mindset approach: acknowledge failure quickly, analyze root causes, extract learnings, apply improvements, share knowledge with team. Example: failed project taught me better stakeholder communication, leading to 30% improvement in project success rate.", + category: "Behavioral", + }, + { + question: "Tell me about a time you helped a colleague", + answer: "Situation: colleague struggling with complex technical problem. Task: help without taking over. Action: paired programming, knowledge sharing, mentoring approach. Result: colleague solved problem, gained new skills, became go-to person for similar issues.", + category: "Behavioral", + }, + { + question: "How would you design Microsoft Teams?", + answer: "Requirements: real-time communication, enterprise scale, security, integration. Architecture: WebRTC for video/audio, WebSocket for messaging, microservices, Azure cloud infrastructure, Office 365 integration, security/compliance features, cross-platform support.", + category: "System Design", + }, + { + question: "What motivates you to learn new things?", + answer: "Connect to growth mindset: curiosity about solving new problems, staying relevant in rapidly evolving tech landscape, helping customers achieve more, contributing to team success. Provide specific examples of recent learning and application.", + category: "Behavioral", + }, + ], + }, + ]; + var mockInterviewQuestions = [ + // 🔹 Technical + // Arrays & Strings + { + id: "tech-arr-1", + type: "technical", + question: "Find the first non-repeating character in a string", + difficulty: "Easy", + hints: ["Use a hash map to count frequencies", "Return the first character with count 1"], + estimatedTime: 10, + category: "Strings", + links: [ + { title: "LeetCode - First Unique Character", url: "https://leetcode.com/problems/first-unique-character-in-a-string/", type: "example" }, + { title: "MDN - Map Object", url: "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map", type: "documentation" } + ] + }, + { + id: "tech-arr-2", + type: "technical", + question: "Merge two sorted arrays without using extra space", + difficulty: "Medium", + hints: ["Two-pointer technique works well", "Consider edge cases where one array is empty"], + estimatedTime: 15, + category: "Arrays", + links: [ + { title: "LeetCode - Merge Sorted Array", url: "https://leetcode.com/problems/merge-sorted-array/", type: "example" }, + { title: "GeeksforGeeks - Merge Without Extra Space", url: "https://www.geeksforgeeks.org/merge-two-sorted-arrays-o1-extra-space/", type: "tutorial" } + ] + }, + // Linked Lists + { + id: "tech-ll-1", + type: "technical", + question: "Reverse a linked list", + difficulty: "Medium", + hints: ["Think about iterative vs recursive approach", "Consider edge cases like empty list"], + estimatedTime: 20, + category: "Linked List", + links: [ + { title: "LeetCode - Reverse Linked List", url: "https://leetcode.com/problems/reverse-linked-list/", type: "example" }, + { title: "GeeksforGeeks - Reverse Linked List", url: "https://www.geeksforgeeks.org/reverse-a-linked-list/", type: "tutorial" } + ] + }, + { + id: "tech-ll-2", + type: "technical", + question: "Detect if a linked list has a cycle", + difficulty: "Medium", + hints: ["Use fast and slow pointers (Floyd’s cycle detection)", "Watch out for null references"], + estimatedTime: 15, + category: "Linked List", + links: [ + { title: "LeetCode - Linked List Cycle", url: "https://leetcode.com/problems/linked-list-cycle/", type: "example" }, + { title: "GeeksForGeeks- Detect Loop in a Linked List", url: "https://www.geeksforgeeks.org/dsa/detect-loop-in-a-linked-list/", type: "reference" } + ] + }, + // Trees & Graphs + { + id: "tech-tree-1", + type: "technical", + question: "Maximum Depth of Binary Tree", + difficulty: "Easy", + hints: ["Use recursion (DFS)", "Think about base case (null node)"], + estimatedTime: 10, + category: "Trees", + links: [ + { title: "LeetCode - Maximum Depth of Binary Tree", url: "https://leetcode.com/problems/maximum-depth-of-binary-tree/", type: "example" }, + { title: "GeeksForGeeks - DFS", url: "https://www.geeksforgeeks.org/dsa/depth-first-search-or-dfs-for-a-graph/", type: "reference" } + ] + }, + { + id: "tech-graph-1", + type: "technical", + question: "Clone a Graph", + difficulty: "Medium", + hints: ["Use DFS or BFS", "Maintain a hash map of visited nodes"], + estimatedTime: 25, + category: "Graphs", + links: [ + { title: "LeetCode - Clone Graph", url: "https://leetcode.com/problems/clone-graph/", type: "example" }, + { title: "GeeksforGeeks - Clone Graph", url: "https://www.geeksforgeeks.org/clone-an-undirected-graph/", type: "tutorial" } + ] + }, + // Dynamic Programming + { + id: "tech-dp-1", + type: "technical", + question: "Climbing Stairs", + difficulty: "Easy", + hints: ["Think Fibonacci", "DP with memoization or bottom-up"], + estimatedTime: 15, + category: "Dynamic Programming", + links: [ + { title: "LeetCode - Climbing Stairs", url: "https://leetcode.com/problems/climbing-stairs/", type: "example" }, + { title: "DP Introduction", url: "https://www.geeksforgeeks.org/dynamic-programming/", type: "tutorial" } + ] + }, + { + id: "tech-dp-2", + type: "technical", + question: "Longest Increasing Subsequence", + difficulty: "Medium", + hints: ["DP with O(n^2)", "Can be optimized with Binary Search (O(n log n))"], + estimatedTime: 35, + category: "Dynamic Programming", + links: [ + { title: "LeetCode - Longest Increasing Subsequence", url: "https://leetcode.com/problems/longest-increasing-subsequence/", type: "example" }, + { title: "GeeksforGeeks - LIS Explained", url: "https://www.geeksforgeeks.org/longest-increasing-subsequence-dp-3/", type: "tutorial" } + ] + }, + // Greedy Algorithms + { + id: "tech-greedy-1", + type: "technical", + question: "Jump Game", + difficulty: "Medium", + hints: ["Track the maximum reachable index", "Greedy works better than DP"], + estimatedTime: 20, + category: "Greedy", + links: [ + { title: "LeetCode - Jump Game", url: "https://leetcode.com/problems/jump-game/", type: "example" }, + { title: "Greedy Algorithm Basics", url: "https://www.geeksforgeeks.org/greedy-algorithms/", type: "reference" } + ] + }, + { + id: "tech-greedy-2", + type: "technical", + question: "Activity Selection Problem", + difficulty: "Medium", + hints: ["Sort by finish time", "Pick earliest finishing activity"], + estimatedTime: 25, + category: "Greedy", + links: [ + { title: "GeeksforGeeks - Activity Selection", url: "https://www.geeksforgeeks.org/activity-selection-problem-greedy-algo-1/", type: "tutorial" }, + { title: "MIT Greedy Algorithms Notes", url: "https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-006-introduction-to-algorithms-fall-2011/lecture-notes/MIT6_006F11_lec05.pdf", type: "reference" } + ] + }, + // Bit Manipulation + { + id: "tech-bit-1", + type: "technical", + question: "Single Number (Find element appearing once)", + difficulty: "Easy", + hints: ["Use XOR property", "a ^ a = 0"], + estimatedTime: 10, + category: "Bit Manipulation", + links: [ + { title: "LeetCode - Single Number", url: "https://leetcode.com/problems/single-number/", type: "example" }, + { title: "Bitwise Operators in C++", url: "https://cplusplus.com/doc/tutorial/operators/#bitwise", type: "documentation" } + ] + }, + { + id: "tech-bit-2", + type: "technical", + question: "Number of 1 Bits (Hamming Weight)", + difficulty: "Easy", + hints: ["Use n & (n-1) trick", "Loop until n=0"], + estimatedTime: 12, + category: "Bit Manipulation", + links: [ + { title: "LeetCode - Number of 1 Bits", url: "https://leetcode.com/problems/number-of-1-bits/", type: "example" }, + { title: "Hamming Weight Explained", url: "https://www.geeksforgeeks.org/count-set-bits-in-an-integer/", type: "tutorial" } + ] + }, + // Sorting Algorithms + { + id: "tech-sort-1", + type: "technical", + question: "Sort Colors (Dutch National Flag problem)", + difficulty: "Medium", + hints: ["Use three pointers (low, mid, high)", "In-place solution required"], + estimatedTime: 20, + category: "Sorting", + links: [ + { title: "LeetCode - Sort Colors", url: "https://leetcode.com/problems/sort-colors/", type: "example" }, + { title: "Dutch National Flag Problem", url: "https://www.geeksforgeeks.org/sort-an-array-of-0s-1s-and-2s/", type: "tutorial" } + ] + }, + { + id: "tech-sort-2", + type: "technical", + question: "Kth Largest Element in an Array", + difficulty: "Medium", + hints: ["QuickSelect algorithm", "Or use Min-Heap"], + estimatedTime: 25, + category: "Sorting/Heap", + links: [ + { title: "LeetCode - Kth Largest Element", url: "https://leetcode.com/problems/kth-largest-element-in-an-array/", type: "example" }, + { title: "QuickSelect Algorithm", url: "https://www.geeksforgeeks.org/quickselect-algorithm/", type: "tutorial" } + ] + }, + // Binary Search + { + id: "tech-bs-1", + type: "technical", + question: "Binary Search", + difficulty: "Easy", + hints: ["Classic divide and conquer", "Midpoint check"], + estimatedTime: 10, + category: "Binary Search", + links: [ + { title: "LeetCode - Binary Search", url: "https://leetcode.com/problems/binary-search/", type: "example" }, + { title: "Binary Search Explained", url: "https://www.geeksforgeeks.org/binary-search/", type: "tutorial" } + ] + }, + { + id: "tech-bs-2", + type: "technical", + question: "Find Minimum in Rotated Sorted Array", + difficulty: "Medium", + hints: ["Modified binary search", "Check mid vs right"], + estimatedTime: 20, + category: "Binary Search", + links: [ + { title: "LeetCode - Find Minimum in Rotated Array", url: "https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/", type: "example" }, + { title: "Binary Search Variants", url: "https://www.geeksforgeeks.org/binary-search/", type: "reference" } + ] + }, + // 🔹 Behavioral + { + id: "behavioral-2", + type: "behavioral", + question: "Tell me about a time you had to work with a difficult team member", + framework: "STAR Method", + difficulty: "Medium", + hints: ["Situation", "Task", "Action", "Result"], + estimatedTime: 15, + category: "Teamwork", + links: [ + { title: "Behavioral Interview Tips", url: "https://www.youtube.com/watch?v=OqoGEMlNk_g", type: "tutorial" } + ] + }, + { + id: "behavioral-3", + type: "behavioral", + question: "Describe a situation where you had to meet a tight deadline", + framework: "STAR Method", + difficulty: "Medium", + hints: ["Explain how you prioritized tasks", "Mention communication with stakeholders", "Highlight the outcome"], + estimatedTime: 12, + category: "Time Management", + links: [ + { title: "STAR Method Guide", url: "https://mondo.com/insights/how-to-use-star-method-to-answer-performace-based-interview-questions/#:~:text=Talk%20about%20a%20time%20when%20you%20had%20to,timeline%20and%20assigned%20tasks%20to%20each%20team%20member.", type: "tutorial" } + ] + }, + { + id: "behavioral-4", + type: "behavioral", + question: "What’s the most challenging project you have worked on?", + framework: "STAR Method", + difficulty: "Medium", + hints: ["Focus on the problem complexity", "Explain how you collaborated", "Highlight measurable outcomes"], + estimatedTime: 15, + category: "Problem Solving", + links: [ + { title: "Problem Solving in Interviews", url: "https://megainterview.com/what-was-the-most-challenging-project-you-have-worked-on/", type: "reference" } + ] + }, + { + id: "behavioral-5", + type: "behavioral", + question: "Tell me about a time you failed. How did you handle it?", + framework: "STAR Method", + difficulty: "Hard", + hints: ["Be honest but professional", "Emphasize what you learned", "Show resilience and growth"], + estimatedTime: 15, + category: "Resilience", + links: [ + { title: "Answering Failure Questions", url: "https://interviewpenguin.com/tell-me-about-a-time-when-you-failed/", type: "tutorial" } + ] + }, + // 🔹 System Design + { + id: "system-2", + type: "system-design", + question: "Design a URL shortener like bit.ly", + difficulty: "Hard", + hints: ["Consider scale", "Database design", "Caching strategy"], + estimatedTime: 40, + category: "Web Systems", + links: [ + { title: "System Design - URL Shortener", url: "https://www.geeksforgeeks.org/system-design/system-design-url-shortening-service/", type: "example" }, + { title: "High Scalability - URL Shortener", url: "https://www.hellointerview.com/learn/system-design/problem-breakdowns/bitly", type: "reference" } + ] + }, + { + id: "system-3", + type: "system-design", + question: "Design a chat application like WhatsApp", + difficulty: "Hard", + hints: ["Think about message delivery guarantees", "Consider real-time sync across devices", "Handle offline users gracefully"], + estimatedTime: 60, + category: "Messaging Systems", + links: [ + { title: "System Design - WhatsApp", url: "https://blog.algomaster.io/p/design-a-chat-application-like-whatsapp", type: "example" }, + { title: "Scalable Chat App Design", url: "https://www.youtube.com/watch?v=3HXFy_7M12E&t=1s", type: "tutorial" } + ] + }, + { + id: "system-4", + type: "system-design", + question: "Design an online food delivery system like Swiggy/Zomato", + difficulty: "Hard", + hints: ["Users, restaurants, delivery partners → entities", "Real-time location tracking", "Scalability and load balancing"], + estimatedTime: 70, + category: "Distributed Systems", + links: [ + { title: "System Design - Food Delivery", url: "https://upvey.com/technology/interview/system-design/design-architecture-food-delivery-service-like-swiggy-or-ubereats/#google_vignette", type: "example" }, + { title: "Scalable Food Delivery Architecture", url: "https://www.youtube.com/watch?v=rZyAgZuuZiA&t=8s", type: "tutorial" } + ] + }, + { + id: "system-5", + type: "system-design", + question: "Design a recommendation system for an e-commerce website", + difficulty: "Medium", + hints: ["Collaborative filtering", "Content-based recommendations", "Cold start problem"], + estimatedTime: 50, + category: "Machine Learning Systems", + links: [ + { title: "Recommendation Systems Intro", url: "https://www.geeksforgeeks.org/recommendation-system-in-python/", type: "tutorial" }, + { title: "System Design - Recommendation Engine", url: "https://webkul.com/blog/e-commerce-recommendation-system/", type: "reference" } + ] + }, + { + id: "system-6", + type: "system-design", + question: "Design YouTube (video streaming platform)", + difficulty: "Hard", + hints: ["Video upload, transcoding, and storage", "Content delivery networks (CDNs)", "Search and recommendation engine"], + estimatedTime: 90, + category: "Media Systems", + links: [ + { title: "System Design - YouTube", url: "https://www.geeksforgeeks.org/system-design/system-design-of-youtube-a-complete-architecture/", type: "example" }, + { title: "Designing Video Streaming Platforms", url: "https://www.youtube.com/watch?v=jPKTo1iGQiE&t=1s", type: "tutorial" } + ] + } + ]; + var practicePlatforms = [ + { + name: "LeetCode", + description: "Most popular coding interview platform", + problems: "2000+", + difficulty: ["Easy", "Medium", "Hard"], + url: "https://leetcode.com/", + features: ["Mock Interviews", "Company Tags", "Discussion Forums", "Premium Content"], + }, + { + name: "HackerRank", + description: "Comprehensive coding challenges and assessments", + problems: "1000+", + difficulty: ["Easy", "Medium", "Hard"], + url: "https://hackerrank.com/", + features: ["Skill Assessments", "Certification", "Company Challenges", "Interview Prep"], + }, + { + name: "CodeChef", + description: "Competitive programming and contests platform", + problems: "3000+", + difficulty: ["Easy", "Medium", "Hard"], + url: "https://www.codechef.com/", + features: ["Monthly Contests", "Long Challenge", "Cook-Off", "Practice Problems"], + }, + ]; + var technicalResources = [ + { + category: "📊 Data Structures & Algorithms", + description: "Master core algorithms and problem-solving patterns for interviews", + totalProblems: 220, + subcategories: [ + { + title: "Arrays & Strings", + difficulty: "Easy", + problems: 50, + subtopics: [ + "Two Pointers", "Sliding Window", "String Manipulation", "Prefix Sums", "Rotation & Reversal", + "Frequency Counting", "Hashing for Arrays", "Anagram Problems" + ], + resources: [ + { name: "LeetCode Arrays", url: "https://leetcode.com/tag/array/" }, + { name: "HackerRank Strings", url: "https://hackerrank.com/domains/algorithms?filters%5Bsubdomains%5D%5B%5D=strings" }, + { name: "NeetCode Array Playlist", url: "https://www.youtube.com/playlist?list=PLot-Xpze53lfOdF3KwpMSFEyfE77zIwiP" } + ], + }, + { + title: "Linked Lists", + difficulty: "Medium", + problems: 30, + subtopics: [ + "Traversal", "Reversal", "Cycle Detection", "Merge Operations", "Dummy Nodes", + "Doubly Linked List", "Skip Lists" + ], + resources: [ + { name: "LeetCode Linked List", url: "https://leetcode.com/tag/linked-list/" }, + { name: "GeeksforGeeks", url: "https://geeksforgeeks.org/data-structures/linked-list/" }, + { name: "FreeCodeCamp Linked List", url: "https://www.youtube.com/watch?v=Hj_rA0dhr2I" } + ], + }, + { + title: "Trees & Graphs", + difficulty: "Hard", + problems: 50, + subtopics: [ + "Binary Trees", "BST Operations", "Tree Traversals", "Graph Representations", "DFS & BFS", + "Shortest Path", "Topological Sort", "Union-Find", "Minimum Spanning Tree" + ], + resources: [ + { name: "LeetCode Tree", url: "https://leetcode.com/tag/tree/" }, + { name: "LeetCode Graph", url: "https://leetcode.com/tag/graph/" }, + { name: "WilliamFiset Graph Theory", url: "https://www.youtube.com/playlist?list=PLDV1Zeh2NRsB6SWUrDFW2RmDotAfPbeHu" } + ], + }, + { + title: "Dynamic Programming", + difficulty: "Hard", + problems: 50, + subtopics: [ + "1D DP", "2D DP", "Memoization", "Tabulation", "State Optimization", + "Knapsack Variants", "Subsequence Problems", "Game Theory DP" + ], + resources: [ + { name: "LeetCode DP", url: "https://leetcode.com/tag/dynamic-programming/" }, + { name: "DP Patterns", url: "https://leetcode.com/discuss/general-discussion/458695/dynamic-programming-patterns" }, + { name: "NeetCode DP Playlist", url: "https://www.youtube.com/playlist?list=PLot-Xpze53ldVwtstag2TL4HQhAnC8m4D" } + ], + }, + { + title: "Other Important Topics", + difficulty: "Medium", + problems: 40, + subtopics: [ + "Heaps", "Hash Tables", "Bit Manipulation", "Greedy Algorithms", "Backtracking", + "Math & Number Theory", "Sorting Algorithms", "Binary Search Variants" + ], + resources: [ + { name: "Heap Guide", url: "https://www.geeksforgeeks.org/heap-data-structure/" }, + { name: "Backtracking Patterns", url: "https://leetcode.com/tag/backtracking/" }, + { name: "Princeton Algorithms", url: "https://algs4.cs.princeton.edu/home/" } + ], + }, + ], + }, + { + category: "🏗️ System Design", + description: "Learn to design scalable, fault-tolerant systems", + totalProblems: 50, + subcategories: [ + { + title: "Core Concepts", + difficulty: "Medium", + problems: 15, + subtopics: [ + "Scalability", "Load Balancing", "Caching", "Database Sharding", "CAP Theorem", + "Consistency Models", "Fault Tolerance" + ], + resources: [ + { name: "System Design Primer", url: "https://github.com/donnemartin/system-design-primer" }, + { name: "High Scalability", url: "http://highscalability.com/" }, + { name: "ByteByteGo YouTube", url: "https://www.youtube.com/c/ByteByteGo" } + ], + }, + { + title: "Real-world Systems", + difficulty: "Hard", + problems: 20, + subtopics: [ + "URL Shortener", "Chat System", "News Feed", "Search Engine", "Video Streaming", + "Payment Gateway", "Social Media Platform" + ], + resources: [ + { name: "Grokking System Design", url: "https://educative.io/courses/grokking-the-system-design-interview" }, + { name: "System Design Interview", url: "https://bytebytego.com/" } + ], + }, + { + title: "Other Important Topics", + difficulty: "Medium", + problems: 15, + subtopics: [ + "Monitoring & Logging", "Event-driven Architecture", "Message Queues", "Content Delivery Networks", + "Security in System Design" + ], + resources: [ + { name: "Grafana Monitoring", url: "https://grafana.com/oss/grafana/" }, + { name: "Event-driven Design", url: "https://microservices.io/patterns/rel/async-messaging.html" } + ], + }, + ], + }, + { + category: "🗄️ Database Design", + description: "Learn relational & NoSQL databases for real-world applications", + totalProblems: 70, + subcategories: [ + { + title: "SQL Basics", + difficulty: "Easy", + problems: 20, + subtopics: [ + "SELECT Queries", "Joins", "Indexes", "Aggregate Functions", "Stored Procedures", + "Views", "Transactions" + ], + resources: [ + { name: "SQLBolt", url: "https://sqlbolt.com/" }, + { name: "LeetCode Database", url: "https://leetcode.com/problemset/database/" } + ], + }, + { + title: "NoSQL & Scaling", + difficulty: "Medium", + problems: 20, + subtopics: [ + "Document Stores", "Key-Value Stores", "Column Stores", "Graph Databases", + "Sharding", "Replication" + ], + resources: [ + { name: "MongoDB Basics", url: "https://www.mongodb.com/basics" }, + { name: "Cassandra Guide", url: "https://cassandra.apache.org/" } + ], + }, + { + title: "Advanced Design", + difficulty: "Hard", + problems: 15, + subtopics: [ + "Normalization", "Denormalization", "Indexing Strategies", "Partitioning", + "Data Warehousing", "Query Optimization" + ], + resources: [ + { name: "Database Normalization", url: "https://www.guru99.com/database-normalization.html" }, + { name: "AWS Data Warehousing", url: "https://aws.amazon.com/redshift/" } + ], + }, + { + title: "Other Important Topics", + difficulty: "Medium", + problems: 15, + subtopics: [ + "ACID Properties", "Database Security", "Backup & Recovery", "OLAP vs OLTP", + "Temporal Databases" + ], + resources: [ + { name: "Transactions in SQL", url: "https://www.postgresql.org/docs/current/tutorial-transactions.html" } + ], + }, + ], + }, + { + category: "🔌 API Design & Development", + description: "REST, GraphQL, and microservices for backend engineering", + totalProblems: 60, + subcategories: [ + { + title: "REST API Design", + difficulty: "Easy", + problems: 15, + subtopics: [ + "HTTP Methods", "CRUD Operations", "Error Handling", "Versioning", "Rate Limiting", + "Pagination", "CORS" + ], + resources: [ + { name: "RESTful API Tutorial", url: "https://restfulapi.net/" }, + { name: "Postman Learning Center", url: "https://learning.postman.com/" } + ], + }, + { + title: "GraphQL", + difficulty: "Medium", + problems: 15, + subtopics: [ + "Queries", "Mutations", "Subscriptions", "Schemas", "Resolvers", + "Apollo Server", "GraphQL Security" + ], + resources: [ + { name: "GraphQL Official Docs", url: "https://graphql.org/learn/" }, + { name: "Apollo GraphQL", url: "https://www.apollographql.com/docs/" } + ], + }, + { + title: "Microservices & Security", + difficulty: "Hard", + problems: 15, + subtopics: [ + "Service Discovery", "API Gateway", "Authentication", "Authorization", "JWT", + "OAuth2", "gRPC" + ], + resources: [ + { name: "Microservices Guide", url: "https://microservices.io/" }, + { name: "JWT Introduction", url: "https://jwt.io/introduction/" } + ], + }, + { + title: "Other Important Topics", + difficulty: "Medium", + problems: 15, + subtopics: [ + "API Testing", "OpenAPI/Swagger", "Async APIs", "WebSockets", "gRPC Streaming", + "API Performance Tuning" + ], + resources: [ + { name: "OpenAPI Specification", url: "https://swagger.io/specification/" }, + { name: "gRPC Basics", url: "https://grpc.io/docs/what-is-grpc/" } + ], + }, + ], + }, + ]; + return ((0, jsx_runtime_1.jsxs)(Layout_1.default, { title: "Interview Preparation - RecodeHive", description: "Comprehensive interview preparation resources for technical and behavioral interviews at top tech companies", children: [(0, jsx_runtime_1.jsxs)(Head_1.default, { children: [(0, jsx_runtime_1.jsx)("title", { children: "Interview Preparation - RecodeHive" }), (0, jsx_runtime_1.jsx)("meta", { name: "description", content: "Master technical and behavioral interviews with our comprehensive preparation resources, practice questions, and company-specific guides." })] }), (0, jsx_runtime_1.jsxs)("div", { className: "min-h-screen bg-gradient-to-b from-white to-gray-50 dark:from-gray-900 dark:to-gray-800", children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.section, { className: "hero-section py-20 px-4 text-center bg-gradient-to-br from-blue-600 via-purple-600 to-blue-800 text-white relative overflow-hidden", initial: "hidden", animate: "visible", variants: staggerContainer, children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 bg-black/20" }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10 max-w-4xl mx-auto", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.h1, { className: "text-5xl md:text-6xl font-bold mb-6 bg-clip-text text-transparent bg-gradient-to-r from-white to-blue-100", variants: fadeIn, children: "Ace Your Next Interview" }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.p, { className: "text-xl md:text-2xl mb-8 text-blue-100", variants: fadeIn, children: "Master technical challenges and behavioral questions with our comprehensive interview preparation platform" }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "flex flex-col sm:flex-row gap-4 justify-center", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("button", { onClick: function () { return setActiveTab("practice"); }, className: "bg-white text-blue-600 px-8 py-4 rounded-lg font-semibold hover:bg-blue-50 transition-all duration-300 transform hover:scale-105 shadow-lg", children: "Start Practice" }), (0, jsx_runtime_1.jsx)("button", { onClick: function () { return setActiveTab("technical"); }, className: "border-2 border-white text-white px-8 py-4 rounded-lg font-semibold hover:bg-white hover:text-blue-600 transition-all duration-300", children: "Browse Resources" })] })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "sticky top-0 z-40 bg-white dark:bg-gray-900 border-b border-gray-200 dark:border-gray-700 shadow-sm", children: (0, jsx_runtime_1.jsx)("div", { className: "max-w-6xl mx-auto px-4", children: (0, jsx_runtime_1.jsx)("nav", { className: "flex space-x-8 overflow-x-auto", children: [ + { id: "overview", label: "Overview", icon: "📋" }, + { id: "technical", label: "Technical", icon: "💻" }, + { id: "behavioral", label: "Behavioral", icon: "🤝" }, + { id: "companies", label: "Companies", icon: "🏢" }, + { id: "practice", label: "Practice", icon: "🎯" }, + ].map(function (tab) { return ((0, jsx_runtime_1.jsxs)("button", { onClick: function () { return setActiveTab(tab.id); }, className: "flex items-center space-x-2 py-4 px-2 border-b-2 font-medium text-sm transition-colors ".concat(activeTab === tab.id + ? "interview-prep-nav-tab-active border-blue-500 text-blue-600 dark:text-blue-400" + : "interview-prep-nav-tab-inactive border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"), children: [(0, jsx_runtime_1.jsx)("span", { children: tab.icon }), (0, jsx_runtime_1.jsx)("span", { children: tab.label })] }, tab.id)); }) }) }) }), (0, jsx_runtime_1.jsxs)("div", { className: "interview-prep-page max-w-6xl mx-auto px-4 py-12", children: [activeTab === "overview" && ((0, jsx_runtime_1.jsx)(OverviewTab_1.default, { toggleTips: toggleTips, toggleQuestions: toggleQuestions, showTips: showTips, showQuestions: showQuestions, setActiveTab: setActiveTab })), activeTab === "technical" && ((0, jsx_runtime_1.jsx)(TechnicalTab_1.default, { technicalResources: technicalResources, practicePlatforms: practicePlatforms, expandedCategories: expandedCategories, toggleCategory: toggleCategory })), activeTab === "behavioral" && ((0, jsx_runtime_1.jsx)(BehavioralTab_1.default, { behavioralQuestions: behavioralQuestions, expandedCategories: expandedCategories, toggleCategory: toggleCategory })), activeTab === "companies" && ((0, jsx_runtime_1.jsx)(CompaniesTab_1.default, { companyTips: companyTips, toggleTips: toggleTips, toggleQuestions: toggleQuestions, showTips: showTips, showQuestions: showQuestions })), activeTab === "practice" && ((0, jsx_runtime_1.jsx)(PracticeTab_1.default, { mockInterviewQuestions: mockInterviewQuestions }))] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.section, { className: "cta-section py-20 px-4 bg-gradient-to-br from-blue-600 via-purple-600 to-blue-800 text-white text-center", initial: "hidden", whileInView: "visible", viewport: { once: true }, variants: staggerContainer, children: (0, jsx_runtime_1.jsxs)("div", { className: "max-w-4xl mx-auto", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.h2, { className: "text-4xl md:text-5xl font-bold mb-6", variants: fadeIn, children: "Ready to Land Your Dream Job?" }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.p, { className: "text-xl mb-8 text-blue-100", variants: fadeIn, children: "Join thousands of developers who have successfully prepared for interviews with RecodeHive" }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "flex flex-col sm:flex-row gap-4 justify-center", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)(Link_1.default, { to: "/get-started", className: "bg-white text-blue-600 px-8 py-4 rounded-lg font-semibold hover:bg-blue-50 transition-all duration-300 transform hover:scale-105 shadow-lg", children: "Start Preparing Now" }), (0, jsx_runtime_1.jsx)(Link_1.default, { to: "/community", className: "border-2 border-white text-white px-8 py-4 rounded-lg font-semibold hover:bg-white hover:text-blue-600 transition-all duration-300", children: "Join Community" })] })] }) })] })] })); +}; +exports.default = InterviewPrepPage; diff --git a/src/pages/our-sponsors/SponsorCard/index.js b/src/pages/our-sponsors/SponsorCard/index.js new file mode 100644 index 00000000..55128b53 --- /dev/null +++ b/src/pages/our-sponsors/SponsorCard/index.js @@ -0,0 +1,14 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importDefault(require("react")); +var fa_1 = require("react-icons/fa"); +var fa6_1 = require("react-icons/fa6"); +var SponsorCard = function (_a) { + var name = _a.name, image = _a.image, description = _a.description, github = _a.github, linkedin = _a.linkedin, twitter = _a.twitter, instagram = _a.instagram; + return ((0, jsx_runtime_1.jsxs)("div", { className: "sponsor-card", children: [(0, jsx_runtime_1.jsx)("div", { className: "avatar-wrapper", children: (0, jsx_runtime_1.jsx)("img", { src: image, alt: name }) }), (0, jsx_runtime_1.jsx)("h3", { className: "sponsor-name", children: name }), (0, jsx_runtime_1.jsx)("p", { className: "sponsor-desc", children: description }), (0, jsx_runtime_1.jsxs)("div", { className: "social-links", children: [github && (0, jsx_runtime_1.jsx)("a", { href: github, target: "_blank", rel: "noopener noreferrer", className: "github", children: (0, jsx_runtime_1.jsx)(fa_1.FaGithub, {}) }), linkedin && (0, jsx_runtime_1.jsx)("a", { href: linkedin, target: "_blank", rel: "noopener noreferrer", className: "linkedin", children: (0, jsx_runtime_1.jsx)(fa_1.FaLinkedin, {}) }), twitter && (0, jsx_runtime_1.jsx)("a", { href: twitter, target: "_blank", rel: "noopener noreferrer", className: "twitter", children: (0, jsx_runtime_1.jsx)(fa6_1.FaXTwitter, {}) }), instagram && (0, jsx_runtime_1.jsx)("a", { href: instagram, target: "_blank", rel: "noopener noreferrer", className: "instagram", children: (0, jsx_runtime_1.jsx)(fa_1.FaInstagram, {}) })] })] })); +}; +exports.default = SponsorCard; diff --git a/src/pages/our-sponsors/index.js b/src/pages/our-sponsors/index.js new file mode 100644 index 00000000..969b9b72 --- /dev/null +++ b/src/pages/our-sponsors/index.js @@ -0,0 +1,99 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importStar(require("react")); +var SponsorCard_1 = __importDefault(require("./SponsorCard")); +require("./Sponsors.css"); +var Layout_1 = __importDefault(require("@theme/Layout")); +var fa_1 = require("react-icons/fa"); +var Head_1 = __importDefault(require("@docusaurus/Head")); +var sponsors_1 = __importDefault(require("@site/src/database/sponsors")); +var router_1 = require("@docusaurus/router"); +var OurSponsors = function () { + var _a = (0, react_1.useState)(false), showScanner = _a[0], setShowScanner = _a[1]; + var _b = (0, react_1.useState)('current'), activeTab = _b[0], setActiveTab = _b[1]; + var modalRef = (0, react_1.useRef)(null); + var history = (0, router_1.useHistory)(); + // Filter for current sponsors (exclude isWeSponsor) + var currentSponsors = sponsors_1.default.filter(function (s) { return !s.isPastSponsor && !s.isWeSponsor; }); + var pastSponsors = sponsors_1.default.filter(function (s) { return s.isPastSponsor; }); + // Filter for people we sponsor + var weSponsorPeople = sponsors_1.default.filter(function (s) { return s.isWeSponsor; }); + var handleJoinSponsor = function () { return setShowScanner(true); }; + var handlePaymentSuccess = function () { + setShowScanner(false); + alert("Thanks, we will redirect to Github Sponsors page, upon sponsoring you will be added to our sponsors list."); + window.location.href = 'https://github.com/sponsors/sanjay-kv?o=esb'; + }; + var handleCloseModal = function () { return setShowScanner(false); }; + var handleTabChange = function (tab) { + setActiveTab(tab); + }; + (0, react_1.useEffect)(function () { + if (!showScanner) + return; + var controller = new AbortController(); + var signal = controller.signal; + var handleKeyDown = function (e) { + if (e.key === 'Escape') + handleCloseModal(); + }; + var handleClickOutside = function (e) { + if (modalRef.current && !modalRef.current.contains(e.target)) { + handleCloseModal(); + } + }; + document.addEventListener('keydown', handleKeyDown, { signal: signal }); + document.addEventListener('mousedown', handleClickOutside, { signal: signal }); + return function () { return controller.abort(); }; + }, [showScanner]); + return ((0, jsx_runtime_1.jsxs)(Layout_1.default, { children: [(0, jsx_runtime_1.jsx)(Head_1.default, { children: (0, jsx_runtime_1.jsx)("script", { async: true, "custom-element": "amp-auto-ads", src: "https://cdn.ampproject.org/v0/amp-auto-ads-0.1.js" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "sponsor-page", children: [(0, jsx_runtime_1.jsxs)("div", { className: "sponsor-header", children: [(0, jsx_runtime_1.jsx)("h1", { className: "TitleText", children: "Our Valued Sponsors" }), (0, jsx_runtime_1.jsxs)("p", { children: ["Join us in empowering the open-source community through your generous support. Your sponsorship directly fuels innovation by enabling developers to create valuable resources and maintain our growing knowledge base.", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {}), "We deeply appreciate your commitment to advancing open-source technology and education."] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "sponsors-section", children: [(0, jsx_runtime_1.jsxs)("div", { className: "tabs", children: [(0, jsx_runtime_1.jsxs)("button", { className: "tab-button ".concat(activeTab === 'current' ? 'active' : ''), onClick: function () { return handleTabChange('current'); }, children: ["Current Sponsors", (0, jsx_runtime_1.jsx)("span", { className: "tab-badge", children: currentSponsors.length })] }), (0, jsx_runtime_1.jsxs)("button", { className: "tab-button ".concat(activeTab === 'past' ? 'active' : ''), onClick: function () { return handleTabChange('past'); }, children: ["People We Sponsored", weSponsorPeople.length > 0 && ((0, jsx_runtime_1.jsx)("span", { className: "tab-badge", children: weSponsorPeople.length }))] })] }), (0, jsx_runtime_1.jsx)("div", { className: "tab-content ".concat(activeTab === 'current' ? 'active' : ''), children: (0, jsx_runtime_1.jsxs)("div", { className: "sponsors-section", children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-semibold text-gray-800 mb-4 mt-2", children: "Current Sponsors" }), (0, jsx_runtime_1.jsxs)("div", { className: "sponsors-list", children: [currentSponsors.length > 0 ? (currentSponsors.map(function (sponsor) { return ((0, jsx_runtime_1.jsx)(SponsorCard_1.default, __assign({}, sponsor), "".concat(sponsor.name, "-current"))); })) : ((0, jsx_runtime_1.jsx)("div", { className: "no-sponsors", children: (0, jsx_runtime_1.jsx)("p", { children: "We're actively seeking visionary sponsors to partner with us in supporting the open-source community." }) })), (0, jsx_runtime_1.jsx)("div", { className: "sponsor-card empty-card group", onClick: handleJoinSponsor, role: "button", tabIndex: 0, children: (0, jsx_runtime_1.jsxs)("div", { className: "text-center p-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-16 h-16 bg-indigo-50 rounded-full flex items-center justify-center mx-auto mb-4 group-hover:bg-indigo-100 transition-colors duration-200", children: (0, jsx_runtime_1.jsx)(fa_1.FaPlusCircle, { className: "text-3xl text-indigo-500 group-hover:text-indigo-600 transition-colors duration-200" }) }), (0, jsx_runtime_1.jsx)("h3", { className: "text-lg font-semibold text-indigo-700 mb-1 group-hover:text-indigo-800 transition-colors duration-200", children: "Partner With Us" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-500 group-hover:text-gray-600 transition-colors duration-200", children: "Support innovation in open-source development" }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-3 inline-flex items-center text-sm font-medium text-indigo-600 group-hover:text-indigo-700 transition-colors duration-200", children: ["Join us", (0, jsx_runtime_1.jsx)("svg", { className: "ml-1 w-4 h-4 group-hover:translate-x-1 transition-transform duration-200", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M14 5l7 7m0 0l-7 7m7-7H3" }) })] })] }) })] }), pastSponsors.length > 0 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-semibold text-gray-800 mb-4 mt-12", children: "Past Sponsors" }), (0, jsx_runtime_1.jsx)("div", { className: "sponsors-list", children: pastSponsors.map(function (sponsor) { return ((0, jsx_runtime_1.jsx)(SponsorCard_1.default, __assign({}, sponsor), "".concat(sponsor.name, "-past-in-current"))); }) })] }))] }) }), (0, jsx_runtime_1.jsx)("div", { className: "tab-content ".concat(activeTab === 'past' ? 'active' : ''), children: weSponsorPeople.length > 0 ? ((0, jsx_runtime_1.jsx)("div", { className: "sponsors-list", children: weSponsorPeople.map(function (sponsor) { return ((0, jsx_runtime_1.jsx)(SponsorCard_1.default, __assign({}, sponsor), "".concat(sponsor.name, "-wesponsor"))); }) })) : ((0, jsx_runtime_1.jsx)("div", { className: "no-sponsors", children: (0, jsx_runtime_1.jsx)("p", { children: "We look forward to recognizing our future sponsors here." }) })) })] }), showScanner && ((0, jsx_runtime_1.jsx)("div", { className: "scanner-popup", role: "dialog", "aria-modal": "true", children: (0, jsx_runtime_1.jsxs)("div", { className: "scanner-content", ref: modalRef, children: [(0, jsx_runtime_1.jsx)("button", { className: "close-button", "aria-label": "Close", onClick: handleCloseModal, children: (0, jsx_runtime_1.jsx)(fa_1.FaTimes, { size: 20 }) }), (0, jsx_runtime_1.jsx)("h2", { className: "TitleText", children: "Become a Valued Partner" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 mb-6", children: "Join our mission to advance open-source innovation and education through your sponsorship" }), (0, jsx_runtime_1.jsx)("div", { className: "relative inline-flex", children: (0, jsx_runtime_1.jsxs)("button", { className: "scanner-button group", onClick: handlePaymentSuccess, children: [(0, jsx_runtime_1.jsx)("span", { className: "absolute left-4 opacity-0 group-hover:opacity-100 group-hover:left-6 transition-all duration-300", children: (0, jsx_runtime_1.jsx)("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", d: "M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.1-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.919.678 1.852 0 1.336-.012 2.415-.012 2.743 0 .267.18.58.688.48A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z", clipRule: "evenodd" }) }) }), (0, jsx_runtime_1.jsx)("span", { className: "relative transition-all duration-300 group-hover:translate-x-2", children: "Sponsor on GitHub" }), (0, jsx_runtime_1.jsx)("span", { className: "absolute right-4 opacity-0 group-hover:opacity-100 group-hover:right-6 transition-all duration-300", children: (0, jsx_runtime_1.jsx)("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M14 5l7 7m0 0l-7 7m7-7H3" }) }) })] }) })] }) })), (0, jsx_runtime_1.jsx)("div", { className: "support-links mt-6", children: (0, jsx_runtime_1.jsx)("iframe", { src: "https://github.com/sponsors/sanjay-kv/button", title: "Sponsor Sanjay Viswanathan on GitHub", height: "32", width: "114", style: { border: 0, borderRadius: "6px" } }) })] })] })); +}; +exports.default = OurSponsors; diff --git a/src/pages/podcasts/details.js b/src/pages/podcasts/details.js new file mode 100644 index 00000000..eee4fa96 --- /dev/null +++ b/src/pages/podcasts/details.js @@ -0,0 +1,160 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = PodcastDetails; +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importDefault(require("react")); +var Layout_1 = __importDefault(require("@theme/Layout")); +var router_1 = require("@docusaurus/router"); +require("./details.css"); +// Enhanced Spotify Title Component +var SpotifyTitle = function (_a) { + var spotifyUrl = _a.spotifyUrl, type = _a.type; + var _b = react_1.default.useState(''), title = _b[0], setTitle = _b[1]; + var _c = react_1.default.useState(''), artist = _c[0], setArtist = _c[1]; + var _d = react_1.default.useState(true), loading = _d[0], setLoading = _d[1]; + react_1.default.useEffect(function () { + var cancelled = false; + setLoading(true); + fetch("https://open.spotify.com/oembed?url=".concat(encodeURIComponent(spotifyUrl))) + .then(function (res) { return res.json(); }) + .then(function (data) { + if (!cancelled) { + setTitle(data.title); + // Extract artist/show info if available + if (data.author_name) { + setArtist(data.author_name); + } + setLoading(false); + } + }) + .catch(function () { + if (!cancelled) { + setTitle(''); + setLoading(false); + } + }); + return function () { cancelled = true; }; + }, [spotifyUrl]); + if (loading) { + return ((0, jsx_runtime_1.jsxs)("div", { className: "title-loading", children: [(0, jsx_runtime_1.jsx)("div", { className: "loading-shimmer large" }), (0, jsx_runtime_1.jsx)("div", { className: "loading-shimmer medium" }), (0, jsx_runtime_1.jsx)("div", { className: "loading-shimmer small" })] })); + } + return ((0, jsx_runtime_1.jsxs)("div", { className: "enhanced-podcast-title", children: [(0, jsx_runtime_1.jsxs)("div", { className: "title-badge", children: [(0, jsx_runtime_1.jsx)("span", { className: "badge-icon", children: type === 'episode' ? '🎙️' : type === 'show' ? '📻' : '🎵' }), (0, jsx_runtime_1.jsx)("span", { className: "badge-text", children: type.charAt(0).toUpperCase() + type.slice(1) })] }), (0, jsx_runtime_1.jsx)("h1", { className: "main-title", children: title || "Featured ".concat(type.charAt(0).toUpperCase() + type.slice(1)) }), artist && ((0, jsx_runtime_1.jsxs)("div", { className: "artist-info", children: [(0, jsx_runtime_1.jsx)("span", { className: "by-text", children: "by" }), (0, jsx_runtime_1.jsx)("span", { className: "artist-name", children: artist })] }))] })); +}; +function PodcastDetails() { + var _this = this; + var _a; + var location = (0, router_1.useLocation)(); + var history = (0, router_1.useHistory)(); + var state = location.state; + var podcast = state === null || state === void 0 ? void 0 : state.podcast; + // Enhanced descriptions with categories + var descriptions = { + episode: [ + "Dive deep into fascinating conversations and thought-provoking content that challenges conventional thinking.", + "Experience expert insights and engaging narratives that expand your understanding of the world.", + "Join compelling discussions that bridge the gap between knowledge and practical wisdom.", + "Explore unique perspectives from industry leaders and innovative thinkers.", + "Uncover hidden stories and behind-the-scenes insights that mainstream media rarely covers." + ], + show: [ + "Discover a treasure trove of episodes covering diverse topics and groundbreaking ideas.", + "Follow an incredible journey of storytelling that spans multiple fascinating episodes.", + "Experience consistent quality content that keeps you coming back for more insights.", + "Join a community of listeners who appreciate depth, authenticity, and expert curation.", + "Explore a comprehensive collection of discussions that shape modern discourse." + ], + playlist: [ + "Enjoy a carefully curated selection of audio content designed for your listening pleasure.", + "Experience the perfect blend of entertainment and education in one convenient collection.", + "Discover diverse voices and perspectives assembled into a cohesive listening experience.", + "Tune into a handpicked selection that showcases the best of podcast storytelling.", + "Explore a thoughtfully arranged collection that takes you on an audio journey." + ] + }; + // Additional podcast features + var features = [ + { icon: "🎯", label: "Expert Insights", description: "Learn from industry professionals" }, + { icon: "🌟", label: "Premium Quality", description: "High-quality audio production" }, + { icon: "📈", label: "Trending Content", description: "Stay ahead with latest topics" }, + { icon: "🎧", label: "Immersive Experience", description: "Engaging storytelling format" } + ]; + var getRandomDescription = function (type) { + var typeDescriptions = descriptions[type]; + return typeDescriptions[Math.floor(Math.random() * typeDescriptions.length)]; + }; + var handleBack = function () { + history.goBack(); + }; + var handleShare = function () { return __awaiter(_this, void 0, void 0, function () { + var err_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!navigator.share) return [3 /*break*/, 5]; + _a.label = 1; + case 1: + _a.trys.push([1, 3, , 4]); + return [4 /*yield*/, navigator.share({ + title: "Check out this ".concat(podcast.type), + url: podcast.spotifyUrl + })]; + case 2: + _a.sent(); + return [3 /*break*/, 4]; + case 3: + err_1 = _a.sent(); + // Fallback to clipboard + navigator.clipboard.writeText(podcast.spotifyUrl); + return [3 /*break*/, 4]; + case 4: return [3 /*break*/, 6]; + case 5: + navigator.clipboard.writeText(podcast.spotifyUrl); + _a.label = 6; + case 6: return [2 /*return*/]; + } + }); + }); }; + if (!podcast) { + return ((0, jsx_runtime_1.jsx)(Layout_1.default, { children: (0, jsx_runtime_1.jsx)("div", { className: "enhanced-details-container", children: (0, jsx_runtime_1.jsxs)("div", { className: "error-state", children: [(0, jsx_runtime_1.jsx)("div", { className: "error-icon", children: "\uD83D\uDD0D" }), (0, jsx_runtime_1.jsx)("h1", { className: "error-title", children: "Podcast Not Found" }), (0, jsx_runtime_1.jsx)("p", { className: "error-description", children: "Sorry, we couldn't find the podcast you're looking for." }), (0, jsx_runtime_1.jsxs)("button", { className: "back-to-podcasts", onClick: function () { return history.push('/podcasts'); }, children: [(0, jsx_runtime_1.jsx)("span", { className: "button-icon", children: "\u2190" }), "Back to Podcasts"] })] }) }) })); + } + return ((0, jsx_runtime_1.jsx)(Layout_1.default, { children: (0, jsx_runtime_1.jsxs)("div", { className: "enhanced-details-container", children: [(0, jsx_runtime_1.jsxs)("div", { className: "details-navigation", children: [(0, jsx_runtime_1.jsxs)("button", { className: "nav-back-button", onClick: handleBack, children: [(0, jsx_runtime_1.jsx)("span", { className: "nav-icon", children: "\u2190" }), (0, jsx_runtime_1.jsx)("span", { className: "nav-text", children: "Back to Podcasts" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "nav-actions", children: [(0, jsx_runtime_1.jsx)("button", { className: "nav-action-button", onClick: handleShare, title: "Share", children: (0, jsx_runtime_1.jsx)("span", { className: "action-icon", children: "\uD83D\uDD17" }) }), (0, jsx_runtime_1.jsx)("button", { className: "nav-action-button", title: "Add to favorites", children: (0, jsx_runtime_1.jsx)("span", { className: "action-icon", children: "\u2764\uFE0F" }) })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "details-content", children: [(0, jsx_runtime_1.jsx)("div", { className: "details-hero", children: (0, jsx_runtime_1.jsxs)("div", { className: "hero-content", children: [(0, jsx_runtime_1.jsx)(SpotifyTitle, { spotifyUrl: podcast.spotifyUrl, type: podcast.type }), (0, jsx_runtime_1.jsx)("p", { className: "hero-description", children: getRandomDescription(podcast.type) }), (0, jsx_runtime_1.jsxs)("div", { className: "quick-stats", children: [(0, jsx_runtime_1.jsxs)("div", { className: "stat-pill", children: [(0, jsx_runtime_1.jsx)("span", { className: "stat-icon", children: "\u23F1\uFE0F" }), (0, jsx_runtime_1.jsx)("span", { className: "stat-text", children: "Premium Content" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "stat-pill", children: [(0, jsx_runtime_1.jsx)("span", { className: "stat-icon", children: "\uD83C\uDFAF" }), (0, jsx_runtime_1.jsx)("span", { className: "stat-text", children: "Expert Curated" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "stat-pill", children: [(0, jsx_runtime_1.jsx)("span", { className: "stat-icon", children: "\uD83D\uDD25" }), (0, jsx_runtime_1.jsx)("span", { className: "stat-text", children: "Trending" })] })] })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "enhanced-embed-section", children: (0, jsx_runtime_1.jsxs)("div", { className: "embed-container", children: [(0, jsx_runtime_1.jsxs)("div", { className: "embed-header", children: [(0, jsx_runtime_1.jsxs)("h2", { className: "embed-title", children: [(0, jsx_runtime_1.jsx)("span", { className: "title-icon", children: "\uD83C\uDFA7" }), "Listen Now"] }), (0, jsx_runtime_1.jsx)("div", { className: "embed-controls", children: (0, jsx_runtime_1.jsx)("button", { className: "control-button", title: "Full screen", children: (0, jsx_runtime_1.jsx)("span", { className: "control-icon", children: "\u26F6" }) }) })] }), (0, jsx_runtime_1.jsx)("div", { className: "spotify-embed-wrapper", children: (0, jsx_runtime_1.jsx)("iframe", { src: "https://open.spotify.com/embed/".concat(podcast.type, "/").concat((_a = podcast.spotifyUrl.split('/').pop()) === null || _a === void 0 ? void 0 : _a.split('?')[0]), width: "100%", height: "400", frameBorder: "0", allowFullScreen: true, allow: "autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture", loading: "lazy", title: "Spotify embed ".concat(podcast.id) }) }), (0, jsx_runtime_1.jsxs)("div", { className: "embed-footer", children: [(0, jsx_runtime_1.jsx)("div", { className: "platform-info", children: (0, jsx_runtime_1.jsxs)("span", { className: "platform-badge", children: [(0, jsx_runtime_1.jsx)("span", { className: "spotify-icon", children: "\uD83C\uDFB5" }), "Powered by Spotify"] }) }), (0, jsx_runtime_1.jsxs)("div", { className: "embed-actions", children: [(0, jsx_runtime_1.jsxs)("button", { className: "embed-action", onClick: handleShare, children: [(0, jsx_runtime_1.jsx)("span", { className: "action-icon", children: "\uD83D\uDCE4" }), "Share"] }), (0, jsx_runtime_1.jsxs)("a", { href: podcast.spotifyUrl, target: "_blank", rel: "noopener noreferrer", className: "embed-action external", children: [(0, jsx_runtime_1.jsx)("span", { className: "action-icon", children: "\uD83D\uDD17" }), "Open in Spotify"] })] })] })] }) }), (0, jsx_runtime_1.jsxs)("div", { className: "features-section", children: [(0, jsx_runtime_1.jsxs)("h2", { className: "section-title", children: [(0, jsx_runtime_1.jsx)("span", { className: "title-icon", children: "\u2728" }), "Why You'll Love This Content"] }), (0, jsx_runtime_1.jsx)("div", { className: "features-grid", children: features.map(function (feature, index) { return ((0, jsx_runtime_1.jsxs)("div", { className: "feature-card", style: { animationDelay: "".concat(index * 0.1, "s") }, children: [(0, jsx_runtime_1.jsx)("div", { className: "feature-icon", children: feature.icon }), (0, jsx_runtime_1.jsxs)("div", { className: "feature-content", children: [(0, jsx_runtime_1.jsx)("h3", { className: "feature-title", children: feature.label }), (0, jsx_runtime_1.jsx)("p", { className: "feature-description", children: feature.description })] })] }, index)); }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "suggestions-section", children: [(0, jsx_runtime_1.jsxs)("h2", { className: "section-title", children: [(0, jsx_runtime_1.jsx)("span", { className: "title-icon", children: "\uD83D\uDE80" }), "Explore More Content"] }), (0, jsx_runtime_1.jsxs)("div", { className: "suggestions-content", children: [(0, jsx_runtime_1.jsxs)("div", { className: "suggestion-card primary", children: [(0, jsx_runtime_1.jsx)("div", { className: "suggestion-icon", children: "\uD83D\uDCFB" }), (0, jsx_runtime_1.jsxs)("div", { className: "suggestion-text", children: [(0, jsx_runtime_1.jsx)("h3", { children: "Discover More Shows" }), (0, jsx_runtime_1.jsx)("p", { children: "Explore our curated collection of premium podcasts" })] }), (0, jsx_runtime_1.jsx)("button", { className: "suggestion-button", onClick: function () { return history.push('/podcasts'); }, children: "Browse All \u2192" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "suggestion-card secondary", children: [(0, jsx_runtime_1.jsx)("div", { className: "suggestion-icon", children: "\uD83C\uDFAF" }), (0, jsx_runtime_1.jsxs)("div", { className: "suggestion-text", children: [(0, jsx_runtime_1.jsx)("h3", { children: "Similar Content" }), (0, jsx_runtime_1.jsx)("p", { children: "Find podcasts matching your interests" })] }), (0, jsx_runtime_1.jsx)("button", { className: "suggestion-button", onClick: function () { return history.push('/podcasts'); }, children: "Discover \u2192" })] })] })] })] })] }) })); +} diff --git a/src/pages/podcasts/index.js b/src/pages/podcasts/index.js new file mode 100644 index 00000000..4d130da8 --- /dev/null +++ b/src/pages/podcasts/index.js @@ -0,0 +1,203 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = Podcasts; +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importStar(require("react")); +var Layout_1 = __importDefault(require("@theme/Layout")); +var router_1 = require("@docusaurus/router"); +require("./index.css"); +// Function to extract Spotify ID from URL +var getSpotifyEmbedId = function (url) { + var match = url.match(/(?:spotify\.com|open\.spotify\.com)\/(episode|show|playlist)\/([a-zA-Z0-9]+)/); + return match ? match[2] : url; +}; +// Function to determine content type from URL +var getSpotifyContentType = function (url) { + var match = url.match(/(?:spotify\.com|open\.spotify\.com)\/(episode|show|playlist)/); + return (match === null || match === void 0 ? void 0 : match[1]) || 'show'; +}; +// Add your podcasts here +var podcastUrls = [ + "https://open.spotify.com/show/6oPJ7ZBlN7y34yiSMguIda?si=729edf3b64a246d7", + "https://open.spotify.com/episode/1zbmUPmGRjC8o8YIMMx2Z6?si=Q4QAS3IJQVGaQYhYApckdA", + "https://open.spotify.com/episode/2twnTb39n5GH9DEhXzSIvi?si=e2d6e85ee7fe4095", + "https://open.spotify.com/episode/3SyDohHTdX2wwaTLNmPTlY?si=5d70f6f7912049a1", + "https://open.spotify.com/episode/20oNPNibv9YFK89wgYfAdK?si=36DZqf4gREC50jrDYOcGGg", + "https://open.spotify.com/episode/5MY5KieAmUWzyKVBK9eFYi?si=caa85cca96c74233", + "https://open.spotify.com/episode/3KSOxrjalScxHFQF9u8M46?si=KNpkP8b3TAy5MShtoISunw", + "https://open.spotify.com/episode/04G9l6lJCBuQ1OdqsjeZz1?si=YEC9zSFiTiSJlbiMjsJMjg", + "https://open.spotify.com/episode/2y9SeEILUFWI6rzl8okASZ?si=52faf8736f914f79", + "https://open.spotify.com/episode/21yp6PDe1XN8B1goR5qMI3?si=k6JURkMRTQq2Ltbujq9qLw", +]; +var podcastData = podcastUrls.map(function (url, index) { return ({ + id: String(index + 1), + spotifyUrl: url, + type: getSpotifyContentType(url) +}); }); +// Fetches the podcast/show/episode title from Spotify oEmbed API +var SpotifyTitle = function (_a) { + var spotifyUrl = _a.spotifyUrl, type = _a.type; + var _b = react_1.default.useState(''), title = _b[0], setTitle = _b[1]; + var _c = react_1.default.useState(true), loading = _c[0], setLoading = _c[1]; + react_1.default.useEffect(function () { + var cancelled = false; + setLoading(true); + fetch("https://open.spotify.com/oembed?url=".concat(encodeURIComponent(spotifyUrl))) + .then(function (res) { return res.json(); }) + .then(function (data) { + if (!cancelled) { + setTitle(data.title); + setLoading(false); + } + }) + .catch(function () { + if (!cancelled) { + setTitle(''); + setLoading(false); + } + }); + return function () { cancelled = true; }; + }, [spotifyUrl]); + return ((0, jsx_runtime_1.jsx)("div", { className: "podcast-title", children: loading ? ((0, jsx_runtime_1.jsxs)("div", { className: "title-skeleton", children: [(0, jsx_runtime_1.jsx)("div", { className: "skeleton-line" }), (0, jsx_runtime_1.jsx)("div", { className: "skeleton-line short" })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "podcast-type-badge", children: [(0, jsx_runtime_1.jsx)("span", { className: "type-icon", children: type === 'episode' ? '🎙️' : type === 'show' ? '📻' : '🎵' }), type.charAt(0).toUpperCase() + type.slice(1)] }), (0, jsx_runtime_1.jsx)("h3", { className: "podcast-title-text", children: title || "".concat(type.charAt(0).toUpperCase() + type.slice(1), " #").concat(Math.floor(Math.random() * 100) + 1) })] })) })); +}; +function Podcasts() { + var _this = this; + var history = (0, router_1.useHistory)(); + var _a = (0, react_1.useState)(1), currentPage = _a[0], setCurrentPage = _a[1]; + var _b = (0, react_1.useState)(''), searchTerm = _b[0], setSearchTerm = _b[1]; + var _c = (0, react_1.useState)('all'), selectedFilter = _c[0], setSelectedFilter = _c[1]; + var podcastsPerPage = 9; + // Filter podcasts based on search and filter + var filteredPodcasts = podcastData.filter(function (podcast) { + var matchesFilter = selectedFilter === 'all' || podcast.type === selectedFilter; + return matchesFilter; + }); + // Calculate podcasts for current page + var indexOfLastPodcast = currentPage * podcastsPerPage; + var indexOfFirstPodcast = indexOfLastPodcast - podcastsPerPage; + var currentPodcasts = filteredPodcasts.slice(indexOfFirstPodcast, indexOfLastPodcast); + var totalPages = Math.ceil(filteredPodcasts.length / podcastsPerPage); + var handlePageChange = function (pageNumber) { + setCurrentPage(pageNumber); + window.scrollTo({ top: 0, behavior: 'smooth' }); + }; + var handleShare = function (podcast) { return __awaiter(_this, void 0, void 0, function () { + var err_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!navigator.share) return [3 /*break*/, 5]; + _a.label = 1; + case 1: + _a.trys.push([1, 3, , 4]); + return [4 /*yield*/, navigator.share({ + title: "Check out this ".concat(podcast.type), + url: podcast.spotifyUrl, + })]; + case 2: + _a.sent(); + return [3 /*break*/, 4]; + case 3: + err_1 = _a.sent(); + // Fallback to clipboard + navigator.clipboard.writeText(podcast.spotifyUrl); + return [3 /*break*/, 4]; + case 4: return [3 /*break*/, 6]; + case 5: + navigator.clipboard.writeText(podcast.spotifyUrl); + _a.label = 6; + case 6: return [2 /*return*/]; + } + }); + }); }; + var handlePodcastClick = function (podcast, event) { + var target = event.target; + if (target.tagName === 'IFRAME' || target.closest('.podcast-embed')) { + return; + } + history.push('/podcasts/details', { podcast: podcast }); + }; + react_1.default.useEffect(function () { + setCurrentPage(1); + }, [searchTerm, selectedFilter]); + return ((0, jsx_runtime_1.jsx)(Layout_1.default, { children: (0, jsx_runtime_1.jsxs)("div", { className: "enhanced-podcast-container", children: [(0, jsx_runtime_1.jsx)("div", { className: "podcast-hero", children: (0, jsx_runtime_1.jsxs)("div", { className: "podcast-hero-content", children: [(0, jsx_runtime_1.jsxs)("div", { className: "hero-badge", children: [(0, jsx_runtime_1.jsx)("span", { className: "badge-icon", children: "\uD83C\uDF99\uFE0F" }), (0, jsx_runtime_1.jsx)("span", { className: "badge-text", children: "Premium Audio Content" })] }), (0, jsx_runtime_1.jsx)("h1", { className: "podcast-hero-title", children: "Discover Top Podcasts" }), (0, jsx_runtime_1.jsx)("p", { className: "podcast-hero-description", children: "Stream the best podcasts from your favorite stations. Dive into episodes that inspire, educate, and entertain from leading voices in tech, business, and beyond." }), (0, jsx_runtime_1.jsxs)("div", { className: "podcast-stats", children: [(0, jsx_runtime_1.jsxs)("div", { className: "stat-item", children: [(0, jsx_runtime_1.jsxs)("div", { className: "stat-number", children: [podcastData.length, "+"] }), (0, jsx_runtime_1.jsx)("div", { className: "stat-label", children: "Episodes" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "stat-item", children: [(0, jsx_runtime_1.jsx)("div", { className: "stat-number", children: "20+" }), (0, jsx_runtime_1.jsx)("div", { className: "stat-label", children: "Hours" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "stat-item", children: [(0, jsx_runtime_1.jsx)("div", { className: "stat-number", children: "5+" }), (0, jsx_runtime_1.jsx)("div", { className: "stat-label", children: "Shows" })] })] })] }) }), (0, jsx_runtime_1.jsxs)("div", { className: "podcast-filters", children: [(0, jsx_runtime_1.jsxs)("div", { className: "filter-search", children: [(0, jsx_runtime_1.jsx)("div", { className: "search-icon" }), (0, jsx_runtime_1.jsx)("input", { type: "text", placeholder: "Search podcasts...", value: searchTerm, onChange: function (e) { return setSearchTerm(e.target.value); }, className: "search-input" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "filter-tabs", children: [(0, jsx_runtime_1.jsxs)("button", { className: "filter-tab ".concat(selectedFilter === 'all' ? 'active' : ''), onClick: function () { return setSelectedFilter('all'); }, children: [(0, jsx_runtime_1.jsx)("span", { className: "tab-icon", children: "\uD83D\uDCCA" }), "All (", podcastData.length, ")"] }), (0, jsx_runtime_1.jsxs)("button", { className: "filter-tab ".concat(selectedFilter === 'episode' ? 'active' : ''), onClick: function () { return setSelectedFilter('episode'); }, children: [(0, jsx_runtime_1.jsx)("span", { className: "tab-icon", children: "\uD83C\uDF99\uFE0F" }), "Episodes (", podcastData.filter(function (p) { return p.type === 'episode'; }).length, ")"] }), (0, jsx_runtime_1.jsxs)("button", { className: "filter-tab ".concat(selectedFilter === 'show' ? 'active' : ''), onClick: function () { return setSelectedFilter('show'); }, children: [(0, jsx_runtime_1.jsx)("span", { className: "tab-icon", children: "\uD83D\uDCFB" }), "Shows (", podcastData.filter(function (p) { return p.type === 'show'; }).length, ")"] }), (0, jsx_runtime_1.jsxs)("button", { className: "filter-tab ".concat(selectedFilter === 'playlist' ? 'active' : ''), onClick: function () { return setSelectedFilter('playlist'); }, children: [(0, jsx_runtime_1.jsx)("span", { className: "tab-icon", children: "\uD83C\uDFB5" }), "Playlists (", podcastData.filter(function (p) { return p.type === 'playlist'; }).length, ")"] })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "podcast-content-section", children: currentPodcasts.length > 0 ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "podcast-grid", children: currentPodcasts.map(function (podcast, index) { return ((0, jsx_runtime_1.jsxs)("div", { className: "enhanced-podcast-card", onClick: function (e) { return handlePodcastClick(podcast, e); }, role: "button", tabIndex: 0, onKeyDown: function (e) { + if (e.key === 'Enter' || e.key === ' ') { + handlePodcastClick(podcast, e); + } + }, style: { animationDelay: "".concat(index * 0.1, "s") }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "podcast-card-header", children: [(0, jsx_runtime_1.jsx)(SpotifyTitle, { spotifyUrl: podcast.spotifyUrl, type: podcast.type }), (0, jsx_runtime_1.jsxs)("div", { className: "card-actions", children: [(0, jsx_runtime_1.jsx)("button", { className: "action-btn favorite", title: "Add to favorites", children: "\u2764\uFE0F" }), (0, jsx_runtime_1.jsx)("button", { className: "action-btn share", title: "Share podcast", onClick: function (e) { + e.stopPropagation(); + handleShare(podcast); + }, children: "\uD83D\uDD17" })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "podcast-embed", onClick: function (e) { return e.stopPropagation(); }, children: (0, jsx_runtime_1.jsx)("iframe", { src: "https://open.spotify.com/embed/".concat(podcast.type, "/").concat(getSpotifyEmbedId(podcast.spotifyUrl)), width: "100%", height: "352", frameBorder: "0", allowFullScreen: true, allow: "autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture", loading: "lazy", title: "Spotify embed ".concat(podcast.id) }) }), (0, jsx_runtime_1.jsx)("div", { className: "podcast-card-footer", children: (0, jsx_runtime_1.jsxs)("button", { className: "listen-button", children: [(0, jsx_runtime_1.jsx)("span", { className: "listen-icon", children: "\u25B6\uFE0F" }), "Listen Now"] }) })] }, podcast.id)); }) }), totalPages > 1 && ((0, jsx_runtime_1.jsxs)("div", { className: "enhanced-pagination", children: [(0, jsx_runtime_1.jsx)("button", { className: "pagination-nav", onClick: function () { return handlePageChange(Math.max(1, currentPage - 1)); }, disabled: currentPage === 1, children: "\u2190 Previous" }), (0, jsx_runtime_1.jsx)("div", { className: "pagination-numbers", children: Array.from({ length: totalPages }, function (_, i) { return i + 1; }).map(function (number) { return ((0, jsx_runtime_1.jsx)("button", { className: "pagination-number ".concat(currentPage === number ? 'active' : ''), onClick: function () { return handlePageChange(number); }, children: number }, number)); }) }), (0, jsx_runtime_1.jsx)("button", { className: "pagination-nav", onClick: function () { return handlePageChange(Math.min(totalPages, currentPage + 1)); }, disabled: currentPage === totalPages, children: "Next \u2192" })] }))] })) : ((0, jsx_runtime_1.jsxs)("div", { className: "no-results", children: [(0, jsx_runtime_1.jsx)("div", { className: "no-results-icon", children: "\uD83D\uDD0D" }), (0, jsx_runtime_1.jsx)("h3", { children: "No podcasts found" }), (0, jsx_runtime_1.jsx)("p", { children: "Try adjusting your filters or search terms" })] })) })] }) })); +} diff --git a/src/pages/privacy-policy/index.js b/src/pages/privacy-policy/index.js new file mode 100644 index 00000000..12d152a6 --- /dev/null +++ b/src/pages/privacy-policy/index.js @@ -0,0 +1,12 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var jsx_runtime_1 = require("react/jsx-runtime"); +var Layout_1 = __importDefault(require("@theme/Layout")); +var react_1 = __importDefault(require("react")); +var PrivacyPolicy = function () { + return ((0, jsx_runtime_1.jsx)(Layout_1.default, { title: "Privacy Policy", description: "Privacy Policy of RecodeHive for Learners, and users", children: (0, jsx_runtime_1.jsxs)("div", { className: "max-w-4xl mx-auto p-5 mt-5 mb-5 rounded-lg shadow-md", children: [(0, jsx_runtime_1.jsx)("h2", { className: "text-3xl font-bold text-center mb-5", children: "Privacy Policy" }), (0, jsx_runtime_1.jsxs)("p", { className: "text-base leading-7", children: [(0, jsx_runtime_1.jsx)("strong", { children: "Last Updated:" }), " 25th May 2025", (0, jsx_runtime_1.jsx)("br", {}), " ", (0, jsx_runtime_1.jsx)("br", {}), "Welcome to", " ", (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/sanjay-kv", target: "_blank", rel: "noopener noreferrer", className: "text-blue-500 underline", children: "RecodeHive" }), ", an educational and technology-focused platform operated by", " ", (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/sanjay-kv", target: "_blank", rel: "noopener noreferrer", className: "text-blue-500 underline", children: "Sanjay Viswanthan" }), "We are committed to protecting your privacy and ensuring the security of your personal information. This Privacy Policy explains how we collect, use, disclose, and safeguard your information when you visit our website.", (0, jsx_runtime_1.jsx)("br", {}), " ", (0, jsx_runtime_1.jsx)("br", {}), "By accessing or using our website, you consent to the terms of this Privacy Policy. If you do not agree with the terms of this Privacy Policy, please do not use our website."] }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-semibold mt-5 mb-3", children: "Information We Collect" }), (0, jsx_runtime_1.jsx)("p", { className: "mb-4", children: "We collect personal information that you voluntarily provide to us when you interact with the website, such as your name, email address, and any other information you choose to share. We may also collect technical information about your device and usage patterns to improve our website's functionality and user experience." }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-semibold mt-5 mb-3", children: "What personal data we collect and why we collect it" }), (0, jsx_runtime_1.jsxs)("ol", { className: "list-decimal list-inside mb-4 space-y-4", children: [(0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Comments & Personalization:" }), " When visitors leave comments on the site we collect the data shown in the comments form, and also the visitors IP address and browser user agent string to help spam detection.To customize your experience on our website and provide content and resources tailored to your interests and preferences."] }), (0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Media & Communication:" }), "If you upload images to the website, you should avoid uploading images with embedded location data (EXIF GPS) included. Visitors to the website can download and extract any location data from images on the website. To respond to your inquiries, provide customer support, and send you updates and notifications about our services, events, and educational materials."] }), (0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Cookies & Analytics:" }), " If you leave a comment on our site you may opt-in to save your name, email address and website in cookies. We use third party app giscuss for this purpose to directly authorise with Github. If you have an account and you log in to this site, we will set a temporary cookie to determine if your browser accepts cookies. This cookie contains no personal data and is discarded when you close your browser.These are for your convenience so that you do not have to fill in your details again when you leave another comment. These cookies will last for oneTo analyze trends, track user interactions, and gather demographic information to improve our website's performance and user experience."] }), (0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Security:" }), " To protect our website from security threats, fraud, or other malicious activities."] }), (0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Legal Compliance:" }), " To comply with applicable laws, regulations, or legal processes."] }), (0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Contact forms & Marketing:" }), " If you contact us we will use your name and email address to reply to your query and we won\u2019t share that information with third party. To promote our services, events, and educational materials through targeted advertising and promotional campaigns.If you are subscribing to our blog you will get emails from substack. You will get emails about a new article, freebies, e-book and much more. If you want you can unsubscribe to the emails and it is really easy. You can read About the General Data Protection"] })] }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-semibold mt-5 mb-3", children: "How long we retain your data" }), (0, jsx_runtime_1.jsx)("p", { className: "mb-4", children: "If you leave a comment, the comment and its metadata are retained indefinitely. This is so we can recognize and approve any follow-up comments automatically instead of holding them in a moderation queue." }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-semibold mt-5 mb-3", children: "Data Retention" }), (0, jsx_runtime_1.jsx)("p", { className: "mb-4", children: "We will retain your personal information for as long as necessary to fulfill the purposes outlined in this Privacy Policy, unless a longer retention period is required or permitted by law.For users that register on our website (if any), we also store the personal information they provide in their user profile. All users can see, edit, or delete their personal information at any time (except they cannot change their username). Website administrators can also see and edit that information." }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-semibold mt-5 mb-3", children: "Your Rights" }), (0, jsx_runtime_1.jsx)("p", { className: "mb-4", children: "We are using CloudFlare SSL on our website and everything which you send to us is with us and the data won\u2019t be shared with any third party.You have the right to access, update, correct, or delete your personal information at any time. You can also object to the processing of your personal information or request that we restrict certain processing activities. To exercise these rights, please contact us using the information provided below." }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-semibold mt-5 mb-3", children: "Third-Party Links" }), (0, jsx_runtime_1.jsx)("p", { className: "mb-4", children: "Our website may contain links to third-party websites or resources that are not owned or controlled by us. We are not responsible for the privacy practices or content of these third-party websites. We encourage you to review the privacy policies of these websites before providing any personal information." }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-semibold mt-5 mb-3", children: "Children's Privacy" }), (0, jsx_runtime_1.jsx)("p", { className: "mb-4", children: "If there is data breach we will contact the subscribers that there was a data breach and we will write an email to them whose data is lost. Our website is not directed to children under the age of 13. We do not knowingly collect personal information from children under 13. If you are a parent or guardian and believe that your child has provided us with personal information, please contact us, and we will take appropriate steps to remove such information from our records." }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-semibold mt-5 mb-3", children: "What third parties we receive data from" }), (0, jsx_runtime_1.jsx)("p", { className: "mb-4", children: "We recieve data from Google AdSense and Google Analytics about the user behaviour. We reserve the right to update or modify this Privacy Policy at any time. We will notify you of any changes by posting the new Privacy Policy on this page. Your continued use of our website after any modifications indicates your acceptance of the updated Privacy Policy." }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-semibold mt-5 mb-3", children: "Contact Us" }), (0, jsx_runtime_1.jsxs)("p", { className: "mb-4", children: ["If you have any questions or concerns about this Privacy Policy, please contact us at", " ", (0, jsx_runtime_1.jsx)("a", { href: "mailto:sanjay@recodehive.com", target: "_blank", rel: "noopener noreferrer", className: "text-blue-500 underline", children: "sanjay@recodehive.com" }), ". Thank you for visiting recodehive!"] })] }) })); +}; +exports.default = PrivacyPolicy; diff --git a/src/pages/showcase/_components/ShowcaseCard/index.js b/src/pages/showcase/_components/ShowcaseCard/index.js new file mode 100644 index 00000000..a5ca2cda --- /dev/null +++ b/src/pages/showcase/_components/ShowcaseCard/index.js @@ -0,0 +1,55 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importDefault(require("react")); +var clsx_1 = __importDefault(require("clsx")); +var Link_1 = __importDefault(require("@docusaurus/Link")); +var Translate_1 = __importDefault(require("@docusaurus/Translate")); +var styles_module_css_1 = __importDefault(require("./styles.module.css")); +var FavoriteIcon_1 = __importDefault(require("../../../../components/svgIcons/FavoriteIcon")); +var ShowcaseTooltip_1 = __importDefault(require("../ShowcaseTooltip")); +var users_1 = require("@site/src/data/users"); +var jsUtils_1 = require("@site/src/utils/jsUtils"); +var IdealImage_1 = __importDefault(require("@theme/IdealImage")); +var TagComp = react_1.default.forwardRef(function (_a, ref) { + var label = _a.label, color = _a.color, description = _a.description; + return ((0, jsx_runtime_1.jsxs)("li", { ref: ref, className: styles_module_css_1.default.tag, title: description, children: [(0, jsx_runtime_1.jsx)("span", { className: styles_module_css_1.default.textLabel, children: label.toLowerCase() }), (0, jsx_runtime_1.jsx)("span", { className: styles_module_css_1.default.colorLabel, style: { backgroundColor: color } })] })); +}); +function ShowcaseCardTag(_a) { + var tags = _a.tags; + var tagObjects = tags.map(function (tag) { return (__assign({ tag: tag }, users_1.Tags[tag])); }); + // Keep same order for all tags + var tagObjectsSorted = (0, jsUtils_1.sortBy)(tagObjects, function (tagObject) { + return users_1.TagList.indexOf(tagObject.tag); + }); + return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: tagObjectsSorted.map(function (tagObject, index) { + var id = "showcase_card_tag_".concat(tagObject.tag); + return ((0, jsx_runtime_1.jsx)(ShowcaseTooltip_1.default, { text: tagObject.description, anchorEl: "#__docusaurus", id: id, children: (0, jsx_runtime_1.jsx)(TagComp, __assign({}, tagObject), index) }, index)); + }) })); +} +function ShowcaseCard(_a) { + var user = _a.user; + var handleCardClick = function () { + window.open(user.website, '_blank'); + }; + var handleSourceClick = function (e) { + e.stopPropagation(); + // The link will handle the navigation + }; + return ((0, jsx_runtime_1.jsxs)("li", { className: (0, clsx_1.default)('card shadow--md', styles_module_css_1.default.card), children: [(0, jsx_runtime_1.jsx)("div", { className: styles_module_css_1.default.cardLink, onClick: handleCardClick }), (0, jsx_runtime_1.jsx)("div", { className: (0, clsx_1.default)('card__image', styles_module_css_1.default.showcaseCardImage), children: (0, jsx_runtime_1.jsx)(IdealImage_1.default, { img: user.preview, alt: user.title }) }), (0, jsx_runtime_1.jsxs)("div", { className: "card__body", children: [(0, jsx_runtime_1.jsxs)("div", { className: styles_module_css_1.default.showcaseCardHeader, children: [(0, jsx_runtime_1.jsx)("h4", { className: styles_module_css_1.default.showcaseCardTitle, children: (0, jsx_runtime_1.jsx)(Link_1.default, { href: user.website, className: styles_module_css_1.default.showcaseCardLink, target: "_blank", children: user.title }) }), user.tags.includes('favorite') && ((0, jsx_runtime_1.jsx)(FavoriteIcon_1.default, { svgClass: styles_module_css_1.default.svgIconFavorite, size: "small" })), user.source && ((0, jsx_runtime_1.jsx)(Link_1.default, { href: user.source, className: (0, clsx_1.default)('button button--secondary button--sm', styles_module_css_1.default.showcaseCardSrcBtn), target: "_blank", rel: "noopener noreferrer", onClick: handleSourceClick, children: (0, jsx_runtime_1.jsx)(Translate_1.default, { id: "showcase.card.sourceLink", children: "source" }) }))] }), (0, jsx_runtime_1.jsx)("p", { className: styles_module_css_1.default.showcaseCardBody, children: user.description })] }), (0, jsx_runtime_1.jsx)("ul", { className: (0, clsx_1.default)('card__footer', styles_module_css_1.default.cardFooter), children: (0, jsx_runtime_1.jsx)(ShowcaseCardTag, { tags: user.tags }) })] }, user.title)); +} +exports.default = react_1.default.memo(ShowcaseCard); diff --git a/src/pages/showcase/_components/ShowcaseFilterToggle/index.js b/src/pages/showcase/_components/ShowcaseFilterToggle/index.js new file mode 100644 index 00000000..87d3a7b1 --- /dev/null +++ b/src/pages/showcase/_components/ShowcaseFilterToggle/index.js @@ -0,0 +1,92 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OperatorQueryKey = void 0; +exports.readOperator = readOperator; +exports.default = ShowcaseFilterToggle; +var jsx_runtime_1 = require("react/jsx-runtime"); +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +var react_1 = __importStar(require("react")); +var router_1 = require("@docusaurus/router"); +var index_1 = require("../../index"); +var clsx_1 = __importDefault(require("clsx")); +var styles_module_css_1 = __importDefault(require("./styles.module.css")); +exports.OperatorQueryKey = 'operator'; +function readOperator(search) { + var _a; + return ((_a = new URLSearchParams(search).get(exports.OperatorQueryKey)) !== null && _a !== void 0 ? _a : 'OR'); +} +function ShowcaseFilterToggle() { + var id = 'showcase_filter_toggle'; + var location = (0, router_1.useLocation)(); + var history = (0, router_1.useHistory)(); + var _a = (0, react_1.useState)(false), operator = _a[0], setOperator = _a[1]; + (0, react_1.useEffect)(function () { + setOperator(readOperator(location.search) === 'AND'); + }, [location]); + var toggleOperator = (0, react_1.useCallback)(function () { + setOperator(function (o) { return !o; }); + var searchParams = new URLSearchParams(location.search); + searchParams.delete(exports.OperatorQueryKey); + if (!operator) { + searchParams.append(exports.OperatorQueryKey, 'AND'); + } + history.push(__assign(__assign({}, location), { search: searchParams.toString(), state: (0, index_1.prepareUserState)() })); + }, [operator, location, history]); + return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("input", { type: "checkbox", id: id, className: "screen-reader-only", "aria-label": "Toggle between or and and for the tags you selected", onChange: toggleOperator, onKeyDown: function (e) { + if (e.key === 'Enter') { + toggleOperator(); + } + }, checked: operator }), (0, jsx_runtime_1.jsxs)("label", { htmlFor: id, className: (0, clsx_1.default)(styles_module_css_1.default.checkboxLabel, 'shadow--md'), children: [(0, jsx_runtime_1.jsx)("span", { className: styles_module_css_1.default.checkboxLabelOr, children: "OR" }), (0, jsx_runtime_1.jsx)("span", { className: styles_module_css_1.default.checkboxLabelAnd, children: "AND" })] })] })); +} diff --git a/src/pages/showcase/_components/ShowcaseTagSelect/index.js b/src/pages/showcase/_components/ShowcaseTagSelect/index.js new file mode 100644 index 00000000..2da51b46 --- /dev/null +++ b/src/pages/showcase/_components/ShowcaseTagSelect/index.js @@ -0,0 +1,113 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.readSearchTags = readSearchTags; +var jsx_runtime_1 = require("react/jsx-runtime"); +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +var react_1 = __importStar(require("react")); +var router_1 = require("@docusaurus/router"); +var jsUtils_1 = require("../../../../utils/jsUtils"); +var index_1 = require("../../index"); +var styles_module_css_1 = __importDefault(require("./styles.module.css")); +var TagQueryStringKey = 'tags'; +function readSearchTags(search) { + return new URLSearchParams(search).getAll(TagQueryStringKey); +} +function replaceSearchTags(search, newTags) { + var searchParams = new URLSearchParams(search); + searchParams.delete(TagQueryStringKey); + newTags.forEach(function (tag) { return searchParams.append(TagQueryStringKey, tag); }); + return searchParams.toString(); +} +function ShowcaseTagSelect(_a, ref) { + var id = _a.id, icon = _a.icon, label = _a.label, tag = _a.tag, rest = __rest(_a, ["id", "icon", "label", "tag"]); + var location = (0, router_1.useLocation)(); + var history = (0, router_1.useHistory)(); + var _b = (0, react_1.useState)(false), selected = _b[0], setSelected = _b[1]; + (0, react_1.useEffect)(function () { + var tags = readSearchTags(location.search); + setSelected(tags.includes(tag)); + }, [tag, location]); + var toggleTag = (0, react_1.useCallback)(function () { + var tags = readSearchTags(location.search); + var newTags = (0, jsUtils_1.toggleListItem)(tags, tag); + var newSearch = replaceSearchTags(location.search, newTags); + history.push(__assign(__assign({}, location), { search: newSearch, state: (0, index_1.prepareUserState)() })); + }, [tag, location, history]); + return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("input", __assign({ type: "checkbox", id: id, className: "screen-reader-only", onKeyDown: function (e) { + if (e.key === 'Enter') { + toggleTag(); + } + }, onFocus: function (e) { + var _a; + if (e.relatedTarget) { + (_a = e.target.nextElementSibling) === null || _a === void 0 ? void 0 : _a.dispatchEvent(new KeyboardEvent('focus')); + } + }, onBlur: function (e) { + var _a; + (_a = e.target.nextElementSibling) === null || _a === void 0 ? void 0 : _a.dispatchEvent(new KeyboardEvent('blur')); + }, onChange: toggleTag, checked: selected }, rest)), (0, jsx_runtime_1.jsxs)("label", { ref: ref, htmlFor: id, className: styles_module_css_1.default.checkboxLabel, children: [label, icon] })] })); +} +exports.default = react_1.default.forwardRef(ShowcaseTagSelect); diff --git a/src/pages/showcase/_components/ShowcaseTooltip/index.js b/src/pages/showcase/_components/ShowcaseTooltip/index.js new file mode 100644 index 00000000..5f5f1b72 --- /dev/null +++ b/src/pages/showcase/_components/ShowcaseTooltip/index.js @@ -0,0 +1,98 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = Tooltip; +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importStar(require("react")); +var react_dom_1 = __importDefault(require("react-dom")); +var react_2 = require("@floating-ui/react"); +var styles_module_css_1 = __importDefault(require("./styles.module.css")); +function Tooltip(_a) { + var children = _a.children, id = _a.id, anchorEl = _a.anchorEl, text = _a.text, _b = _a.delay, delay = _b === void 0 ? 400 : _b, _c = _a.placement, placement = _c === void 0 ? 'top' : _c; + var _d = (0, react_1.useState)(false), open = _d[0], setOpen = _d[1]; + var _e = (0, react_1.useState)(null), container = _e[0], setContainer = _e[1]; + var arrowRef = (0, react_1.useRef)(null); + var _f = (0, react_2.useFloating)({ + open: open, + onOpenChange: setOpen, + placement: placement, + middleware: [ + (0, react_2.offset)(8), + (0, react_2.arrow)({ + element: arrowRef, + }), + ], + whileElementsMounted: react_2.autoUpdate, + }), refs = _f.refs, floatingStyles = _f.floatingStyles, context = _f.context; + var hover = (0, react_2.useHover)(context, { delay: delay }); + var focus = (0, react_2.useFocus)(context); + var dismiss = (0, react_2.useDismiss)(context); + var role = (0, react_2.useRole)(context, { role: 'tooltip' }); + var _g = (0, react_2.useInteractions)([ + hover, + focus, + dismiss, + role, + ]), getReferenceProps = _g.getReferenceProps, getFloatingProps = _g.getFloatingProps; + var tooltipId = "".concat(id, "_tooltip"); + (0, react_1.useEffect)(function () { + if (!anchorEl) { + setContainer(document.body); + return; + } + var newContainer = typeof anchorEl === 'string' + ? document.querySelector(anchorEl) + : anchorEl; + setContainer(newContainer); + }, [anchorEl]); + var childWithProps = react_1.default.isValidElement(children) + ? react_1.default.cloneElement(children, __assign(__assign({ ref: refs.setReference }, getReferenceProps()), { 'aria-describedby': open ? tooltipId : undefined })) + : children; + return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [childWithProps, container && open && react_dom_1.default.createPortal((0, jsx_runtime_1.jsxs)("div", __assign({ id: tooltipId, ref: refs.setFloating, className: styles_module_css_1.default.tooltip, style: floatingStyles }, getFloatingProps(), { children: [text, (0, jsx_runtime_1.jsx)(react_2.FloatingArrow, { ref: arrowRef, context: context, className: styles_module_css_1.default.tooltipArrow })] })), container)] })); +} diff --git a/src/pages/showcase/index.js b/src/pages/showcase/index.js new file mode 100644 index 00000000..132a4a5e --- /dev/null +++ b/src/pages/showcase/index.js @@ -0,0 +1,257 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.prepareUserState = prepareUserState; +exports.default = Showcase; +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importStar(require("react")); +var Layout_1 = __importDefault(require("@theme/Layout")); +var clsx_1 = __importDefault(require("clsx")); +var Head_1 = __importDefault(require("@docusaurus/Head")); +var ShowcaseTagSelect_1 = __importStar(require("./_components/ShowcaseTagSelect")); +var ShowcaseFilterToggle_1 = __importStar(require("./_components/ShowcaseFilterToggle")); +var ShowcaseCard_1 = __importDefault(require("./_components/ShowcaseCard")); +var ShowcaseTooltip_1 = __importDefault(require("./_components/ShowcaseTooltip")); +var ExecutionEnvironment_1 = __importDefault(require("@docusaurus/ExecutionEnvironment")); +var Translate_1 = __importStar(require("@docusaurus/Translate")); +var router_1 = require("@docusaurus/router"); +var theme_common_1 = require("@docusaurus/theme-common"); +var framer_motion_1 = require("framer-motion"); +var styles_module_css_1 = __importDefault(require("./styles.module.css")); +var users_1 = require("@site/src/data/users"); +var FavoriteIcon_1 = __importDefault(require("@site/src/components/svgIcons/FavoriteIcon")); +var theme_common_2 = require("@docusaurus/theme-common"); +var TITLE = 'Recode Hive: Framing all the opensource projects built by our community members'; +var DESCRIPTION = 'All the opensource projects listed below are available for you to explore, learn, and contribute.'; +var EDIT_URL = 'https://github.com/recodehive'; +function restoreUserState(userState) { + var _a; + var _b = userState !== null && userState !== void 0 ? userState : { + scrollTopPosition: 0, + focusedElementId: undefined, + }, scrollTopPosition = _b.scrollTopPosition, focusedElementId = _b.focusedElementId; + (_a = document.getElementById(focusedElementId)) === null || _a === void 0 ? void 0 : _a.focus(); + window.scrollTo({ top: scrollTopPosition }); +} +function prepareUserState() { + var _a; + if (ExecutionEnvironment_1.default.canUseDOM) { + return { + scrollTopPosition: window.scrollY, + focusedElementId: (_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.id, + }; + } + return undefined; +} +var SearchNameQueryKey = 'name'; +function readSearchName(search) { + return new URLSearchParams(search).get(SearchNameQueryKey); +} +function filterUsers(users, selectedTags, operator, searchName) { + if (searchName) { + // eslint-disable-next-line no-param-reassign + users = users.filter(function (user) { + return user.title.toLowerCase().includes(searchName.toLowerCase()); + }); + } + if (selectedTags.length === 0) { + return users; + } + return users.filter(function (user) { + if (user.tags.length === 0) { + return false; + } + if (operator === 'AND') { + return selectedTags.every(function (tag) { return user.tags.includes(tag); }); + } + return selectedTags.some(function (tag) { return user.tags.includes(tag); }); + }); +} +function useFilteredUsers() { + var location = (0, router_1.useLocation)(); + var _a = (0, react_1.useState)('OR'), operator = _a[0], setOperator = _a[1]; + // On SSR / first mount (hydration) no tag is selected + var _b = (0, react_1.useState)([]), selectedTags = _b[0], setSelectedTags = _b[1]; + var _c = (0, react_1.useState)(null), searchName = _c[0], setSearchName = _c[1]; + // Sync tags from QS to state (delayed on purpose to avoid SSR/Client + // hydration mismatch) + (0, react_1.useEffect)(function () { + setSelectedTags((0, ShowcaseTagSelect_1.readSearchTags)(location.search)); + setOperator((0, ShowcaseFilterToggle_1.readOperator)(location.search)); + setSearchName(readSearchName(location.search)); + restoreUserState(location.state); + }, [location]); + return (0, react_1.useMemo)(function () { return filterUsers(users_1.sortedUsers, selectedTags, operator, searchName); }, [selectedTags, operator, searchName]); +} +function ShowcaseHeader() { + return ((0, jsx_runtime_1.jsxs)("section", { className: "margin-top--lg margin-bottom--lg text--center", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.h1, { initial: { opacity: 0, x: -15 }, whileInView: { opacity: 1, x: 0 }, viewport: { once: true }, transition: { + duration: 1, + type: "spring", + stiffness: 100, + delay: 0.2, + }, className: styles_module_css_1.default.TitleText, children: TITLE }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.p, { initial: { opacity: 0, y: 15 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { + duration: 1, + type: "spring", + stiffness: 100, + delay: 0.3, + }, children: DESCRIPTION }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: { opacity: 0, y: 15 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { + duration: 1, + type: "spring", + stiffness: 100, + delay: 0.5, + }, children: (0, jsx_runtime_1.jsx)("a", { className: "button button--primary", href: EDIT_URL, target: "_blank", rel: "noreferrer", children: (0, jsx_runtime_1.jsx)(Translate_1.default, { id: "showcase.header.button", children: "\uD83C\uDF1F Join the Hive Community" }) }) })] })); +} +function useSiteCountPlural() { + var selectMessage = (0, theme_common_1.usePluralForm)().selectMessage; + return function (sitesCount) { + return selectMessage(sitesCount, (0, Translate_1.translate)({ + id: 'showcase.filters.resultCount', + description: 'Pluralized label for the number of sites found on the showcase. Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)', + message: '1 site|{sitesCount} sites', + }, { sitesCount: sitesCount })); + }; +} +function ShowcaseFilters() { + var filteredUsers = useFilteredUsers(); + var siteCountPlural = useSiteCountPlural(); + return ((0, jsx_runtime_1.jsxs)("section", { className: "container margin-top--l margin-bottom--lg", children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, clsx_1.default)('margin-bottom--sm', styles_module_css_1.default.filterCheckbox), children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.h2, { initial: { opacity: 0, x: -15 }, whileInView: { opacity: 1, x: 0 }, viewport: { once: true }, transition: { + duration: 1, + type: "spring", + stiffness: 100, + delay: 0.2, + }, children: (0, jsx_runtime_1.jsx)(Translate_1.default, { id: "showcase.filters.title", children: "Filters" }) }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: { opacity: 0, x: -15 }, whileInView: { opacity: 1, x: 0 }, viewport: { once: true }, transition: { + duration: 1, + type: "spring", + stiffness: 100, + delay: 0.3, + }, children: (0, jsx_runtime_1.jsx)("span", { children: siteCountPlural(filteredUsers.length) }) })] }), (0, jsx_runtime_1.jsx)(ShowcaseFilterToggle_1.default, {})] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.ul, { initial: { opacity: 0 }, whileInView: { opacity: 1 }, viewport: { once: true }, transition: { + duration: 4, + type: "spring", + stiffness: 100, + delay: 0.5, + }, className: (0, clsx_1.default)('clean-list', styles_module_css_1.default.checkboxList), children: users_1.TagList.map(function (tag, i) { + var _a = users_1.Tags[tag], label = _a.label, description = _a.description, color = _a.color; + var id = "showcase_checkbox_id_".concat(tag); + return ((0, jsx_runtime_1.jsx)("li", { className: styles_module_css_1.default.checkboxListItem, children: (0, jsx_runtime_1.jsx)(ShowcaseTooltip_1.default, { id: id, text: description, anchorEl: "#__docusaurus", children: (0, jsx_runtime_1.jsx)(ShowcaseTagSelect_1.default, { tag: tag, id: id, label: label, icon: tag === 'favorite' ? ((0, jsx_runtime_1.jsx)(FavoriteIcon_1.default, { svgClass: styles_module_css_1.default.svgIconFavoriteXs })) : ((0, jsx_runtime_1.jsx)("span", { style: { + backgroundColor: color, + width: 10, + height: 10, + borderRadius: '50%', + marginLeft: 8, + } })) }) }) }, i)); + }) })] })); +} +var favoriteUsers = users_1.sortedUsers.filter(function (user) { + return user.tags.includes('favorite'); +}); +var otherUsers = users_1.sortedUsers.filter(function (user) { return !user.tags.includes('favorite'); }); +function SearchBar() { + var history = (0, router_1.useHistory)(); + var location = (0, router_1.useLocation)(); + var _a = (0, react_1.useState)(null), value = _a[0], setValue = _a[1]; + (0, react_1.useEffect)(function () { + setValue(readSearchName(location.search)); + }, [location]); + return ((0, jsx_runtime_1.jsx)("div", { className: styles_module_css_1.default.searchContainer, children: (0, jsx_runtime_1.jsx)("input", { id: "searchbar", placeholder: (0, Translate_1.translate)({ + message: 'Search for site name...', + id: 'showcase.searchBar.placeholder', + }), value: value !== null && value !== void 0 ? value : undefined, onInput: function (e) { + setValue(e.currentTarget.value); + var newSearch = new URLSearchParams(location.search); + newSearch.delete(SearchNameQueryKey); + if (e.currentTarget.value) { + newSearch.set(SearchNameQueryKey, e.currentTarget.value); + } + history.push(__assign(__assign({}, location), { search: newSearch.toString(), state: prepareUserState() })); + setTimeout(function () { + var _a; + (_a = document.getElementById('searchbar')) === null || _a === void 0 ? void 0 : _a.focus(); + }, 0); + } }) })); +} +function ShowcaseCards() { + var filteredUsers = useFilteredUsers(); + if (filteredUsers.length === 0) { + return ((0, jsx_runtime_1.jsx)("section", { className: "margin-top--lg margin-bottom--xl", children: (0, jsx_runtime_1.jsxs)("div", { className: "container padding-vert--md text--center", children: [(0, jsx_runtime_1.jsx)("h2", { children: (0, jsx_runtime_1.jsx)(Translate_1.default, { id: "showcase.usersList.noResult", children: "No result" }) }), (0, jsx_runtime_1.jsx)(SearchBar, {})] }) })); + } + return ((0, jsx_runtime_1.jsx)("section", { className: "margin-top--lg margin-bottom--xl", children: filteredUsers.length === users_1.sortedUsers.length ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: styles_module_css_1.default.showcaseFavorite, children: (0, jsx_runtime_1.jsxs)("div", { className: "container", children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, clsx_1.default)('margin-bottom--md', styles_module_css_1.default.showcaseFavoriteHeader), children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.h2, { initial: { opacity: 0, x: -15 }, whileInView: { opacity: 1, x: 0 }, viewport: { once: true }, transition: { + duration: 1, + type: "spring", + stiffness: 100, + delay: 0.3, + }, children: (0, jsx_runtime_1.jsx)(Translate_1.default, { id: "showcase.favoritesList.title", children: "Best of the Hive" }) }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.h2, { initial: { opacity: 0, x: -15 }, whileInView: { opacity: 1, x: 0 }, viewport: { once: true }, transition: { + duration: 1, + type: "spring", + stiffness: 100, + delay: 0.3, + }, children: (0, jsx_runtime_1.jsx)(FavoriteIcon_1.default, { svgClass: styles_module_css_1.default.svgIconFavorite }) }), (0, jsx_runtime_1.jsx)(SearchBar, {})] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.ul, { initial: { opacity: 0 }, whileInView: { opacity: 1 }, viewport: { once: true }, transition: { + duration: 4, + type: "spring", + stiffness: 100, + delay: 0.4, + }, className: (0, clsx_1.default)('container', 'clean-list', styles_module_css_1.default.showcaseList), children: favoriteUsers.map(function (user) { return ((0, jsx_runtime_1.jsx)(ShowcaseCard_1.default, { user: user }, user.title)); }) })] }) }), (0, jsx_runtime_1.jsxs)("div", { className: "container margin-top--lg", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.h2, { initial: { opacity: 0, x: -15 }, whileInView: { opacity: 1, x: 0 }, viewport: { once: true }, transition: { + duration: 1, + type: "spring", + stiffness: 100, + delay: 0.5, + }, className: styles_module_css_1.default.showcaseHeader, children: (0, jsx_runtime_1.jsx)(Translate_1.default, { id: "showcase.usersList.allUsers", children: "All sites" }) }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.ul, { initial: { opacity: 0 }, whileInView: { opacity: 1 }, viewport: { once: true }, transition: { + duration: 4, + type: "spring", + stiffness: 100, + delay: 0.5, + }, className: (0, clsx_1.default)('clean-list', styles_module_css_1.default.showcaseList), children: otherUsers.map(function (user) { return ((0, jsx_runtime_1.jsx)(ShowcaseCard_1.default, { user: user }, user.title)); }) })] })] })) : ((0, jsx_runtime_1.jsxs)("div", { className: "container", children: [(0, jsx_runtime_1.jsx)("div", { className: (0, clsx_1.default)('margin-bottom--md', styles_module_css_1.default.showcaseFavoriteHeader), children: (0, jsx_runtime_1.jsx)(SearchBar, {}) }), (0, jsx_runtime_1.jsx)("ul", { className: (0, clsx_1.default)('clean-list', styles_module_css_1.default.showcaseList), children: filteredUsers.map(function (user) { return ((0, jsx_runtime_1.jsx)(ShowcaseCard_1.default, { user: user }, user.title)); }) })] })) })); +} +function Showcase() { + return ((0, jsx_runtime_1.jsx)(Layout_1.default, { title: "Showcase of CodeHarborHub", description: "Showcase of CodeHarborHub for CodeHarborHub Learners and users", children: (0, jsx_runtime_1.jsx)(ShowcaseContent, {}) })); +} +function ShowcaseContent() { + var colorMode = (0, theme_common_2.useColorMode)().colorMode; + var isDark = colorMode === "dark"; + return ((0, jsx_runtime_1.jsxs)("main", { className: (0, clsx_1.default)("", isDark ? "bg-[#121212] text-white" : "bg-white text-black"), children: [(0, jsx_runtime_1.jsx)(Head_1.default, { children: (0, jsx_runtime_1.jsx)("script", { async: true, "custom-element": "amp-auto-ads", src: "https://cdn.ampproject.org/v0/amp-auto-ads-0.1.js" }) }), (0, jsx_runtime_1.jsx)(ShowcaseHeader, {}), (0, jsx_runtime_1.jsx)(ShowcaseFilters, {}), (0, jsx_runtime_1.jsx)(ShowcaseCards, {})] })); +} diff --git a/src/pages/terms-service/index.js b/src/pages/terms-service/index.js new file mode 100644 index 00000000..7e8061c6 --- /dev/null +++ b/src/pages/terms-service/index.js @@ -0,0 +1,12 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importDefault(require("react")); +var Layout_1 = __importDefault(require("@theme/Layout")); +var TermsOfService = function () { + return ((0, jsx_runtime_1.jsx)(Layout_1.default, { title: "Terms and condition of recodehive.com", description: "Terms of Service Page for recodehive Learners, and users", children: (0, jsx_runtime_1.jsxs)("div", { className: "max-w-3xl mx-auto p-6 rounded-lg shadow-lg mt-8 mb-8 text-base leading-relaxed font-sans text-justify", children: [(0, jsx_runtime_1.jsx)("h2", { className: "text-2xl font-bold mb-6 text-center", children: "Terms of Service" }), (0, jsx_runtime_1.jsxs)("p", { className: "mb-6", children: ["These Terms of Service govern your use of", " ", (0, jsx_runtime_1.jsx)("b", { className: "bg-yellow-100 dark:bg-yellow-600 dark:text-gray-900", children: "recodehive" }), ", provided by", " ", (0, jsx_runtime_1.jsx)("strong", { className: "bg-yellow-100 dark:bg-yellow-600 dark:text-gray-900", children: "Sanjay Viswanathan" }), ". Below are the Terms and Conditions for the use of www.recodehive.com. Please read these carefully. If you need to contact us regarding any aspect of the following terms of use of our website, please reach out us at the following email address \u2013 sanjay@recodehive.com."] }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-bold mb-4", children: "Acceptance of Terms" }), (0, jsx_runtime_1.jsx)("p", { className: "mb-6", children: "By accessing or using the Service, you acknowledge that you have read, understood, and agree to be bound by these Terms, as well as any additional terms and conditions, policies, and guidelines provided by us. If you do not agree to these Terms, please refrain from using the Service." }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-bold mb-4", children: "Use of the Service" }), (0, jsx_runtime_1.jsxs)("ol", { className: "list-decimal pl-6 mb-6", children: [(0, jsx_runtime_1.jsxs)("li", { className: "mb-4", children: [(0, jsx_runtime_1.jsx)("strong", { children: "Usage Instructions:" }), " You agree not to use the website in a way that may impair the performance, corrupt or manipulate the content or information available on the website or reduce the overall functionality of the website."] }), (0, jsx_runtime_1.jsxs)("li", { className: "mb-4", children: [(0, jsx_runtime_1.jsx)("strong", { children: "License:" }), " We grant you a limited, non-exclusive, non-transferable, and revocable license to access and use the Service for your personal or internal business purposes. This license does not permit any resale or commercial use of the Service."] }), (0, jsx_runtime_1.jsxs)("li", { className: "mb-4", children: [(0, jsx_runtime_1.jsx)("strong", { children: "User Conduct:" }), " You agree not to compromise the security of the website or attempt to gain access to secured areas of the website or attempt to access any sensitive information you may believe exist on the website or server where it is hosted."] })] }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-bold mb-4", children: "Content" }), (0, jsx_runtime_1.jsxs)("ol", { className: "list-decimal pl-6 mb-6", children: [(0, jsx_runtime_1.jsxs)("li", { className: "mb-4", children: [(0, jsx_runtime_1.jsx)("strong", { children: "User Content:" }), " You retain ownership of any content you submit or upload to the Service (\"User Content\"). By submitting User Content, you grant us a worldwide, royalty-free, and non-exclusive license to use, reproduce, modify, adapt, publish, translate, distribute, and display such User Content."] }), (0, jsx_runtime_1.jsxs)("li", { className: "mb-4", children: [(0, jsx_runtime_1.jsx)("strong", { children: "Intellectual Property:" }), " All content, trademarks, service marks, logos, and other intellectual property displayed on or related to the Service are the property of", " ", (0, jsx_runtime_1.jsx)("strong", { className: "bg-yellow-100 dark:bg-yellow-600 dark:text-gray-900", children: "Sanjay Viswanathan" }), " or its licensors. You may not use or display any of these without our prior written consent."] }), (0, jsx_runtime_1.jsxs)("li", { className: "mb-4", children: [(0, jsx_runtime_1.jsx)("strong", { children: "Compensation:" }), " You agree to be fully responsible for any claim, expense, losses, liability, costs including legal fees incurred by us arising from any infringement of the terms and conditions of this agreement and to which you will have agreed if you continue to use the website."] })] }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-bold mb-4", children: "Privacy" }), (0, jsx_runtime_1.jsxs)("p", { className: "mb-6", children: ["Your privacy is important to us. Please review our", " ", (0, jsx_runtime_1.jsx)("a", { href: "/privacy-policy/", target: "_blank", rel: "noopener noreferrer", className: "text-blue-600 underline", children: "Privacy Policy" }), " ", "to understand how we collect, use, and disclose your personal information."] }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-bold mb-4", children: "Termination" }), (0, jsx_runtime_1.jsx)("p", { className: "mb-6", children: "We reserve the right to suspend or terminate your access to the Service at any time, with or without cause, and without notice or liability." }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-bold mb-4", children: "Governing Law" }), (0, jsx_runtime_1.jsx)("p", { className: "mb-6", children: "These Terms shall be governed by and construed per the laws of India, without regard to its conflict of law principles." }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-bold mb-4", children: "Changes to the Terms" }), (0, jsx_runtime_1.jsx)("p", { className: "mb-6", children: "Though we strive to be entirely accurate in the information that is presented on our site and attempt to keep it as up to date as possible, in some cases, some of the information you find on the website may be slightly outdated. www.recodehive.com reserves the right to make any modifications or corrections to the information you find on the site at any time without notice." }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-bold mb-4", children: "Contact Us" }), (0, jsx_runtime_1.jsxs)("p", { children: ["If you have any questions about these Terms, please contact us at", " ", (0, jsx_runtime_1.jsx)("a", { href: "mailto:sanjay@recodehive.com", className: "text-blue-600 underline", children: "sanjay@recodehive.com" }), "."] })] }) })); +}; +exports.default = TermsOfService; diff --git a/src/plugins/tailwind-plugin.js b/src/plugins/tailwind-plugin.js new file mode 100644 index 00000000..7b50d5b1 --- /dev/null +++ b/src/plugins/tailwind-plugin.js @@ -0,0 +1,13 @@ +// src/plugins/tailwind-plugin.js +module.exports = function tailwindPlugin(context, options) { + return { + name: "tailwind-plugin", + configurePostCss: function (postcssOptions) { + postcssOptions.plugins = [ + require("@tailwindcss/postcss"), + // optionally: require("autoprefixer") + ]; + return postcssOptions; + }, + }; +}; diff --git a/src/services/githubService.js b/src/services/githubService.js new file mode 100644 index 00000000..22d88a32 --- /dev/null +++ b/src/services/githubService.js @@ -0,0 +1,544 @@ +"use strict"; +// GitHub API service for fetching organization metrics +// Uses localStorage for caching to reduce API calls +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.githubService = void 0; +var GitHubService = /** @class */ (function () { + function GitHubService() { + this.ORG_NAME = 'recodehive'; + this.CACHE_KEY = 'github_org_stats'; + this.CACHE_DURATION = 30 * 60 * 1000; // 30 minutes in milliseconds + this.BASE_URL = 'https://api.github.com'; + } + // Get headers for GitHub API requests + GitHubService.prototype.getHeaders = function () { + var headers = { + 'Accept': 'application/vnd.github.v3+json', + 'Content-Type': 'application/json', + }; + // Add GitHub token if available in environment + // Note: In production, you might want to use a server-side proxy to avoid exposing tokens + if (typeof window !== 'undefined' && window.GITHUB_TOKEN) { + headers['Authorization'] = "token ".concat(window.GITHUB_TOKEN); + } + return headers; + }; + // Fetch with error handling and rate limit consideration + GitHubService.prototype.fetchWithRetry = function (url_1) { + return __awaiter(this, arguments, void 0, function (url, retries) { + var _loop_1, this_1, i, state_1; + if (retries === void 0) { retries = 3; } + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _loop_1 = function (i) { + var response, error_1; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + _b.trys.push([0, 2, , 4]); + return [4 /*yield*/, fetch(url, { + headers: this_1.getHeaders(), + })]; + case 1: + response = _b.sent(); + if (response.status === 403) { + // Rate limited - don't retry, just throw error + console.warn('GitHub API rate limit exceeded'); + throw new Error('GitHub API rate limit exceeded'); + } + if (!response.ok) { + throw new Error("HTTP ".concat(response.status, ": ").concat(response.statusText)); + } + return [2 /*return*/, { value: response }]; + case 2: + error_1 = _b.sent(); + if (i === retries - 1) + throw error_1; + return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, 1000 * (i + 1)); })]; + case 3: + _b.sent(); + return [3 /*break*/, 4]; + case 4: return [2 /*return*/]; + } + }); + }; + this_1 = this; + i = 0; + _a.label = 1; + case 1: + if (!(i < retries)) return [3 /*break*/, 4]; + return [5 /*yield**/, _loop_1(i)]; + case 2: + state_1 = _a.sent(); + if (typeof state_1 === "object") + return [2 /*return*/, state_1.value]; + _a.label = 3; + case 3: + i++; + return [3 /*break*/, 1]; + case 4: throw new Error('Failed after retries'); + } + }); + }); + }; + // Get cached data if valid + GitHubService.prototype.getCachedData = function () { + if (typeof window === 'undefined') + return null; + try { + var cached = localStorage.getItem(this.CACHE_KEY); + if (!cached) + return null; + var data = JSON.parse(cached); + var now = Date.now(); + if (now - data.lastUpdated < this.CACHE_DURATION) { + return data; + } + } + catch (error) { + console.warn('Error reading GitHub stats cache:', error); + // Clear invalid cache + localStorage.removeItem(this.CACHE_KEY); + } + return null; + }; + // Cache data to localStorage + GitHubService.prototype.setCachedData = function (data) { + if (typeof window === 'undefined') + return; + try { + localStorage.setItem(this.CACHE_KEY, JSON.stringify(__assign(__assign({}, data), { lastUpdated: Date.now() }))); + } + catch (error) { + console.warn('Error caching GitHub stats:', error); + } + }; + // Fetch organization basic info + GitHubService.prototype.fetchOrganizationInfo = function (signal) { + return __awaiter(this, void 0, void 0, function () { + var response; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, fetch("".concat(this.BASE_URL, "/orgs/").concat(this.ORG_NAME), { + headers: this.getHeaders(), + signal: signal, + })]; + case 1: + response = _a.sent(); + if (!response.ok) { + throw new Error("Failed to fetch organization info: ".concat(response.status)); + } + return [2 /*return*/, response.json()]; + } + }); + }); + }; + // Fetch all public repositories for the organization + GitHubService.prototype.fetchAllRepositories = function (signal) { + return __awaiter(this, void 0, void 0, function () { + var repositories, page, perPage, response, repos; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + repositories = []; + page = 1; + perPage = 100; + _a.label = 1; + case 1: + if (!true) return [3 /*break*/, 4]; + return [4 /*yield*/, fetch("".concat(this.BASE_URL, "/orgs/").concat(this.ORG_NAME, "/repos?type=public&per_page=").concat(perPage, "&page=").concat(page, "&sort=updated"), { + headers: this.getHeaders(), + signal: signal, + })]; + case 2: + response = _a.sent(); + if (!response.ok) { + if (response.status === 403) { + console.warn('GitHub API rate limit exceeded while fetching repositories'); + throw new Error('GitHub API rate limit exceeded'); + } + throw new Error("Failed to fetch repositories: ".concat(response.status)); + } + return [4 /*yield*/, response.json()]; + case 3: + repos = _a.sent(); + if (repos.length === 0) + return [3 /*break*/, 4]; + repositories.push.apply(repositories, repos); + if (repos.length < perPage) + return [3 /*break*/, 4]; + page++; + return [3 /*break*/, 1]; + case 4: return [2 /*return*/, repositories]; + } + }); + }); + }; + // Estimate contributors count (GitHub API doesn't provide org-wide contributor count) + GitHubService.prototype.estimateContributors = function (repositories, signal) { + return __awaiter(this, void 0, void 0, function () { + var topRepos, totalContributors, contributorPromises, contributorCounts, sumContributors; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + topRepos = repositories + .filter(function (repo) { return !repo.archived && repo.stargazers_count > 0; }) + .sort(function (a, b) { return b.stargazers_count - a.stargazers_count; }) + .slice(0, 10); + totalContributors = 0; + contributorPromises = topRepos.map(function (repo) { return __awaiter(_this, void 0, void 0, function () { + var response, linkHeader, match, contributors, error_2; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 4, , 5]); + return [4 /*yield*/, fetch("".concat(this.BASE_URL, "/repos/").concat(repo.full_name, "/contributors?per_page=1"), { + headers: this.getHeaders(), + signal: signal, + })]; + case 1: + response = _a.sent(); + if (!response.ok) return [3 /*break*/, 3]; + linkHeader = response.headers.get('Link'); + if (linkHeader) { + match = linkHeader.match(/page=(\d+)>; rel="last"/); + if (match) { + return [2 /*return*/, parseInt(match[1])]; + } + } + return [4 /*yield*/, response.json()]; + case 2: + contributors = _a.sent(); + return [2 /*return*/, Array.isArray(contributors) ? contributors.length : 0]; + case 3: return [2 /*return*/, 0]; + case 4: + error_2 = _a.sent(); + console.warn("Error fetching contributors for ".concat(repo.name, ":"), error_2); + return [2 /*return*/, 0]; + case 5: return [2 /*return*/]; + } + }); + }); }); + return [4 /*yield*/, Promise.all(contributorPromises)]; + case 1: + contributorCounts = _a.sent(); + sumContributors = contributorCounts.reduce(function (sum, count) { return sum + count; }, 0); + // Apply estimation factor for unique contributors across repos + totalContributors = Math.round(sumContributors * 0.7); // Assume 30% overlap + // Ensure minimum reasonable number + return [2 /*return*/, Math.max(totalContributors, 140)]; + } + }); + }); + }; + // Get discussions count (approximate using search) + GitHubService.prototype.getDiscussionsCount = function (signal) { + return __awaiter(this, void 0, void 0, function () { + var response, data, error_3; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 4, , 5]); + return [4 /*yield*/, fetch("".concat(this.BASE_URL, "/search/issues?q=repo:").concat(this.ORG_NAME, "/Support+type:issue"), { + headers: this.getHeaders(), + signal: signal, + })]; + case 1: + response = _a.sent(); + if (!response.ok) return [3 /*break*/, 3]; + return [4 /*yield*/, response.json()]; + case 2: + data = _a.sent(); + return [2 /*return*/, data.total_count || 0]; + case 3: return [3 /*break*/, 5]; + case 4: + error_3 = _a.sent(); + console.warn('Error fetching discussions count:', error_3); + return [3 /*break*/, 5]; + case 5: return [2 /*return*/, 0]; + } + }); + }); + }; + // Main method to fetch all organization statistics + GitHubService.prototype.fetchOrganizationStats = function (signal) { + return __awaiter(this, void 0, void 0, function () { + var cached, _a, orgInfo, repositories, activeRepos, totalStars, totalForks, _b, totalContributors, discussionsCount, stats, error_4, fallbackStats; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + cached = this.getCachedData(); + if (cached) { + return [2 /*return*/, cached]; + } + _c.label = 1; + case 1: + _c.trys.push([1, 4, , 5]); + return [4 /*yield*/, Promise.all([ + this.fetchOrganizationInfo(signal), + this.fetchAllRepositories(signal), + ])]; + case 2: + _a = _c.sent(), orgInfo = _a[0], repositories = _a[1]; + activeRepos = repositories.filter(function (repo) { return !repo.archived; }); + totalStars = repositories.reduce(function (sum, repo) { return sum + repo.stargazers_count; }, 0); + totalForks = repositories.reduce(function (sum, repo) { return sum + repo.forks_count; }, 0); + return [4 /*yield*/, Promise.all([ + this.estimateContributors(activeRepos, signal), + this.getDiscussionsCount(signal), + ])]; + case 3: + _b = _c.sent(), totalContributors = _b[0], discussionsCount = _b[1]; + stats = { + totalStars: totalStars, + totalForks: totalForks, + totalRepositories: repositories.length, + publicRepositories: activeRepos.length, + totalContributors: totalContributors, + discussionsCount: discussionsCount, + lastUpdated: Date.now(), + }; + // Cache the results + this.setCachedData(stats); + return [2 /*return*/, stats]; + case 4: + error_4 = _c.sent(); + console.error('Error fetching GitHub organization stats:', error_4); + fallbackStats = { + totalStars: 0, + totalForks: 0, + totalRepositories: 0, + publicRepositories: 0, + totalContributors: 140, + discussionsCount: 0, + lastUpdated: Date.now(), + }; + return [2 /*return*/, fallbackStats]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + // Clear cache (useful for manual refresh) + GitHubService.prototype.clearCache = function () { + if (typeof window !== 'undefined') { + localStorage.removeItem(this.CACHE_KEY); + } + }; + // Get cache status + GitHubService.prototype.getCacheStatus = function () { + var cached = this.getCachedData(); + if (!cached) { + return { cached: false, age: 0, expiresIn: 0 }; + } + var age = Date.now() - cached.lastUpdated; + var expiresIn = Math.max(0, this.CACHE_DURATION - age); + return { cached: true, age: age, expiresIn: expiresIn }; + }; + // Fetch GitHub Discussions using GraphQL API + GitHubService.prototype.fetchDiscussions = function () { + return __awaiter(this, arguments, void 0, function (limit, signal) { + var query, variables, response, data, discussions, error_5; + var _a, _b, _c; + if (limit === void 0) { limit = 20; } + return __generator(this, function (_d) { + switch (_d.label) { + case 0: + query = "\n query GetDiscussions($owner: String!, $name: String!, $first: Int!) {\n repository(owner: $owner, name: $name) {\n discussions(first: $first, orderBy: {field: UPDATED_AT, direction: DESC}) {\n nodes {\n id\n title\n body\n createdAt\n updatedAt\n url\n author {\n login\n avatarUrl\n url\n }\n category {\n name\n emoji\n }\n comments {\n totalCount\n }\n reactions {\n totalCount\n }\n labels(first: 10) {\n nodes {\n name\n color\n }\n }\n }\n }\n }\n }\n "; + variables = { + owner: this.ORG_NAME, + name: 'recode-website', // Main repository for discussions + first: limit + }; + _d.label = 1; + case 1: + _d.trys.push([1, 4, , 5]); + return [4 /*yield*/, fetch('https://api.github.com/graphql', { + method: 'POST', + headers: __assign(__assign({}, this.getHeaders()), { 'Content-Type': 'application/json' }), + body: JSON.stringify({ query: query, variables: variables }), + signal: signal, + })]; + case 2: + response = _d.sent(); + if (!response.ok) { + throw new Error("GraphQL request failed: ".concat(response.status)); + } + return [4 /*yield*/, response.json()]; + case 3: + data = _d.sent(); + if (data.errors) { + console.error('GraphQL errors:', data.errors); + throw new Error('GraphQL query failed'); + } + discussions = ((_c = (_b = (_a = data.data) === null || _a === void 0 ? void 0 : _a.repository) === null || _b === void 0 ? void 0 : _b.discussions) === null || _c === void 0 ? void 0 : _c.nodes) || []; + return [2 /*return*/, discussions.map(function (discussion) { + var _a, _b, _c, _d, _e, _f, _g, _h, _j; + return ({ + id: discussion.id, + title: discussion.title, + body: discussion.body || '', + author: { + login: ((_a = discussion.author) === null || _a === void 0 ? void 0 : _a.login) || 'Unknown', + avatar_url: ((_b = discussion.author) === null || _b === void 0 ? void 0 : _b.avatarUrl) || '', + html_url: ((_c = discussion.author) === null || _c === void 0 ? void 0 : _c.url) || '', + }, + category: { + name: ((_d = discussion.category) === null || _d === void 0 ? void 0 : _d.name) || 'General', + emoji: ((_e = discussion.category) === null || _e === void 0 ? void 0 : _e.emoji) || '💬', + }, + created_at: discussion.createdAt, + updated_at: discussion.updatedAt, + comments: ((_f = discussion.comments) === null || _f === void 0 ? void 0 : _f.totalCount) || 0, + reactions: { + total_count: ((_g = discussion.reactions) === null || _g === void 0 ? void 0 : _g.totalCount) || 0, + }, + html_url: discussion.url, + labels: ((_j = (_h = discussion.labels) === null || _h === void 0 ? void 0 : _h.nodes) === null || _j === void 0 ? void 0 : _j.map(function (label) { return ({ + name: label.name, + color: label.color, + }); })) || [], + }); + })]; + case 4: + error_5 = _d.sent(); + console.error('Error fetching discussions:', error_5); + // Return mock data for development/fallback + return [2 /*return*/, this.getMockDiscussions()]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + // Mock discussions for development/fallback + GitHubService.prototype.getMockDiscussions = function () { + return [ + { + id: '1', + title: 'Welcome to RecodeHive Discussions!', + body: 'This is where we discuss ideas, share knowledge, and help each other grow. Feel free to ask questions, share your projects, or just say hello!', + author: { + login: 'recodehive', + avatar_url: 'https://avatars.githubusercontent.com/u/your-org-id?v=4', + html_url: 'https://github.com/recodehive', + }, + category: { + name: 'Announcements', + emoji: '📢', + }, + created_at: new Date(Date.now() - 86400000).toISOString(), + updated_at: new Date(Date.now() - 3600000).toISOString(), + comments: 12, + reactions: { + total_count: 25, + }, + html_url: 'https://github.com/recodehive/recode-website/discussions', + labels: [ + { name: 'welcome', color: '0075ca' }, + { name: 'community', color: '7057ff' }, + ], + }, + { + id: '2', + title: 'How to contribute to open source projects?', + body: 'I\'m new to open source and would love to learn how to make my first contribution. Any tips or resources would be greatly appreciated!', + author: { + login: 'newcontributor', + avatar_url: 'https://avatars.githubusercontent.com/u/example?v=4', + html_url: 'https://github.com/newcontributor', + }, + category: { + name: 'Q&A', + emoji: '❓', + }, + created_at: new Date(Date.now() - 172800000).toISOString(), + updated_at: new Date(Date.now() - 7200000).toISOString(), + comments: 8, + reactions: { + total_count: 15, + }, + html_url: 'https://github.com/recodehive/recode-website/discussions', + labels: [ + { name: 'question', color: 'd876e3' }, + { name: 'beginner', color: '0e8a16' }, + ], + }, + { + id: '3', + title: 'Feature Request: Dark Mode for Documentation', + body: 'It would be great to have a dark mode option for the documentation pages. This would be easier on the eyes during late-night coding sessions.', + author: { + login: 'darkmode-lover', + avatar_url: 'https://avatars.githubusercontent.com/u/example2?v=4', + html_url: 'https://github.com/darkmode-lover', + }, + category: { + name: 'Ideas', + emoji: '💡', + }, + created_at: new Date(Date.now() - 259200000).toISOString(), + updated_at: new Date(Date.now() - 10800000).toISOString(), + comments: 5, + reactions: { + total_count: 22, + }, + html_url: 'https://github.com/recodehive/recode-website/discussions', + labels: [ + { name: 'enhancement', color: 'a2eeef' }, + { name: 'ui/ux', color: 'f9d0c4' }, + ], + }, + ]; + }; + return GitHubService; +}()); +exports.githubService = new GitHubService(); diff --git a/src/theme/ColorModeToggle/index.js b/src/theme/ColorModeToggle/index.js new file mode 100644 index 00000000..2d30f5fe --- /dev/null +++ b/src/theme/ColorModeToggle/index.js @@ -0,0 +1,43 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = ColorModeToggle; +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importDefault(require("react")); +var theme_common_1 = require("@docusaurus/theme-common"); +function ColorModeToggle() { + var _a = (0, theme_common_1.useColorMode)(), colorMode = _a.colorMode, setColorMode = _a.setColorMode; + var toggleColorMode = function () { + var newMode = colorMode === 'dark' ? 'light' : 'dark'; + // Only use Docusaurus's setColorMode - it handles everything properly + setColorMode(newMode); + }; + return ((0, jsx_runtime_1.jsx)("button", { onClick: toggleColorMode, "aria-label": "Switch to ".concat(colorMode === 'dark' ? 'light' : 'dark', " mode"), style: { + background: 'none', + border: 'none', + cursor: 'pointer', + padding: '8px', + borderRadius: '6px', + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + transition: 'all 0.3s cubic-bezier(0.4, 0, 0.2, 1)', + transform: 'scale(1)', + }, onMouseEnter: function (e) { + e.currentTarget.style.transform = 'scale(1.1)'; + }, onMouseLeave: function (e) { + e.currentTarget.style.transform = 'scale(1)'; + }, children: (0, jsx_runtime_1.jsx)("div", { style: { + transition: 'all 0.3s cubic-bezier(0.4, 0, 0.2, 1)', + opacity: 1, + transform: 'rotate(0deg)' + }, children: colorMode === 'dark' ? ((0, jsx_runtime_1.jsx)("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "currentColor", style: { + transition: 'all 0.3s cubic-bezier(0.4, 0, 0.2, 1)', + filter: 'drop-shadow(0 0 4px rgba(255, 193, 7, 0.3))' + }, children: (0, jsx_runtime_1.jsx)("path", { d: "M12 2.25a.75.75 0 01.75.75v2.25a.75.75 0 01-1.5 0V3a.75.75 0 01.75-.75zM7.5 12a4.5 4.5 0 119 0 4.5 4.5 0 01-9 0zM18.894 6.166a.75.75 0 00-1.06-1.06l-1.591 1.59a.75.75 0 101.06 1.061l1.591-1.59zM21.75 12a.75.75 0 01-.75.75h-2.25a.75.75 0 010-1.5H21a.75.75 0 01.75.75zM17.834 18.894a.75.75 0 001.06-1.06l-1.59-1.591a.75.75 0 10-1.061 1.06l1.59 1.591zM12 18a.75.75 0 01.75.75V21a.75.75 0 01-1.5 0v-2.25A.75.75 0 0112 18zM7.758 17.303a.75.75 0 00-1.061-1.06l-1.591 1.59a.75.75 0 001.06 1.061l1.591-1.59zM6 12a.75.75 0 01-.75.75H3a.75.75 0 010-1.5h2.25A.75.75 0 016 12zM6.697 7.757a.75.75 0 001.06-1.06l-1.59-1.591a.75.75 0 00-1.061 1.06l1.59 1.591z" }) })) : ((0, jsx_runtime_1.jsx)("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "currentColor", style: { + transition: 'all 0.3s cubic-bezier(0.4, 0, 0.2, 1)', + filter: 'drop-shadow(0 0 4px rgba(99, 102, 241, 0.3))' + }, children: (0, jsx_runtime_1.jsx)("path", { d: "M9.528 1.718a.75.75 0 01.162.819A8.97 8.97 0 009 6a9 9 0 009 9 8.97 8.97 0 003.463-.69.75.75 0 01.981.98 10.503 10.503 0 01-9.694 6.46c-5.799 0-10.5-4.701-10.5-10.5 0-4.368 2.667-8.112 6.46-9.694a.75.75 0 01.818.162z" }) })) }) })); +} diff --git a/src/theme/DocSidebar/Desktop/index.js b/src/theme/DocSidebar/Desktop/index.js new file mode 100644 index 00000000..a04e72e5 --- /dev/null +++ b/src/theme/DocSidebar/Desktop/index.js @@ -0,0 +1,44 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = DocSidebar; +var jsx_runtime_1 = require("react/jsx-runtime"); +/** + * DocSidebar/Desktop - Main sidebar container component + * + * This is the top-level component in the sidebar hierarchy that renders + * the main documentation sidebar container. It's responsible for: + * - Rendering the overall sidebar structure + * - Handling sidebar visibility states + * - Rendering DocSidebarItems component which handles the item list + */ +var react_1 = __importDefault(require("react")); +var clsx_1 = __importDefault(require("clsx")); +var theme_common_1 = require("@docusaurus/theme-common"); +var styles_module_css_1 = __importDefault(require("./styles.module.css")); +var DocSidebarItems_1 = __importDefault(require("@theme/DocSidebarItems")); +// Using a custom layout for desktop navigation +function DocSidebarDesktop(_a) { + var _b; + var path = _a.path, sidebar = _a.sidebar, onCollapse = _a.onCollapse, isHidden = _a.isHidden; + var _c = (0, theme_common_1.useThemeConfig)(), hideOnScroll = _c.navbar.hideOnScroll, hideable = _c.docs.sidebar.hideable; + return ((0, jsx_runtime_1.jsx)("div", { className: (0, clsx_1.default)(styles_module_css_1.default.sidebar, styles_module_css_1.default.sidebarWithHideableNavbar, (_b = {}, + _b[styles_module_css_1.default.sidebarHidden] = isHidden, + _b)), children: (0, jsx_runtime_1.jsx)("div", { className: styles_module_css_1.default.sidebarInner, children: (0, jsx_runtime_1.jsx)("nav", { className: (0, clsx_1.default)("menu", styles_module_css_1.default.menu), children: (0, jsx_runtime_1.jsx)(DocSidebarItems_1.default, { items: sidebar, activePath: path, level: 0 }) }) }) })); +} +function DocSidebar(props) { + return (0, jsx_runtime_1.jsx)(DocSidebarDesktop, __assign({}, props)); +} diff --git a/src/theme/DocSidebarItem/Category/index.js b/src/theme/DocSidebarItem/Category/index.js new file mode 100644 index 00000000..3d32a55a --- /dev/null +++ b/src/theme/DocSidebarItem/Category/index.js @@ -0,0 +1,227 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var jsx_runtime_1 = require("react/jsx-runtime"); +/** + * DocSidebarItemCategory - Component for rendering collapsible sidebar categories + * + * This component is responsible for: + * - Rendering collapsible sections/folders in the sidebar + * - Managing expand/collapse state + * - Handling active state for categories + * - Rendering nested DocSidebarItem components for child items + */ +var react_1 = __importStar(require("react")); +var theme_common_1 = require("@docusaurus/theme-common"); +// Create a simple isSamePath utility since we can't import it +function isSamePath(path1, path2) { + // If either path is empty or null, return false (no active items) + if (!path1 || !path2) { + return false; + } + // Simple path comparison function + return path1 === path2; +} +var lucide_react_1 = require("lucide-react"); +var Link_1 = __importDefault(require("@docusaurus/Link")); +var clsx_1 = __importDefault(require("clsx")); +var styles_module_css_1 = __importDefault(require("./styles.module.css")); +// Recursively get all doc ids from sidebar +function getAllDocIds(items) { + var ids = []; + for (var _i = 0, items_1 = items; _i < items_1.length; _i++) { + var item = items_1[_i]; + if (item.type === "category") { + // Include the category's href if it exists + if (item.href) { + ids.push(item.href); + } + ids = __spreadArray(__spreadArray([], ids, true), getAllDocIds(item.items), true); + } + else if (item.type === "doc") { + ids.push(item.id); + } + else if (item.href) { + // Handle link type items + ids.push(item.href); + } + } + return ids; +} +var getIcon = function (label, className) { + // Use the className to determine the appropriate icon and color + if (label.includes("GitHub") || (className === null || className === void 0 ? void 0 : className.includes("github"))) { + return (0, jsx_runtime_1.jsx)(lucide_react_1.Github, { className: "".concat(styles_module_css_1.default.categoryIcon, " ").concat(styles_module_css_1.default.githubIcon) }); + } + else if (label.includes("SQL") || (className === null || className === void 0 ? void 0 : className.includes("sql"))) { + return (0, jsx_runtime_1.jsx)(lucide_react_1.Database, { className: "".concat(styles_module_css_1.default.categoryIcon, " ").concat(styles_module_css_1.default.sqlIcon) }); + } + else if (label.includes("Python") || (className === null || className === void 0 ? void 0 : className.includes("python"))) { + return (0, jsx_runtime_1.jsx)(lucide_react_1.Code2, { className: "".concat(styles_module_css_1.default.categoryIcon, " ").concat(styles_module_css_1.default.pythonIcon) }); + } + else if (label.includes("Next.js") || (className === null || className === void 0 ? void 0 : className.includes("nextjs"))) { + return (0, jsx_runtime_1.jsx)(lucide_react_1.Zap, { className: "".concat(styles_module_css_1.default.categoryIcon, " ").concat(styles_module_css_1.default.nextjsIcon) }); + } + else if (label.includes("Google Student Ambassador") || + (className === null || className === void 0 ? void 0 : className.includes("gsa"))) { + return (0, jsx_runtime_1.jsx)(lucide_react_1.School, { className: "".concat(styles_module_css_1.default.categoryIcon, " ").concat(styles_module_css_1.default.gsaIcon) }); + } + else if (label.includes("Technical") || (className === null || className === void 0 ? void 0 : className.includes("technical"))) { + return ((0, jsx_runtime_1.jsx)(lucide_react_1.PanelRight, { className: "".concat(styles_module_css_1.default.categoryIcon, " ").concat(styles_module_css_1.default.technicalIcon) })); + } + else { + return (0, jsx_runtime_1.jsx)(lucide_react_1.Book, { className: styles_module_css_1.default.categoryIcon }); + } +}; +// Component responsible for the category collapsing behavior +function DocSidebarItemCategory(_a) { + var _b, _c; + var item = _a.item, onItemClick = _a.onItemClick, activePath = _a.activePath, _d = _a.level, level = _d === void 0 ? 0 : _d, index = _a.index, props = __rest(_a, ["item", "onItemClick", "activePath", "level", "index"]); + var items = item.items, label = item.label, collapsible = item.collapsible, className = item.className, href = item.href; + // Check if this is the GitHub category that should not be active by default + var isGitHubCategory = (label === null || label === void 0 ? void 0 : label.includes("GitHub")) || (className === null || className === void 0 ? void 0 : className.includes("github")); + // Use a simpler approach to handle collapsing + var _e = (0, react_1.useState)(item.collapsed), collapsed = _e[0], setCollapsed = _e[1]; + // Only set active if the path matches AND it's not the GitHub category on initial load + var active = href + ? isSamePath(href, activePath) && !(isGitHubCategory && !activePath) + : false; + // Use useEffect to update the collapsed state when the active path changes + (0, react_1.useEffect)(function () { + if (collapsible) { + // If activePath is empty, don't consider any items active + if (!activePath) { + return; + } + // Don't collapse if this category or any of its items are active + var hasActiveItem = items.some(function (item) { + // Check for direct href match + if (item.href && isSamePath(item.href, activePath)) { + return true; + } + // Check for nested items (for categories like SQL Basics) + if (item.type === "category" && item.items) { + return item.items.some(function (subItem) { return subItem.href && isSamePath(subItem.href, activePath); }); + } + return false; + }); + // Only collapse if not active and no active children + if (!active && !hasActiveItem) { + setCollapsed(true); + } + else { + // Keep expanded if active or has active children + setCollapsed(false); + } + } + }, [activePath, active, collapsible, items]); + var isHidden = collapsed && !active; + var handleClick = function (e) { + if (collapsible && !href) { + e.preventDefault(); + e.currentTarget.blur(); + setCollapsed(function (prev) { return !prev; }); + } + if (href) { + onItemClick === null || onItemClick === void 0 ? void 0 : onItemClick(item); + } + }; + var categoryIcon = getIcon(label, className); + // Determine category theme based on label or className + var getCategoryTheme = function () { + if (label.includes("GitHub") || (className === null || className === void 0 ? void 0 : className.includes("github"))) { + return "custom-sidebar-github"; + } + else if (label.includes("Python") || (className === null || className === void 0 ? void 0 : className.includes("python"))) { + return "custom-sidebar-python"; + } + else if (label.includes("SQL") || (className === null || className === void 0 ? void 0 : className.includes("sql"))) { + return "custom-sidebar-sql"; + } + else if (label.includes("Next.js") || (className === null || className === void 0 ? void 0 : className.includes("nextjs"))) { + return "custom-sidebar-nextjs"; + } + else if (label.includes("Google Student Ambassador") || + (className === null || className === void 0 ? void 0 : className.includes("gsa"))) { + return "custom-sidebar-gsa"; + } + else if (label.includes("Technical") || + (className === null || className === void 0 ? void 0 : className.includes("technical"))) { + return "custom-sidebar-technical"; + } + return ""; + }; + var categoryTheme = getCategoryTheme(); + return ((0, jsx_runtime_1.jsxs)("li", { className: (0, clsx_1.default)(theme_common_1.ThemeClassNames.docs.docSidebarItemCategory, { + "menu__list-item--collapsed": collapsed, + }, className, styles_module_css_1.default.categoryItem, categoryTheme, (_b = {}, + _b[styles_module_css_1.default.categoryLevel1] = level === 1, + _b[styles_module_css_1.default.categoryLevel2] = level === 2, + _b)), children: [(0, jsx_runtime_1.jsx)("div", { className: (0, clsx_1.default)(styles_module_css_1.default.categoryHeader, (_c = {}, + _c[styles_module_css_1.default.categoryHeaderActive] = active, + _c)), children: href ? ((0, jsx_runtime_1.jsx)(Link_1.default, { className: (0, clsx_1.default)("menu__link", { + "menu__link--active": active, + }, styles_module_css_1.default.categoryLink), to: href, onClick: handleClick, children: (0, jsx_runtime_1.jsxs)("div", { className: styles_module_css_1.default.categoryLinkContent, children: [categoryIcon, (0, jsx_runtime_1.jsx)("span", { className: styles_module_css_1.default.categoryLabel, children: label.replace(/^[🐙🐍🗄️⚡🎓🔧📚⚙️👨‍💼🔄📊]+ /g, "") })] }) })) : ((0, jsx_runtime_1.jsxs)("a", { className: (0, clsx_1.default)("menu__link", { + "menu__link--active": active, + }, styles_module_css_1.default.categoryLink), href: "#", onClick: handleClick, children: [(0, jsx_runtime_1.jsxs)("div", { className: styles_module_css_1.default.categoryLinkContent, children: [categoryIcon, (0, jsx_runtime_1.jsx)("span", { className: styles_module_css_1.default.categoryLabel, children: label.replace(/^[🐙🐍🗄️⚡🎓🔧📚⚙️👨‍💼🔄📊]+ /g, "") })] }), collapsible && ((0, jsx_runtime_1.jsx)("div", { className: styles_module_css_1.default.categoryCollapseIcon, children: collapsed ? ((0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { size: 16, className: styles_module_css_1.default.chevronIcon })) : ((0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { size: 16, className: styles_module_css_1.default.chevronIcon })) }))] })) }), !isHidden && ((0, jsx_runtime_1.jsx)("ul", { className: (0, clsx_1.default)("menu__list", styles_module_css_1.default.categoryList), children: items.map(function (childItem, i) { + // @ts-ignore + var DocSidebarItem = require("@theme/DocSidebarItem").default; + return ((0, jsx_runtime_1.jsx)(DocSidebarItem, { tabIndex: collapsed ? "-1" : "0", item: childItem, onItemClick: onItemClick, activePath: activePath, level: level + 1, index: i }, i)); + }) }))] })); +} +exports.default = (0, react_1.memo)(DocSidebarItemCategory); diff --git a/src/theme/DocSidebarItem/Html/index.js b/src/theme/DocSidebarItem/Html/index.js new file mode 100644 index 00000000..3fbceb30 --- /dev/null +++ b/src/theme/DocSidebarItem/Html/index.js @@ -0,0 +1,25 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = DocSidebarItemHtml; +var jsx_runtime_1 = require("react/jsx-runtime"); +/** + * DocSidebarItemHtml - Component for rendering custom HTML in sidebar + * + * This component handles: + * - Rendering custom HTML content in the sidebar + * - Preserving any custom classes + * - Safely injecting HTML using dangerouslySetInnerHTML + * - Managing accessibility through tabIndex + */ +var react_1 = __importDefault(require("react")); +var clsx_1 = __importDefault(require("clsx")); +function DocSidebarItemHtml(_a) { + var item = _a.item, level = _a.level, tabIndex = _a.tabIndex, + // We're receiving these props but not using them in this component + activePath = _a.activePath, index = _a.index; + var value = item.value, className = item.className; + return ((0, jsx_runtime_1.jsx)("li", { className: (0, clsx_1.default)("menu__list-item", className), dangerouslySetInnerHTML: { __html: value }, tabIndex: tabIndex })); +} diff --git a/src/theme/DocSidebarItem/Link/index.js b/src/theme/DocSidebarItem/Link/index.js new file mode 100644 index 00000000..a815b609 --- /dev/null +++ b/src/theme/DocSidebarItem/Link/index.js @@ -0,0 +1,62 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = DocSidebarItemLink; +var jsx_runtime_1 = require("react/jsx-runtime"); +/** + * DocSidebarItemLink - Component for rendering sidebar link items + * + * This component is responsible for: + * - Rendering individual documentation page links + * - Handling active state styling + * - Managing click behavior and navigation + */ +var react_1 = __importDefault(require("react")); +var clsx_1 = __importDefault(require("clsx")); +var theme_common_1 = require("@docusaurus/theme-common"); +var Link_1 = __importDefault(require("@docusaurus/Link")); +var isInternalUrl_1 = __importDefault(require("@docusaurus/isInternalUrl")); +var styles_module_css_1 = __importDefault(require("./styles.module.css")); +// Utility to determine if a sidebar item is active +function isActiveSidebarItem(item, activePath) { + if (!activePath) { + return false; + } + return item.href === activePath; +} +function DocSidebarItemLink(_a) { + var item = _a.item, onItemClick = _a.onItemClick, activePath = _a.activePath, level = _a.level, index = _a.index, props = __rest(_a, ["item", "onItemClick", "activePath", "level", "index"]); + var href = item.href, label = item.label, className = item.className, autoAddBaseUrl = item.autoAddBaseUrl; + // Determine if item is active based on path matching + var isActive = isActiveSidebarItem(item, activePath); + var isInternalLink = (0, isInternalUrl_1.default)(href); + return ((0, jsx_runtime_1.jsx)("li", { className: (0, clsx_1.default)(theme_common_1.ThemeClassNames.docs.docSidebarItemLink, theme_common_1.ThemeClassNames.docs.docSidebarItemLinkLevel(level), "menu__list-item", className, styles_module_css_1.default.linkItem), children: (0, jsx_runtime_1.jsx)(Link_1.default, __assign({ className: (0, clsx_1.default)("menu__link", { + "menu__link--active": isActive, + }, styles_module_css_1.default.menuLink), autoAddBaseUrl: autoAddBaseUrl, "aria-current": isActive ? "page" : undefined, to: href }, (isInternalLink && { + onClick: onItemClick ? function () { return onItemClick(item); } : undefined, + }), props, { children: (0, jsx_runtime_1.jsxs)("div", { className: styles_module_css_1.default.linkContent, children: [(0, jsx_runtime_1.jsx)("span", { className: styles_module_css_1.default.linkDot }), (0, jsx_runtime_1.jsx)("span", { children: label })] }) })) }, label)); +} diff --git a/src/theme/DocSidebarItem/index.js b/src/theme/DocSidebarItem/index.js new file mode 100644 index 00000000..d5741182 --- /dev/null +++ b/src/theme/DocSidebarItem/index.js @@ -0,0 +1,50 @@ +"use strict"; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = DocSidebarItem; +var jsx_runtime_1 = require("react/jsx-runtime"); +/** + * DocSidebarItem - Router component for sidebar items + * + * This component acts as a router that: + * - Determines the type of sidebar item (category, link, or HTML) + * - Renders the appropriate component based on the item type + * - Passes relevant props to child components + * + * It works with three subcomponents: + * - DocSidebarItemCategory: For collapsible sections (folders) + * - DocSidebarItemLink: For individual page links + * - DocSidebarItemHtml: For custom HTML content + */ +var react_1 = __importDefault(require("react")); +var Category_1 = __importDefault(require("@theme/DocSidebarItem/Category")); +var Link_1 = __importDefault(require("@theme/DocSidebarItem/Link")); +var Html_1 = __importDefault(require("@theme/DocSidebarItem/Html")); +function DocSidebarItem(_a) { + var item = _a.item, props = __rest(_a, ["item"]); + var activePath = props.activePath || ""; + var level = props.level || 0; + var index = props.index || 0; + switch (item.type) { + case "category": + return ((0, jsx_runtime_1.jsx)(Category_1.default, { item: item, activePath: activePath, level: level, index: index, tabIndex: props.tabIndex, onItemClick: props.onItemClick })); + case "html": + return ((0, jsx_runtime_1.jsx)(Html_1.default, { item: item, level: level, tabIndex: props.tabIndex, activePath: activePath, index: index })); + case "link": + default: + return ((0, jsx_runtime_1.jsx)(Link_1.default, { item: item, activePath: activePath, level: level, index: index, tabIndex: props.tabIndex, onItemClick: props.onItemClick })); + } +} diff --git a/src/theme/DocSidebarItem/types.js b/src/theme/DocSidebarItem/types.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/src/theme/DocSidebarItem/types.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/src/theme/DocSidebarItems/index.js b/src/theme/DocSidebarItems/index.js new file mode 100644 index 00000000..ae1eb983 --- /dev/null +++ b/src/theme/DocSidebarItems/index.js @@ -0,0 +1,36 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = DocSidebarItems; +var jsx_runtime_1 = require("react/jsx-runtime"); +/** + * DocSidebarItems - Container for sidebar item list + * + * This component is responsible for: + * - Rendering the list of sidebar items (categories and links) + * - Passing props to the DocSidebarItem component + * - Managing the overall list structure + * - Setting default active state to none on initial load + * + * It serves as the bridge between DocSidebar/Desktop and individual DocSidebarItem components. + */ +var react_1 = __importDefault(require("react")); +var DocSidebarItem_1 = __importDefault(require("@theme/DocSidebarItem")); +var styles_module_css_1 = __importDefault(require("./styles.module.css")); +function DocSidebarItems(_a) { + // Force empty activePath to disable default selection + // This will prevent any sidebar items from being marked as active by default + var items = _a.items, activePath = _a.activePath, _b = _a.level, level = _b === void 0 ? 0 : _b; + // Get the current URL path + var currentPath = typeof window !== "undefined" ? window.location.pathname : ""; + // Check if we're at the docs root page + var isDocsRootPath = currentPath === "/" || + currentPath === "/docs" || + currentPath === "/docs/" || + currentPath.startsWith("/docs/GitHub/intro-github"); + // If we're at the docs root, force an empty active path + var effectiveActivePath = isDocsRootPath ? "" : activePath; + return ((0, jsx_runtime_1.jsx)("ul", { className: "menu__list", children: items.map(function (item, index) { return ((0, jsx_runtime_1.jsx)("div", { className: index === 0 ? styles_module_css_1.default.firstItem : "", children: (0, jsx_runtime_1.jsx)(DocSidebarItem_1.default, { item: item, index: index, activePath: effectiveActivePath, level: level }) }, index)); }) })); +} diff --git a/src/theme/Footer/Copyright/index.js b/src/theme/Footer/Copyright/index.js new file mode 100644 index 00000000..96bc9c2f --- /dev/null +++ b/src/theme/Footer/Copyright/index.js @@ -0,0 +1,15 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = FooterCopyright; +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importDefault(require("react")); +function FooterCopyright(_a) { + var copyright = _a.copyright; + return ((0, jsx_runtime_1.jsx)("div", { className: "footer__copyright", + // Developer provided the HTML, so assume it's safe. + // eslint-disable-next-line react/no-danger + dangerouslySetInnerHTML: { __html: copyright } })); +} diff --git a/src/theme/Footer/Layout/Counter.js b/src/theme/Footer/Layout/Counter.js new file mode 100644 index 00000000..18785eb1 --- /dev/null +++ b/src/theme/Footer/Layout/Counter.js @@ -0,0 +1,71 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importStar(require("react")); +var Counter = function (_a) { + var value = _a.value, _b = _a.duration, duration = _b === void 0 ? 1500 : _b, _c = _a.suffix, suffix = _c === void 0 ? "" : _c; + var _d = (0, react_1.useState)(0), count = _d[0], setCount = _d[1]; + var _e = (0, react_1.useState)(false), hasAnimated = _e[0], setHasAnimated = _e[1]; + var ref = (0, react_1.useRef)(null); + (0, react_1.useEffect)(function () { + if (!ref.current) + return; + var observer = new IntersectionObserver(function (entries) { + var entry = entries[0]; + if (entry.isIntersecting && !hasAnimated) { + animateCount(); + setHasAnimated(true); + } + }, { threshold: 0.5 } // Trigger when 50% of element is visible + ); + observer.observe(ref.current); + return function () { return observer.disconnect(); }; + }, [hasAnimated]); + var animateCount = function () { + var startTime = performance.now(); + var step = function (now) { + var progress = Math.min((now - startTime) / duration, 1); + var current = Math.floor(progress * value); + setCount(current); + if (progress < 1) { + requestAnimationFrame(step); + } + }; + requestAnimationFrame(step); + }; + return ((0, jsx_runtime_1.jsxs)("div", { ref: ref, children: [count.toLocaleString(), suffix] })); +}; +exports.default = Counter; diff --git a/src/theme/Footer/Layout/index.js b/src/theme/Footer/Layout/index.js new file mode 100644 index 00000000..6a933616 --- /dev/null +++ b/src/theme/Footer/Layout/index.js @@ -0,0 +1,152 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); + return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (g && (g = 0, op[0] && (_ = 0)), _) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = FooterLayout; +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importStar(require("react")); +var Link_1 = __importDefault(require("@docusaurus/Link")); +require("./enhanced-footer.css"); +var Counter_1 = __importDefault(require("./Counter")); +var react_dom_1 = require("react-dom"); +var emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; +function FooterLayout(_a) { + var _this = this; + var style = _a.style, links = _a.links, logo = _a.logo, copyright = _a.copyright; + var _b = (0, react_1.useState)(new Date().getFullYear()), currentYear = _b[0], setCurrentYear = _b[1]; + var _c = (0, react_1.useState)({ + activeUsers: "50K+", + tutorials: "200+", + successRate: "95%", + supportHours: "24/7", + }), stats = _c[0], setStats = _c[1]; + var _d = (0, react_1.useState)(""), email = _d[0], setEmail = _d[1]; + var _e = (0, react_1.useState)(false), isSubscribed = _e[0], setIsSubscribed = _e[1]; + var _f = (0, react_1.useState)(false), showToast = _f[0], setShowToast = _f[1]; + var _g = (0, react_1.useState)(""), error = _g[0], setError = _g[1]; + (0, react_1.useEffect)(function () { + // Simulate real-time stats updates + var fetchStats = function () { return __awaiter(_this, void 0, void 0, function () { + var baseUsers, baseTutorials, randomGrowth; + return __generator(this, function (_a) { + try { + baseUsers = 52000; + baseTutorials = 215; + randomGrowth = Math.floor(Math.random() * 100); + setStats({ + activeUsers: "".concat(Math.floor((baseUsers + randomGrowth) / 1000), "K+"), + tutorials: "".concat(baseTutorials + Math.floor(randomGrowth / 10), "+"), + successRate: "".concat(95 + Math.floor(Math.random() * 3), "%"), + supportHours: "24/7", + }); + } + catch (error) { + console.log("Using fallback stats"); + } + return [2 /*return*/]; + }); + }); }; + fetchStats(); + var interval = setInterval(fetchStats, 30000); // Update every 30 seconds + return function () { return clearInterval(interval); }; + }, []); + var handleSubscribe = function (e) { + e.preventDefault(); + if (!email) { + setError("Email is required"); + return; + } + if (!emailRegex.test(email)) { + setError("Please enter a valid email address"); + return; + } + setError(""); + setIsSubscribed(true); + setShowToast(true); + // Hide toast after 3 seconds + setTimeout(function () { + setShowToast(false); + }, 3000); + // Reset form after 3 seconds + setTimeout(function () { + setIsSubscribed(false); + setEmail(""); + }, 3000); + }; + return ((0, jsx_runtime_1.jsxs)("footer", { className: "enhanced-footer", children: [showToast && + (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)("div", { className: "newsletter-toast", children: (0, jsx_runtime_1.jsxs)("div", { className: "toast-content", children: [(0, jsx_runtime_1.jsx)("span", { className: "toast-icon", children: "\uD83C\uDF89" }), (0, jsx_runtime_1.jsxs)("div", { className: "toast-message", children: [(0, jsx_runtime_1.jsx)("h4", { children: "Successfully Subscribed!" }), (0, jsx_runtime_1.jsx)("p", { children: "Thank you for joining our newsletter." })] }), (0, jsx_runtime_1.jsx)("button", { className: "toast-close", onClick: function () { return setShowToast(false); }, "aria-label": "Close notification", children: "\u00D7" })] }) }), document.body // 👈 mounts toast directly to , outside footer + ), (0, jsx_runtime_1.jsx)("div", { className: "footer-hero", children: (0, jsx_runtime_1.jsxs)("div", { className: "container", children: [(0, jsx_runtime_1.jsxs)("div", { className: "footer-hero-content", children: [(0, jsx_runtime_1.jsx)("div", { className: "footer-logo-section", children: (0, jsx_runtime_1.jsxs)("div", { className: "footer-logo", children: [(0, jsx_runtime_1.jsx)("div", { className: "logo-container", children: (0, jsx_runtime_1.jsx)("img", { src: "/img/logo.png", alt: "recodehive", className: "footer-logo-img" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "footer-brand-header", children: [(0, jsx_runtime_1.jsx)("h1", { className: "footer-brand-title", children: "recodehive" }), (0, jsx_runtime_1.jsxs)("div", { className: "footer-trust-badge", children: [(0, jsx_runtime_1.jsxs)("div", { className: "trust-stars", children: [(0, jsx_runtime_1.jsx)("span", { className: "star", children: "\u2B50" }), (0, jsx_runtime_1.jsx)("span", { className: "star", children: "\u2B50" }), (0, jsx_runtime_1.jsx)("span", { className: "star", children: "\u2B50" }), (0, jsx_runtime_1.jsx)("span", { className: "star", children: "\u2B50" }), (0, jsx_runtime_1.jsx)("span", { className: "star", children: "\u2B50" })] }), (0, jsx_runtime_1.jsx)("span", { className: "trust-text", children: "Trusted by 50K+ developers" })] })] })] }) }), (0, jsx_runtime_1.jsxs)("div", { className: "footer-hero-text", children: [(0, jsx_runtime_1.jsx)("h1", { children: "Empowering the Next Generation of Developers" }), (0, jsx_runtime_1.jsx)("p", { children: "Master cutting-edge technologies, build innovative projects, and join a thriving community of developers passionate about open-source innovation and continuous learning." })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "footer-stats", children: [(0, jsx_runtime_1.jsxs)("div", { className: "stat-item", title: "Growing community of active learners", children: [(0, jsx_runtime_1.jsx)("div", { className: "stat-icon stat-icon-learners", children: (0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { d: "M16 4c0-1.11.89-2 2-2s2 .89 2 2-.89 2-2 2-2-.89-2-2zM4 18v-6h2.5l6 6H4zm16.5-9.5L19 7l-7.5 7.5L9 12l-2.5 2.5L4 12l7.5-7.5L14 7l6.5 1.5z" }) }) }), (0, jsx_runtime_1.jsxs)("div", { className: "stat-content", children: [(0, jsx_runtime_1.jsx)("div", { className: "stat-number", children: (0, jsx_runtime_1.jsx)(Counter_1.default, { value: parseInt(stats.activeUsers), suffix: "K+" }) }), (0, jsx_runtime_1.jsx)("div", { className: "stat-label", children: "Active Learners" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "stat-item", title: "Comprehensive tutorials and courses", children: [(0, jsx_runtime_1.jsx)("div", { className: "stat-icon stat-icon-tutorials", children: (0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z" }) }) }), (0, jsx_runtime_1.jsxs)("div", { className: "stat-content", children: [(0, jsx_runtime_1.jsx)("div", { className: "stat-number", children: (0, jsx_runtime_1.jsx)(Counter_1.default, { value: parseInt(stats.tutorials), suffix: "+" }) }), (0, jsx_runtime_1.jsx)("div", { className: "stat-label", children: "Tutorials" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "stat-item", title: "High success rate in learning outcomes", children: [(0, jsx_runtime_1.jsx)("div", { className: "stat-icon stat-icon-success", children: (0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" }) }) }), (0, jsx_runtime_1.jsxs)("div", { className: "stat-content", children: [(0, jsx_runtime_1.jsx)("div", { className: "stat-number", children: (0, jsx_runtime_1.jsx)(Counter_1.default, { value: parseInt(stats.successRate), suffix: "%" }) }), (0, jsx_runtime_1.jsx)("div", { className: "stat-label", children: "Success Rate" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "stat-item", title: "Round-the-clock community support", children: [(0, jsx_runtime_1.jsx)("div", { className: "stat-icon stat-icon-support", children: (0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-6h2v6zm0-8h-2V7h2v4z" }) }) }), (0, jsx_runtime_1.jsxs)("div", { className: "stat-content", children: [(0, jsx_runtime_1.jsx)("div", { className: "stat-number", children: stats.supportHours }), (0, jsx_runtime_1.jsx)("div", { className: "stat-label", children: "Support" })] })] })] })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "footer-links-section", children: (0, jsx_runtime_1.jsx)("div", { className: "container", children: (0, jsx_runtime_1.jsxs)("div", { className: "footer-links-grid", children: [(0, jsx_runtime_1.jsxs)("div", { className: "footer-column", children: [(0, jsx_runtime_1.jsxs)("h3", { className: "footer-column-title", children: [(0, jsx_runtime_1.jsx)("div", { className: "column-icon resources-icon", children: "\uD83D\uDCDA" }), "Learning"] }), (0, jsx_runtime_1.jsxs)("ul", { className: "footer-links", children: [(0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsxs)(Link_1.default, { to: "#", className: "footer-link", children: [(0, jsx_runtime_1.jsx)("span", { className: "link-icon", children: "\uD83D\uDCD6" }), "Documentation", (0, jsx_runtime_1.jsx)("span", { className: "link-badge popular", children: "Popular" })] }) }), (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsxs)(Link_1.default, { to: "/courses", className: "footer-link", children: [(0, jsx_runtime_1.jsx)("span", { className: "link-icon", children: "\uD83C\uDFA5" }), "Video Courses", (0, jsx_runtime_1.jsx)("span", { className: "link-badge new", children: "New" })] }) }), (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsxs)(Link_1.default, { to: "/get-started", className: "footer-link", children: [(0, jsx_runtime_1.jsx)("span", { className: "link-icon", children: "\uD83D\uDE80" }), "Get Started"] }) }), (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsxs)(Link_1.default, { to: "/interview-prep", className: "footer-link", children: [(0, jsx_runtime_1.jsx)("span", { className: "link-icon", children: "\uD83E\uDDE9" }), "Interview Prep", (0, jsx_runtime_1.jsx)("span", { className: "link-badge hot", children: "Hot" })] }) }), (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsxs)(Link_1.default, { to: "/badges/github-badges", className: "footer-link", children: [(0, jsx_runtime_1.jsx)("span", { className: "link-icon", children: "\uD83C\uDFC6" }), "GitHub Badges"] }) })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "footer-column", children: [(0, jsx_runtime_1.jsxs)("h3", { className: "footer-column-title", children: [(0, jsx_runtime_1.jsx)("div", { className: "column-icon company-icon", children: "\uD83C\uDFE2" }), "Company"] }), (0, jsx_runtime_1.jsxs)("ul", { className: "footer-links", children: [(0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsxs)(Link_1.default, { to: "/community", className: "footer-link", children: [(0, jsx_runtime_1.jsx)("span", { className: "link-icon", children: "\uD83D\uDC65" }), "Community"] }) }), (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsxs)(Link_1.default, { to: "/blogs", className: "footer-link", children: [(0, jsx_runtime_1.jsx)("span", { className: "link-icon", children: "\uD83D\uDCF0" }), "Our Blog"] }) }), (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsxs)(Link_1.default, { to: "/careers", className: "footer-link", children: [(0, jsx_runtime_1.jsx)("span", { className: "link-icon", children: "\uD83D\uDCBC" }), "Careers", (0, jsx_runtime_1.jsx)("span", { className: "link-badge hiring", children: "We're Hiring!" })] }) }), (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsxs)(Link_1.default, { to: "/our-sponsors", className: "footer-link", children: [(0, jsx_runtime_1.jsx)("span", { className: "link-icon", children: "\uD83E\uDD1D" }), "Our Sponsors"] }) }), (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsxs)(Link_1.default, { to: "/showcase", className: "footer-link", children: [(0, jsx_runtime_1.jsx)("span", { className: "link-icon", children: "\uD83C\uDF1F" }), "Showcase"] }) })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "footer-column", children: [(0, jsx_runtime_1.jsxs)("h3", { className: "footer-column-title", children: [(0, jsx_runtime_1.jsx)("div", { className: "column-icon support-icon", children: "\uD83D\uDEE0\uFE0F" }), "Support"] }), (0, jsx_runtime_1.jsxs)("ul", { className: "footer-links", children: [(0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsxs)(Link_1.default, { to: "/contact-us", className: "footer-link", children: [(0, jsx_runtime_1.jsx)("span", { className: "link-icon", children: "\u2753" }), "Contact Us"] }) }), (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsxs)(Link_1.default, { to: "/broadcasts", className: "footer-link", children: [(0, jsx_runtime_1.jsx)("span", { className: "link-icon", children: "\uD83D\uDCFA" }), "Broadcasts"] }) }), (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsxs)(Link_1.default, { to: "/podcasts", className: "footer-link", children: [(0, jsx_runtime_1.jsx)("span", { className: "link-icon", children: "\uD83C\uDF99\uFE0F" }), "Podcasts"] }) })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "footer-column newsletter-column", children: [(0, jsx_runtime_1.jsxs)("h3", { className: "footer-column-title", children: [(0, jsx_runtime_1.jsx)("div", { className: "column-icon newsletter-icon", children: "\uD83D\uDCE7" }), "Stay in the Loop"] }), (0, jsx_runtime_1.jsxs)("p", { className: "newsletter-description", children: ["Join ", stats.activeUsers, " developers getting weekly insights, tutorials, and exclusive content."] }), (0, jsx_runtime_1.jsxs)("form", { className: "newsletter-form", onSubmit: handleSubscribe, children: [(0, jsx_runtime_1.jsx)("input", { type: "email", placeholder: "your@email.com", className: "newsletter-input", value: email, onChange: function (e) { + setEmail(e.target.value); + setError(""); + }, required: true }), (0, jsx_runtime_1.jsx)("button", { type: "submit", className: "newsletter-button ".concat(isSubscribed ? "subscribed" : ""), disabled: isSubscribed, children: isSubscribed ? "✓ Subscribed!" : "Subscribe Now →" }), error && (0, jsx_runtime_1.jsx)("p", { className: "error-text", children: error })] }), (0, jsx_runtime_1.jsx)("div", { className: "newsletter-stats", children: (0, jsx_runtime_1.jsx)("span", { className: "newsletter-stat", children: "\uD83D\uDCCA 1.2K+ developers joined this week" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "quick-links-section newsletter-quick-links", children: [(0, jsx_runtime_1.jsxs)("h4", { className: "quick-links-title", children: [(0, jsx_runtime_1.jsx)("span", { className: "links-icon", children: "\uD83D\uDD17" }), "QUICK LINKS"] }), (0, jsx_runtime_1.jsxs)("div", { className: "quick-links-list", children: [(0, jsx_runtime_1.jsxs)(Link_1.default, { to: "/get-started", className: "quick-link", children: [(0, jsx_runtime_1.jsx)("span", { className: "quick-link-icon", children: "\uD83D\uDE80" }), "Get Started"] }), (0, jsx_runtime_1.jsxs)(Link_1.default, { to: "/dashboard", className: "quick-link", children: [(0, jsx_runtime_1.jsx)("span", { className: "quick-link-icon", children: "\uD83D\uDCCA" }), "Dashboard"] })] })] })] })] }) }) }), (0, jsx_runtime_1.jsx)("div", { className: "footer-bottom", children: (0, jsx_runtime_1.jsx)("div", { className: "container", children: (0, jsx_runtime_1.jsxs)("div", { className: "footer-bottom-content", children: [(0, jsx_runtime_1.jsx)("div", { className: "footer-bottom-left", children: (0, jsx_runtime_1.jsxs)("div", { className: "footer-social-links", children: [(0, jsx_runtime_1.jsx)("span", { className: "social-label", children: "Connect & Follow:" }), (0, jsx_runtime_1.jsx)(Link_1.default, { to: "https://github.com/recodehive", className: "social-link github", "aria-label": "GitHub", children: (0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { d: "M12 0C5.37 0 0 5.37 0 12C0 17.31 3.435 21.795 8.205 23.385C8.805 23.49 9.03 23.13 9.03 22.815C9.03 22.53 9.015 21.585 9.015 20.58C6 21.135 5.22 19.845 4.98 19.17C4.845 18.825 4.26 17.76 3.75 17.475C3.33 17.25 2.73 16.695 3.735 16.68C4.68 16.665 5.355 17.55 5.58 17.91C6.66 19.725 8.385 19.215 9.075 18.9C9.18 18.12 9.495 17.595 9.84 17.295C7.17 16.995 4.38 15.96 4.38 11.37C4.38 10.065 4.845 8.985 5.61 8.145C5.49 7.845 5.07 6.615 5.73 4.965C5.73 4.965 6.735 4.65 9.03 6.195C9.99 5.925 11.01 5.79 12.03 5.79C13.05 5.79 14.07 5.925 15.03 6.195C17.325 4.635 18.33 4.965 18.33 4.965C18.99 6.615 18.57 7.845 18.45 8.145C19.215 8.985 19.68 10.05 19.68 11.37C19.68 15.975 16.875 16.995 14.205 17.295C14.64 17.67 15.015 18.39 15.015 19.515C15.015 21.12 15 22.41 15 22.815C15 23.13 15.225 23.505 15.825 23.385C18.2072 22.5807 20.2772 21.0497 21.7437 19.0074C23.2101 16.965 23.9993 14.5143 24 12C24 5.37 18.63 0 12 0Z" }) }) }), (0, jsx_runtime_1.jsx)(Link_1.default, { to: "https://x.com/sanjay_kv_", className: "social-link twitter", "aria-label": "Twitter", children: (0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" }) }) }), (0, jsx_runtime_1.jsx)(Link_1.default, { to: "https://www.instagram.com/nomad_brains/", className: "social-link instagram", "aria-label": "Instagram", children: (0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { d: "M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zm0 5.838c-3.403 0-6.162 2.759-6.162 6.162s2.759 6.163 6.162 6.163 6.162-2.759 6.162-6.163c0-3.403-2.759-6.162-6.162-6.162zm0 10.162c-2.209 0-4-1.79-4-4 0-2.209 1.791-4 4-4s4 1.791 4 4c0 2.21-1.791 4-4 4zm6.406-11.845c-.796 0-1.441.645-1.441 1.44s.645 1.44 1.441 1.44c.795 0 1.439-.645 1.439-1.44s-.644-1.44-1.439-1.44z" }) }) }), (0, jsx_runtime_1.jsx)(Link_1.default, { to: "https://www.linkedin.com/in/sanjay-k-v/", className: "social-link linkedin", "aria-label": "LinkedIn", children: (0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { d: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" }) }) })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "footer-bottom-center", children: (0, jsx_runtime_1.jsxs)("div", { className: "footer-legal-links", children: [(0, jsx_runtime_1.jsx)(Link_1.default, { to: "/privacy-policy", className: "legal-link", children: "Privacy Policy" }), (0, jsx_runtime_1.jsx)(Link_1.default, { to: "/terms-service", className: "legal-link", children: "Terms of Service" }), (0, jsx_runtime_1.jsx)(Link_1.default, { to: "/code-of-conduct", className: "legal-link", children: "Code of Conduct" }), (0, jsx_runtime_1.jsx)(Link_1.default, { to: "/License", className: "legal-link", children: "License" })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "footer-bottom-right", children: (0, jsx_runtime_1.jsx)("div", { className: "footer-copyright", children: (0, jsx_runtime_1.jsxs)("span", { children: ["\u00A9 ", currentYear, " recodehive. Made with \u2764\uFE0F by the Community."] }) }) })] }) }) })] })); +} diff --git a/src/theme/Footer/LinkItem/index.js b/src/theme/Footer/LinkItem/index.js new file mode 100644 index 00000000..a269c624 --- /dev/null +++ b/src/theme/Footer/LinkItem/index.js @@ -0,0 +1,48 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = FooterLinkItem; +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importDefault(require("react")); +var clsx_1 = __importDefault(require("clsx")); +var Link_1 = __importDefault(require("@docusaurus/Link")); +var useBaseUrl_1 = __importDefault(require("@docusaurus/useBaseUrl")); +var isInternalUrl_1 = __importDefault(require("@docusaurus/isInternalUrl")); +var ExternalLink_1 = __importDefault(require("@theme/Icon/ExternalLink")); +function FooterLinkItem(_a) { + var item = _a.item; + var to = item.to, href = item.href, label = item.label, prependBaseUrlToHref = item.prependBaseUrlToHref, className = item.className, props = __rest(item, ["to", "href", "label", "prependBaseUrlToHref", "className"]); + var toUrl = (0, useBaseUrl_1.default)(to); + var normalizedHref = (0, useBaseUrl_1.default)(href, { forcePrependBaseUrl: true }); + return ((0, jsx_runtime_1.jsxs)(Link_1.default, __assign({ className: (0, clsx_1.default)('footer__link-item', className) }, (href + ? { + href: prependBaseUrlToHref ? normalizedHref : href, + } + : { + to: toUrl, + }), props, { children: [label, href && !(0, isInternalUrl_1.default)(href) && (0, jsx_runtime_1.jsx)(ExternalLink_1.default, {})] }))); +} diff --git a/src/theme/Footer/Links/MultiColumn/index.js b/src/theme/Footer/Links/MultiColumn/index.js new file mode 100644 index 00000000..5609440d --- /dev/null +++ b/src/theme/Footer/Links/MultiColumn/index.js @@ -0,0 +1,26 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = FooterLinksMultiColumn; +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importDefault(require("react")); +var clsx_1 = __importDefault(require("clsx")); +var LinkItem_1 = __importDefault(require("@theme/Footer/LinkItem")); +function ColumnLinkItem(_a) { + var _b; + var item = _a.item; + return item.html ? ((0, jsx_runtime_1.jsx)("li", { className: (0, clsx_1.default)('footer__item', item.className), + // Developer provided the HTML, so assume it's safe. + // eslint-disable-next-line react/no-danger + dangerouslySetInnerHTML: { __html: item.html } })) : ((0, jsx_runtime_1.jsx)("li", { className: "footer__item", children: (0, jsx_runtime_1.jsx)(LinkItem_1.default, { item: item }) }, (_b = item.href) !== null && _b !== void 0 ? _b : item.to)); +} +function Column(_a) { + var column = _a.column; + return ((0, jsx_runtime_1.jsxs)("div", { className: (0, clsx_1.default)('col footer__col', column.className), children: [(0, jsx_runtime_1.jsx)("div", { className: "footer__title", children: column.title }), (0, jsx_runtime_1.jsx)("ul", { className: "footer__items clean-list", children: column.items.map(function (item, i) { return ((0, jsx_runtime_1.jsx)(ColumnLinkItem, { item: item }, i)); }) })] })); +} +function FooterLinksMultiColumn(_a) { + var columns = _a.columns; + return ((0, jsx_runtime_1.jsx)("div", { className: "row footer__links", children: columns.map(function (column, i) { return ((0, jsx_runtime_1.jsx)(Column, { column: column }, i)); }) })); +} diff --git a/src/theme/Footer/Links/Simple/index.js b/src/theme/Footer/Links/Simple/index.js new file mode 100644 index 00000000..70fe1fdd --- /dev/null +++ b/src/theme/Footer/Links/Simple/index.js @@ -0,0 +1,24 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = FooterLinksSimple; +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importDefault(require("react")); +var clsx_1 = __importDefault(require("clsx")); +var LinkItem_1 = __importDefault(require("@theme/Footer/LinkItem")); +function Separator() { + return (0, jsx_runtime_1.jsx)("span", { className: "footer__link-separator", children: "\u00B7" }); +} +function SimpleLinkItem(_a) { + var item = _a.item; + return item.html ? ((0, jsx_runtime_1.jsx)("span", { className: (0, clsx_1.default)('footer__link-item', item.className), + // Developer provided the HTML, so assume it's safe. + // eslint-disable-next-line react/no-danger + dangerouslySetInnerHTML: { __html: item.html } })) : ((0, jsx_runtime_1.jsx)(LinkItem_1.default, { item: item })); +} +function FooterLinksSimple(_a) { + var links = _a.links; + return ((0, jsx_runtime_1.jsx)("div", { className: "footer__links text--center", children: (0, jsx_runtime_1.jsx)("div", { className: "footer__links", children: links.map(function (item, i) { return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(SimpleLinkItem, { item: item }), links.length !== i + 1 && (0, jsx_runtime_1.jsx)(Separator, {})] }, i)); }) }) })); +} diff --git a/src/theme/Footer/Links/index.js b/src/theme/Footer/Links/index.js new file mode 100644 index 00000000..e51896cb --- /dev/null +++ b/src/theme/Footer/Links/index.js @@ -0,0 +1,15 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = FooterLinks; +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importDefault(require("react")); +var theme_common_1 = require("@docusaurus/theme-common"); +var MultiColumn_1 = __importDefault(require("@theme/Footer/Links/MultiColumn")); +var Simple_1 = __importDefault(require("@theme/Footer/Links/Simple")); +function FooterLinks(_a) { + var links = _a.links; + return (0, theme_common_1.isMultiColumnFooterLinks)(links) ? ((0, jsx_runtime_1.jsx)(MultiColumn_1.default, { columns: links })) : ((0, jsx_runtime_1.jsx)(Simple_1.default, { links: links })); +} diff --git a/src/theme/Footer/Logo/index.js b/src/theme/Footer/Logo/index.js new file mode 100644 index 00000000..c8073ae4 --- /dev/null +++ b/src/theme/Footer/Logo/index.js @@ -0,0 +1,27 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = FooterLogo; +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importDefault(require("react")); +var clsx_1 = __importDefault(require("clsx")); +var Link_1 = __importDefault(require("@docusaurus/Link")); +var useBaseUrl_1 = require("@docusaurus/useBaseUrl"); +var ThemedImage_1 = __importDefault(require("@theme/ThemedImage")); +var styles_module_css_1 = __importDefault(require("./styles.module.css")); +function LogoImage(_a) { + var _b; + var logo = _a.logo; + var withBaseUrl = (0, useBaseUrl_1.useBaseUrlUtils)().withBaseUrl; + var sources = { + light: withBaseUrl(logo.src), + dark: withBaseUrl((_b = logo.srcDark) !== null && _b !== void 0 ? _b : logo.src), + }; + return ((0, jsx_runtime_1.jsx)(ThemedImage_1.default, { className: (0, clsx_1.default)('footer__logo', logo.className), alt: logo.alt, sources: sources, width: logo.width, height: logo.height, style: logo.style })); +} +function FooterLogo(_a) { + var logo = _a.logo; + return logo.href ? ((0, jsx_runtime_1.jsx)(Link_1.default, { href: logo.href, className: styles_module_css_1.default.footerLogoLink, target: logo.target, children: (0, jsx_runtime_1.jsx)(LogoImage, { logo: logo }) })) : ((0, jsx_runtime_1.jsx)(LogoImage, { logo: logo })); +} diff --git a/src/theme/Footer/index.js b/src/theme/Footer/index.js new file mode 100644 index 00000000..82663389 --- /dev/null +++ b/src/theme/Footer/index.js @@ -0,0 +1,21 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importDefault(require("react")); +var theme_common_1 = require("@docusaurus/theme-common"); +var Layout_1 = __importDefault(require("@theme/Footer/Layout")); +var Copyright_1 = __importDefault(require("@theme/Footer/Copyright")); +var Logo_1 = __importDefault(require("@theme/Footer/Logo")); +var Links_1 = __importDefault(require("@theme/Footer/Links")); +function Footer() { + var footer = (0, theme_common_1.useThemeConfig)().footer; + if (!footer) { + return null; + } + var copyright = footer.copyright, links = footer.links, logo = footer.logo, style = footer.style; + return ((0, jsx_runtime_1.jsx)(Layout_1.default, { style: style, links: links && (0, jsx_runtime_1.jsx)(Links_1.default, { links: links }), logo: logo && (0, jsx_runtime_1.jsx)(Logo_1.default, { logo: logo }), copyright: copyright && (0, jsx_runtime_1.jsx)(Copyright_1.default, { copyright: copyright }) })); +} +exports.default = react_1.default.memo(Footer); diff --git a/src/theme/Layout.js b/src/theme/Layout.js new file mode 100644 index 00000000..a8fe6af0 --- /dev/null +++ b/src/theme/Layout.js @@ -0,0 +1,37 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = CustomLayout; +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importDefault(require("react")); +var Layout_1 = __importDefault(require("@theme-original/Layout")); +var NavbarFirebaseAuthGithub_1 = __importDefault(require("@site/src/components/ui/NavbarFirebaseAuthGithub")); +var NewsLetterPopup_1 = __importDefault(require("../components/NewsLetterPopup")); +function CustomLayout(_a) { + var children = _a.children, props = __rest(_a, ["children"]); + return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(Layout_1.default, __assign({}, props, { children: [(0, jsx_runtime_1.jsx)(NavbarFirebaseAuthGithub_1.default, {}), children] })), (0, jsx_runtime_1.jsx)(NewsLetterPopup_1.default, {})] })); +} diff --git a/src/theme/Navbar/Content/index.js b/src/theme/Navbar/Content/index.js new file mode 100644 index 00000000..9a82cd3c --- /dev/null +++ b/src/theme/Navbar/Content/index.js @@ -0,0 +1,88 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = NavbarContent; +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importStar(require("react")); +var theme_common_1 = require("@docusaurus/theme-common"); +var internal_1 = require("@docusaurus/theme-common/internal"); +var NavbarItem_1 = __importDefault(require("@theme/NavbarItem")); +var ColorModeToggle_1 = __importDefault(require("@theme/Navbar/ColorModeToggle")); +var SearchBar_1 = __importDefault(require("@theme/SearchBar")); +var Toggle_1 = __importDefault(require("@theme/Navbar/MobileSidebar/Toggle")); +var Logo_1 = __importDefault(require("@theme/Navbar/Logo")); +var Search_1 = __importDefault(require("@theme/Navbar/Search")); +function useNavbarItems() { + return (0, theme_common_1.useThemeConfig)().navbar.items; +} +function NavbarItems(_a) { + var items = _a.items; + return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: items.map(function (item, i) { + var key = "".concat(item.label || item.to || item.href || 'item', "-").concat(i); + return ((0, jsx_runtime_1.jsx)(theme_common_1.ErrorCauseBoundary, { onError: function (error) { + return new Error("A theme navbar item failed to render.\nPlease double-check the following navbar item (themeConfig.navbar.items) of your Docusaurus config:\n".concat(JSON.stringify(item, null, 2)), { cause: error }); + }, children: (0, jsx_runtime_1.jsx)(NavbarItem_1.default, __assign({}, item)) }, key)); + }) })); +} +function NavbarContentLayout(_a) { + var left = _a.left, right = _a.right; + return ((0, jsx_runtime_1.jsxs)("div", { className: "navbar__inner", children: [(0, jsx_runtime_1.jsx)("div", { className: "navbar__items", children: left }), (0, jsx_runtime_1.jsx)("div", { className: "navbar__items navbar__items--right", children: right })] })); +} +function NavbarContent() { + var mobileSidebar = (0, internal_1.useNavbarMobileSidebar)(); + var items = useNavbarItems(); + var _a = (0, react_1.useMemo)(function () { return (0, internal_1.splitNavbarItems)(items); }, [items]), leftItems = _a[0], rightItems = _a[1]; + var searchBarItem = (0, react_1.useMemo)(function () { return items.find(function (item) { return item.type === 'search'; }); }, [items]); + return ((0, jsx_runtime_1.jsx)(NavbarContentLayout, { left: + // TODO stop hardcoding items? + (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [!mobileSidebar.disabled && (0, jsx_runtime_1.jsx)(Toggle_1.default, {}), (0, jsx_runtime_1.jsx)(Logo_1.default, {}), (0, jsx_runtime_1.jsx)(NavbarItems, { items: leftItems })] }), right: + // TODO stop hardcoding items? + // Ask the user to add the respective navbar items => more flexible + (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(NavbarItems, { items: rightItems }), (0, jsx_runtime_1.jsx)(ColorModeToggle_1.default, {}), !searchBarItem && ((0, jsx_runtime_1.jsx)(Search_1.default, { children: (0, jsx_runtime_1.jsx)(SearchBar_1.default, {}) }))] }) })); +} diff --git a/src/theme/Navbar/index.js b/src/theme/Navbar/index.js new file mode 100644 index 00000000..18451eaf --- /dev/null +++ b/src/theme/Navbar/index.js @@ -0,0 +1,23 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = NavbarWrapper; +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importDefault(require("react")); +var Navbar_1 = __importDefault(require("@theme-original/Navbar")); +function NavbarWrapper(props) { + return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(Navbar_1.default, __assign({}, props)) })); +} diff --git a/src/theme/NavbarItem.js b/src/theme/NavbarItem.js new file mode 100644 index 00000000..ffb4de4b --- /dev/null +++ b/src/theme/NavbarItem.js @@ -0,0 +1,10 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = void 0; +// This file can be removed as it's just a pass-through wrapper +// Docusaurus will use the original NavbarItem component directly +var NavbarItem_1 = require("@theme-original/NavbarItem"); +Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(NavbarItem_1).default; } }); diff --git a/src/theme/NavbarItem/index.js b/src/theme/NavbarItem/index.js new file mode 100644 index 00000000..219c91c2 --- /dev/null +++ b/src/theme/NavbarItem/index.js @@ -0,0 +1,8 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = void 0; +var NavbarItem_1 = require("@theme-original/NavbarItem"); +Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(NavbarItem_1).default; } }); diff --git a/src/theme/Root.js b/src/theme/Root.js new file mode 100644 index 00000000..a1ea87b8 --- /dev/null +++ b/src/theme/Root.js @@ -0,0 +1,14 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = Root; +var jsx_runtime_1 = require("react/jsx-runtime"); +var react_1 = __importDefault(require("react")); +var react_2 = require("@vercel/analytics/react"); +// Default implementation, that you can customize +function Root(_a) { + var children = _a.children; + return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [children, process.env.NODE_ENV === 'production' && (0, jsx_runtime_1.jsx)(react_2.Analytics, {})] })); +} diff --git a/src/utils/authors.js b/src/utils/authors.js new file mode 100644 index 00000000..7f102c49 --- /dev/null +++ b/src/utils/authors.js @@ -0,0 +1,25 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getAuthorNames = exports.authorsMap = void 0; +exports.authorsMap = { + "ajay-dhangar": "Ajay Dhangar", + "sanjay-kv": "Sanjay Viswanthan", + "hitesh-gahanolia": "Hitesh Gahanolia", + "dharshibalasubramaniyam": "Sowmiya Venketashan", + "abhijith-m-s": "Abhijith M S", + "khushi-kalra": "Khushi Kalra", + "nayanikamukherjee": "Nayanika Mukherjee", + "pujan-sarkar": "Pujan Sarkar", + "mohitmuktikant": "Mohit Muktikant", + "santhosh-siddhardha": "Lingamuneni Santhosh Siddhardha", + "akshitha-chiluka": "Akshitha Chiluka", + "Aditya-Singh-Rathore": "Aditya Singh Rathore", +}; +var getAuthorNames = function (authorIds) { + var firstNames = authorIds.map(function (id) { + var fullName = exports.authorsMap[id] || id; + return fullName.split(' ')[0]; + }).slice(0, 2); + return firstNames.length > 1 ? firstNames.join(" & ") : firstNames[0] || "RecodeHive"; +}; +exports.getAuthorNames = getAuthorNames; diff --git a/src/utils/jsUtils.js b/src/utils/jsUtils.js new file mode 100644 index 00000000..920c8cbb --- /dev/null +++ b/src/utils/jsUtils.js @@ -0,0 +1,29 @@ +"use strict"; +var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.sortBy = sortBy; +exports.toggleListItem = toggleListItem; +function sortBy(array, getter) { + var sortedArray = __spreadArray([], array, true); + sortedArray.sort(function (a, b) { + return getter(a) > getter(b) ? 1 : getter(b) > getter(a) ? -1 : 0; + }); + return sortedArray; +} +function toggleListItem(list, item) { + var itemIndex = list.indexOf(item); + if (itemIndex === -1) { + return list.concat(item); + } + var newList = __spreadArray([], list, true); + newList.splice(itemIndex, 1); + return newList; +} diff --git a/src/utils/navbarUtils.js b/src/utils/navbarUtils.js new file mode 100644 index 00000000..16af01ab --- /dev/null +++ b/src/utils/navbarUtils.js @@ -0,0 +1,22 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createNavbarItemHTML = createNavbarItemHTML; +exports.createSimpleNavbarItemHTML = createSimpleNavbarItemHTML; +/** + * Generates HTML string for navbar items with icons + * @param iconName - The name of the icon from NAVBAR_CONFIG + * @param label - The text label for the navbar item + * @returns HTML string with icon placeholder and label + */ +function createNavbarItemHTML(iconName, label) { + return " ").concat(label); +} +/** + * Generates HTML string for simple navbar items with icons (no inline styles) + * @param iconName - The name of the icon from NAVBAR_CONFIG + * @param label - The text label for the navbar item + * @returns HTML string with icon placeholder and label + */ +function createSimpleNavbarItemHTML(iconName, label) { + return " ").concat(label); +} From b6a68a66e0f0d0b476da135994a8a9f653464415 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 30 Sep 2025 05:43:19 +0000 Subject: [PATCH 3/3] Add proper form handling to contact page with validation and submit events Co-authored-by: Adez017 <142787780+Adez017@users.noreply.github.com> --- .gitignore | 5 + docusaurus.config.js | 264 ----- package.json | 14 +- sidebars.js | 168 --- src/components/BrowserWindow/index.js | 25 - src/components/Comming/index.js | 15 - src/components/Community/index.js | 98 -- src/components/FloatingContributors/index.js | 472 --------- src/components/GiscusComponent/index.js | 22 - src/components/HomepageFeatures/index.js | 45 - src/components/NewsLetterPopup.js | 67 -- src/components/StatsSection/index.js | 49 - src/components/Svg/index.js | 42 - src/components/TeamProfileCards/index.js | 51 - src/components/blogCarousel/blogCard.js | 69 -- src/components/blogCarousel/blogCarousel.js | 74 -- .../dashboard/LeaderBoard/PRListModal.js | 57 - .../dashboard/LeaderBoard/leaderboard.js | 226 ---- .../dashboard/LeaderBoard/mockData.js | 103 -- src/components/discussions/DiscussionCard.js | 39 - src/components/discussions/index.js | 8 - src/components/faqs/faqs.js | 89 -- src/components/giscus.js | 65 -- src/components/header.js | 121 --- src/components/header/header.js | 57 - src/components/mockup/DeveloperMockup.js | 54 - src/components/navbar/NavbarIcon.js | 31 - src/components/navbar/NavbarIconInjector.js | 74 -- src/components/ourProjects.js | 122 --- src/components/particle.js | 179 ---- src/components/scroll/bottom-to-top.js | 63 -- src/components/scroll/top-to-bottom.js | 64 -- src/components/svgIcons/FavoriteIcon/index.js | 29 - .../testimonials/TestimonialCard.js | 29 - .../testimonials/TestimonialCarousel.js | 106 -- src/components/topmate/TopMateCard.js | 28 - src/components/topmate/TopMateSection.js | 33 - src/components/ui/FirebaseAuthGithub.js | 120 --- src/components/ui/NavbarFirebaseAuthGithub.js | 50 - src/components/ui/avatar.js | 76 -- src/components/ui/badge.js | 83 -- src/components/ui/button.js | 92 -- src/components/ui/card.js | 95 -- src/components/ui/carousel.js | 156 --- src/components/ui/collapsible.js | 75 -- src/components/ui/input.js | 65 -- src/constants/navbarConfig.js | 23 - src/data/roadmaps/html.js | 77 -- src/data/roadmaps/index.js | 46 - src/data/roadmaps/javascript/index.js | 180 ---- src/data/userData.js | 50 - src/data/users.js | 175 ---- src/database/blogs/index.js | 69 -- src/database/ebooks/index.js | 33 - src/database/projects/projects.js | 30 - src/database/sponsors/index.js | 529 ---------- src/lib/firebase.js | 19 - src/lib/statsProvider.js | 477 --------- src/lib/utils.js | 12 - src/pages/License/index.js | 24 - src/pages/badges/github-badges.js | 122 --- src/pages/blogs/index.js | 105 -- src/pages/broadcasts/details.js | 161 --- src/pages/broadcasts/index.js | 264 ----- src/pages/careers/index.js | 280 ----- src/pages/code-of-conduct/index.js | 27 - src/pages/community/index.js | 217 ---- src/pages/contact-us/index.css | 84 +- src/pages/contact-us/index.js | 14 - src/pages/contact-us/index.tsx | 205 +++- src/pages/courses/index.js | 293 ------ src/pages/dashboard/giveaway/index.js | 244 ----- src/pages/dashboard/index.js | 345 ------ src/pages/get-started/index.js | 429 -------- src/pages/index.js | 81 -- src/pages/interview-prep/BehavioralTab.js | 133 --- src/pages/interview-prep/CompaniesTab.js | 167 --- src/pages/interview-prep/OverviewTab.js | 163 --- src/pages/interview-prep/PracticeTab.js | 239 ----- src/pages/interview-prep/TechnicalTab.js | 47 - src/pages/interview-prep/index.js | 978 ------------------ src/pages/our-sponsors/SponsorCard/index.js | 14 - src/pages/our-sponsors/index.js | 99 -- src/pages/podcasts/details.js | 160 --- src/pages/podcasts/index.js | 203 ---- src/pages/privacy-policy/index.js | 12 - .../_components/ShowcaseCard/index.js | 55 - .../_components/ShowcaseFilterToggle/index.js | 92 -- .../_components/ShowcaseTagSelect/index.js | 113 -- .../_components/ShowcaseTooltip/index.js | 98 -- src/pages/showcase/index.js | 257 ----- src/pages/terms-service/index.js | 12 - src/plugins/tailwind-plugin.js | 13 - src/services/githubService.js | 544 ---------- src/theme/ColorModeToggle/index.js | 43 - src/theme/DocSidebar/Desktop/index.js | 44 - src/theme/DocSidebarItem/Category/index.js | 227 ---- src/theme/DocSidebarItem/Html/index.js | 25 - src/theme/DocSidebarItem/Link/index.js | 62 -- src/theme/DocSidebarItem/index.js | 50 - src/theme/DocSidebarItem/types.js | 2 - src/theme/DocSidebarItems/index.js | 36 - src/theme/Footer/Copyright/index.js | 15 - src/theme/Footer/Layout/Counter.js | 71 -- src/theme/Footer/Layout/index.js | 152 --- src/theme/Footer/LinkItem/index.js | 48 - src/theme/Footer/Links/MultiColumn/index.js | 26 - src/theme/Footer/Links/Simple/index.js | 24 - src/theme/Footer/Links/index.js | 15 - src/theme/Footer/Logo/index.js | 27 - src/theme/Footer/index.js | 21 - src/theme/Layout.js | 37 - src/theme/MDXComponents.js | 17 - src/theme/Navbar/Content/index.js | 88 -- src/theme/Navbar/index.js | 23 - src/theme/NavbarItem.js | 10 - src/theme/NavbarItem/index.js | 8 - src/theme/Root.js | 14 - src/utils/authors.js | 25 - src/utils/jsUtils.js | 29 - src/utils/navbarUtils.js | 22 - 121 files changed, 287 insertions(+), 12757 deletions(-) delete mode 100644 docusaurus.config.js delete mode 100644 sidebars.js delete mode 100644 src/components/BrowserWindow/index.js delete mode 100644 src/components/Comming/index.js delete mode 100644 src/components/Community/index.js delete mode 100644 src/components/FloatingContributors/index.js delete mode 100644 src/components/GiscusComponent/index.js delete mode 100644 src/components/HomepageFeatures/index.js delete mode 100644 src/components/NewsLetterPopup.js delete mode 100644 src/components/StatsSection/index.js delete mode 100644 src/components/Svg/index.js delete mode 100644 src/components/TeamProfileCards/index.js delete mode 100644 src/components/blogCarousel/blogCard.js delete mode 100644 src/components/blogCarousel/blogCarousel.js delete mode 100644 src/components/dashboard/LeaderBoard/PRListModal.js delete mode 100644 src/components/dashboard/LeaderBoard/leaderboard.js delete mode 100644 src/components/dashboard/LeaderBoard/mockData.js delete mode 100644 src/components/discussions/DiscussionCard.js delete mode 100644 src/components/discussions/index.js delete mode 100644 src/components/faqs/faqs.js delete mode 100644 src/components/giscus.js delete mode 100644 src/components/header.js delete mode 100644 src/components/header/header.js delete mode 100644 src/components/mockup/DeveloperMockup.js delete mode 100644 src/components/navbar/NavbarIcon.js delete mode 100644 src/components/navbar/NavbarIconInjector.js delete mode 100644 src/components/ourProjects.js delete mode 100644 src/components/particle.js delete mode 100644 src/components/scroll/bottom-to-top.js delete mode 100644 src/components/scroll/top-to-bottom.js delete mode 100644 src/components/svgIcons/FavoriteIcon/index.js delete mode 100644 src/components/testimonials/TestimonialCard.js delete mode 100644 src/components/testimonials/TestimonialCarousel.js delete mode 100644 src/components/topmate/TopMateCard.js delete mode 100644 src/components/topmate/TopMateSection.js delete mode 100644 src/components/ui/FirebaseAuthGithub.js delete mode 100644 src/components/ui/NavbarFirebaseAuthGithub.js delete mode 100644 src/components/ui/avatar.js delete mode 100644 src/components/ui/badge.js delete mode 100644 src/components/ui/button.js delete mode 100644 src/components/ui/card.js delete mode 100644 src/components/ui/carousel.js delete mode 100644 src/components/ui/collapsible.js delete mode 100644 src/components/ui/input.js delete mode 100644 src/constants/navbarConfig.js delete mode 100644 src/data/roadmaps/html.js delete mode 100644 src/data/roadmaps/index.js delete mode 100644 src/data/roadmaps/javascript/index.js delete mode 100644 src/data/userData.js delete mode 100644 src/data/users.js delete mode 100644 src/database/blogs/index.js delete mode 100644 src/database/ebooks/index.js delete mode 100644 src/database/projects/projects.js delete mode 100644 src/database/sponsors/index.js delete mode 100644 src/lib/firebase.js delete mode 100644 src/lib/statsProvider.js delete mode 100644 src/lib/utils.js delete mode 100644 src/pages/License/index.js delete mode 100644 src/pages/badges/github-badges.js delete mode 100644 src/pages/blogs/index.js delete mode 100644 src/pages/broadcasts/details.js delete mode 100644 src/pages/broadcasts/index.js delete mode 100644 src/pages/careers/index.js delete mode 100644 src/pages/code-of-conduct/index.js delete mode 100644 src/pages/community/index.js delete mode 100644 src/pages/contact-us/index.js delete mode 100644 src/pages/courses/index.js delete mode 100644 src/pages/dashboard/giveaway/index.js delete mode 100644 src/pages/dashboard/index.js delete mode 100644 src/pages/get-started/index.js delete mode 100644 src/pages/index.js delete mode 100644 src/pages/interview-prep/BehavioralTab.js delete mode 100644 src/pages/interview-prep/CompaniesTab.js delete mode 100644 src/pages/interview-prep/OverviewTab.js delete mode 100644 src/pages/interview-prep/PracticeTab.js delete mode 100644 src/pages/interview-prep/TechnicalTab.js delete mode 100644 src/pages/interview-prep/index.js delete mode 100644 src/pages/our-sponsors/SponsorCard/index.js delete mode 100644 src/pages/our-sponsors/index.js delete mode 100644 src/pages/podcasts/details.js delete mode 100644 src/pages/podcasts/index.js delete mode 100644 src/pages/privacy-policy/index.js delete mode 100644 src/pages/showcase/_components/ShowcaseCard/index.js delete mode 100644 src/pages/showcase/_components/ShowcaseFilterToggle/index.js delete mode 100644 src/pages/showcase/_components/ShowcaseTagSelect/index.js delete mode 100644 src/pages/showcase/_components/ShowcaseTooltip/index.js delete mode 100644 src/pages/showcase/index.js delete mode 100644 src/pages/terms-service/index.js delete mode 100644 src/plugins/tailwind-plugin.js delete mode 100644 src/services/githubService.js delete mode 100644 src/theme/ColorModeToggle/index.js delete mode 100644 src/theme/DocSidebar/Desktop/index.js delete mode 100644 src/theme/DocSidebarItem/Category/index.js delete mode 100644 src/theme/DocSidebarItem/Html/index.js delete mode 100644 src/theme/DocSidebarItem/Link/index.js delete mode 100644 src/theme/DocSidebarItem/index.js delete mode 100644 src/theme/DocSidebarItem/types.js delete mode 100644 src/theme/DocSidebarItems/index.js delete mode 100644 src/theme/Footer/Copyright/index.js delete mode 100644 src/theme/Footer/Layout/Counter.js delete mode 100644 src/theme/Footer/Layout/index.js delete mode 100644 src/theme/Footer/LinkItem/index.js delete mode 100644 src/theme/Footer/Links/MultiColumn/index.js delete mode 100644 src/theme/Footer/Links/Simple/index.js delete mode 100644 src/theme/Footer/Links/index.js delete mode 100644 src/theme/Footer/Logo/index.js delete mode 100644 src/theme/Footer/index.js delete mode 100644 src/theme/Layout.js delete mode 100644 src/theme/MDXComponents.js delete mode 100644 src/theme/Navbar/Content/index.js delete mode 100644 src/theme/Navbar/index.js delete mode 100644 src/theme/NavbarItem.js delete mode 100644 src/theme/NavbarItem/index.js delete mode 100644 src/theme/Root.js delete mode 100644 src/utils/authors.js delete mode 100644 src/utils/jsUtils.js delete mode 100644 src/utils/navbarUtils.js diff --git a/.gitignore b/.gitignore index 292a4329..627f7813 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,11 @@ .docusaurus .cache-loader +# Docusaurus build artifacts (transpiled JS from TS/TSX) +docusaurus.config.js +sidebars.js +src/**/*.js + # Misc .DS_Store .env.local diff --git a/docusaurus.config.js b/docusaurus.config.js deleted file mode 100644 index 15462423..00000000 --- a/docusaurus.config.js +++ /dev/null @@ -1,264 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var prism_react_renderer_1 = require("prism-react-renderer"); -var dotenv = __importStar(require("dotenv")); -dotenv.config(); -// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...) -var config = { - title: "Recode Hive", - tagline: "Dinosaurs are cool", - favicon: "img/favicon.ico", - url: "https://recodehive.com", - baseUrl: "/", - organizationName: "recodehive", - projectName: "recode-website", - onBrokenLinks: "throw", - onBrokenMarkdownLinks: "warn", - // Google Analytics and Theme Scripts - scripts: [ - { - src: "/instant-theme.js", - async: false, - }, - { - src: "https://www.googletagmanager.com/gtag/js?id=G-W02Z2VJYCR", - async: true, - }, - { - src: "/gtag-init.js", - }, - { - src: "/pinterest-init.js", - }, - ], - i18n: { - defaultLocale: "en", - locales: ["en"], - }, - presets: [ - [ - "classic", - { - docs: { - path: "docs", - routeBasePath: "docs", - sidebarPath: require.resolve("./sidebars.ts"), - editUrl: function (_a) { - var docPath = _a.docPath; - return "https://github.com/recodehive/recode-website/tree/main/docs/".concat(docPath); - }, - }, - blog: { - showReadingTime: true, - feedOptions: { - type: ["rss", "atom"], - xslt: true, - }, - editUrl: "https://github.com/recodehive/recode-website/tree/main", - onInlineTags: "warn", - onInlineAuthors: "warn", - onUntruncatedBlogPosts: "warn", - }, - theme: { - customCss: require.resolve("./src/css/custom.css"), - }, - gtag: { - trackingID: "G-W02Z2VJYCR", - anonymizeIP: false, - }, - }, - ], - ], - themeConfig: { - image: "img/docusaurus-social-card.jpg", - colorMode: { - defaultMode: "light", - disableSwitch: false, - respectPrefersColorScheme: false, // Let users manually control theme - }, - navbar: { - title: "Recode Hive", - logo: { - alt: "RecodeHive Logo", - src: "img/logo.png", - }, - items: [ - { - type: "dropdown", - html: '📚 Docs', - position: "left", - items: [ - { - type: "html", - value: "
\n Tutorials\n
\n \"SQL\" \n \"Python\" \n \"GitHub\" \n \"Nextjs\" \n \"Docs\" \n
\n
", - }, - { - type: "html", - value: '
', - }, - { - type: "html", - value: "
\n Courses\n
\n \"git\" \n \"Postman\" \n \"Google\" \n
\n
", - }, - { - type: "html", - value: '
', - }, - { - type: "html", - value: "", - }, - ], - }, - { - to: "/showcase", - html: '🌍 Showcase', - position: "left", - }, - { - to: "/dashboard", - html: '📊 Dashboard', - position: "left", - }, - { - to: "/our-sponsors/", - html: '💰 Donate', - position: "left", - }, - { - type: "dropdown", - html: '👩🏻‍💻 Devfolio', - position: "left", - items: [ - { - label: "💻GitHub Profiles", - to: "https://dev.recodehive.com/devfolio", - }, - { - label: "🎖️ GitHub Badges", - to: "/badges/github-badges/", - }, - ], - }, - { - to: "/blogs", - html: '📰 Blogs', - position: "left", - }, - { - type: "dropdown", - html: '🔗 More', - position: "left", - items: [ - { - label: "📚 E-books", - to: "https://learn.recodehive.com/datascience", - }, - { - label: "🗺️ Roadmap", - to: "https://github.com/orgs/recodehive/projects/9", - }, - { - label: "🤝 Community", - to: "/community", - }, - { - label: "📺 Broadcast", - to: "/broadcasts/", - }, - { - label: "🎙️ Podcast", - to: "/podcasts/", - }, - ], - }, - { - type: "search", - position: "right", - }, - { - type: "html", - position: "right", - value: '
', - }, - ], - }, - footer: { - style: "dark", - links: [], - copyright: "Copyright \u00A9 ".concat(new Date().getFullYear(), " recodehive. Built with Docusaurus."), - }, - prism: { - theme: prism_react_renderer_1.themes.github, - darkTheme: prism_react_renderer_1.themes.dracula, - }, - algolia: { - appId: "YOUR_APP_ID", - apiKey: "YOUR_SEARCH_API_KEY", - indexName: "YOUR_INDEX_NAME", - contextualSearch: true, - externalUrlRegex: "external\\.com|domain\\.com", - replaceSearchResultPathname: { - from: "/docs/", - to: "/", - }, - searchParameters: {}, - searchPagePath: "search", - insights: false, - }, - }, - markdown: { - mermaid: true, - }, - themes: ["@docusaurus/theme-mermaid"], - plugins: [ - [ - "@docusaurus/plugin-ideal-image", - { - quality: 70, - max: 1030, - min: 640, - steps: 2, - disableInDev: false, - }, - ], - ], - // ✅ Add this customFields object to expose the token to the client-side - customFields: { - gitToken: process.env.DOCUSAURUS_GIT_TOKEN, - }, -}; -exports.default = config; diff --git a/package.json b/package.json index b42bb8b0..7fba5f5a 100644 --- a/package.json +++ b/package.json @@ -15,12 +15,12 @@ "typecheck": "tsc" }, "dependencies": { - "@docusaurus/core": "^3.8.1", + "@docusaurus/core": "3.8.1", "@docusaurus/plugin-content-docs": "3.8.1", - "@docusaurus/plugin-google-analytics": "^3.8.1", + "@docusaurus/plugin-google-analytics": "3.8.1", "@docusaurus/plugin-ideal-image": "3.8.1", - "@docusaurus/preset-classic": "^3.8.1", - "@docusaurus/theme-classic": "^3.8.1", + "@docusaurus/preset-classic": "3.8.1", + "@docusaurus/theme-classic": "3.8.1", "@docusaurus/theme-mermaid": "3.8.1", "@docusaurus/theme-search-algolia": "3.8.1", "@floating-ui/react": "^0.27.8", @@ -57,9 +57,9 @@ "vanilla-tilt": "^1.8.1" }, "devDependencies": { - "@docusaurus/module-type-aliases": "^3.8.1", - "@docusaurus/tsconfig": "^3.8.1", - "@docusaurus/types": "^3.8.1", + "@docusaurus/module-type-aliases": "3.8.1", + "@docusaurus/tsconfig": "3.8.1", + "@docusaurus/types": "3.8.1", "@tailwindcss/postcss": "^4.1.4", "@types/canvas-confetti": "^1.9.0", "@types/react": "^19.1.9", diff --git a/sidebars.js b/sidebars.js deleted file mode 100644 index 963adc62..00000000 --- a/sidebars.js +++ /dev/null @@ -1,168 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...) -/** - * Creating a sidebar enables you to: - - create an ordered group of docs - - render a sidebar for each doc of that group - - provide next/previous navigation - - The sidebars can be generated from the filesystem, or explicitly defined here. - - Create as many sidebars as you want. - */ -var sidebars = { - // Custom manual sidebar configuration for complete control - tutorialSidebar: [ - { - type: 'doc', - id: 'docs', // document ID - label: '🏠 Home', // sidebar label - className: 'custom-sidebar-home', - }, - { - type: 'category', - label: '🐙 GitHub', - className: 'custom-sidebar-github', - items: [ - 'GitHub/intro-github', - { - type: 'category', - label: '⚙️ Setup Environment', - className: 'custom-sidebar-setup', - items: [ - 'GitHub/setup-environment/setup-environment', - 'GitHub/setup-environment/setup-git-on-windows', - 'GitHub/setup-environment/setup-git-on-mac', - 'GitHub/setup-environment/git-commands', - ], - }, - { - type: 'category', - label: '📚 GitHub Basics', - className: 'custom-sidebar-basics', - items: [ - 'GitHub/GitHub-basics/create-github-repo', - 'GitHub/GitHub-basics/github-repo-command-line', - 'GitHub/GitHub-basics/how-to-clone-repository', - 'GitHub/GitHub-basics/how-to-fork', - 'GitHub/GitHub-basics/firs-opensource-code', - ], - }, - { - type: 'category', - label: '👨‍💼 Maintainer Guide', - className: 'custom-sidebar-maintainer', - items: [ - 'GitHub/Maintainer-guide/github-labels', - 'GitHub/Maintainer-guide/milestone', - 'GitHub/Maintainer-guide/github-project', - 'GitHub/Maintainer-guide/enable-dicussion', - ], - }, - ], - }, - { - type: 'category', - label: '🐍 Python', - className: 'custom-sidebar-python', - items: [ - 'python/intro-python', - 'python/setup-environment', - 'python/python-syntax', - 'python/python-variables', - 'python/datatype-python', - 'python/python-casting', - 'python/python-string', - 'python/python-operators', - 'python/python-list', - 'python/python-tuple', - 'python/python-set', - 'python/python-dictionaries', - 'python/python-array', - 'python/python-conditional-statements', - 'python/python-loops', - ], - }, - { - type: 'category', - label: '🗄️ SQL', - className: 'custom-sidebar-sql', - items: [ - 'sql/intro-sql', - 'sql/setup-environment', - { - type: 'category', - label: '📊 SQL Basics', - className: 'custom-sidebar-sql-basics', - items: [ - 'sql/SQL-basics/sql-constraints', - 'sql/SQL-basics/selecting-data', - 'sql/SQL-basics/filtering-data', - 'sql/SQL-basics/ordering-data', - 'sql/SQL-basics/grouping-data', - 'sql/SQL-basics/the-inequality-operator', - 'sql/SQL-basics/sql-datatypes', - 'sql/SQL-basics/primary-key-foreign-key', - 'sql/SQL-basics/sql-operators' - ], - }, - { - type: 'category', - label: '🔄 Table Transformation', - className: 'custom-sidebar-sql-transform', - items: [ - 'sql/table-transformation/table-creation', - 'sql/table-transformation/alter-table', - 'sql/table-transformation/data-operations', - 'sql/table-transformation/list-drop-table', - ], - }, - { - type: 'category', - label: 'SQL Joins', - className: 'custom-sidebar-sql-joins', - items: [ - 'sql/SQL-joins/intro-sql-joins', - 'sql/SQL-joins/inner-join', - 'sql/SQL-joins/left-join', - 'sql/SQL-joins/right-join', - 'sql/SQL-joins/full-outer-join', - 'sql/SQL-joins/cross-join', - 'sql/SQL-joins/self-join', - ], - }, - ], - }, - { - type: 'category', - label: '⚡ Next.js', - className: 'custom-sidebar-nextjs', - items: [ - 'Nextjs/intro-nextjs', - 'Nextjs/setup-environment', - // 'Nextjs/git-commands', - ], - }, - { - type: 'category', - label: '🎓 Google Student Ambassador', - className: 'custom-sidebar-gsa', - items: [ - 'Google-Student-Ambassador/part-1-getting-started/gsa-part-1', - 'Google-Student-Ambassador/part-2-application-process/gsa-part-2', - 'Google-Student-Ambassador/part-3-eligibility/gsa-part-3', - 'Google-Student-Ambassador/part-4-gemini-pro/gsa-part-4', - ], - }, - { - type: 'category', - label: '🔧 Technical', - className: 'custom-sidebar-technical', - items: [ - 'Technical/intro-github', - ], - }, - ], -}; -exports.default = sidebars; diff --git a/src/components/BrowserWindow/index.js b/src/components/BrowserWindow/index.js deleted file mode 100644 index 8625f964..00000000 --- a/src/components/BrowserWindow/index.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = BrowserWindow; -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importDefault(require("react")); -var clsx_1 = __importDefault(require("clsx")); -var BrowserWindow_module_css_1 = __importDefault(require("./BrowserWindow.module.css")); -function BrowserWindow(_a) { - var children = _a.children, minHeight = _a.minHeight, _b = _a.url, url = _b === void 0 ? 'http://localhost:3000' : _b, style = _a.style, bodyStyle = _a.bodyStyle; - return ((0, jsx_runtime_1.jsxs)("div", { className: BrowserWindow_module_css_1.default.browserWindow, style: __assign(__assign({}, style), { minHeight: minHeight }), children: [(0, jsx_runtime_1.jsxs)("div", { className: BrowserWindow_module_css_1.default.browserWindowHeader, children: [(0, jsx_runtime_1.jsxs)("div", { className: BrowserWindow_module_css_1.default.buttons, children: [(0, jsx_runtime_1.jsx)("span", { className: BrowserWindow_module_css_1.default.dot, style: { background: '#f25f58' } }), (0, jsx_runtime_1.jsx)("span", { className: BrowserWindow_module_css_1.default.dot, style: { background: '#fbbe3c' } }), (0, jsx_runtime_1.jsx)("span", { className: BrowserWindow_module_css_1.default.dot, style: { background: '#58cb42' } })] }), (0, jsx_runtime_1.jsx)("div", { className: (0, clsx_1.default)(BrowserWindow_module_css_1.default.browserWindowAddressBar, 'text--truncate'), children: url }), (0, jsx_runtime_1.jsx)("div", { className: BrowserWindow_module_css_1.default.browserWindowMenuIcon, children: (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("span", { className: BrowserWindow_module_css_1.default.bar }), (0, jsx_runtime_1.jsx)("span", { className: BrowserWindow_module_css_1.default.bar }), (0, jsx_runtime_1.jsx)("span", { className: BrowserWindow_module_css_1.default.bar })] }) })] }), (0, jsx_runtime_1.jsx)("div", { className: BrowserWindow_module_css_1.default.browserWindowBody, style: bodyStyle, children: children })] })); -} diff --git a/src/components/Comming/index.js b/src/components/Comming/index.js deleted file mode 100644 index f72fbf92..00000000 --- a/src/components/Comming/index.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importDefault(require("react")); -/** - * A maintenance notification component with contained sizing. - * @returns {JSX.Element} A React functional component - */ -var Coming = function () { - return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col justify-center items-center p-6 mx-auto my-8 max-w-2xl rounded-xl bg-white dark:bg-gray-800 shadow-lg", children: [(0, jsx_runtime_1.jsx)("img", { src: "https://www.svgrepo.com/show/426192/cogs-settings.svg", alt: "Maintenance in progress", className: "mb-6 h-32 w-32", height: 100, width: 100, loading: "lazy" }), (0, jsx_runtime_1.jsx)("h1", { className: "text-3xl font-bold text-center text-gray-800 dark:text-white mb-3", children: "Site Maintenance" }), (0, jsx_runtime_1.jsx)("p", { className: "text-center text-gray-600 dark:text-gray-300 mb-6", children: "We're working hard to improve your experience. Please check back soon!" }), (0, jsx_runtime_1.jsx)("div", { className: "flex flex-col sm:flex-row gap-10 w-full", children: (0, jsx_runtime_1.jsx)("a", { href: "/contact", className: "flex-1 bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded-lg text-center transition-colors ", children: "Contact Support" }) })] })); -}; -exports.default = Coming; diff --git a/src/components/Community/index.js b/src/components/Community/index.js deleted file mode 100644 index 3a546a39..00000000 --- a/src/components/Community/index.js +++ /dev/null @@ -1,98 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.LandingCommunity = void 0; -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importStar(require("react")); -var react_slot_counter_1 = __importDefault(require("react-slot-counter")); -require("./LandingCommunity.css"); -var statsProvider_1 = require("@site/src/lib/statsProvider"); -var LandingCommunity = function (_a) { - var className = _a.className; - var _b = (0, statsProvider_1.useCommunityStatsContext)(), githubStarCountText = _b.githubStarCountText, githubContributorsCountText = _b.githubContributorsCountText, githubForksCountText = _b.githubForksCountText, githubReposCountText = _b.githubReposCountText, githubStarCount = _b.githubStarCount, githubContributorsCount = _b.githubContributorsCount, githubForksCount = _b.githubForksCount, githubReposCount = _b.githubReposCount, loading = _b.loading, error = _b.error; - var generateList = (0, react_1.useMemo)(function () { return [ - { - stat: githubStarCount, - statText: githubStarCountText, - description: "Stars across all our GitHub repositories, showcasing the support and appreciation from the community.", - href: "https://github.com/recodehive/Support", - label: "GitHub Stars" - }, - { - stat: githubReposCount, - statText: githubReposCountText, - description: "Live public projects on RecodHive, demonstrating the power of open-source collaboration.", - href: "https://github.com/orgs/recodehive/repositories?q=visibility%3Apublic+archived%3Afalse", - label: "Public Repositories" - }, - { - stat: githubContributorsCount, - statText: githubContributorsCountText, - description: "Amazing contributors who have made our repositories better and helped build our community.", - href: "https://github.com/orgs/recodehive/people", - label: "Contributors" - }, - { - stat: githubForksCount, - statText: githubForksCountText, - description: "Forks of our repositories, showing how our community extends and builds upon our work.", - href: "https://github.com/orgs/recodehive/discussions", - label: "Community Forks" - }, - ]; }, [githubStarCount, githubStarCountText, githubReposCount, githubReposCountText, githubContributorsCount, githubContributorsCountText, githubForksCount, githubForksCountText]); - var handleCardClick = function (href) { - if (href) { - window.open(href, '_blank', 'noopener,noreferrer'); - } - }; - return ((0, jsx_runtime_1.jsxs)("div", { className: "landing-community ".concat(className || ""), children: [(0, jsx_runtime_1.jsxs)("div", { className: "landing-community__header", children: [(0, jsx_runtime_1.jsxs)("h2", { className: "landing-community__title", children: ["Discover the strength of our", " ", (0, jsx_runtime_1.jsx)("span", { className: "landing-community__highlight", children: "amazing community" }), "."] }), error && ((0, jsx_runtime_1.jsx)("div", { className: "landing-community__error", children: (0, jsx_runtime_1.jsx)("small", { children: "\u26A0\uFE0F Stats may be cached or incomplete" }) }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "landing-community__content", children: [(0, jsx_runtime_1.jsx)("div", { className: "landing-community__stats", children: generateList.map(function (item, index) { return ((0, jsx_runtime_1.jsxs)("div", { className: "landing-community__stat-item ".concat(item.href ? 'clickable' : '', " ").concat(loading ? 'loading' : ''), onClick: function () { return handleCardClick(item.href); }, role: item.href ? "button" : "presentation", tabIndex: item.href ? 0 : -1, onKeyDown: function (e) { - if (item.href && (e.key === 'Enter' || e.key === ' ')) { - e.preventDefault(); - handleCardClick(item.href); - } - }, title: item.href ? "Click to visit ".concat(item.label) : item.label, children: [(0, jsx_runtime_1.jsx)("div", { className: "landing-community__stat-value", children: loading ? ((0, jsx_runtime_1.jsx)("div", { className: "landing-community__loading", children: (0, jsx_runtime_1.jsx)("span", { className: "loading-spinner", children: "\u23F3" }) })) : ((0, jsx_runtime_1.jsxs)("span", { children: [(0, jsx_runtime_1.jsx)(react_slot_counter_1.default, { value: item.stat, duration: 2, animateOnVisible: { - triggerOnce: true, - rootMargin: '0px 0px -100px 0px' - }, numberSlotClassName: "slot-counter-number", separatorClassName: "slot-counter-separator" }), item.href && (0, jsx_runtime_1.jsx)("span", { className: "external-link-icon", children: "\u2197" })] })) }), (0, jsx_runtime_1.jsx)("div", { className: "landing-community__stat-description", children: item.description })] }, index)); }) }), (0, jsx_runtime_1.jsxs)("div", { className: "landing-community__info clickable", onClick: function () { return handleCardClick("https://github.com/recodehive"); }, role: "button", tabIndex: 0, onKeyDown: function (e) { - if (e.key === 'Enter' || e.key === ' ') { - e.preventDefault(); - handleCardClick("https://github.com/recodehive"); - } - }, title: "Click to visit RecodHive GitHub Organization", children: [(0, jsx_runtime_1.jsx)("img", { className: "landing-community__image", src: "/community.png", alt: "team collaboration", loading: "lazy" }), (0, jsx_runtime_1.jsxs)("div", { className: "landing-community__info-text", children: ["Our developers are the core of RecodHive community. We take pride in our", " ", (0, jsx_runtime_1.jsx)("span", { className: "landing-community__link", children: "GitHub organization" }), " ", "with amazing", " ", (0, jsx_runtime_1.jsx)("span", { className: "landing-community__link", children: "contributors and maintainers" }), " ", "powering RecodHive's growth.", (0, jsx_runtime_1.jsxs)("div", { className: "external-link-indicator", children: [(0, jsx_runtime_1.jsx)("span", { className: "external-link-icon", children: "\u2197" }), (0, jsx_runtime_1.jsx)("small", { children: "Click to explore our GitHub" })] })] })] })] })] })); -}; -exports.LandingCommunity = LandingCommunity; diff --git a/src/components/FloatingContributors/index.js b/src/components/FloatingContributors/index.js deleted file mode 100644 index 216a6fa7..00000000 --- a/src/components/FloatingContributors/index.js +++ /dev/null @@ -1,472 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importStar(require("react")); -var framer_motion_1 = require("framer-motion"); -require("./FloatingContributors.css"); -// Format relative time (e.g., "2 hours ago") -var formatTimeAgo = function (date) { - var seconds = Math.floor((new Date().getTime() - date.getTime()) / 1000); - var interval = Math.floor(seconds / 31536000); - if (interval > 1) - return "".concat(interval, " years ago"); - interval = Math.floor(seconds / 2592000); - if (interval > 1) - return "".concat(interval, " months ago"); - interval = Math.floor(seconds / 86400); - if (interval > 1) - return "".concat(interval, " days ago"); - if (interval === 1) - return "1 day ago"; - interval = Math.floor(seconds / 3600); - if (interval > 1) - return "".concat(interval, " hours ago"); - if (interval === 1) - return "1 hour ago"; - interval = Math.floor(seconds / 60); - if (interval > 1) - return "".concat(interval, " minutes ago"); - if (interval === 1) - return "1 minute ago"; - return "just now"; -}; -var FloatingContributors = function (_a) { - var _b = _a.headerEmbedded, headerEmbedded = _b === void 0 ? false : _b; - var _c = (0, react_1.useState)([]), contributors = _c[0], setContributors = _c[1]; - var _d = (0, react_1.useState)([]), activities = _d[0], setActivities = _d[1]; - var _e = (0, react_1.useState)(0), currentActivityIndex = _e[0], setCurrentActivityIndex = _e[1]; - var _f = (0, react_1.useState)(true), isVisible = _f[0], setIsVisible = _f[1]; - var _g = (0, react_1.useState)(true), loading = _g[0], setLoading = _g[1]; - var _h = (0, react_1.useState)(null), lastFetched = _h[0], setLastFetched = _h[1]; - var refreshTimerRef = (0, react_1.useRef)(null); - // Create fallback activities for when API fails - var createFallbackActivities = (0, react_1.useCallback)(function () { - var fallbackContributors = [ - { - login: 'sanjay-kv', - avatar_url: 'https://avatars.githubusercontent.com/u/30715153?v=4', - html_url: 'https://github.com/sanjay-kv', - }, - { - login: 'recodehive-team', - avatar_url: 'https://avatars.githubusercontent.com/u/150000000?v=4', - html_url: 'https://github.com/recodehive', - }, - { - login: 'open-source-contributor', - avatar_url: 'https://avatars.githubusercontent.com/u/583231?v=4', - html_url: 'https://github.com/open-source-contributor', - }, - { - login: 'developer', - avatar_url: 'https://avatars.githubusercontent.com/u/9919?v=4', - html_url: 'https://github.com/developer', - }, - { - login: 'coder', - avatar_url: 'https://avatars.githubusercontent.com/u/6154722?v=4', - html_url: 'https://github.com/coder', - }, - ]; - var actions = ['pushed', 'created', 'merged', 'opened', 'commented']; - var timeOffsets = [5, 10, 30, 60, 120, 240, 480]; // minutes - var messages = [ - 'Updated documentation', - 'Fixed styling issues', - 'Added new feature', - 'Resolved conflict in package.json', - 'Implemented responsive design', - 'Updated dependencies', - 'Fixed typo in README' - ]; - return fallbackContributors.map(function (contributor, index) { - var _a; - var now = new Date(); - var timestamp = new Date(now.getTime() - (timeOffsets[index % timeOffsets.length] * 60 * 1000)); - return { - id: "fallback-".concat(index), - contributor: { - login: contributor.login, - avatar_url: contributor.avatar_url, - html_url: contributor.html_url, - }, - action: actions[index % actions.length], - message: (_a = messages[index % messages.length]) === null || _a === void 0 ? void 0 : _a.slice(0, 50), // Consistent message length - timestamp: timestamp, - timeAgo: formatTimeAgo(timestamp), - }; - }); - }, []); - // Fetch live data from GitHub - var fetchLiveData = (0, react_1.useCallback)(function () { return __awaiter(void 0, void 0, void 0, function () { - var CACHE_KEY, CACHE_DURATION, now, events, cachedData, _a, data, timestamp, eventsResponse, newActivities, contributorsMap_1, contributorsResponse, contributorsData, error_1, error_2, fallbackActivities, contributorsMap_2; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - _b.trys.push([0, 11, , 12]); - CACHE_KEY = 'recodehive_website_events'; - CACHE_DURATION = 2 * 60 * 1000; - now = Date.now(); - if (lastFetched && now - lastFetched < 30000) { - // Don't fetch more than once every 30 seconds - return [2 /*return*/]; - } - events = []; - if (typeof window !== 'undefined') { - try { - cachedData = localStorage.getItem(CACHE_KEY); - if (cachedData) { - _a = JSON.parse(cachedData), data = _a.data, timestamp = _a.timestamp; - if (now - timestamp < CACHE_DURATION) { - events = data; - } - } - } - catch (e) { - console.warn('Error retrieving cached events', e); - } - } - if (!(events.length === 0)) return [3 /*break*/, 3]; - setLoading(true); - return [4 /*yield*/, fetch('https://api.github.com/repos/recodehive/recode-website/events?per_page=30')]; - case 1: - eventsResponse = _b.sent(); - if (!eventsResponse.ok) { - throw new Error("GitHub API error: ".concat(eventsResponse.status)); - } - return [4 /*yield*/, eventsResponse.json()]; - case 2: - events = _b.sent(); - // Save to cache - if (typeof window !== 'undefined' && Array.isArray(events)) { - try { - localStorage.setItem(CACHE_KEY, JSON.stringify({ - data: events, - timestamp: now, - })); - } - catch (e) { - console.warn('Error caching events data', e); - } - } - _b.label = 3; - case 3: - if (!(Array.isArray(events) && events.length > 0)) return [3 /*break*/, 10]; - newActivities = events.map(function (event) { - var _a, _b, _c, _d, _e; - // Map GitHub event types to our action types - var action = 'other'; - var message; - switch (event.type) { - case 'PushEvent': - action = 'pushed'; - message = event.payload.commits && ((_b = (_a = event.payload.commits[0]) === null || _a === void 0 ? void 0 : _a.message) === null || _b === void 0 ? void 0 : _b.slice(0, 50)); - break; - case 'PullRequestEvent': - if (event.payload.action === 'opened') - action = 'opened'; - else if (event.payload.action === 'closed' && ((_c = event.payload.pull_request) === null || _c === void 0 ? void 0 : _c.merged)) - action = 'merged'; - else if (event.payload.action === 'closed') - action = 'closed'; - break; - case 'CreateEvent': - action = 'created'; - break; - case 'IssueCommentEvent': - case 'CommitCommentEvent': - case 'PullRequestReviewCommentEvent': - action = 'commented'; - message = (_e = (_d = event.payload.comment) === null || _d === void 0 ? void 0 : _d.body) === null || _e === void 0 ? void 0 : _e.slice(0, 50); - break; - default: - action = 'other'; - } - var timestamp = new Date(event.created_at); - return { - id: event.id, - contributor: { - login: event.actor.login, - avatar_url: event.actor.avatar_url, - html_url: "https://github.com/".concat(event.actor.login), - }, - action: action, - message: message === null || message === void 0 ? void 0 : message.slice(0, 50), // Consistent message length limit - timestamp: timestamp, - timeAgo: formatTimeAgo(timestamp), - }; - }); - if (!(newActivities.length > 0)) return [3 /*break*/, 10]; - setActivities(newActivities); - contributorsMap_1 = new Map(); - _b.label = 4; - case 4: - _b.trys.push([4, 8, , 9]); - return [4 /*yield*/, fetch('https://api.github.com/repos/recodehive/recode-website/contributors?per_page=100')]; - case 5: - contributorsResponse = _b.sent(); - if (!contributorsResponse.ok) return [3 /*break*/, 7]; - return [4 /*yield*/, contributorsResponse.json()]; - case 6: - contributorsData = _b.sent(); - if (Array.isArray(contributorsData)) { - contributorsData.forEach(function (contributor) { - if (contributor.login && contributor.type === 'User') { - contributorsMap_1.set(contributor.login, { - id: contributor.id.toString(), - login: contributor.login, - avatar_url: contributor.avatar_url, - contributions: contributor.contributions, - html_url: contributor.html_url, - }); - } - }); - } - _b.label = 7; - case 7: return [3 /*break*/, 9]; - case 8: - error_1 = _b.sent(); - console.warn('Error fetching contributors:', error_1); - // If we couldn't get contributors data, at least use actors from events - events.forEach(function (event) { - var login = event.actor.login; - if (!contributorsMap_1.has(login)) { - contributorsMap_1.set(login, { - id: event.actor.id.toString(), - login: login, - avatar_url: event.actor.avatar_url, - contributions: 1, // We don't know the actual count - html_url: "https://github.com/".concat(login), - }); - } - }); - return [3 /*break*/, 9]; - case 9: - // Update contributors if we found any - if (contributorsMap_1.size > 0) { - setContributors(Array.from(contributorsMap_1.values())); - } - _b.label = 10; - case 10: - setLastFetched(now); - setLoading(false); - // Set up next refresh - if (refreshTimerRef.current) { - clearTimeout(refreshTimerRef.current); - } - refreshTimerRef.current = setTimeout(function () { - fetchLiveData(); - }, 60000); // Refresh every minute - return [3 /*break*/, 12]; - case 11: - error_2 = _b.sent(); - console.warn('Error fetching GitHub events:', error_2); - // Use fallback data if we have no activities yet - if (activities.length === 0) { - fallbackActivities = createFallbackActivities(); - setActivities(fallbackActivities); - contributorsMap_2 = new Map(); - fallbackActivities.forEach(function (activity) { - var login = activity.contributor.login; - if (!contributorsMap_2.has(login)) { - contributorsMap_2.set(login, { - id: "fallback-".concat(login), - login: login, - avatar_url: activity.contributor.avatar_url, - contributions: Math.floor(Math.random() * 50) + 10, - html_url: activity.contributor.html_url, - }); - } - }); - setContributors(Array.from(contributorsMap_2.values())); - } - setLoading(false); - return [3 /*break*/, 12]; - case 12: return [2 /*return*/]; - } - }); - }); }, [activities.length, createFallbackActivities, lastFetched]); - // Initialize component and start data fetching - (0, react_1.useEffect)(function () { - // Set loading state - setLoading(true); - // Fetch data immediately - fetchLiveData(); - // Clean up on unmount - return function () { - if (refreshTimerRef.current) { - clearTimeout(refreshTimerRef.current); - } - }; - }, [fetchLiveData]); - // Cycle through activities - (0, react_1.useEffect)(function () { - if (activities.length <= 1) - return; - var interval = setInterval(function () { - setCurrentActivityIndex(function (prev) { return (prev + 1) % activities.length; }); - }, 4000); - return function () { return clearInterval(interval); }; - }, [activities.length]); - // Get GitHub URL for event - var getGitHubEventUrl = function (activity) { - var repoUrl = 'https://github.com/recodehive/recode-website'; - switch (activity.action) { - case 'pushed': - return "".concat(repoUrl, "/commits"); - case 'merged': - case 'opened': - case 'closed': - return "".concat(repoUrl, "/pulls"); - case 'commented': - return "".concat(repoUrl, "/issues"); - case 'created': - return repoUrl; - default: - return repoUrl; - } - }; - // Get icon for action type - var getActionIcon = function (action) { - switch (action) { - case 'pushed': return '🚀'; - case 'created': return '✨'; - case 'merged': return '🔄'; - case 'opened': return '📝'; - case 'commented': return '💬'; - case 'closed': return '✅'; - default: return '💻'; - } - }; - // Get text for action type - var getActionText = function (action) { - switch (action) { - case 'pushed': return 'PUSHED'; - case 'created': return 'CREATED'; - case 'merged': return 'MERGED'; - case 'opened': return 'OPENED'; - case 'commented': return 'COMMENTED'; - case 'closed': return 'CLOSED'; - default: return 'ACTIVE'; - } - }; - // Don't render anything while initial loading - if (loading && activities.length === 0) { - return null; - } - // Get current activity to display - var currentActivity = activities[currentActivityIndex]; - return ((0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { children: isVisible && ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "floating-contributors-container ".concat(headerEmbedded ? 'header-embedded' : ''), initial: { opacity: 0, y: headerEmbedded ? 0 : 50, scale: headerEmbedded ? 1 : 0.9 }, animate: { - opacity: 1, - y: 0, - scale: 1, - }, exit: { opacity: 0, y: headerEmbedded ? 0 : 50, scale: headerEmbedded ? 1 : 0.9 }, transition: { - duration: headerEmbedded ? 0.8 : 0.6, - ease: [0.4, 0, 0.2, 1] - }, children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "floating-contributors-card", animate: headerEmbedded ? {} : { - y: [0, -8, 0], - }, transition: headerEmbedded ? {} : { - duration: 4, - repeat: Infinity, - ease: "easeInOut", - }, children: [(0, jsx_runtime_1.jsx)("button", { className: "floating-contributors-close", onClick: function () { return setIsVisible(false); }, "aria-label": "Close contributors showcase", children: "\u00D7" }), (0, jsx_runtime_1.jsxs)("div", { className: "floating-contributors-header", children: [(0, jsx_runtime_1.jsxs)("div", { className: "floating-contributors-title", children: [(0, jsx_runtime_1.jsx)("span", { className: "title-icon", children: "\uD83D\uDC65" }), (0, jsx_runtime_1.jsx)("span", { children: "Live Activity" })] }), (0, jsx_runtime_1.jsx)("div", { className: "floating-contributors-subtitle", children: "recodehive/recode-website" })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { mode: "wait", children: (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "floating-contributors-activity contributor-activity-item", initial: { opacity: 0, x: 20 }, animate: { opacity: 1, x: 0 }, exit: { opacity: 0, x: -20 }, transition: { duration: 0.4 }, onClick: function () { return window.open(getGitHubEventUrl(currentActivity), '_blank'); }, tabIndex: 0, role: "link", "aria-label": "View ".concat(currentActivity.contributor.login, "'s ").concat(currentActivity.action, " activity on GitHub"), children: [(0, jsx_runtime_1.jsxs)("div", { className: "activity-avatar-container", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.img, { src: currentActivity.contributor.avatar_url, alt: currentActivity.contributor.login, className: "activity-avatar", whileHover: { scale: 1.1 }, transition: { type: "spring", stiffness: 400, damping: 10 } }), (0, jsx_runtime_1.jsx)("div", { className: "activity-status-indicator", children: (0, jsx_runtime_1.jsx)("span", { className: "status-dot" }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "activity-details", children: [(0, jsx_runtime_1.jsxs)("div", { className: "activity-user", children: [(0, jsx_runtime_1.jsxs)("span", { className: "activity-username", title: "@".concat(currentActivity.contributor.login), children: ["@", currentActivity.contributor.login] }), (0, jsx_runtime_1.jsx)("span", { className: "activity-action-badge", children: getActionText(currentActivity.action) })] }), currentActivity.message && ((0, jsx_runtime_1.jsx)("div", { className: "activity-message", title: currentActivity.message, children: currentActivity.message })), (0, jsx_runtime_1.jsx)("div", { className: "activity-time", children: currentActivity.timeAgo })] })] }, currentActivityIndex) }), (0, jsx_runtime_1.jsxs)("div", { className: "floating-contributors-grid", children: [(0, jsx_runtime_1.jsxs)("div", { className: "contributors-grid-header", children: [(0, jsx_runtime_1.jsx)("span", { children: "Recent Contributors" }), (0, jsx_runtime_1.jsx)("span", { className: "contributors-count", children: contributors.length })] }), (0, jsx_runtime_1.jsxs)("div", { className: "contributors-avatars", children: [contributors - .sort(function (a, b) { return b.contributions - a.contributions; }) // Sort contributors by contributions in descending order - .slice(0, 5) // Limit to top 5 contributors - .map(function (contributor, index) { return ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "contributor-avatar-wrapper", initial: { opacity: 0, scale: 0.8 }, animate: { opacity: 1, scale: 1 }, transition: { - delay: index * 0.05, - type: "spring", - stiffness: 300, - damping: 15 - }, whileHover: { scale: 1.1, zIndex: 5 }, children: (0, jsx_runtime_1.jsxs)("a", { href: contributor.html_url, target: "_blank", rel: "noopener noreferrer", "aria-label": "View ".concat(contributor.login, "'s GitHub profile"), className: "contributor-link", children: [(0, jsx_runtime_1.jsx)("img", { src: contributor.avatar_url, alt: contributor.login, className: "contributor-avatar" }), (0, jsx_runtime_1.jsxs)("div", { className: "contributor-tooltip", children: [(0, jsx_runtime_1.jsxs)("div", { className: "tooltip-username", children: ["@", contributor.login] }), (0, jsx_runtime_1.jsxs)("div", { className: "tooltip-contributions", children: [contributor.contributions || 0, " contributions"] })] })] }) }, contributor.id)); }), contributors.length > 12 && ((0, jsx_runtime_1.jsx)("div", { className: "contributors-more", children: (0, jsx_runtime_1.jsxs)("span", { children: ["+", contributors.length - 12, " more"] }) }))] })] }), (0, jsx_runtime_1.jsx)("div", { className: "floating-contributors-footer", children: (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.a, { href: "https://github.com/recodehive/recode-website", target: "_blank", rel: "noopener noreferrer", className: "contributors-cta", whileHover: { scale: 1.02 }, whileTap: { scale: 0.98 }, "aria-label": "View repository on GitHub and join the community", children: [(0, jsx_runtime_1.jsx)("span", { className: "cta-icon", children: "\uD83D\uDE80" }), (0, jsx_runtime_1.jsx)("span", { children: "View Repository on GitHub" }), (0, jsx_runtime_1.jsx)("span", { className: "cta-arrow", children: "\u2197" })] }) })] }), (0, jsx_runtime_1.jsx)("div", { className: "floating-particles", children: __spreadArray([], Array(6), true).map(function (_, i) { return ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "floating-particle", animate: { - y: [0, -20, 0], - x: [0, Math.sin(i) * 10, 0], - opacity: [0.3, 0.8, 0.3], - }, transition: { - duration: 3 + i * 0.5, - repeat: Infinity, - ease: "easeInOut", - delay: i * 0.2, - }, style: { - left: "".concat(10 + i * 15, "%"), - top: "".concat(20 + (i % 3) * 20, "%"), - } }, i)); }) })] })) })); -}; -exports.default = FloatingContributors; diff --git a/src/components/GiscusComponent/index.js b/src/components/GiscusComponent/index.js deleted file mode 100644 index cd5a3185..00000000 --- a/src/components/GiscusComponent/index.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = GiscusComponent; -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importDefault(require("react")); -var react_2 = __importDefault(require("@giscus/react")); -var theme_common_1 = require("@docusaurus/theme-common"); -require("./style.css"); -/** - * GiscusComponent - * - * A React component that integrates Giscus for GitHub discussions. - * - * @returns {JSX.Element} The rendered component - */ -function GiscusComponent() { - var colorMode = (0, theme_common_1.useColorMode)().colorMode; // Retrieves the current color mode from Docusaurus theme - return ((0, jsx_runtime_1.jsx)("div", { className: "giscus-component", children: (0, jsx_runtime_1.jsx)(react_2.default, { id: "giscus", repo: "CodeHarborHub/codeharborhub.github.io", repoId: "R_kgDOLiT30w", category: "Support", categoryId: "DIC_kwDOLiT3084CfRMi", mapping: "pathname", term: "Welcome to @giscus/react component!", strict: "0", reactionsEnabled: "1", emitMetadata: "0", inputPosition: "bottom", theme: colorMode, lang: "en", loading: "lazy" }) })); -} diff --git a/src/components/HomepageFeatures/index.js b/src/components/HomepageFeatures/index.js deleted file mode 100644 index cbdad5c3..00000000 --- a/src/components/HomepageFeatures/index.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = HomepageFeatures; -var jsx_runtime_1 = require("react/jsx-runtime"); -var clsx_1 = __importDefault(require("clsx")); -var Heading_1 = __importDefault(require("@theme/Heading")); -var styles_module_css_1 = __importDefault(require("./styles.module.css")); -var FeatureList = [ - { - title: 'Easy to Use', - Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default, - description: ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "Docusaurus was designed from the ground up to be easily installed and used to get your website up and running quickly." })), - }, - { - title: 'Focus on What Matters', - Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default, - description: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["Docusaurus lets you focus on your docs, and we'll do the chores. Go ahead and move your docs into the ", (0, jsx_runtime_1.jsx)("code", { children: "docs" }), " directory."] })), - }, - { - title: 'Powered by React', - Svg: require('@site/static/img/undraw_docusaurus_react.svg').default, - description: ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: "Extend or customize your website layout by reusing React. Docusaurus can be extended while reusing the same header and footer." })), - }, -]; -function Feature(_a) { - var title = _a.title, Svg = _a.Svg, description = _a.description; - return ((0, jsx_runtime_1.jsxs)("div", { className: (0, clsx_1.default)('col col--4'), children: [(0, jsx_runtime_1.jsx)("div", { className: "text--center", children: (0, jsx_runtime_1.jsx)(Svg, { className: styles_module_css_1.default.featureSvg, role: "img" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "text--center padding-horiz--md", children: [(0, jsx_runtime_1.jsx)(Heading_1.default, { as: "h3", children: title }), (0, jsx_runtime_1.jsx)("p", { children: description })] })] })); -} -function HomepageFeatures() { - return ((0, jsx_runtime_1.jsx)("section", { className: styles_module_css_1.default.features, children: (0, jsx_runtime_1.jsx)("div", { className: "container", children: (0, jsx_runtime_1.jsx)("div", { className: "row", children: FeatureList.map(function (props, idx) { return ((0, jsx_runtime_1.jsx)(Feature, __assign({}, props), idx)); }) }) }) })); -} diff --git a/src/components/NewsLetterPopup.js b/src/components/NewsLetterPopup.js deleted file mode 100644 index bde17f31..00000000 --- a/src/components/NewsLetterPopup.js +++ /dev/null @@ -1,67 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importStar(require("react")); -var NewsletterPopup = function () { - var _a = (0, react_1.useState)(false), showPopup = _a[0], setShowPopup = _a[1]; - (0, react_1.useEffect)(function () { - var hasSubscribed = localStorage.getItem('recodehive_newsletter_popup'); - if (hasSubscribed !== 'true') { - var handleScroll_1 = function () { - var scrollPosition = window.scrollY + window.innerHeight; - var pageHeight = document.body.scrollHeight; - if ((scrollPosition / pageHeight) >= 0.8) { - setShowPopup(true); - window.removeEventListener('scroll', handleScroll_1); - } - }; - window.addEventListener('scroll', handleScroll_1); - return function () { return window.removeEventListener('scroll', handleScroll_1); }; - } - }, []); - var handleClose = function () { - setShowPopup(false); - localStorage.setItem('recodehive_newsletter_popup', 'true'); - }; - if (!showPopup) - return null; - return ((0, jsx_runtime_1.jsx)("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 px-4", children: (0, jsx_runtime_1.jsxs)("div", { className: "bg-white/80 backdrop-blur-xl max-w-xl w-full rounded-3xl shadow-2xl p-8 text-center relative border border-gray-200 animate-fade-in", children: [(0, jsx_runtime_1.jsx)("img", { src: "/img/logo.png", alt: "RecodeHive Logo", className: "w-16 h-16 mx-auto mb-4 rounded-full shadow-md" }), (0, jsx_runtime_1.jsx)("h2", { className: "text-3xl font-extrabold mb-2 text-gray-900", children: "Sanjay\u2019s Substack" }), (0, jsx_runtime_1.jsxs)("p", { className: "text-gray-700 text-base leading-relaxed mb-4", children: ["Recodehive is an inclusive and welcoming platform where everyone can contribute, learn, and grow together. \u26A1 ", (0, jsx_runtime_1.jsx)("br", {}), "Check my \u2728 Website: ", (0, jsx_runtime_1.jsx)("a", { href: "https://www.recodehive.com", target: "_blank", className: "text-blue-600 hover:underline font-medium", children: "https://www.recodehive.com " }), (0, jsx_runtime_1.jsx)("br", {}), "\uD83D\uDCEE How to reach me: ", (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/sanjay-kv", target: "_blank", className: "text-blue-600 hover:underline font-medium", children: "github.com/sanjay-kv" }), (0, jsx_runtime_1.jsx)("br", {}), "\uD83D\uDC6B Join my opensource community"] }), (0, jsx_runtime_1.jsxs)("p", { className: "text-sm font-semibold text-gray-700 mb-4", children: ["By ", (0, jsx_runtime_1.jsx)("span", { className: "text-gray-900", children: "Sanjay Viswanathan" }), " \u00B7 Over ", (0, jsx_runtime_1.jsx)("span", { className: "text-gray-900", children: "31,000 subscribers" })] }), (0, jsx_runtime_1.jsxs)("form", { className: "flex items-stretch w-full border-2 border-gray-300 rounded-xl overflow-hidden bg-white shadow-inner mb-4 focus-within:ring-2 focus-within:ring-blue-500", onSubmit: function (e) { - e.preventDefault(); - alert('Subscribed! (Integrate with Substack API)'); - handleClose(); - }, children: [(0, jsx_runtime_1.jsx)("input", { type: "email", required: true, placeholder: "Type your email...", className: "flex-1 px-4 py-2 text-sm bg-transparent focus:outline-none text-gray-800 placeholder-gray-400" }), (0, jsx_runtime_1.jsx)("button", { type: "submit", className: "bg-gradient-to-r from-orange-400 to-orange-600 text-white px-6 text-sm font-bold transition duration-300 hover:from-orange-500 hover:to-orange-700", children: "Subscribe" })] }), (0, jsx_runtime_1.jsxs)("p", { className: "text-xs text-gray-500 mb-4", children: ["By subscribing, I agree to Substack\u2019s", ' ', (0, jsx_runtime_1.jsx)("a", { href: "#", className: "underline hover:text-blue-600", children: "Terms of Use" }), " and acknowledge its", ' ', (0, jsx_runtime_1.jsx)("a", { href: "#", className: "underline hover:text-blue-600", children: "Information Collection Notice" }), " and", ' ', (0, jsx_runtime_1.jsx)("a", { href: "#", className: "underline hover:text-blue-600", children: "Privacy Policy" }), "."] }), (0, jsx_runtime_1.jsx)("button", { onClick: handleClose, className: "text-sm text-gray-600 font-medium hover:text-black transition", "aria-label": "Close newsletter popup", children: "No thanks \u2192" })] }) })); -}; -exports.default = NewsletterPopup; diff --git a/src/components/StatsSection/index.js b/src/components/StatsSection/index.js deleted file mode 100644 index 3a4aacd4..00000000 --- a/src/components/StatsSection/index.js +++ /dev/null @@ -1,49 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importDefault(require("react")); -var framer_motion_1 = require("framer-motion"); -var styles_module_css_1 = __importDefault(require("./styles.module.css")); -var stats = [ - { value: '10,000+', label: 'Active Learners', icon: '👥' }, - { value: '100+', label: 'Hours of Content', icon: '⏱️' }, - { value: '24/7', label: 'Community Support', icon: '💬' }, - { value: '4.9/5', label: 'Average Rating', icon: '⭐' }, -]; -var StatCard = function (_a) { - var stat = _a.stat, index = _a.index; - return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: styles_module_css_1.default.statCard, initial: { opacity: 0, y: 30 }, whileInView: { - opacity: 1, - y: 0, - transition: { - duration: 0.6, - delay: index * 0.1, - ease: "easeOut" - } - }, viewport: { once: true, margin: "-50px" }, whileHover: { - y: -5, - boxShadow: '0 15px 30px rgba(0, 0, 0, 0.2)' - }, children: [stat.icon && ((0, jsx_runtime_1.jsx)("div", { className: styles_module_css_1.default.statIcon, children: stat.icon })), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: styles_module_css_1.default.statValue, "aria-label": stat.value, initial: { scale: 0.9 }, whileInView: { - scale: 1, - transition: { - delay: 0.2 + (index * 0.05), - type: 'spring', - stiffness: 100 - } - }, viewport: { once: true }, children: stat.value }), (0, jsx_runtime_1.jsx)("div", { className: styles_module_css_1.default.statLabel, children: stat.label })] })); -}; -var StatsSection = function () { - return ((0, jsx_runtime_1.jsx)("section", { className: styles_module_css_1.default.section, children: (0, jsx_runtime_1.jsx)("div", { className: styles_module_css_1.default.container, children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: styles_module_css_1.default.statsGrid, initial: "hidden", whileInView: "visible", viewport: { once: true, amount: 0.5 }, variants: { - hidden: { opacity: 0 }, - visible: { - opacity: 1, - transition: { - staggerChildren: 0.1 - } - } - }, children: stats.map(function (stat, index) { return ((0, jsx_runtime_1.jsx)(StatCard, { stat: stat, index: index }, stat.label)); }) }) }) })); -}; -exports.default = StatsSection; diff --git a/src/components/Svg/index.js b/src/components/Svg/index.js deleted file mode 100644 index 76d51da3..00000000 --- a/src/components/Svg/index.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __rest = (this && this.__rest) || function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = Svg; -var jsx_runtime_1 = require("react/jsx-runtime"); -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -var react_1 = __importDefault(require("react")); -var clsx_1 = __importDefault(require("clsx")); -var styles_module_css_1 = __importDefault(require("./styles.module.css")); -function Svg(props) { - var svgClass = props.svgClass, colorAttr = props.colorAttr, children = props.children, _a = props.color, color = _a === void 0 ? 'inherit' : _a, _b = props.size, size = _b === void 0 ? 'medium' : _b, _c = props.viewBox, viewBox = _c === void 0 ? '0 0 24 24' : _c, rest = __rest(props, ["svgClass", "colorAttr", "children", "color", "size", "viewBox"]); - return ((0, jsx_runtime_1.jsx)("svg", __assign({ viewBox: viewBox, color: colorAttr, "aria-hidden": true, className: (0, clsx_1.default)(styles_module_css_1.default.svgIcon, styles_module_css_1.default[color], styles_module_css_1.default[size], svgClass) }, rest, { children: children }))); -} diff --git a/src/components/TeamProfileCards/index.js b/src/components/TeamProfileCards/index.js deleted file mode 100644 index 6ecc8ffd..00000000 --- a/src/components/TeamProfileCards/index.js +++ /dev/null @@ -1,51 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ActiveTeamRow = ActiveTeamRow; -exports.HonoraryAlumniTeamRow = HonoraryAlumniTeamRow; -exports.StudentFellowsTeamRow = StudentFellowsTeamRow; -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importDefault(require("react")); -var Translate_1 = __importDefault(require("@docusaurus/Translate")); -var Link_1 = __importDefault(require("@docusaurus/Link")); -var Heading_1 = __importDefault(require("@theme/Heading")); -require("./teamcards.css"); -function WebsiteLink(_a) { - var to = _a.to, children = _a.children; - return ((0, jsx_runtime_1.jsx)(Link_1.default, { to: to, children: children !== null && children !== void 0 ? children : ((0, jsx_runtime_1.jsx)(Translate_1.default, { id: "team.profile.websiteLinkLabel", children: "website" })) })); -} -function TeamProfileCard(_a) { - var className = _a.className, name = _a.name, children = _a.children, githubUrl = _a.githubUrl, twitterUrl = _a.twitterUrl, linkedInUrl = _a.linkedInUrl; - return ((0, jsx_runtime_1.jsx)("div", { className: "team-profile-card ".concat(className), children: (0, jsx_runtime_1.jsxs)("div", { className: "card card--full-height", children: [(0, jsx_runtime_1.jsx)("div", { className: "card__header", children: (0, jsx_runtime_1.jsxs)("div", { className: "avatar avatar--vertical", children: [(0, jsx_runtime_1.jsx)("img", { className: "avatar__photo avatar__photo--xl", src: "".concat(githubUrl, ".png"), alt: "".concat(name, "'s avatar") }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("div", { className: "avatar__intro", children: (0, jsx_runtime_1.jsx)(Heading_1.default, { as: "h3", className: "avatar__name", children: name }) })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "card__body", children: children }), (0, jsx_runtime_1.jsx)("div", { className: "card__footer", children: (0, jsx_runtime_1.jsxs)("div", { className: "button-group button-group--block", children: [githubUrl && ((0, jsx_runtime_1.jsx)(Link_1.default, { className: "button button--secondary", href: githubUrl, children: "GitHub" })), linkedInUrl && ((0, jsx_runtime_1.jsx)(Link_1.default, { className: "button button--secondary", href: linkedInUrl, children: "LinkedIn" })), twitterUrl && ((0, jsx_runtime_1.jsx)(Link_1.default, { className: "button button--secondary", href: twitterUrl, children: "Twitter" }))] }) })] }) })); -} -function TeamProfileCardCol(props) { - return ((0, jsx_runtime_1.jsx)(TeamProfileCard, __assign({}, props, { className: "col col--6 margin-bottom--lg" }))); -} -function ActiveTeamRow() { - return ((0, jsx_runtime_1.jsx)("div", { className: "row", children: (0, jsx_runtime_1.jsx)(TeamProfileCardCol, { name: "Ajay Dhangar", githubUrl: "https://github.com/ajay-dhangar", linkedInUrl: "https://www.linkedin.com/in/ajay-dhangar", twitterUrl: "https://twitter.com/CodesWithAjay", children: (0, jsx_runtime_1.jsx)(Translate_1.default, { id: "team.profile.Sebastien Lorber.body", values: { - website: (0, jsx_runtime_1.jsx)(WebsiteLink, { to: "https://ajay-dhangar.github.io/" }), - devto: (0, jsx_runtime_1.jsx)(Link_1.default, { to: "https://dev.to/ajaydhangar49", children: "Dev.to" }), - optimumAi: (0, jsx_runtime_1.jsx)(Link_1.default, { to: "https://www.optimumai.in/community", children: "OptimumAI" }), - }, children: "Founder, Lead Developer and Maintainer of CodeHarborHub. We are passionate about contributing to open source and regularly write articles on our {website} and {devto}. Currently working at {optimumAi}." }) }) })); -} -function HonoraryAlumniTeamRow() { - return ((0, jsx_runtime_1.jsx)("div", { className: "row", children: (0, jsx_runtime_1.jsx)(TeamProfileCardCol, { name: "Shivay", githubUrl: "https://github.com/shivay-coding", children: (0, jsx_runtime_1.jsx)(Translate_1.default, { id: "team.profile.Shivay.body", children: "A passionate developer who loves to contribute to open source and write articles on his blog." }) }) })); -} -function StudentFellowsTeamRow() { - return ((0, jsx_runtime_1.jsx)("div", { className: "row", children: (0, jsx_runtime_1.jsx)(TeamProfileCardCol, { name: "Narendra Dhangar", githubUrl: "https://github.com/Narendra-Dhangar", children: (0, jsx_runtime_1.jsx)(Translate_1.default, { id: "team.profile.Anshul Goyal.body", values: { - websiteLink: ((0, jsx_runtime_1.jsx)(Link_1.default, { href: "/", children: (0, jsx_runtime_1.jsx)(Translate_1.default, { id: "team.profile.Narendra Dhangar.body.websiteLink.label", children: "website" }) })), - }, children: "B.Tech student, open source enthusiast, and tech blogger. He loves to contribute to open source and write articles on his {websiteLink}." }) }) })); -} diff --git a/src/components/blogCarousel/blogCard.js b/src/components/blogCarousel/blogCard.js deleted file mode 100644 index 6c1739c1..00000000 --- a/src/components/blogCarousel/blogCard.js +++ /dev/null @@ -1,69 +0,0 @@ -"use client"; -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); -var React = __importStar(require("react")); -var react_1 = require("react"); -var framer_motion_1 = require("framer-motion"); -var Link_1 = __importDefault(require("@docusaurus/Link")); -var authors_1 = require("../../utils/authors"); -var BlogCard = function (_a) { - var type = _a.type, date = _a.date, title = _a.title, content = _a.content, imageUrl = _a.imageUrl, id = _a.id, authors = _a.authors; - var _b = (0, react_1.useState)(false), isHovered = _b[0], setIsHovered = _b[1]; - if (!id || !type) { - return (0, jsx_runtime_1.jsx)("div", { children: "data not fetched properly, imageId and entryId not found" }); - } - // Get category from title for demo purposes - var getCategory = function (title) { - if (title.toLowerCase().includes('design') || title.toLowerCase().includes('ux')) - return 'Design'; - if (title.toLowerCase().includes('ai') || title.toLowerCase().includes('deepmind')) - return 'AI & Tech'; - if (title.toLowerCase().includes('github') || title.toLowerCase().includes('git')) - return 'Development'; - return 'Resources'; - }; - var category = getCategory(title); - return ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: { opacity: 0, y: 40, scale: 0.95 }, animate: { opacity: 1, y: 0, scale: 1 }, transition: { duration: 0.6, ease: "easeOut" }, whileHover: { - y: -8, - scale: 1.02, - transition: { duration: 0.4, ease: "easeOut" } - }, onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, className: "relative overflow-hidden h-full transition-all duration-300", children: (0, jsx_runtime_1.jsx)(Link_1.default, { to: "/blog/".concat(id), className: "block h-full text-decoration-none", style: { textDecoration: 'none' }, children: (0, jsx_runtime_1.jsxs)("div", { className: "article-card h-full", children: [(0, jsx_runtime_1.jsx)("div", { className: "card-category", children: category }), (0, jsx_runtime_1.jsx)("div", { className: "card-image", children: (0, jsx_runtime_1.jsx)("img", { src: imageUrl, alt: title }) }), (0, jsx_runtime_1.jsxs)("div", { className: "card-content", children: [(0, jsx_runtime_1.jsx)("h3", { className: "card-title", children: title }), (0, jsx_runtime_1.jsx)("p", { className: "card-description", children: content }), (0, jsx_runtime_1.jsxs)("div", { className: "card-meta", children: [(0, jsx_runtime_1.jsxs)("div", { className: "card-author", children: [(0, jsx_runtime_1.jsx)("span", { className: "author-avatar", children: "\uD83D\uDC64" }), (0, jsx_runtime_1.jsx)("span", { className: "author-name", "data-full-name": (0, authors_1.getAuthorNames)(authors || []), children: (0, authors_1.getAuthorNames)(authors || []) })] }), (0, jsx_runtime_1.jsx)("span", { className: "card-read-time", children: "5 min read" })] }), (0, jsx_runtime_1.jsx)("div", { className: "card-read-more", children: "Read Article \u2192" })] })] }) }) })); -}; -exports.default = BlogCard; diff --git a/src/components/blogCarousel/blogCarousel.js b/src/components/blogCarousel/blogCarousel.js deleted file mode 100644 index 1cd3dac5..00000000 --- a/src/components/blogCarousel/blogCarousel.js +++ /dev/null @@ -1,74 +0,0 @@ -"use client"; -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BlogCarousel = BlogCarousel; -var jsx_runtime_1 = require("react/jsx-runtime"); -var React = __importStar(require("react")); -var carousel_1 = require("../ui/carousel"); -var button_1 = require("../ui/button"); -var react_1 = require("react"); -var blogCard_1 = __importDefault(require("./blogCard")); -var blogs_1 = __importDefault(require("../../database/blogs")); -var embla_carousel_autoplay_1 = __importDefault(require("embla-carousel-autoplay")); -require("./blogCarousel.css"); -function BlogCarousel() { - var _a = (0, react_1.useState)(), api = _a[0], setApi = _a[1]; - var _b = (0, react_1.useState)(0), current = _b[0], setCurrent = _b[1]; - var _c = (0, react_1.useState)(0), count = _c[0], setCount = _c[1]; - (0, react_1.useEffect)(function () { - if (!api) - return; - setCount(api.scrollSnapList().length); - setCurrent(api.selectedScrollSnap() + 1); - api.on("select", function () { - setCurrent(api.selectedScrollSnap() + 1); - }); - }, [api]); - return ((0, jsx_runtime_1.jsx)("div", { className: "w-full max-w-8xl mx-auto px-4", children: (0, jsx_runtime_1.jsxs)(carousel_1.Carousel, { setApi: setApi, className: "w-full", opts: { - align: "start", - loop: true, - }, plugins: [ - (0, embla_carousel_autoplay_1.default)({ - delay: 4000, - stopOnInteraction: true, - }), - ], children: [(0, jsx_runtime_1.jsx)(carousel_1.CarouselContent, { className: "my-10", children: blogs_1.default.map(function (blog, index) { return ((0, jsx_runtime_1.jsx)(carousel_1.CarouselItem, { className: "basis-full sm:basis-1/2 lg:basis-1/3 xl:basis-1/4", children: (0, jsx_runtime_1.jsx)(blogCard_1.default, { type: "blog", date: "2024-01-01", title: blog.title, content: blog.description, imageUrl: blog.image, id: blog.slug, authors: blog.authors }) }, blog.id)); }) }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-center gap-4 mt-8", children: [(0, jsx_runtime_1.jsx)(carousel_1.CarouselPrevious, { className: "static translate-y-0 h-12 w-12 border-2 border-blue-200 dark:border-blue-800 hover:border-blue-400 dark:hover:border-blue-600 transition-all duration-300 hover:scale-110" }), (0, jsx_runtime_1.jsx)("div", { className: "flex gap-2", children: Array.from({ length: count }).map(function (_, index) { return ((0, jsx_runtime_1.jsx)(button_1.Button, { variant: "ghost", size: "sm", className: "h-3 w-3 p-0 rounded-full transition-all duration-300 ".concat(current === index + 1 - ? "bg-gradient-to-r from-blue-500 to-purple-500 scale-125" - : "bg-gray-300 dark:bg-gray-600 hover:bg-gray-400 dark:hover:bg-gray-500"), onClick: function () { return api === null || api === void 0 ? void 0 : api.scrollTo(index); } }, index)); }) }), (0, jsx_runtime_1.jsx)(carousel_1.CarouselNext, { className: "static translate-y-0 h-12 w-12 border-2 border-blue-200 dark:border-blue-800 hover:border-blue-400 dark:hover:border-blue-600 transition-all duration-300 hover:scale-110" })] })] }) })); -} diff --git a/src/components/dashboard/LeaderBoard/PRListModal.js b/src/components/dashboard/LeaderBoard/PRListModal.js deleted file mode 100644 index c619cf34..00000000 --- a/src/components/dashboard/LeaderBoard/PRListModal.js +++ /dev/null @@ -1,57 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = PRListModal; -var jsx_runtime_1 = require("react/jsx-runtime"); -// src/components/dashboard/LeaderBoard/PRListModal.tsx -var react_1 = __importDefault(require("react")); -var framer_motion_1 = require("framer-motion"); -var fa_1 = require("react-icons/fa"); -var theme_common_1 = require("@docusaurus/theme-common"); -var statsProvider_1 = require("../../../lib/statsProvider"); -function PRListModal(_a) { - var contributor = _a.contributor, isOpen = _a.isOpen, onClose = _a.onClose; - var colorMode = (0, theme_common_1.useColorMode)().colorMode; - var isDark = colorMode === "dark"; - // Get filtered PRs from context - var _b = (0, statsProvider_1.useCommunityStatsContext)(), getFilteredPRsForContributor = _b.getFilteredPRsForContributor, currentTimeFilter = _b.currentTimeFilter; - if (!contributor) - return null; - // Get filtered PRs instead of using contributor.prDetails - var filteredPRs = getFilteredPRsForContributor(contributor.username); - var formatDate = function (dateString) { - var date = new Date(dateString); - return date.toLocaleDateString('en-US', { - year: 'numeric', - month: 'short', - day: 'numeric' - }); - }; - var handleBackdropClick = function (e) { - if (e.target === e.currentTarget) { - onClose(); - } - }; - var handleKeyDown = function (e) { - if (e.key === 'Escape') { - onClose(); - } - }; - // Helper function to get filter display text - var getFilterDisplayText = function (filter) { - switch (filter) { - case 'week': return 'This Week'; - case 'month': return 'This Month'; - case 'year': return 'This Year'; - case 'all': return 'All Time'; - default: return 'All Time'; - } - }; - return ((0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { children: isOpen && ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "pr-modal-backdrop ".concat(isDark ? "dark" : "light"), initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, onClick: handleBackdropClick, onKeyDown: handleKeyDown, tabIndex: 0, role: "dialog", "aria-modal": "true", "aria-labelledby": "pr-modal-title", children: (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "pr-modal-container ".concat(isDark ? "dark" : "light"), initial: { opacity: 0, scale: 0.9, y: 20 }, animate: { opacity: 1, scale: 1, y: 0 }, exit: { opacity: 0, scale: 0.9, y: 20 }, transition: { type: "spring", damping: 25, stiffness: 300 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "pr-modal-header ".concat(isDark ? "dark" : "light"), children: [(0, jsx_runtime_1.jsxs)("div", { className: "pr-modal-user-info", children: [(0, jsx_runtime_1.jsx)("img", { src: contributor.avatar, alt: contributor.username, className: "pr-modal-avatar" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("h2", { id: "pr-modal-title", className: "pr-modal-title ".concat(isDark ? "dark" : "light"), children: [contributor.username, "'s Pull Requests"] }), (0, jsx_runtime_1.jsxs)("p", { className: "pr-modal-subtitle ".concat(isDark ? "dark" : "light"), children: [filteredPRs.length, " merged PR", filteredPRs.length !== 1 ? 's' : '', " \u2022 ", filteredPRs.length * 10, " points", currentTimeFilter !== 'all' && ((0, jsx_runtime_1.jsxs)("span", { style: { marginLeft: '8px', opacity: 0.7 }, children: ["(", getFilterDisplayText(currentTimeFilter), ")"] }))] })] })] }), (0, jsx_runtime_1.jsx)("button", { className: "pr-modal-close ".concat(isDark ? "dark" : "light"), onClick: onClose, "aria-label": "Close modal", children: (0, jsx_runtime_1.jsx)(fa_1.FaTimes, {}) })] }), (0, jsx_runtime_1.jsx)("div", { className: "pr-modal-body ".concat(isDark ? "dark" : "light"), children: filteredPRs && filteredPRs.length > 0 ? ((0, jsx_runtime_1.jsx)("div", { className: "pr-list", children: filteredPRs.map(function (pr, index) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "pr-item ".concat(isDark ? "dark" : "light"), initial: { opacity: 0, x: -20 }, animate: { opacity: 1, x: 0 }, transition: { delay: index * 0.05 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "pr-item-header", children: [(0, jsx_runtime_1.jsx)("h3", { className: "pr-item-title ".concat(isDark ? "dark" : "light"), children: pr.title }), (0, jsx_runtime_1.jsx)("div", { className: "pr-item-actions", children: (0, jsx_runtime_1.jsx)("a", { href: pr.url, target: "_blank", rel: "noopener noreferrer", className: "pr-item-link ".concat(isDark ? "dark" : "light"), "aria-label": "Open PR #".concat(pr.number, " in GitHub"), children: (0, jsx_runtime_1.jsx)(fa_1.FaExternalLinkAlt, {}) }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "pr-item-meta", children: [(0, jsx_runtime_1.jsxs)("span", { className: "pr-item-repo ".concat(isDark ? "dark" : "light"), children: [(0, jsx_runtime_1.jsx)(fa_1.FaGithub, {}), pr.repoName] }), (0, jsx_runtime_1.jsxs)("span", { className: "pr-item-number ".concat(isDark ? "dark" : "light"), children: ["#", pr.number] }), (0, jsx_runtime_1.jsxs)("span", { className: "pr-item-date ".concat(isDark ? "dark" : "light"), children: ["Merged on ", formatDate(pr.mergedAt)] })] })] }, "".concat(pr.repoName, "-").concat(pr.number))); }) })) : ((0, jsx_runtime_1.jsxs)("div", { className: "pr-empty-state ".concat(isDark ? "dark" : "light"), children: [(0, jsx_runtime_1.jsx)(fa_1.FaGithub, { className: "pr-empty-icon" }), (0, jsx_runtime_1.jsx)("p", { children: currentTimeFilter === 'all' - ? 'No pull request details available' - : "No PRs found for ".concat(getFilterDisplayText(currentTimeFilter).toLowerCase()) }), (0, jsx_runtime_1.jsx)("p", { className: "pr-empty-subtitle", children: currentTimeFilter === 'all' - ? 'PR details might not be loaded yet or this contributor has no merged PRs.' - : "Try selecting a different time period or check \"All Time\" to see all PRs." })] })) }), (0, jsx_runtime_1.jsx)("div", { className: "pr-modal-footer ".concat(isDark ? "dark" : "light"), children: (0, jsx_runtime_1.jsxs)("a", { href: contributor.profile, target: "_blank", rel: "noopener noreferrer", className: "pr-modal-profile-link ".concat(isDark ? "dark" : "light"), children: [(0, jsx_runtime_1.jsx)(fa_1.FaGithub, {}), "View GitHub Profile"] }) })] }) })) })); -} diff --git a/src/components/dashboard/LeaderBoard/leaderboard.js b/src/components/dashboard/LeaderBoard/leaderboard.js deleted file mode 100644 index f0652871..00000000 --- a/src/components/dashboard/LeaderBoard/leaderboard.js +++ /dev/null @@ -1,226 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = LeaderBoard; -var jsx_runtime_1 = require("react/jsx-runtime"); -// src/components/dashboard/LeaderBoard/leaderboard.tsx -var react_1 = __importStar(require("react")); -var framer_motion_1 = require("framer-motion"); -var fa_1 = require("react-icons/fa"); -var lucide_react_1 = require("lucide-react"); -var theme_common_1 = require("@docusaurus/theme-common"); -var statsProvider_1 = require("@site/src/lib/statsProvider"); -var PRListModal_1 = __importDefault(require("./PRListModal")); -var mockData_1 = require("./mockData"); -require("./leaderboard.css"); -var GITHUB_ORG = "recodehive"; -// Users to exclude from the leaderboard -var EXCLUDED_USERS = ["sanjay-kv", "allcontributors", "allcontributors[bot]"]; -function Badge(_a) { - var count = _a.count, label = _a.label, color = _a.color, onClick = _a.onClick, _b = _a.clickable, clickable = _b === void 0 ? false : _b; - var badgeStyle = __assign(__assign({}, color), { cursor: clickable ? 'pointer' : 'default', transition: clickable ? 'all 0.2s ease' : 'none' }); - var handleClick = function () { - if (clickable && onClick) { - onClick(); - } - }; - var handleKeyDown = function (e) { - if (clickable && (e.key === 'Enter' || e.key === ' ')) { - e.preventDefault(); - if (onClick) - onClick(); - } - }; - return ((0, jsx_runtime_1.jsxs)("span", { className: "badge ".concat(clickable ? 'clickable' : ''), style: badgeStyle, onClick: handleClick, onKeyDown: handleKeyDown, tabIndex: clickable ? 0 : -1, role: clickable ? 'button' : undefined, "aria-label": clickable ? "View ".concat(label.toLowerCase(), " details") : undefined, children: [count, " ", label] })); -} -function TopPerformerCard(_a) { - var contributor = _a.contributor, rank = _a.rank, onPRClick = _a.onPRClick; - var colorMode = (0, theme_common_1.useColorMode)().colorMode; - var isDark = colorMode === "dark"; - var rankClass = rank === 1 ? "top-1" : rank === 2 ? "top-2" : "top-3"; - return ((0, jsx_runtime_1.jsxs)("div", { className: "top-performer-card ".concat(isDark ? "dark" : "light"), children: [(0, jsx_runtime_1.jsx)("img", { src: contributor.avatar, alt: contributor.username, className: "avatar large" }), (0, jsx_runtime_1.jsx)("div", { className: "rank-overlay ".concat(rankClass), children: (0, jsx_runtime_1.jsx)("span", { className: "rank-text", children: rank }) }), (0, jsx_runtime_1.jsxs)("div", { className: "performer-info", children: [(0, jsx_runtime_1.jsx)("a", { href: contributor.profile, target: "_blank", rel: "noreferrer", className: "username-link", children: contributor.username }), (0, jsx_runtime_1.jsxs)("div", { className: "badges-container", children: [(0, jsx_runtime_1.jsx)(Badge, { count: contributor.prs, label: "PRs", color: { background: "#dbeafe", color: "#2563eb" }, onClick: function () { return onPRClick(contributor); }, clickable: true }), (0, jsx_runtime_1.jsx)(Badge, { count: contributor.points, label: "Points", color: { background: "#ede9fe", color: "#7c3aed" } })] })] })] })); -} -function LeaderBoard() { - // Get time filter functions from context - var _a = (0, statsProvider_1.useCommunityStatsContext)(), contributors = _a.contributors, stats = _a.stats, loading = _a.loading, error = _a.error, currentTimeFilter = _a.currentTimeFilter, setTimeFilter = _a.setTimeFilter; - var colorMode = (0, theme_common_1.useColorMode)().colorMode; - var isDark = colorMode === "dark"; - var _b = (0, react_1.useState)(""), searchQuery = _b[0], setSearchQuery = _b[1]; - var _c = (0, react_1.useState)(1), currentPage = _c[0], setCurrentPage = _c[1]; - var _d = (0, react_1.useState)(null), selectedContributor = _d[0], setSelectedContributor = _d[1]; - var _e = (0, react_1.useState)(false), isModalOpen = _e[0], setIsModalOpen = _e[1]; - var _f = (0, react_1.useState)(false), isSelectChanged = _f[0], setIsSelectChanged = _f[1]; - var itemsPerPage = 10; - // Modal handlers - var handlePRClick = function (contributor) { - setSelectedContributor(contributor); - setIsModalOpen(true); - }; - var handleCloseModal = function () { - setIsModalOpen(false); - setSelectedContributor(null); - }; - // Use mock data only in development mode when there's an error or no contributors - var displayContributors = (error || contributors.length === 0) - ? (typeof process !== "undefined" && process.env.NODE_ENV === "development" - ? mockData_1.mockContributors - : []) - : contributors; - // Filter out excluded users and apply search filter - var filteredContributors = contributors - .filter(function (contributor) { - return !EXCLUDED_USERS.some(function (excludedUser) { - return contributor.username.toLowerCase() === excludedUser.toLowerCase(); - }); - }) - .filter(function (contributor) { - return contributor.username.toLowerCase().includes(searchQuery.toLowerCase()); - }); - var totalPages = Math.ceil(filteredContributors.length / itemsPerPage); - var indexOfLast = currentPage * itemsPerPage; - var indexOfFirst = indexOfLast - itemsPerPage; - var currentItems = filteredContributors.slice(indexOfFirst, indexOfLast); - var paginate = function (pageNumber) { return setCurrentPage(Math.max(1, Math.min(pageNumber, totalPages))); }; - var renderPaginationButtons = function () { - var pages = []; - var maxVisibleButtons = 5; // Maximum number of page buttons to show directly - // Special case: if we have 7 or fewer pages, show all of them without ellipsis - if (totalPages <= 7) { - var _loop_1 = function (i) { - pages.push((0, jsx_runtime_1.jsx)("button", { onClick: function () { return paginate(i); }, className: "page-btn ".concat(currentPage === i ? "active" : ""), children: i }, i)); - }; - for (var i = 1; i <= totalPages; i++) { - _loop_1(i); - } - return pages; - } - // For more than 7 pages, use the ellipsis approach - // Always show first page - pages.push((0, jsx_runtime_1.jsx)("button", { onClick: function () { return paginate(1); }, className: "page-btn ".concat(currentPage === 1 ? "active" : ""), children: "1" }, 1)); - // Calculate the range of pages to show (middle section) - // We want to show current page and 1-2 pages before and after when possible - var startPage = Math.max(2, currentPage - 1); - var endPage = Math.min(totalPages - 1, currentPage + 1); - // Adjust start and end page if we're near the beginning or end - if (currentPage <= 3) { - // Near the beginning, show pages 2, 3, 4 - startPage = 2; - endPage = Math.min(4, totalPages - 1); - } - else if (currentPage >= totalPages - 2) { - // Near the end, show the three pages before the last page - endPage = totalPages - 1; - startPage = Math.max(2, totalPages - 3); - } - // Show ellipsis if needed before the middle range - if (startPage > 2) { - pages.push((0, jsx_runtime_1.jsx)("span", { className: "pagination-ellipsis", children: "..." }, "ellipsis-1")); - } - var _loop_2 = function (i) { - pages.push((0, jsx_runtime_1.jsx)("button", { onClick: function () { return paginate(i); }, className: "page-btn ".concat(currentPage === i ? "active" : ""), children: i }, i)); - }; - // Show pages in the middle range - for (var i = startPage; i <= endPage; i++) { - _loop_2(i); - } - // Show ellipsis if needed after the middle range - if (endPage < totalPages - 1) { - pages.push((0, jsx_runtime_1.jsx)("span", { className: "pagination-ellipsis", children: "..." }, "ellipsis-2")); - } - // Always show last page - pages.push((0, jsx_runtime_1.jsx)("button", { onClick: function () { return paginate(totalPages); }, className: "page-btn ".concat(currentPage === totalPages ? "active" : ""), children: totalPages }, totalPages)); - return pages; - }; - var getRankClass = function (index) { - if (index === 0) - return "top-1"; - if (index === 1) - return "top-2"; - if (index === 2) - return "top-3"; - return "regular"; - }; - // Helper function for time filter display - var getTimeFilterLabel = function (filter) { - switch (filter) { - case 'week': return '📊 This Week'; - case 'month': return '📆 This Month'; - case 'year': return '📅 This Year'; - case 'all': return '🏆 All Time'; - default: return '🏆 All Time'; - } - }; - return ((0, jsx_runtime_1.jsxs)("div", { className: "leaderboard-container ".concat(isDark ? "dark" : "light"), children: [(0, jsx_runtime_1.jsxs)("div", { className: "leaderboard-content", children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "header", initial: { opacity: 0, y: -20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5 }, children: [(0, jsx_runtime_1.jsx)("h1", { className: "title", children: "Recode Hive Leaderboard" }), (0, jsx_runtime_1.jsxs)("p", { className: "subtitle ".concat(isDark ? "dark" : "light"), children: ["Top contributors across the ", (0, jsx_runtime_1.jsx)("strong", { children: GITHUB_ORG }), " organization"] })] }), !loading && filteredContributors.length > 2 && ((0, jsx_runtime_1.jsxs)("div", { className: "top-performers-container", children: [(0, jsx_runtime_1.jsxs)("div", { className: "title-filter-container", children: [(0, jsx_runtime_1.jsx)("h2", { className: "top-performers-title ".concat(isDark ? "dark" : "light"), children: "RecodeHive Top Performers" }), (0, jsx_runtime_1.jsxs)("div", { className: "time-filter-wrapper top-title-filter", children: [(0, jsx_runtime_1.jsx)("label", { htmlFor: "time-period-filter", className: "filter-label", children: "Time Period:" }), (0, jsx_runtime_1.jsxs)("select", { id: "time-period-filter", value: currentTimeFilter, onChange: function (e) { - // Use setTimeFilter from context - setTimeFilter(e.target.value); - setCurrentPage(1); - setIsSelectChanged(true); - setTimeout(function () { return setIsSelectChanged(false); }, 1200); - }, className: "time-filter-select ".concat(isDark ? "dark" : "light", " ").concat(isSelectChanged ? 'highlight-change' : ''), children: [(0, jsx_runtime_1.jsx)("option", { value: "all", children: "\uD83C\uDFC6 All Time" }), (0, jsx_runtime_1.jsx)("option", { value: "year", children: "\uD83D\uDCC5 This Year" }), (0, jsx_runtime_1.jsx)("option", { value: "month", children: "\uD83D\uDCC6 This Month" }), (0, jsx_runtime_1.jsx)("option", { value: "week", children: "\uD83D\uDCCA This Week" })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "top-performers-grid", children: [(0, jsx_runtime_1.jsx)(TopPerformerCard, { contributor: filteredContributors[1], rank: 2, onPRClick: handlePRClick }), (0, jsx_runtime_1.jsx)(TopPerformerCard, { contributor: filteredContributors[0], rank: 1, onPRClick: handlePRClick }), (0, jsx_runtime_1.jsx)(TopPerformerCard, { contributor: filteredContributors[2], rank: 3, onPRClick: handlePRClick })] })] })), stats && ((0, jsx_runtime_1.jsxs)("div", { className: "stats-grid", children: [(0, jsx_runtime_1.jsx)("div", { className: "stat-card ".concat(isDark ? "dark" : "light"), children: (0, jsx_runtime_1.jsxs)("div", { className: "stat-content", children: [(0, jsx_runtime_1.jsx)("div", { className: "stat-icon users", children: (0, jsx_runtime_1.jsx)(fa_1.FaUsers, {}) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "stat-value ".concat(isDark ? "dark" : "light"), children: stats.totalContributors }), (0, jsx_runtime_1.jsx)("div", { className: "stat-label ".concat(isDark ? "dark" : "light"), children: "Total Contributors" })] })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "stat-card ".concat(isDark ? "dark" : "light"), children: (0, jsx_runtime_1.jsxs)("div", { className: "stat-content", children: [(0, jsx_runtime_1.jsx)("div", { className: "stat-icon prs", children: (0, jsx_runtime_1.jsx)(fa_1.FaCode, {}) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "stat-value ".concat(isDark ? "dark" : "light"), children: stats.flooredTotalPRs }), (0, jsx_runtime_1.jsx)("div", { className: "stat-label ".concat(isDark ? "dark" : "light"), children: "Merged PRs" })] })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "stat-card ".concat(isDark ? "dark" : "light"), children: (0, jsx_runtime_1.jsxs)("div", { className: "stat-content", children: [(0, jsx_runtime_1.jsx)("div", { className: "stat-icon points", children: (0, jsx_runtime_1.jsx)(fa_1.FaStar, {}) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "stat-value ".concat(isDark ? "dark" : "light"), children: stats.flooredTotalPoints }), (0, jsx_runtime_1.jsx)("div", { className: "stat-label ".concat(isDark ? "dark" : "light"), children: "Total Points" })] })] }) })] })), (0, jsx_runtime_1.jsx)("div", { className: "search-container", children: (0, jsx_runtime_1.jsxs)("div", { className: "search-wrapper", children: [(0, jsx_runtime_1.jsx)(fa_1.FaSearch, { className: "search-icon ".concat(isDark ? "dark" : "light") }), (0, jsx_runtime_1.jsx)("input", { type: "text", placeholder: "Search contributors...", value: searchQuery, onChange: function (e) { - setSearchQuery(e.target.value); - setCurrentPage(1); - }, className: "search-input ".concat(isDark ? "dark" : "light") })] }) }), loading && ((0, jsx_runtime_1.jsxs)("div", { className: "skeleton-loader ".concat(isDark ? "dark" : "light"), children: [(0, jsx_runtime_1.jsxs)("div", { className: "skeleton-header", children: [(0, jsx_runtime_1.jsx)("div", { children: "#" }), (0, jsx_runtime_1.jsx)("div", { children: "Contributor" }), (0, jsx_runtime_1.jsx)("div", { children: "Contributions" })] }), __spreadArray([], Array(itemsPerPage), true).map(function (_, i) { return ((0, jsx_runtime_1.jsxs)("div", { className: "skeleton-row", children: [(0, jsx_runtime_1.jsx)("div", { className: "skeleton-avatar" }), (0, jsx_runtime_1.jsx)("div", { className: "skeleton-avatar large" }), (0, jsx_runtime_1.jsxs)("div", { className: "skeleton-info", children: [(0, jsx_runtime_1.jsx)("div", { className: "skeleton-bar" }), (0, jsx_runtime_1.jsxs)("div", { className: "skeleton-badges", children: [(0, jsx_runtime_1.jsx)("div", { className: "skeleton-badge" }), (0, jsx_runtime_1.jsx)("div", { className: "skeleton-badge" })] })] })] }, i)); })] })), error && displayContributors.length === 0 && ((0, jsx_runtime_1.jsx)("div", { className: "no-contributors", children: (0, jsx_runtime_1.jsxs)("p", { children: ["Error: ", error] }) })), !loading && filteredContributors.length === 0 && ((0, jsx_runtime_1.jsx)("div", { className: "no-contributors", children: (0, jsx_runtime_1.jsx)("p", { children: "No contributors found." }) })), !loading && filteredContributors.length > 0 && ((0, jsx_runtime_1.jsxs)("div", { className: "contributors-container ".concat(isDark ? "dark" : "light"), children: [error && ((0, jsx_runtime_1.jsx)("div", { className: "error-banner", style: { - padding: '12px', - backgroundColor: isDark ? '#fee8e7' : '#fee8e7', - color: '#dc2626', - borderRadius: '8px', - marginBottom: '16px', - fontSize: '14px', - textAlign: 'center' - }, children: "Demo Mode: Showing sample data due to API configuration issue" })), (0, jsx_runtime_1.jsxs)("div", { className: "contributors-header", children: [(0, jsx_runtime_1.jsx)("div", { className: "contributor-cell rank", children: "Rank" }), (0, jsx_runtime_1.jsx)("div", { className: "contributor-cell avatar-cell", children: "Avatar" }), (0, jsx_runtime_1.jsx)("div", { className: "contributor-cell username-cell", children: "User" }), (0, jsx_runtime_1.jsx)("div", { className: "contributor-cell prs-cell", children: "PRs" }), (0, jsx_runtime_1.jsx)("div", { className: "contributor-cell points-cell", children: "Points" })] }), currentItems.map(function (contributor, index) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.3, delay: index * 0.05 }, className: "contributor-row ".concat(isDark ? (index % 2 === 0 ? "even" : "odd") : (index % 2 === 0 ? "even" : "odd")), children: [(0, jsx_runtime_1.jsx)("div", { className: "contributor-cell rank-cell", children: (0, jsx_runtime_1.jsx)("div", { className: "rank-badge ".concat(getRankClass(filteredContributors.indexOf(contributor))), children: filteredContributors.indexOf(contributor) + 1 }) }), (0, jsx_runtime_1.jsx)("div", { className: "contributor-cell avatar-cell", children: (0, jsx_runtime_1.jsx)("img", { src: contributor.avatar, alt: contributor.username, className: "avatar ".concat(isDark ? "dark" : "light") }) }), (0, jsx_runtime_1.jsx)("div", { className: "contributor-cell username-cell", children: (0, jsx_runtime_1.jsx)("a", { href: contributor.profile, target: "_blank", rel: "noreferrer", className: "username-link ".concat(isDark ? "dark" : "light"), children: contributor.username }) }), (0, jsx_runtime_1.jsx)("div", { className: "contributor-cell prs-cell", children: (0, jsx_runtime_1.jsx)(Badge, { count: contributor.prs, label: "PRs", color: { background: "#dbeafe", color: "#2563eb" }, onClick: function () { return handlePRClick(contributor); }, clickable: true }) }), (0, jsx_runtime_1.jsx)("div", { className: "contributor-cell points-cell", children: (0, jsx_runtime_1.jsx)(Badge, { count: contributor.points, label: "Points", color: { background: "#ede9fe", color: "#7c3aed" } }) })] }, contributor.username)); }), totalPages > 1 && ((0, jsx_runtime_1.jsxs)("div", { className: "pagination ".concat(isDark ? "dark" : "light"), children: [(0, jsx_runtime_1.jsx)("button", { onClick: function () { return paginate(currentPage - 1); }, disabled: currentPage === 1, className: "pagination-btn ".concat(currentPage === 1 ? "disabled" : ""), "aria-label": "Previous page", title: "Previous page", children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronLeft, { size: 20 }) }), (0, jsx_runtime_1.jsx)("div", { className: "page-numbers", children: renderPaginationButtons() }), (0, jsx_runtime_1.jsx)("button", { onClick: function () { return paginate(currentPage + 1); }, disabled: currentPage === totalPages, className: "pagination-btn ".concat(currentPage === totalPages ? "disabled" : ""), "aria-label": "Next page", title: "Next page", children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { size: 20 }) })] })), (0, jsx_runtime_1.jsxs)("div", { className: "cta-footer ".concat(isDark ? "dark" : "light"), children: [(0, jsx_runtime_1.jsx)("p", { className: "cta-text ".concat(isDark ? "dark" : "light"), children: "Want to get on this leaderboard?" }), (0, jsx_runtime_1.jsxs)("a", { href: "https://github.com/".concat(GITHUB_ORG), target: "_blank", rel: "noreferrer", className: "cta-button", children: [(0, jsx_runtime_1.jsx)(fa_1.FaGithub, { style: { marginRight: 8 } }), "Contribute on GitHub"] })] })] }))] }), (0, jsx_runtime_1.jsx)(PRListModal_1.default, { contributor: selectedContributor, isOpen: isModalOpen, onClose: handleCloseModal })] })); -} diff --git a/src/components/dashboard/LeaderBoard/mockData.js b/src/components/dashboard/LeaderBoard/mockData.js deleted file mode 100644 index 6f561b5b..00000000 --- a/src/components/dashboard/LeaderBoard/mockData.js +++ /dev/null @@ -1,103 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.mockContributors = void 0; -// Temporary mock data for testing the PR list modal functionality -exports.mockContributors = [ - { - username: "testuser1", - avatar: "https://github.com/testuser1.png", - profile: "https://github.com/testuser1", - points: 50, - prs: 5, - prDetails: [ - { - title: "Add new feature: user authentication system", - url: "https://github.com/recodehive/repo1/pull/123", - mergedAt: "2024-01-15T10:30:00Z", - repoName: "auth-service", - number: 123 - }, - { - title: "Fix: resolve security vulnerability in login flow", - url: "https://github.com/recodehive/repo1/pull/124", - mergedAt: "2024-01-14T14:22:00Z", - repoName: "auth-service", - number: 124 - }, - { - title: "Update documentation for API endpoints", - url: "https://github.com/recodehive/repo2/pull/45", - mergedAt: "2024-01-13T09:15:00Z", - repoName: "api-docs", - number: 45 - }, - { - title: "Implement dark mode toggle component", - url: "https://github.com/recodehive/repo3/pull/67", - mergedAt: "2024-01-12T16:45:00Z", - repoName: "ui-components", - number: 67 - }, - { - title: "Optimize database queries for better performance", - url: "https://github.com/recodehive/repo1/pull/125", - mergedAt: "2024-01-11T11:30:00Z", - repoName: "backend-core", - number: 125 - } - ] - }, - { - username: "testuser2", - avatar: "https://github.com/testuser2.png", - profile: "https://github.com/testuser2", - points: 30, - prs: 3, - prDetails: [ - { - title: "Add responsive design to landing page", - url: "https://github.com/recodehive/repo4/pull/89", - mergedAt: "2024-01-10T13:20:00Z", - repoName: "frontend-website", - number: 89 - }, - { - title: "Fix mobile navigation menu issue", - url: "https://github.com/recodehive/repo4/pull/90", - mergedAt: "2024-01-09T08:45:00Z", - repoName: "frontend-website", - number: 90 - }, - { - title: "Add unit tests for utility functions", - url: "https://github.com/recodehive/repo5/pull/12", - mergedAt: "2024-01-08T15:30:00Z", - repoName: "utils-library", - number: 12 - } - ] - }, - { - username: "testuser3", - avatar: "https://github.com/testuser3.png", - profile: "https://github.com/testuser3", - points: 20, - prs: 2, - prDetails: [ - { - title: "Update README with installation instructions", - url: "https://github.com/recodehive/repo6/pull/23", - mergedAt: "2024-01-07T12:15:00Z", - repoName: "documentation", - number: 23 - }, - { - title: "Add error handling for API failures", - url: "https://github.com/recodehive/repo7/pull/34", - mergedAt: "2024-01-06T10:00:00Z", - repoName: "error-handling", - number: 34 - } - ] - } -]; diff --git a/src/components/discussions/DiscussionCard.js b/src/components/discussions/DiscussionCard.js deleted file mode 100644 index 83f1ab88..00000000 --- a/src/components/discussions/DiscussionCard.js +++ /dev/null @@ -1,39 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = DiscussionCard; -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importDefault(require("react")); -var framer_motion_1 = require("framer-motion"); -var lucide_react_1 = require("lucide-react"); -function DiscussionCard(_a) { - var discussion = _a.discussion, index = _a.index; - var formatDate = function (dateString) { - var date = new Date(dateString); - return date.toLocaleDateString("en-US", { - year: "numeric", - month: "short", - day: "numeric", - }); - }; - var truncateText = function (text, maxLength) { - if (!text || text.length <= maxLength) - return text; - return text.substring(0, maxLength).trim() + "..."; - }; - var formatCount = function (count) { - if (count >= 1000) { - return (count / 1000).toFixed(1) + "k"; - } - return count.toString(); - }; - return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "discussion-card-new", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5, delay: index * 0.1 }, whileHover: { boxShadow: "0 4px 20px rgba(0,0,0,0.08)" }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "discussion-card-header", children: [(0, jsx_runtime_1.jsxs)("div", { className: "discussion-category-badge", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Tag, { size: 14 }), (0, jsx_runtime_1.jsx)("span", { children: discussion.category.name })] }), (0, jsx_runtime_1.jsxs)("div", { className: "discussion-date-badge", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Calendar, { size: 14 }), (0, jsx_runtime_1.jsx)("span", { children: formatDate(discussion.created_at) })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "discussion-main-content", children: [(0, jsx_runtime_1.jsx)("h3", { className: "discussion-title-new", children: (0, jsx_runtime_1.jsx)("a", { href: discussion.html_url, target: "_blank", rel: "noopener noreferrer", children: discussion.title }) }), discussion.body && ((0, jsx_runtime_1.jsx)("p", { className: "discussion-excerpt", children: truncateText(discussion.body.replace(/[#*`\[\]]/g, "").replace(/\n/g, " "), 150) })), discussion.labels.length > 0 && ((0, jsx_runtime_1.jsx)("div", { className: "discussion-keywords", children: discussion.labels.slice(0, 4).map(function (label, idx) { return ((0, jsx_runtime_1.jsx)("span", { className: "keyword-tag", children: label.name }, idx)); }) }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "discussion-card-footer", children: [(0, jsx_runtime_1.jsxs)("div", { className: "discussion-author-info", children: [discussion.author.avatar_url ? ((0, jsx_runtime_1.jsx)("img", { src: discussion.author.avatar_url, alt: discussion.author.login, className: "author-avatar-small", onError: function (e) { - var target = e.currentTarget; - target.style.display = 'none'; - var fallback = target.nextElementSibling; - if (fallback) - fallback.style.display = 'flex'; - } })) : null, (0, jsx_runtime_1.jsx)("div", { className: "author-avatar-fallback", style: { display: discussion.author.avatar_url ? 'none' : 'flex' }, children: discussion.author.login.charAt(0).toUpperCase() }), (0, jsx_runtime_1.jsx)("span", { className: "author-name-new", children: discussion.author.login })] }), (0, jsx_runtime_1.jsxs)("div", { className: "discussion-engagement", children: [(0, jsx_runtime_1.jsxs)("div", { className: "engagement-item", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.MessageCircle, { size: 16 }), (0, jsx_runtime_1.jsx)("span", { children: formatCount(discussion.comments) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "engagement-item", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.ThumbsUp, { size: 16 }), (0, jsx_runtime_1.jsx)("span", { children: formatCount(discussion.reactions.total_count) })] })] })] })] })); -} diff --git a/src/components/discussions/index.js b/src/components/discussions/index.js deleted file mode 100644 index 31a33322..00000000 --- a/src/components/discussions/index.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DiscussionCard = void 0; -var DiscussionCard_1 = require("./DiscussionCard"); -Object.defineProperty(exports, "DiscussionCard", { enumerable: true, get: function () { return __importDefault(DiscussionCard_1).default; } }); diff --git a/src/components/faqs/faqs.js b/src/components/faqs/faqs.js deleted file mode 100644 index 53b507fe..00000000 --- a/src/components/faqs/faqs.js +++ /dev/null @@ -1,89 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importStar(require("react")); -var fi_1 = require("react-icons/fi"); -var framer_motion_1 = require("framer-motion"); -var theme_common_1 = require("@docusaurus/theme-common"); // Docusaurus theme detection -var faqData = [ - { - question: "What is the recode hive?", - answer: "Recode Hive is a comprehensive platform focused on providing students with the right resources at the right time. We help you focus on important topics and tools used in current industry standards compared to traditional university curricula. This includes data engineering tutorials, blogs, and opportunities for open-source contribution with earning potential.

🌐 Visit our official website | 📚 Explore our documentation", - }, - { - question: "What features do the recode hive provides?", - answer: "We provide students with comprehensive learning opportunities through our Recode Hive GitHub organization, which includes 1000+ data-related projects. Our community is non-profit and inclusive for all, offering:

Learning Resources: Tutorials, documentation, and hands-on projects
Open Source Contribution: Real-world project experience
Earning Opportunities: GitHub sponsorship program
Community Support: Discord community and mentorship

🚀 Browse our GitHub projects", - }, - { - question: "How can I contribute tutorials?", - answer: "Contributing tutorials is straightforward! Our community is completely open-source, and the entire codebase is available on GitHub for forking and contributing. Whether you're a beginner or experienced developer, we welcome your contributions.

Getting Started:
1. Fork our main repository
2. Check our contribution guidelines
3. Create your tutorial content
4. Submit a pull request

📖 Learn how to make your first contribution", - }, - { - question: "What all resources are available here?", - answer: "We offer a comprehensive range of learning resources across multiple technologies:

Currently Available:
• 🐍 Python Tutorials - From basics to advanced concepts
• 🗄️ SQL Resources - Database management and queries
• 🐙 GitHub Guides - Version control and collaboration
• 📮 Postman API Testing
• ⚛️ Next.js Development

Coming Soon: Advanced data tools tutorials, cloud technologies, and more!", - }, - { - question: "How can I contribute as a beginner?", - answer: "We've designed our community specifically with beginners in mind! Contributing to open-source can seem intimidating, but we provide a supportive environment for learning.

Beginner-Friendly Steps:
1. Start with our GitHub Basics guide
2. Join our Discord community for support
3. Look for 'good first issue' labels in our repositories
4. Follow our step-by-step contribution guide

🎯 Make your first open-source contribution", - }, - { - question: "How can I earn from this recode hive organisation?", - answer: "We offer earning opportunities through our GitHub sponsorship program! Every week, we sponsor contributors who make valuable open-source contributions.

Sponsorship Details:
• Weekly sponsorship program
• Earning range: ₹100 to ₹500 per week
• Based on contribution quality and impact
• Open to all community members

How to Qualify:
• Make meaningful contributions to our projects
• Follow contribution guidelines
• Engage with the community

💰 Learn more about GitHub Sponsorship | 🚀 Start contributing today", - }, - { - question: "How will I stay up to date with the latest news from this organisation?", - answer: "Stay connected with Recode Hive through multiple channels to never miss important updates:

📧 Newsletter: Our primary communication channel providing weekly updates on community happenings, new resources, and opportunities.

Social Media:
• 📱 Instagram - Visual updates and behind-the-scenes
• 🐦 Twitter - Quick updates and tech insights
• 💼 LinkedIn - Professional updates
• 🎥 YouTube - Video tutorials and content

📬 Subscribe to our Newsletter | 💬 Join our Discord", - }, -]; -var FAQs = function () { - var _a = (0, react_1.useState)(null), activeIndex = _a[0], setActiveIndex = _a[1]; - var colorMode = (0, theme_common_1.useColorMode)().colorMode; - var isDark = colorMode === "dark"; - var toggleAccordion = function (index) { - setActiveIndex(activeIndex === index ? null : index); - }; - return ((0, jsx_runtime_1.jsx)("section", { className: "py-8 transition-colors duration-300 ".concat(isDark ? "bg-[#121212]" : "bg-gray-50"), children: (0, jsx_runtime_1.jsx)("div", { className: "mx-auto px-2 sm:px-4 lg:px-6", children: (0, jsx_runtime_1.jsx)("div", { className: "flex flex-col justify-center items-center gap-x-8 gap-y-12 xl:gap-28 lg:flex-row lg:justify-between", children: (0, jsx_runtime_1.jsxs)("div", { className: "w-full", children: [(0, jsx_runtime_1.jsxs)("div", { className: "mb-8 lg:mb-16", children: [(0, jsx_runtime_1.jsx)("h6", { className: "text-lg text-center lg:text-left font-medium text-indigo-600 mb-2", children: "FAQs" }), (0, jsx_runtime_1.jsx)("h2", { className: "text-4xl text-center lg:text-left font-bold ".concat(isDark ? "text-gray-100" : "text-gray-900", " leading-snug"), children: "Looking for answers?" }), (0, jsx_runtime_1.jsx)("p", { className: "".concat(isDark ? "text-gray-400" : "text-gray-600", " text-center lg:text-left"), children: "Find answers to the most common questions about Recode Hive." })] }), (0, jsx_runtime_1.jsx)("div", { className: "columns-1 md:columns-2 md:gap-x-6", children: faqData.map(function (faq, index) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "accordion h-fit border-gray-200 dark:border-gray-700 pb-4 mb-4 break-inside-avoid", initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.3 }, children: [(0, jsx_runtime_1.jsxs)("button", { className: "accordion-toggle group flex justify-between items-center text-lg font-medium w-full transition-all duration-300 \n ".concat(isDark - ? "text-gray-200 bg-gray-800 hover:text-indigo-400" - : "text-gray-700 bg-gray-100 hover:text-indigo-600", " \n p-4 rounded-lg focus:outline-none"), onClick: function () { return toggleAccordion(index); }, children: [faq.question, (0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "transform transition-transform duration-300", animate: { rotate: activeIndex === index ? 180 : 0 }, children: (0, jsx_runtime_1.jsx)(fi_1.FiChevronDown, { size: 22 }) })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "accordion-content overflow-hidden", initial: { height: 0, opacity: 0 }, animate: { - height: activeIndex === index ? "auto" : 0, - opacity: activeIndex === index ? 1 : 0, - }, transition: { duration: 0.3, ease: "easeInOut" }, children: (0, jsx_runtime_1.jsx)("div", { className: "mt-2 text-base transition-colors duration-200 ".concat(isDark ? "text-gray-300" : "text-gray-900"), style: { - color: isDark ? '#d1d5db' : '#111827' - }, dangerouslySetInnerHTML: { - __html: faq.answer.replace(//g, "")).replace(/ 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); -var React = __importStar(require("react")); -var react_1 = __importStar(require("@tsparticles/react")); -var react_2 = require("react"); -var slim_1 = require("@tsparticles/slim"); -var ParticlesComponent = function (props) { - var _a = (0, react_2.useState)(false), init = _a[0], setInit = _a[1]; - (0, react_2.useEffect)(function () { - (0, react_1.initParticlesEngine)(function (engine) { return __awaiter(void 0, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, (0, slim_1.loadSlim)(engine)]; - case 1: - _a.sent(); - return [2 /*return*/]; - } - }); - }); }).then(function () { - setInit(true); - }); - }, []); - var particlesLoaded = function (container) { - console.log(container); - }; - var options = (0, react_2.useMemo)(function () { return ({ - fullScreen: { - enable: false, // Important: disable built-in fullscreen - }, - fpsLimit: 120, - interactivity: { - events: { - onClick: { - enable: true, - mode: "repulse", - }, - onHover: { - enable: true, - mode: "repulse", - }, - }, - modes: { - repulse: { - distance: 200, - duration: 0.4, - }, - grab: { - distance: 150, - }, - }, - }, - particles: { - number: { - value: 100, - density: { - enable: true, - value_area: 800, - }, - }, - color: { - value: "#FFFFFF", - }, - shape: { - type: "triangle", - stroke: { - width: 0, - color: "#FFD700", - }, - polygon: { - nb_sides: 12, - }, - }, - links: { - color: "#778899", - distance: 180, - enable: true, - opacity: 0.8, - width: 1, - }, - move: { - direction: "none", - enable: true, - outModes: { - default: "bounce", - }, - random: true, - speed: 5, - straight: false, - }, - opacity: { - value: 0.7, - }, - size: { - value: { min: 1, max: 3 }, - }, - }, - detectRetina: true, - }); }, []); - return ((0, jsx_runtime_1.jsx)("div", { style: { - position: "fixed", - width: "100vw", - height: "100vh", - top: 0, - left: 0, - zIndex: -1, // Critical: ensures it's in the background - pointerEvents: "none", // Ensures it doesn't block clicks - }, children: (0, jsx_runtime_1.jsx)(react_1.default, { id: props.id, options: options }) })); -}; -exports.default = ParticlesComponent; diff --git a/src/components/scroll/bottom-to-top.js b/src/components/scroll/bottom-to-top.js deleted file mode 100644 index c942e32e..00000000 --- a/src/components/scroll/bottom-to-top.js +++ /dev/null @@ -1,63 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = ScrollBottomToTop; -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importStar(require("react")); -var fa_1 = require("react-icons/fa"); -function ScrollBottomToTop() { - var _a = (0, react_1.useState)(false), showButton = _a[0], setShowButton = _a[1]; - var scrollToTop = function () { - window.scrollTo({ - top: 0, - behavior: "smooth", - }); - }; - var handleScroll = function () { - if (window.scrollY > 300) { - setShowButton(true); - } - else { - setShowButton(false); - } - }; - (0, react_1.useEffect)(function () { - window.addEventListener("scroll", handleScroll); - return function () { - window.removeEventListener("scroll", handleScroll); - }; - }, []); - return (showButton && ((0, jsx_runtime_1.jsx)("button", { onClick: scrollToTop, className: "fixed bottom-20 right-5 bg-blue-600 text-white border-none rounded-lg p-2.5 cursor-pointer shadow-md transition-opacity duration-300 opacity-80 z-50 hover:bg-blue-700 hover:opacity-100", children: (0, jsx_runtime_1.jsx)(fa_1.FaArrowUp, {}) }))); -} diff --git a/src/components/scroll/top-to-bottom.js b/src/components/scroll/top-to-bottom.js deleted file mode 100644 index f141a096..00000000 --- a/src/components/scroll/top-to-bottom.js +++ /dev/null @@ -1,64 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = ScrollTopToBottom; -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importStar(require("react")); -var fa_1 = require("react-icons/fa"); -function ScrollTopToBottom() { - var _a = (0, react_1.useState)(false), showButton = _a[0], setShowButton = _a[1]; - var scrollToBottom = function () { - window.scrollTo({ - top: document.documentElement.scrollHeight, - behavior: "smooth", - }); - }; - var handleScroll = function () { - var bottomThreshold = document.documentElement.scrollHeight - window.innerHeight - 100; - if (window.scrollY < bottomThreshold) { - setShowButton(true); - } - else { - setShowButton(false); - } - }; - (0, react_1.useEffect)(function () { - window.addEventListener("scroll", handleScroll); - return function () { - window.removeEventListener("scroll", handleScroll); - }; - }, []); - return (showButton && ((0, jsx_runtime_1.jsx)("button", { onClick: scrollToBottom, className: "fixed bottom-5 right-5 bg-green-600 text-white border-none rounded-lg p-2.5 cursor-pointer shadow-md transition-opacity duration-300 opacity-80 z-50 hover:bg-green-700 hover:opacity-100", children: (0, jsx_runtime_1.jsx)(fa_1.FaArrowDown, {}) }))); -} diff --git a/src/components/svgIcons/FavoriteIcon/index.js b/src/components/svgIcons/FavoriteIcon/index.js deleted file mode 100644 index d28fde9c..00000000 --- a/src/components/svgIcons/FavoriteIcon/index.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = FavoriteIcon; -var jsx_runtime_1 = require("react/jsx-runtime"); -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -var react_1 = __importDefault(require("react")); -var Svg_1 = __importDefault(require("../../Svg")); -function FavoriteIcon(props) { - return ((0, jsx_runtime_1.jsx)(Svg_1.default, __assign({}, props, { children: (0, jsx_runtime_1.jsx)("path", { d: "M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z" }) }))); -} diff --git a/src/components/testimonials/TestimonialCard.js b/src/components/testimonials/TestimonialCard.js deleted file mode 100644 index a17720a9..00000000 --- a/src/components/testimonials/TestimonialCard.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importDefault(require("react")); -var framer_motion_1 = require("framer-motion"); -var avatar_1 = require("../ui/avatar"); -var theme_common_1 = require("@docusaurus/theme-common"); -var TestimonialCard = function (_a) { - var _b; - var name = _a.name, username = _a.username, content = _a.content, date = _a.date, avatar = _a.avatar, link = _a.link; - var colorMode = (0, theme_common_1.useColorMode)().colorMode; - var isDark = colorMode === "dark"; - // Function to format the link display - var formatLinkDisplay = function (url) { - try { - var urlObj = new URL(url); - return urlObj.hostname + urlObj.pathname; - } - catch (_a) { - // If URL parsing fails, return the original link - return url; - } - }; - return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, className: "rounded-2xl p-6 shadow-lg hover:shadow-xl transition-shadow duration-300 h-[250px] flex flex-col justify-between ".concat(isDark ? "bg-[#1a1a1a] text-white" : "bg-white text-gray-900"), children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-4", children: [(0, jsx_runtime_1.jsxs)(avatar_1.Avatar, { className: "w-24 h-24 rounded-full", children: [(0, jsx_runtime_1.jsx)(avatar_1.AvatarImage, { src: avatar, className: "object-contain" }), (0, jsx_runtime_1.jsx)(avatar_1.AvatarFallback, { children: "CN" })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h3", { className: "font-semibold text-lg ".concat(isDark ? "text-white" : "text-gray-900"), children: name }), (0, jsx_runtime_1.jsxs)("p", { className: "text-sm ".concat(isDark ? "text-gray-400" : "text-gray-500"), children: ["@", username] })] })] }), (0, jsx_runtime_1.jsx)("p", { className: "line-clamp-3 my-4 flex-grow ".concat(isDark ? "text-gray-300" : "text-gray-700"), children: content }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-2 text-sm pt-2 border-t ".concat(isDark ? "border-gray-700" : "border-gray-100"), children: [(0, jsx_runtime_1.jsx)("div", { className: "flex gap-2 flex-wrap", children: (_b = content.match(/#\w+/g)) === null || _b === void 0 ? void 0 : _b.map(function (hashtag, index) { return ((0, jsx_runtime_1.jsx)("span", { className: "text-blue-500 hover:text-blue-600 cursor-pointer", children: hashtag }, index)); }) }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between", children: [(0, jsx_runtime_1.jsx)("a", { href: link, target: "_blank", rel: "noopener noreferrer", className: "hover:underline cursor-pointer ".concat(isDark ? "text-blue-400 hover:text-blue-300" : "text-blue-600 hover:text-blue-700"), children: formatLinkDisplay(link) }), (0, jsx_runtime_1.jsx)("span", { className: isDark ? "text-gray-500" : "text-gray-400", children: date })] })] })] })); -}; -exports.default = TestimonialCard; diff --git a/src/components/testimonials/TestimonialCarousel.js b/src/components/testimonials/TestimonialCarousel.js deleted file mode 100644 index 1e370fc8..00000000 --- a/src/components/testimonials/TestimonialCarousel.js +++ /dev/null @@ -1,106 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TestimonialCarousel = TestimonialCarousel; -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importStar(require("react")); -var carousel_1 = require("../ui/carousel"); -var button_1 = require("../ui/button"); -var TestimonialCard_1 = __importDefault(require("./TestimonialCard")); -var embla_carousel_autoplay_1 = __importDefault(require("embla-carousel-autoplay")); -// Sample testimonial data -var testimonials = [ - { - name: "Rashi Chouhan", - username: "RashiChouhan", - content: "Valuable insights shared, productive discussions, and actionable outcomes. Looking forward to implementing the strategies discussed.! #TechCommunity #WomenInTech", - date: "May 18, 2024", - avatar: "/icons/adobe.png", - link: "https://topmate.io/sanjaykv" - }, - { - name: "Namith", - username: "namith", - content: "Gave remarkable insights on parts i have to improve and gave me new opportunities . cheers~! #TechCommunity #Grateful", - date: "April 21, 2023", - avatar: "/icons/google.png", - link: "https://topmate.io/sanjaykv" - }, - { - name: "Rajdeep Chakraborty", - username: "RajdeepChakraborty", - content: "I appreciate Sanjay sir's insights on open source and his suggestions for improving my GitHub profile. I'm excited to hear more and discuss open source further.! #OpenSource #TechCommunity", - date: "Oct 18, 2024", - avatar: "/icons/amazon.png", - link: "https://topmate.io/sanjaykv" - } -]; -function TestimonialCarousel() { - var _a = (0, react_1.useState)(), api = _a[0], setApi = _a[1]; - var _b = (0, react_1.useState)(0), current = _b[0], setCurrent = _b[1]; - var _c = (0, react_1.useState)(0), count = _c[0], setCount = _c[1]; - (0, react_1.useEffect)(function () { - if (!api) { - return; - } - setCount(api.scrollSnapList().length); - setCurrent(api.selectedScrollSnap() + 1); - api.on("select", function () { - setCurrent(api.selectedScrollSnap() + 1); - }); - }, [api]); - return ((0, jsx_runtime_1.jsxs)("div", { className: "w-full", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-center mb-10", children: [(0, jsx_runtime_1.jsx)("h2", { className: "text-3xl font-bold mb-2", children: "Loved by Many Users" }), (0, jsx_runtime_1.jsx)("div", { className: "w-32 h-1 bg-blue-500 mx-auto rounded-full" })] }), (0, jsx_runtime_1.jsxs)(carousel_1.Carousel, { setApi: setApi, className: "w-full", opts: { - align: "start", - loop: true, - }, plugins: [ - (0, embla_carousel_autoplay_1.default)({ - delay: 4000, - }), - ], children: [(0, jsx_runtime_1.jsx)(carousel_1.CarouselContent, { className: "-ml-2 md:-ml-4 my-16", children: testimonials.map(function (testimonial, index) { return ((0, jsx_runtime_1.jsx)(carousel_1.CarouselItem, { className: "pl-2 md:pl-4 md:basis-1/2 h-full", children: (0, jsx_runtime_1.jsx)(TestimonialCard_1.default, __assign({}, testimonial)) }, index)); }) }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-center gap-2 mt-8", children: [(0, jsx_runtime_1.jsx)(carousel_1.CarouselPrevious, { className: "static translate-y-0" }), (0, jsx_runtime_1.jsx)("div", { className: "flex gap-2", children: Array.from({ length: count }).map(function (_, index) { return ((0, jsx_runtime_1.jsx)(button_1.Button, { variant: current === index + 1 ? "default" : "outline", size: "icon", className: "h-2 w-2 p-0 rounded-full", onClick: function () { return api === null || api === void 0 ? void 0 : api.scrollTo(index); } }, index)); }) }), (0, jsx_runtime_1.jsx)(carousel_1.CarouselNext, { className: "static translate-y-0" })] })] })] })); -} diff --git a/src/components/topmate/TopMateCard.js b/src/components/topmate/TopMateCard.js deleted file mode 100644 index b9fabc3a..00000000 --- a/src/components/topmate/TopMateCard.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importDefault(require("react")); -var framer_motion_1 = require("framer-motion"); -var lucide_react_1 = require("lucide-react"); -var theme_common_1 = require("@docusaurus/theme-common"); -var TopMateCard = function (_a) { - var title = _a.title, description = _a.description, duration = _a.duration, profileImage = _a.profileImage, username = _a.username, setShowTopmate = _a.setShowTopmate; - var colorMode = (0, theme_common_1.useColorMode)().colorMode; - var isDark = colorMode === "dark"; - return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5 }, className: "relative w-full max-w-md mx-auto rounded-3xl shadow-2xl overflow-hidden hover:shadow-3xl transition-all duration-300 transform hover:-translate-y-1 ".concat(isDark ? "bg-[#1a1a1a] text-white" : "bg-white text-black"), children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute -top-4 -left-4 flex gap-2", children: __spreadArray([], Array(3), true).map(function (_, i) { return ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: { opacity: 0, x: -10 }, animate: { opacity: 1, x: 0 }, transition: { delay: i * 0.1 }, className: "text-purple-500", children: (0, jsx_runtime_1.jsx)(lucide_react_1.ArrowUpRight, { size: 24, className: "transform rotate-45" }) }, i)); }) }), (0, jsx_runtime_1.jsxs)("div", { className: "p-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between mb-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-sm font-medium ".concat(isDark ? "text-gray-300" : "text-gray-600"), children: "1:1 CALL" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-1 ".concat(isDark ? "text-gray-400" : "text-gray-500"), children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Clock, { size: 16 }), (0, jsx_runtime_1.jsx)("span", { className: "text-sm", children: duration })] })] }), (0, jsx_runtime_1.jsxs)("button", { className: "text-xl font-semibold ".concat(isDark - ? "text-gray-500 hover:text-gray-300" - : "text-gray-400 hover:text-gray-600"), onClick: function () { return setShowTopmate(false); }, children: [(0, jsx_runtime_1.jsx)("span", { className: "sr-only", children: "Close" }), "\u00D7"] })] }), (0, jsx_runtime_1.jsx)("h2", { className: "text-2xl font-bold mb-4 ".concat(isDark ? "text-white" : "text-gray-900"), children: title }), (0, jsx_runtime_1.jsx)("p", { className: "".concat(isDark ? "text-gray-300" : "text-gray-600", " mb-6"), children: description }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between flex-wrap md:flex-nowrap gap-y-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-3 min-w-0", children: [(0, jsx_runtime_1.jsx)("img", { src: profileImage, alt: "Profile", className: "w-12 h-12 rounded-full object-cover border-2 border-purple-200" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-sm ".concat(isDark ? "text-gray-300" : "text-gray-600"), children: "Book a slot at" }), (0, jsx_runtime_1.jsxs)("a", { href: "https://topmate.io/".concat(username), target: "_blank", rel: "noopener noreferrer", className: "text-purple-500 font-semibold hover:text-purple-600 transition-colors flex items-center gap-1 truncate", children: [(0, jsx_runtime_1.jsxs)("span", { className: "truncate", children: ["topmate.io/", username] }), (0, jsx_runtime_1.jsx)(lucide_react_1.ArrowUpRight, { size: 16 })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2 shrink-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "h-4 w-4 overflow-hidden flex-shrink-0 rounded-sm", children: (0, jsx_runtime_1.jsx)("img", { src: "/icons/topmate.png", alt: "Topmate icon", className: "h-4 w-auto object-cover object-left opacity-90" }) }), (0, jsx_runtime_1.jsx)("span", { className: "text-sm font-semibold shrink-0 ".concat(isDark ? "text-gray-200" : "text-gray-700"), children: "topmate" })] })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 border-2 border-transparent rounded-3xl bg-gradient-to-br from-purple-500/20 to-pink-500/20 -z-10" })] })); -}; -exports.default = TopMateCard; diff --git a/src/components/topmate/TopMateSection.js b/src/components/topmate/TopMateSection.js deleted file mode 100644 index 83f6edcc..00000000 --- a/src/components/topmate/TopMateSection.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importDefault(require("react")); -var TopMateCard_1 = __importDefault(require("./TopMateCard")); -var theme_common_1 = require("@docusaurus/theme-common"); -var TopMateSection = function (_a) { - var setShowTopmate = _a.setShowTopmate; - var colorMode = (0, theme_common_1.useColorMode)().colorMode; // Get current theme: 'light' or 'dark' - var profileData = { - title: "1:1 Mentorship Call", - description: "Book a slot, Free for Hive Community Members", - duration: "30 mins", - profileImage: "/sanjay.png", - username: "sanjaykv", - }; - return ((0, jsx_runtime_1.jsx)("div", { className: "px-4", children: (0, jsx_runtime_1.jsxs)("div", { className: "mx-auto", children: [(0, jsx_runtime_1.jsxs)("div", { className: "mx-auto text-center mb-16", children: [(0, jsx_runtime_1.jsx)("h1", { className: "text-4xl font-bold mb-4 ".concat(colorMode === "dark" ? "text-white" : "text-gray-900"), children: "Book a Session" }), (0, jsx_runtime_1.jsx)("p", { className: "text-lg ".concat(colorMode === "dark" ? "text-gray-300" : "text-gray-600"), children: "Get personalized guidance and feedback through one-on-one sessions" })] }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(TopMateCard_1.default, __assign({}, profileData, { setShowTopmate: setShowTopmate })) })] }) })); -}; -exports.default = TopMateSection; diff --git a/src/components/ui/FirebaseAuthGithub.js b/src/components/ui/FirebaseAuthGithub.js deleted file mode 100644 index 4c819d29..00000000 --- a/src/components/ui/FirebaseAuthGithub.js +++ /dev/null @@ -1,120 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importStar(require("react")); -var firebase_1 = require("../../lib/firebase"); -var auth_1 = require("firebase/auth"); -var uiConfig = { - signInFlow: 'popup', - signInOptions: [ - { - provider: auth_1.GithubAuthProvider.PROVIDER_ID, - // You can add scopes and custom parameters here if needed - }, - ], - callbacks: { - signInSuccessWithAuthResult: function () { return false; }, // Prevents redirect - }, -}; -var FirebaseAuthGithub = function () { - var _a = (0, react_1.useState)(null), user = _a[0], setUser = _a[1]; - (0, react_1.useEffect)(function () { - var unregisterAuthObserver = firebase_1.auth.onAuthStateChanged(function (user) { return setUser(user); }); - return function () { return unregisterAuthObserver(); }; - }, []); - if (user) { - return ((0, jsx_runtime_1.jsxs)("div", { style: { textAlign: 'center' }, className: 'flex justify-center items-center gap-5 p-0', children: [(0, jsx_runtime_1.jsx)("img", { src: user.photoURL || '', alt: "avatar", style: { width: 48, borderRadius: '50%', border: '2px solid #000' } }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsxs)("button", { onClick: function () { return firebase_1.auth.signOut(); }, className: "bg-gray-900 hover:bg-gray-700 text-white px-4 py-1 rounded flex items-center gap-2 transition-colors duration-200 shadow-md font-semibold", children: [(0, jsx_runtime_1.jsxs)("svg", { height: "20", width: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [(0, jsx_runtime_1.jsx)("path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }), (0, jsx_runtime_1.jsx)("polyline", { points: "16 17 21 12 16 7" }), (0, jsx_runtime_1.jsx)("line", { x1: "21", y1: "12", x2: "9", y2: "12" })] }), "Sign out"] })] })); - } - var handleGithubSignIn = function () { return __awaiter(void 0, void 0, void 0, function () { - var provider, error_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - provider = new auth_1.GithubAuthProvider(); - _a.label = 1; - case 1: - _a.trys.push([1, 3, , 4]); - return [4 /*yield*/, (0, auth_1.signInWithPopup)(firebase_1.auth, provider)]; - case 2: - _a.sent(); - return [3 /*break*/, 4]; - case 3: - error_1 = _a.sent(); - console.error('GitHub sign-in error:', error_1); - return [3 /*break*/, 4]; - case 4: return [2 /*return*/]; - } - }); - }); }; - return ((0, jsx_runtime_1.jsx)("div", { style: { textAlign: 'center' }, className: 'flex justify-center items-center gap-5 p-0', children: (0, jsx_runtime_1.jsxs)("button", { onClick: handleGithubSignIn, className: "bg-black text-white px-4 py-2 rounded flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)("svg", { height: "24", width: "24", viewBox: "0 0 16 16", fill: "currentColor", "aria-hidden": "true", children: (0, jsx_runtime_1.jsx)("path", { d: "M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82a7.65 7.65 0 0 1 2-.27c.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z" }) }), (0, jsx_runtime_1.jsx)("span", { className: "github-text", children: "Sign in with GitHub" })] }) })); -}; -exports.default = FirebaseAuthGithub; diff --git a/src/components/ui/NavbarFirebaseAuthGithub.js b/src/components/ui/NavbarFirebaseAuthGithub.js deleted file mode 100644 index ac5a9bcf..00000000 --- a/src/components/ui/NavbarFirebaseAuthGithub.js +++ /dev/null @@ -1,50 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importStar(require("react")); -var react_dom_1 = require("react-dom"); -var FirebaseAuthGithub_1 = __importDefault(require("./FirebaseAuthGithub")); -var NavbarFirebaseAuthGithub = function () { - var _a = (0, react_1.useState)(null), container = _a[0], setContainer = _a[1]; - (0, react_1.useEffect)(function () { - setContainer(document.getElementById("firebase-auth-github-navbar")); - }, []); - return container ? (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(FirebaseAuthGithub_1.default, {}), container) : null; -}; -exports.default = NavbarFirebaseAuthGithub; diff --git a/src/components/ui/avatar.js b/src/components/ui/avatar.js deleted file mode 100644 index 169bffd8..00000000 --- a/src/components/ui/avatar.js +++ /dev/null @@ -1,76 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __rest = (this && this.__rest) || function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Avatar = Avatar; -exports.AvatarImage = AvatarImage; -exports.AvatarFallback = AvatarFallback; -var jsx_runtime_1 = require("react/jsx-runtime"); -var React = __importStar(require("react")); -var AvatarPrimitive = __importStar(require("@radix-ui/react-avatar")); -var utils_1 = require("@site/src/lib/utils"); -function Avatar(_a) { - var className = _a.className, props = __rest(_a, ["className"]); - return ((0, jsx_runtime_1.jsx)(AvatarPrimitive.Root, __assign({ "data-slot": "avatar", className: (0, utils_1.cn)("relative flex size-8 shrink-0 overflow-hidden rounded-full", className) }, props))); -} -function AvatarImage(_a) { - var className = _a.className, props = __rest(_a, ["className"]); - return ((0, jsx_runtime_1.jsx)(AvatarPrimitive.Image, __assign({ "data-slot": "avatar-image", className: (0, utils_1.cn)("aspect-square size-full", className) }, props))); -} -function AvatarFallback(_a) { - var className = _a.className, props = __rest(_a, ["className"]); - return ((0, jsx_runtime_1.jsx)(AvatarPrimitive.Fallback, __assign({ "data-slot": "avatar-fallback", className: (0, utils_1.cn)("bg-muted flex size-full items-center justify-center rounded-full", className) }, props))); -} diff --git a/src/components/ui/badge.js b/src/components/ui/badge.js deleted file mode 100644 index 7e2333dd..00000000 --- a/src/components/ui/badge.js +++ /dev/null @@ -1,83 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __rest = (this && this.__rest) || function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.badgeVariants = void 0; -exports.Badge = Badge; -var jsx_runtime_1 = require("react/jsx-runtime"); -var React = __importStar(require("react")); -var react_slot_1 = require("@radix-ui/react-slot"); -var class_variance_authority_1 = require("class-variance-authority"); -var utils_1 = require("../../../src/lib/utils"); -var badgeVariants = (0, class_variance_authority_1.cva)("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden", { - variants: { - variant: { - default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90", - secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90", - destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60", - outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground", - }, - }, - defaultVariants: { - variant: "default", - }, -}); -exports.badgeVariants = badgeVariants; -function Badge(_a) { - var className = _a.className, variant = _a.variant, _b = _a.asChild, asChild = _b === void 0 ? false : _b, props = __rest(_a, ["className", "variant", "asChild"]); - var Comp = asChild ? react_slot_1.Slot : "span"; - return ((0, jsx_runtime_1.jsx)(Comp, __assign({ "data-slot": "badge", className: (0, utils_1.cn)(badgeVariants({ variant: variant }), className) }, props))); -} diff --git a/src/components/ui/button.js b/src/components/ui/button.js deleted file mode 100644 index f09fc2c5..00000000 --- a/src/components/ui/button.js +++ /dev/null @@ -1,92 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __rest = (this && this.__rest) || function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.buttonVariants = void 0; -exports.Button = Button; -var jsx_runtime_1 = require("react/jsx-runtime"); -var React = __importStar(require("react")); -var react_slot_1 = require("@radix-ui/react-slot"); -var class_variance_authority_1 = require("class-variance-authority"); -var utils_1 = require("@site/src/lib/utils"); -var buttonVariants = (0, class_variance_authority_1.cva)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", { - variants: { - variant: { - default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90", - destructive: "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60", - outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50", - secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80", - ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50", - link: "text-primary underline-offset-4 hover:underline", - }, - size: { - default: "h-9 px-4 py-2 has-[>svg]:px-3", - sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5", - lg: "h-10 rounded-md px-6 has-[>svg]:px-4", - icon: "size-9", - }, - }, - defaultVariants: { - variant: "default", - size: "default", - }, -}); -exports.buttonVariants = buttonVariants; -function Button(_a) { - var className = _a.className, variant = _a.variant, size = _a.size, _b = _a.asChild, asChild = _b === void 0 ? false : _b, props = __rest(_a, ["className", "variant", "size", "asChild"]); - var Comp = asChild ? react_slot_1.Slot : "button"; - return ((0, jsx_runtime_1.jsx)(Comp, __assign({ "data-slot": "button", className: (0, utils_1.cn)(buttonVariants({ variant: variant, size: size, className: className })) }, props))); -} diff --git a/src/components/ui/card.js b/src/components/ui/card.js deleted file mode 100644 index b6183e34..00000000 --- a/src/components/ui/card.js +++ /dev/null @@ -1,95 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __rest = (this && this.__rest) || function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Card = Card; -exports.CardHeader = CardHeader; -exports.CardFooter = CardFooter; -exports.CardTitle = CardTitle; -exports.CardAction = CardAction; -exports.CardDescription = CardDescription; -exports.CardContent = CardContent; -var jsx_runtime_1 = require("react/jsx-runtime"); -var React = __importStar(require("react")); -var utils_1 = require("@site/src/lib/utils"); -function Card(_a) { - var className = _a.className, props = __rest(_a, ["className"]); - return ((0, jsx_runtime_1.jsx)("div", __assign({ "data-slot": "card", className: (0, utils_1.cn)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm", className) }, props))); -} -function CardHeader(_a) { - var className = _a.className, props = __rest(_a, ["className"]); - return ((0, jsx_runtime_1.jsx)("div", __assign({ "data-slot": "card-header", className: (0, utils_1.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", className) }, props))); -} -function CardTitle(_a) { - var className = _a.className, props = __rest(_a, ["className"]); - return ((0, jsx_runtime_1.jsx)("div", __assign({ "data-slot": "card-title", className: (0, utils_1.cn)("leading-none font-semibold", className) }, props))); -} -function CardDescription(_a) { - var className = _a.className, props = __rest(_a, ["className"]); - return ((0, jsx_runtime_1.jsx)("div", __assign({ "data-slot": "card-description", className: (0, utils_1.cn)("text-muted-foreground text-sm", className) }, props))); -} -function CardAction(_a) { - var className = _a.className, props = __rest(_a, ["className"]); - return ((0, jsx_runtime_1.jsx)("div", __assign({ "data-slot": "card-action", className: (0, utils_1.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className) }, props))); -} -function CardContent(_a) { - var className = _a.className, props = __rest(_a, ["className"]); - return ((0, jsx_runtime_1.jsx)("div", __assign({ "data-slot": "card-content", className: (0, utils_1.cn)("px-6", className) }, props))); -} -function CardFooter(_a) { - var className = _a.className, props = __rest(_a, ["className"]); - return ((0, jsx_runtime_1.jsx)("div", __assign({ "data-slot": "card-footer", className: (0, utils_1.cn)("flex items-center px-6 [.border-t]:pt-6", className) }, props))); -} diff --git a/src/components/ui/carousel.js b/src/components/ui/carousel.js deleted file mode 100644 index d8ee10d6..00000000 --- a/src/components/ui/carousel.js +++ /dev/null @@ -1,156 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __rest = (this && this.__rest) || function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Carousel = Carousel; -exports.CarouselContent = CarouselContent; -exports.CarouselItem = CarouselItem; -exports.CarouselPrevious = CarouselPrevious; -exports.CarouselNext = CarouselNext; -var jsx_runtime_1 = require("react/jsx-runtime"); -var React = __importStar(require("react")); -var embla_carousel_react_1 = __importDefault(require("embla-carousel-react")); -var lucide_react_1 = require("lucide-react"); -var utils_1 = require("@site/src/lib/utils"); -var button_1 = require("@site/src/components/ui/button"); -var CarouselContext = React.createContext(null); -function useCarousel() { - var context = React.useContext(CarouselContext); - if (!context) { - throw new Error("useCarousel must be used within a "); - } - return context; -} -function Carousel(_a) { - var _b = _a.orientation, orientation = _b === void 0 ? "horizontal" : _b, opts = _a.opts, setApi = _a.setApi, plugins = _a.plugins, className = _a.className, children = _a.children, props = __rest(_a, ["orientation", "opts", "setApi", "plugins", "className", "children"]); - var _c = (0, embla_carousel_react_1.default)(__assign(__assign({}, opts), { axis: orientation === "horizontal" ? "x" : "y" }), plugins), carouselRef = _c[0], api = _c[1]; - var _d = React.useState(false), canScrollPrev = _d[0], setCanScrollPrev = _d[1]; - var _e = React.useState(false), canScrollNext = _e[0], setCanScrollNext = _e[1]; - var onSelect = React.useCallback(function (api) { - if (!api) - return; - setCanScrollPrev(api.canScrollPrev()); - setCanScrollNext(api.canScrollNext()); - }, []); - var scrollPrev = React.useCallback(function () { - api === null || api === void 0 ? void 0 : api.scrollPrev(); - }, [api]); - var scrollNext = React.useCallback(function () { - api === null || api === void 0 ? void 0 : api.scrollNext(); - }, [api]); - var handleKeyDown = React.useCallback(function (event) { - if (event.key === "ArrowLeft") { - event.preventDefault(); - scrollPrev(); - } - else if (event.key === "ArrowRight") { - event.preventDefault(); - scrollNext(); - } - }, [scrollPrev, scrollNext]); - React.useEffect(function () { - if (!api || !setApi) - return; - setApi(api); - }, [api, setApi]); - React.useEffect(function () { - if (!api) - return; - onSelect(api); - api.on("reInit", onSelect); - api.on("select", onSelect); - return function () { - api === null || api === void 0 ? void 0 : api.off("select", onSelect); - }; - }, [api, onSelect]); - return ((0, jsx_runtime_1.jsx)(CarouselContext.Provider, { value: { - carouselRef: carouselRef, - api: api, - opts: opts, - orientation: orientation || ((opts === null || opts === void 0 ? void 0 : opts.axis) === "y" ? "vertical" : "horizontal"), - scrollPrev: scrollPrev, - scrollNext: scrollNext, - canScrollPrev: canScrollPrev, - canScrollNext: canScrollNext, - }, children: (0, jsx_runtime_1.jsx)("div", __assign({ onKeyDownCapture: handleKeyDown, className: (0, utils_1.cn)("relative", className), role: "region", "aria-roledescription": "carousel", "data-slot": "carousel" }, props, { children: children })) })); -} -function CarouselContent(_a) { - var className = _a.className, props = __rest(_a, ["className"]); - var _b = useCarousel(), carouselRef = _b.carouselRef, orientation = _b.orientation; - return ((0, jsx_runtime_1.jsx)("div", { ref: carouselRef, className: "overflow-hidden", "data-slot": "carousel-content", children: (0, jsx_runtime_1.jsx)("div", __assign({ className: (0, utils_1.cn)("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className) }, props)) })); -} -function CarouselItem(_a) { - var className = _a.className, props = __rest(_a, ["className"]); - var orientation = useCarousel().orientation; - return ((0, jsx_runtime_1.jsx)("div", __assign({ role: "group", "aria-roledescription": "slide", "data-slot": "carousel-item", className: (0, utils_1.cn)("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "pl-4" : "pt-4", className) }, props))); -} -function CarouselPrevious(_a) { - var className = _a.className, _b = _a.variant, variant = _b === void 0 ? "outline" : _b, _c = _a.size, size = _c === void 0 ? "icon" : _c, props = __rest(_a, ["className", "variant", "size"]); - var _d = useCarousel(), orientation = _d.orientation, scrollPrev = _d.scrollPrev, canScrollPrev = _d.canScrollPrev; - return ((0, jsx_runtime_1.jsxs)(button_1.Button, __assign({ "data-slot": "carousel-previous", variant: variant, size: size, className: (0, utils_1.cn)("absolute size-8 rounded-full", orientation === "horizontal" - ? "top-1/2 -left-12 -translate-y-1/2" - : "-top-12 left-1/2 -translate-x-1/2 rotate-90", className), disabled: !canScrollPrev, onClick: scrollPrev }, props, { children: [(0, jsx_runtime_1.jsx)(lucide_react_1.ArrowLeft, {}), (0, jsx_runtime_1.jsx)("span", { className: "sr-only", children: "Previous slide" })] }))); -} -function CarouselNext(_a) { - var className = _a.className, _b = _a.variant, variant = _b === void 0 ? "outline" : _b, _c = _a.size, size = _c === void 0 ? "icon" : _c, props = __rest(_a, ["className", "variant", "size"]); - var _d = useCarousel(), orientation = _d.orientation, scrollNext = _d.scrollNext, canScrollNext = _d.canScrollNext; - return ((0, jsx_runtime_1.jsxs)(button_1.Button, __assign({ "data-slot": "carousel-next", variant: variant, size: size, className: (0, utils_1.cn)("absolute size-8 rounded-full", orientation === "horizontal" - ? "top-1/2 -right-12 -translate-y-1/2" - : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", className), disabled: !canScrollNext, onClick: scrollNext }, props, { children: [(0, jsx_runtime_1.jsx)(lucide_react_1.ArrowRight, {}), (0, jsx_runtime_1.jsx)("span", { className: "sr-only", children: "Next slide" })] }))); -} diff --git a/src/components/ui/collapsible.js b/src/components/ui/collapsible.js deleted file mode 100644 index bc333652..00000000 --- a/src/components/ui/collapsible.js +++ /dev/null @@ -1,75 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __rest = (this && this.__rest) || function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Collapsible = Collapsible; -exports.CollapsibleTrigger = CollapsibleTrigger; -exports.CollapsibleContent = CollapsibleContent; -var jsx_runtime_1 = require("react/jsx-runtime"); -var CollapsiblePrimitive = __importStar(require("@radix-ui/react-collapsible")); -var React = __importStar(require("react")); -function Collapsible(_a) { - var props = __rest(_a, []); - return (0, jsx_runtime_1.jsx)(CollapsiblePrimitive.Root, __assign({ "data-slot": "collapsible" }, props)); -} -function CollapsibleTrigger(_a) { - var props = __rest(_a, []); - return ((0, jsx_runtime_1.jsx)(CollapsiblePrimitive.CollapsibleTrigger, __assign({ "data-slot": "collapsible-trigger" }, props))); -} -function CollapsibleContent(_a) { - var props = __rest(_a, []); - return ((0, jsx_runtime_1.jsx)(CollapsiblePrimitive.CollapsibleContent, __assign({ "data-slot": "collapsible-content" }, props))); -} diff --git a/src/components/ui/input.js b/src/components/ui/input.js deleted file mode 100644 index 62963316..00000000 --- a/src/components/ui/input.js +++ /dev/null @@ -1,65 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __rest = (this && this.__rest) || function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Input = Input; -var jsx_runtime_1 = require("react/jsx-runtime"); -var React = __importStar(require("react")); -var utils_1 = require("../../../src/lib/utils"); -function Input(_a) { - var className = _a.className, type = _a.type, props = __rest(_a, ["className", "type"]); - return ((0, jsx_runtime_1.jsx)("input", __assign({ type: type, "data-slot": "input", className: (0, utils_1.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", className) }, props))); -} diff --git a/src/constants/navbarConfig.js b/src/constants/navbarConfig.js deleted file mode 100644 index 6b6e8129..00000000 --- a/src/constants/navbarConfig.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.NAVBAR_ICONS = exports.NAVBAR_CONFIG = void 0; -var lucide_react_1 = require("lucide-react"); -exports.NAVBAR_CONFIG = { - Docs: lucide_react_1.Book, - Showcase: lucide_react_1.Eye, - Dashboard: lucide_react_1.LayoutDashboard, - Donate: lucide_react_1.DollarSign, - Devfolio: lucide_react_1.User, - Blogs: lucide_react_1.Newspaper, - More: lucide_react_1.MoreHorizontal, - GitHub: lucide_react_1.Github, - Badges: lucide_react_1.BadgeCheck, - Ebooks: lucide_react_1.FileText, - Roadmap: lucide_react_1.Map, - Community: lucide_react_1.Users, - Broadcast: lucide_react_1.Tv, - Podcast: lucide_react_1.Mic, - Technical: lucide_react_1.Puzzle, - Behavioral: lucide_react_1.Lightbulb -}; -exports.NAVBAR_ICONS = Object.keys(exports.NAVBAR_CONFIG); diff --git a/src/data/roadmaps/html.js b/src/data/roadmaps/html.js deleted file mode 100644 index 80c38c40..00000000 --- a/src/data/roadmaps/html.js +++ /dev/null @@ -1,77 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.htmlRoadmapData = void 0; -exports.htmlRoadmapData = [ - { - title: "HTML Basics", - items: [ - { text: "Introduction to HTML", link: "/docs/html/intro-html/", status: "todo" }, - { text: "HTML Documents Structure", link: "#", status: "todo" }, - { text: "Basic HTML Tags", link: "#", status: "todo" }, - { text: "Attributes in HTML", link: "#", status: "todo" }, - { - text: "HTML Paragraphs and Text Formatting", - link: "#", - status: "todo", - }, - { text: "Links and Images in HTML", link: "#", status: "todo" }, - { text: "HTML Lists", link: "#", status: "todo" }, - ], - }, - { - title: "HTML Forms", - items: [ - { text: "Introduction to HTML Forms", link: "#", status: "todo" }, - { text: "Form Elements and Attributes", link: "#", status: "todo" }, - { text: "Input Types in HTML", link: "#", status: "todo" }, - { text: "Form Action and Method", link: "#", status: "todo" }, - { text: "HTML Form Validation", link: "#", status: "todo" }, - ], - }, - { - title: "HTML5 Elements", - items: [ - { text: "HTML5 Semantic Elements", link: "#", status: "todo" }, - { text: "HTML5 Media Elements", link: "#", status: "todo" }, - { text: "HTML5 Graphics Elements", link: "#", status: "todo" }, - { text: "HTML5 Form Types", link: "#", status: "todo" }, - { text: "HTML5 New Attributes", link: "#", status: "todo" }, - { text: "Web Storage in HTML5", link: "#", status: "todo" }, - ], - }, - { - title: "HTML Tables", - items: [ - { text: "Basic HTML Table Structure", link: "#", status: "todo" }, - { text: "HTML Table Attributes", link: "#", status: "todo" }, - { text: "Row and Colspan in HTML", link: "#", status: "todo" }, - { text: "Table Caption and Summary", link: "#", status: "todo" }, - { text: "Complex Tables in HTML", link: "#", status: "todo" }, - ], - }, - { - title: "HTML and SEO", - items: [ - { text: "Basic SEO Concepts", link: "#", status: "todo" }, - { text: "HTML Tags and SEO", link: "#", status: "todo" }, - { text: "SEO and HTML Meta Tags", link: "#", status: "todo" }, - { text: "SEO and HTML Sitemap", link: "#", status: "todo" }, - { text: "SEO and HTML Robots", link: "#", status: "todo" }, - ], - }, - { - title: "Responsive Web Design", - items: [ - { - text: "Understanding Responsive Web Design", - link: "#", - status: "todo", - }, - { text: "Media Queries in CSS", link: "#", status: "todo" }, - { text: "Responsive Images", link: "#", status: "todo" }, - { text: "CSS Flexbox", link: "#", status: "todo" }, - { text: "CSS Grid", link: "#", status: "todo" }, - { text: "CSS Frameworks", link: "#", status: "todo" }, - ], - }, -]; diff --git a/src/data/roadmaps/index.js b/src/data/roadmaps/index.js deleted file mode 100644 index 7dd1b62d..00000000 --- a/src/data/roadmaps/index.js +++ /dev/null @@ -1,46 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.roadmaps = void 0; -exports.roadmaps = [ - { - id: "html", - title: "HTML Basics", - description: "Learn the basics of HTML", - lessons: [ - { - id: "html_intro", - title: "Introduction to HTML", - duration: "1 hour", - link: "https://www.w3schools.com/html/", - }, - { - id: "html_elements", - title: "HTML Elements", - duration: "2 hours", - link: "https://www.w3schools.com/html/html_elements.asp", - }, - // Add more lessons as needed - ], - }, - { - id: "css", - title: "CSS Styling", - description: "Learn CSS for styling web pages", - lessons: [ - { - id: "css_intro", - title: "Introduction to CSS", - duration: "1.5 hours", - link: "https://www.w3schools.com/css/", - }, - { - id: "css_selectors", - title: "CSS Selectors", - duration: "2.5 hours", - link: "https://www.w3schools.com/css/css_selectors.asp", - }, - // Add more lessons as needed - ], - }, - // Add more courses (React, Node.js, etc.) -]; diff --git a/src/data/roadmaps/javascript/index.js b/src/data/roadmaps/javascript/index.js deleted file mode 100644 index 5501a31f..00000000 --- a/src/data/roadmaps/javascript/index.js +++ /dev/null @@ -1,180 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var roadmapJavaScript = [ - { - title: "Beginner Topics", - description: "Start with these!", - topics: [ - { - title: "Introduction to JavaScript", - description: "Learn the basics of JavaScript", - }, - { - title: "Variables", - description: "Learn how to declare variables", - }, - { - title: "Data Types", - description: "Learn about the different data types in JavaScript", - }, - { - title: "Operators", - description: "Learn about the different operators in JavaScript", - }, - { - title: "Control Structures", - description: "Learn about control structures in JavaScript", - }, - { - title: "Functions", - description: "Learn about functions in JavaScript", - }, - { - title: "Arrays", - description: "Learn about arrays in JavaScript", - }, - { - title: "Objects", - description: "Learn about objects in JavaScript", - }, - { - title: "Classes", - description: "Learn about classes in JavaScript", - }, - { - title: "DOM Manipulation", - description: "Learn about manipulating the DOM in JavaScript", - }, - { - title: "Events", - description: "Learn about events in JavaScript", - }, - { - title: "AJAX", - description: "Learn about AJAX in JavaScript", - }, - { - title: "ES6 Features", - description: "Learn about the new features in ES6", - }, - ], - }, - { - title: "Intermediate Topics", - description: "Pick these after beginner topics", - topics: [ - { - title: "Promises", - description: "Learn about promises in JavaScript", - }, - { - title: "Async/Await", - description: "Learn about async/await in JavaScript", - }, - { - title: "Modules", - description: "Learn about modules in JavaScript", - }, - { - title: "Error Handling", - description: "Learn about error handling in JavaScript", - }, - { - title: "Regular Expressions", - description: "Learn about regular expressions in JavaScript", - }, - { - title: "Closures", - description: "Learn about closures in JavaScript", - }, - { - title: "Scope", - description: "Learn about scope in JavaScript", - }, - { - title: "This Keyword", - description: "Learn about the this keyword in JavaScript", - }, - { - title: "Prototype", - description: "Learn about prototype in JavaScript", - }, - { - title: "Functional Programming", - description: "Learn about functional programming in JavaScript", - }, - { - title: "Testing", - description: "Learn about testing in JavaScript", - }, - { - title: "Debugging", - description: "Learn about debugging in JavaScript", - }, - { - title: "Performance", - description: "Learn about performance in JavaScript", - }, - ], - }, - { - title: "Advanced Topics", - description: "Pick these after intermediate topics", - topics: [ - { - title: "Web Components", - description: "Learn about web components in JavaScript", - }, - { - title: "Web Workers", - description: "Learn about web workers in JavaScript", - }, - { - title: "Service Workers", - description: "Learn about service workers in JavaScript", - }, - { - title: "Web Assembly", - description: "Learn about web assembly in JavaScript", - }, - { - title: "Web Sockets", - description: "Learn about web sockets in JavaScript", - }, - { - title: "WebRTC", - description: "Learn about webRTC in JavaScript", - }, - { - title: "Node.js", - description: "Learn about Node.js", - }, - { - title: "Express.js", - description: "Learn about Express.js", - }, - { - title: "GraphQL", - description: "Learn about GraphQL", - }, - { - title: "React", - description: "Learn about React", - }, - { - title: "Vue", - description: "Learn about Vue", - }, - { - title: "Angular", - description: "Learn about Angular", - }, - { - title: "TypeScript", - description: "Learn about TypeScript", - }, - ], - }, - // Add more items as needed -]; -exports.default = roadmapJavaScript; diff --git a/src/data/userData.js b/src/data/userData.js deleted file mode 100644 index 54dc5054..00000000 --- a/src/data/userData.js +++ /dev/null @@ -1,50 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Users = void 0; -exports.Users = [ - // ML Repository - { - title: "ML Repository", - description: "Curated collection of machine learning projects, tutorials, and resources for enthusiasts and developers.", - preview: require("./showcase/machine-learning-project.png"), - website: "https://machine-learning-repos.vercel.app/", - source: "https://github.com/recodehive/machine-learning-repos", - tags: ["opensource", "ml", "favorite", "react"], - }, - // Opesource project - { - title: "Opesource Practice", - description: "A beginner-friendly repository designed for newcomers to learn , collaborate and practice open-source contributions.", - preview: require("./showcase/opesource-project.png"), - website: "https://github.com/recodehive/Opensource-practice", - source: "https://github.com/recodehive/Opensource-practice", - tags: ["opensource", "clone", "templates"], - }, - // Scrape ML - { - title: "Scrape ML", - description: "Scrape ML is a Streamlit app that allows users to scrape and analyze data from various websites, providing insights and visualizations for machine learning enthusiasts.", - preview: require("./showcase/Scrape-ml-project.png"), - website: "https://scrape-ml.streamlit.app/", - source: "https://github.com/recodehive/Scrape-ML", - tags: ["opensource", "templates", "clone"], - }, - // StackOverflow Analysis - { - title: "StackOverflow Analysis", - description: "StackOverflow Analysis is a comprehensive data analysis project that explores the vast repository of questions and answers on StackOverflow. ", - preview: require("./showcase/Stackoverflow-analysis.png"), - website: "https://github.com/recodehive/Stackoverflow-Analysis", - source: null, - tags: ["opensource", "product", "nextjs", "javascript"], - }, - // Awesome GitHub Profiles" - { - title: "GitHub Profiles", - description: "Curated list of awesome GitHub profiles showcasing creativity, design, and coding skills.", - preview: require("./showcase/awesome-project.png"), - website: "https://dev.recodehive.com/devfolio", - source: "https://github.com/recodehive/awesome-github-profiles", - tags: ["opensource", "nextjs", "typescript", "ai", "favorite"], - }, -]; diff --git a/src/data/users.js b/src/data/users.js deleted file mode 100644 index bf805add..00000000 --- a/src/data/users.js +++ /dev/null @@ -1,175 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.sortedUsers = exports.TagList = exports.Tags = void 0; -var jsUtils_1 = require("../utils/jsUtils"); -var userData_1 = require("./userData"); -exports.Tags = { - html: { - label: "HTML", - description: "", - color: "#f06529", - }, - css: { - label: "CSS", - description: "", - color: "#2965f1", - }, - javascript: { - label: "JavaScript", - description: "", - color: "#f0db4f", - }, - vanilla: { - label: "Vanilla", - description: "", - color: "#f0db4f", - }, - react: { - label: "React.js", - description: "", - color: "#61dafb", - }, - nextjs: { - label: "Next.js", - description: "", - color: "#000000", - }, - typescript: { - label: "TypeScript", - description: "", - color: "#007acc", - }, - nodejs: { - label: "Node.js", - description: "", - color: "#026e00", - }, - mongodb: { - label: "MongoDB", - description: "", - color: "#13aa52", - }, - favorite: { - label: "Favorite", - description: "", - color: "#f06529", - }, - opensource: { - label: "Open-Source", - description: "", - color: "#39ca30", - }, - product: { - label: "Product", - description: "", - color: "#dfd545", - }, - design: { - label: "Design", - description: "", - color: "#a44fb7", - }, - i18n: { - label: "I18n", - description: "", - color: "#127f82", - }, - versioning: { - label: "Versioning", - description: "", - color: "#fe6829", - }, - large: { - label: "Large", - description: "", - color: "#8c2f00", - }, - motion: { - label: "Motion", - description: "", - color: "#f06529", - }, - redux: { - label: "Redux", - description: "", - color: "#764abc", - }, - meta: { - label: "Meta", - description: "", - color: "#4267b2", - }, - php: { - label: "PHP", - description: "", - color: "#8892be", - }, - personal: { - label: "Personal", - description: "", - color: "#14cfc3", - }, - templates: { - label: "Templates", - description: "", - color: "#ffcfc3", - }, - portfolio: { - label: "portfolio", - description: "", - color: "#ff4400", - }, - clone: { - label: "Clone", - description: "", - color: "#004400", - }, - ai: { - label: "AI", - description: "", - color: "#007acc", - }, - documentation: { - label: "Documentation", - description: "", - color: "#007acc", - }, - game: { - label: "Game", - description: "", - color: "#555555", - }, - ml: { - label: "ML", - description: "", - color: "#007acc", - }, - gym: { - label: "Gym", - description: "", - color: "#FF5733", - }, - mdx: { - label: "MDX", - description: "", - color: "#007acc", - }, - tailwind: { - label: "Tailwind", - description: "", - color: "#007acc", - }, - scss: { - label: "SCSS", - description: "", - color: "#007acc", - }, -}; -exports.TagList = Object.keys(exports.Tags); -function sortUsers() { - var result = userData_1.Users; - result = (0, jsUtils_1.sortBy)(result, function (user) { return user.title.toLowerCase(); }); - result = (0, jsUtils_1.sortBy)(result, function (user) { return !user.tags.includes("favorite"); }); - return result; -} -exports.sortedUsers = sortUsers(); diff --git a/src/database/blogs/index.js b/src/database/blogs/index.js deleted file mode 100644 index b4df685e..00000000 --- a/src/database/blogs/index.js +++ /dev/null @@ -1,69 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var blogs = [ - { - id: 1, - title: "Streamline Your UX Design", - image: "/img/blogs/05-ux-streamline.png", - description: "User experience design can be overwhelming because of the number of factors that influence what a product should look like and how it should function.", - slug: "streamline-ux-ui", - authors: ["dharshibalasubramaniyam", "sanjay-kv"], - }, - { - id: 2, - title: "Land a Job in UI/UX Design", - image: "/img/blogs/04-ux-job-design.png", - description: " Are you passionate about design and dreaming of a career in it? Or maybe you are already in the design space and looking to pivot into UI/UX? ", - slug: "ux-ui-design-job", - authors: ["dharshibalasubramaniyam", "sanjay-kv"], - }, - { - id: 3, - title: "UX Designers Future with AI", - image: "/img/blogs/03-ui-ux.png", - description: "The impact of technology on UX design is undeniable. Automation and artificial intelligence are making it easier to identify user needs and create tailored experiences.", - slug: "ux-designers-ai", - authors: ["dharshibalasubramaniyam", "sanjay-kv"], - }, - { - id: 4, - title: "What is Google DeepMind?", - image: "/img/blogs/02-deepmind.png", - description: "DeepMind is an auxiliary of Google that centers around man-made brainpower. It utilizes a part of AI called AI", - slug: "google-deepmind", - authors: ["dharshibalasubramaniyam", "sanjay-kv"], - }, - { - id: 5, - title: "What are backlinks for SEO", - image: "/img/blogs/01-seo-image.png", - description: "An SEO backlink is created when one website links to another, and they're extremely important for SEO. ", - slug: "google-backlinks", - authors: ["sanjay-kv"], - }, - { - id: 6, - title: "What is GitHub Copilot", - image: "/img/blogs/06-github-agent.png", - description: "The GitHub Copilot Coding Agent is an asynchronous software engineering agent that assists developers by suggesting code snippets", - slug: "git-coding-agent", - authors: ["sanjay-kv"], - }, - { - id: 7, - title: "Apache Spark Architecture Explained", - image: "img/blogs/07-spark-blog-banner.png", - description: "Apache Spark is a fast, open-source big data framework that leverages in-memory computing for high performance. Its architecture powers scalable distributed processing across clusters, making it essential for analytics and machine learning.", - slug: "spark-architecture", - authors: ["Aditya-Singh-Rathore", "sanjay-kv"], - }, - { - id: 8, - title: "N8N: The Future of Workflow Automation", - image: "/img/blogs/n8n-logo.png", - description: "N8N is an open-source workflow automation tool that enables users to connect various apps and services to automate tasks without extensive coding knowledge.", - slug: "n8n-workflow-automation", - authors: ["Aditya-Singh-Rathore",], - } -]; -exports.default = blogs; diff --git a/src/database/ebooks/index.js b/src/database/ebooks/index.js deleted file mode 100644 index 09851861..00000000 --- a/src/database/ebooks/index.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var books = [ - { - id: 1, - title: 'Programming in C', - image: 'https://cdn.geekboots.com/geek/c-language-popularity-meta-1656157189121.jpg', - description: 'C is a general-purpose, procedural computer programming language supporting structured programming, lexical variable scope, and recursion, with a static type system. By design, C provides constructs that map efficiently to typical machine instructions.', - link: 'https://drive.google.com/file/d/1B36OGR_QVEFnJvcH3NiBa0tcBaa2po6W/view?usp=drive_link', - }, - { - id: 2, - title: 'Programming in C++', - image: 'https://media.geeksforgeeks.org/wp-content/cdn-uploads/20230703144619/CPP-Language.png', - description: 'C++ is a general-purpose programming language created by Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significantly over time, and modern C++ now has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.', - link: 'https://drive.google.com/file/d/1asF5MoWe2o5eDAG3o_OeA_f5vf9AKKy9/view?usp=drive_link', - }, - { - id: 3, - title: 'Programming in Java', - image: 'https://1.bp.blogspot.com/-bIgZGyzK51I/XyzniiD0JYI/AAAAAAAH7W0/dFGu48SV2I4Yg9--YNhAZ4Z6RiNbcWbuwCLcBGAsYHQ/s1600/java.jpg', - description: 'Java is a class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible. It is a general-purpose programming language intended to let application developers write once, run anywhere (WORA), meaning that compiled Java code can run on all platforms that support Java without the need for recompilation.', - link: 'https://drive.google.com/file/d/1Yzw0HDlQ4dECk04hb-1P81xR5dwEBM_k/view?usp=drive_link', - }, - { - id: 4, - title: 'Programming in Python', - image: 'https://1.bp.blogspot.com/-WFlTDRQ5nZI/XqMED_-aV8I/AAAAAAAB1NM/X4mEmbLbylYotlO25v8f6v4RM2zQobmVgCLcBGAsYHQ/s1600/image2%2B-%2B2020-04-24T172119.147.jpg', - description: 'Python is an interpreted high-level general-purpose programming language. Python\'s design philosophy emphasizes code readability with its notable use of significant indentation. Its language constructs and object-oriented approach aim to help programmers write clear, logical code for small and large-scale projects.', - link: 'https://drive.google.com/file/d/1NTzQFX47JqjQtFUMMscL264wqpUwIwGT/view?usp=drive_link', - }, -]; -exports.default = books; diff --git a/src/database/projects/projects.js b/src/database/projects/projects.js deleted file mode 100644 index ae1d96cb..00000000 --- a/src/database/projects/projects.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var projectsData = { - tag: "Our Projects", - title: "Explore Our Latest Projects and Innovations", - description: "Discover our diverse projects showcasing all the begineer friendly opensource contributions, innovative applications. Each project represents our commitment to excellence and continuous learning.", - items: [ - { - title: "Awesome GitHub Profile", - image: "/img/blogs/awesome-project.png" - }, - { - title: "Machine Learning Repository", - image: "/img/blogs/machine-learning-project.png" - }, - { - title: "Stack overflow Analysis", - image: "/img/blogs/Stackoverflow-analysis.png" - }, - { - title: "Scrape ML Project", - image: "/img/blogs/Scrape-ml-project.png" - }, - { - title: "Opensource Project", - image: "/img/blogs/opesource-project.png" - }, - ] -}; -exports.default = projectsData; diff --git a/src/database/sponsors/index.js b/src/database/sponsors/index.js deleted file mode 100644 index ca6bd1a3..00000000 --- a/src/database/sponsors/index.js +++ /dev/null @@ -1,529 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var sponsors = [ - { - name: "DevXavier", - image: "https://avatars.githubusercontent.com/u/192259212?v=4", - description: "Student ", - github: "https://github.com/DevXavierNieto", - }, - { - name: "Austin Jian", - image: "https://avatars.githubusercontent.com/u/135089334?v=4", - description: "Student ", - github: "https://github.com/austinjiann", - }, - { - name: "Ayokanmi Adejola", - image: "https://avatars.githubusercontent.com/u/191106326?v=4", - description: "Developer at Softlyft", - github: "https://github.com/Ayokanmi-Adejola", - linkedin: "https://www.linkedin.com/in/ayokanmiadejola/", - twitter: "https://x.com/AyoAdejola100", - }, - { - name: "Matheus Farias", - image: "http://avatars.githubusercontent.com/u/22086460?v=4", - description: "Student", - github: "https://github.com/MatheusFarias8", - }, - { - name: "superdevp", - image: "https://avatars.githubusercontent.com/u/202645405?v=4", - description: "Web Developer", - github: "https://github.com/superdevp", - }, - { - name: "MeeTy HA", - image: "https://avatars.githubusercontent.com/u/196355500?v=4", - description: "Student ", - github: "https://github.com/MeeTyHA", - }, - { - name: "milos matovicup", - image: "https://avatars.githubusercontent.com/u/184030535?v=4", - description: "Student", - github: "https://github.com/milosmatovicup", - }, - { - name: "Tirth Patel", - image: "https://avatars.githubusercontent.com/u/111308497?v=4", - description: "Student", - github: "https://github.com/TirthWillLearn", - linkedin: "https://www.linkedin.com/in/tirth-k-patel/", - twitter: "https://x.com/codewithtirth", - }, - { - name: "Takashi Arai", - image: "https://avatars.githubusercontent.com/u/42265874?v=4", - description: "Student Ryukyu Uni, Japan", - github: "https://github.com/arataka1313", - linkedin: "https://www.linkedin.com/in/takashi-arai-2b697b360/", - twitter: "https://x.com/jjackofall", - isPastSponsor: true, - }, - { - name: "Sumit Khanna", - image: "https://avatars.githubusercontent.com/u/29749122?v=4", - description: "Developer at slickspender", - github: "https://github.com/jjackofall", - twitter: "https://x.com/jjackofall", - isPastSponsor: true, - }, - { - name: "Prakhar Saxena", - image: "https://avatars.githubusercontent.com/u/111764688?v=4", - description: "Studying @McMaster University", - github: "https://www.linkedin.com/in/prakharsaxena5/", - linkedin: "https://www.linkedin.com/in/prakharsaxena5/", - isPastSponsor: true, - }, - { - name: "Varghese Baby", - image: "https://avatars.githubusercontent.com/u/68038057?v=4", - description: "Software Developer", - github: "https://github.com/varghese25", - linkedin: "https://www.linkedin.com/in/varghese-baby-138429175/", - isPastSponsor: true, - }, - { - name: "Carlos Romero", - image: "https://avatars.githubusercontent.com/u/119690391?v=4", - description: "CS Student of La Salle", - github: "https://github.com/carlosromerorodriguez", - linkedin: "https://www.linkedin.com/in/carlos-romero-rdgz/", - isPastSponsor: true, - }, - { - name: "Yahya Banouk", - image: "https://avatars.githubusercontent.com/u/83559441?v=4", - description: "Full-Stack Engineer at Expersi", - github: "https://github.com/yahya-banouk", - linkedin: "https://x.com/Yahya_Banouk", - twitter: "https://x.com/Yahya_Banouk", - isPastSponsor: true, - }, - { - name: "Mike ", - image: "https://avatars.githubusercontent.com/u/79911993?v=4", - description: "AI Consultant", - github: "#", - linkedin: "#", - isPastSponsor: true, - }, - { - name: "Alex Choi", - image: "https://avatars.githubusercontent.com/u/64334999?v=4", - description: "Legacy sponsor", - github: "https://github.com/alexechoi", - linkedin: "https://www.linkedin.com/in/alexchoi1/", - twitter: "https://x.com/alexchhk", - isPastSponsor: true, - }, - { - name: "Renato Maynard", - image: "https://avatars.githubusercontent.com/u/79546214?v=4", - description: "M.Sc. in Operations Research", - github: "https://www.linkedin.com/in/renatomaynardetche/", - linkedin: "#", - twitter: "#", - isPastSponsor: true, - }, - { - name: "Tram Khoi Nguyen", - image: "https://avatars.githubusercontent.com/u/112838098?v=4", - description: "Student at Tra Vinh, Vietnam", - github: "https://github.com/khoinguyennni", - linkedin: "#", - twitter: "#", - isPastSponsor: true, - }, - { - name: "Bobby Azad", - image: "https://avatars.githubusercontent.com/u/48394338?v=4", - description: "BI Developer at Agtegra", - github: "https://github.com/gbazad93", - linkedin: "https://www.linkedin.com/in/bobby-azad-b2035b65/", - twitter: "#", - isPastSponsor: true, - }, - { - name: "Sudarshan Giri", - image: "https://avatars.githubusercontent.com/u/41857483?v=4", - description: "Drupal Developer at Webfirst", - github: "hhttps://github.com/SudarshanGiri", - linkedin: "https://www.linkedin.com/in/sudarshangiri/", - twitter: "https://x.com/sudarshanhang", - isPastSponsor: true, - }, - { - name: "Aryan Jaiswal", - image: "https://pbs.twimg.com/profile_images/1921606118683426816/M1mU3vm8_400x400.jpg", - description: "Founder @MLSA", - github: "https://github.com/Aryanjstar", - linkedin: "https://www.linkedin.com/in/aryanjstar/", - twitter: "https://x.com/Aryanjstar", - isPastSponsor: true, - }, - { - name: "Kashif Khan", - image: "https://avatars.githubusercontent.com/u/88695658?v=4", - description: "Quality Assurance Engineer", - github: "https://github.com/KashifKhaan", - linkedin: "https://www.linkedin.com/in/mr-kashif-442146214/", - twitter: "https://x.com/KaxhifKhan", - isPastSponsor: true, - }, - { - name: "Judar", - image: "https://pbs.twimg.com/profile_images/1625875289795604480/Vghp-Ym6_400x400.jpg", - description: "Founder @MLSA", - github: "https://github.com/trongphuhappy", - linkedin: "#", - twitter: "https://x.com/Judar_Clitus", - isPastSponsor: true, - }, - { - name: "Kriti Raj", - image: "https://avatars.githubusercontent.com/u/62815511?v=4", - description: "Student at IIIT , India", - github: "https://github.com/kriti-raj", - linkedin: "https://www.linkedin.com/in/kritirajtech/", - twitter: "https://x.com/kriti___raj", - isPastSponsor: true, - }, - { - name: "Alex Cerezo", - image: "https://avatars.githubusercontent.com/u/92682715?v=4", - description: "Software Engineer at Outlier", - github: "https://github.com/alexcerezo", - linkedin: "https://www.linkedin.com/in/alexcerezocontreras/", - twitter: "https://x.com/alexcerezx", - isPastSponsor: true, - }, - { - name: "Monojit Pal", - image: "https://avatars.githubusercontent.com/u/144504389?v=4", - description: "Student at St. Thomas' College", - github: "https://github.com/Monojit-Pal", - linkedin: "https://www.linkedin.com/in/pal-monojit/", - twitter: "https://x.com/Monojit__18", - isPastSponsor: true, - }, - { - name: "Chiluka Akshitha", - image: "https://avatars.githubusercontent.com/u/120377576?v=4", - description: "Student at IIT Madras", - github: "https://github.com/AKSHITHA-CHILUKA", - linkedin: "https://www.linkedin.com/in/akshitha-chiluka-b19245259", - twitter: "https://x.com/AkshithaChiluka?t=5ztRGbV2DDB6Wf5tlCyHrw&s=09", - isPastSponsor: true, - }, - { - name: "Medha", - image: "https://avatars.githubusercontent.com/u/90996890?v=4", - description: "Student: NextJs Developer", - github: "https://github.com/medss19", - linkedin: "https://www.linkedin.com/in/medha-agarwal-01b33725a/", - isWeSponsor: true, - }, - { - name: "Aadil Latif", - image: "https://avatars.githubusercontent.com/u/145087959?v=4", - description: "Founder TechXNinjas", - github: "https://github.com/iaadillatif", - linkedin: "https://www.linkedin.com/in/iaadillatif/", - isWeSponsor: true, - }, - { - name: "Richa jaishwal", - image: "https://avatars.githubusercontent.com/u/156594333?v=4", - description: "MERN Developer", - github: "https://github.com/Richajaishwal0", - linkedin: "https://www.linkedin.com/in/richa-jaishwal/", - isWeSponsor: true, - }, - { - name: "Sonal Yadav", - image: "https://avatars.githubusercontent.com/u/169170929?v=4", - description: "Web & App Developer", - github: "https://github.com/sonalyadav1", - linkedin: "https://www.linkedin.com/in/sonal-yadav-193471238/", - twitter: "https://x.com/SonalYa944317", - isWeSponsor: true, - }, - { - name: "Ayokanmi Adejola", - image: "https://avatars.githubusercontent.com/u/191106326?v=4", - description: "Final Year Student", - github: "https://github.com/Ayokanmi-Adejola", - linkedin: "hhttps://www.linkedin.com/in/ayokanmiadejola/", - twitter: "https://x.com/AyoAdejola100", - isWeSponsor: true, - }, - { - name: "Nishant Rana", - image: "https://avatars.githubusercontent.com/u/126577697?v=4", - description: "Final Year Student", - github: "https://github.com/NishantRana07", - linkedin: "https://www.linkedin.com/in/nishantrana07/", - twitter: "https://x.com/TechwNishant", - isWeSponsor: true, - }, - { - name: "Ankit Modanwal", - image: "https://avatars.githubusercontent.com/u/166202965?v=4", - description: "Next.js & ML Developer ", - github: "https://github.com/ankitmodanwall", - linkedin: "https://www.linkedin.com/in/ankit-modanwal/", - twitter: "https://x.com/ankitt_ml", - isWeSponsor: true, - }, - { - name: "Irfan", - image: "https://avatars.githubusercontent.com/u/138690953?v=4", - description: "Final Year Student", - github: "https://github.com/iitzIrFan", - linkedin: "https://www.linkedin.com/in/irfan-shaikh-8b5b94259/", - twitter: "https://x.com/iitzIrfan", - isWeSponsor: true, - }, - { - name: "Renato Maynard", - image: "https://avatars.githubusercontent.com/u/79546214?v=4", - description: "M.Sc. in Operations Research", - github: "https://www.linkedin.com/in/renatomaynardetche/", - twitter: "https://x.com/codewithdhruba", - isWeSponsor: true, - }, - { - name: "Dhrubaraj Pati", - image: "https://avatars.githubusercontent.com/u/146111647?v=4", - description: "Student at SVU", - github: "https://github.com/codewithdhruba01", - linkedin: "#", - twitter: "#", - isWeSponsor: true, - }, - { - name: "Carlos Romero", - image: "https://avatars.githubusercontent.com/u/119690391?v=4", - description: "CS Student of La Salle", - github: "https://github.com/carlosromerorodriguez", - linkedin: "https://www.linkedin.com/in/carlos-romero-rdgz/", - isWeSponsor: true, - }, - { - name: "Shivansh Saxena", - image: "https://avatars.githubusercontent.com/u/112249407?v=4", - description: "Intern at Geo Softech", - github: "https://github.com/ShivanshPlays", - linkedin: "https://www.linkedin.com/in/shivansh-saxena-288785168/", - isWeSponsor: true, - }, - { - name: "Mastan Sayyad", - image: "https://avatars.githubusercontent.com/u/101971980?v=4", - description: "Web Deveoper at SWOC", - github: "https://github.com/MastanSayyad", - linkedin: "https://www.linkedin.com/in/mastan-sayyad/", - twitter: "https://x.com/mastansayyad02", - isWeSponsor: true, - }, - { - name: "GSSOC", - image: "https://avatars.githubusercontent.com/u/166525102?s=200&v=4", - description: "Girlscript Organisation", - github: "https://github.com/GSSoC24", - linkedin: "https://www.linkedin.com/company/girlscriptsoc/posts/?feedView=all", - isWeSponsor: true, - }, - { - name: "Anshika Tiwari", - image: "https://avatars.githubusercontent.com/u/143124119?v=4", - description: "Student, ", - github: "https://github.com/anshikatiwari20", - linkedin: "https://www.linkedin.com/in/anshika-tiwari-/", - twitter: "https://x.com/anshikat_20", - isWeSponsor: true, - }, - { - name: "Meet Jain", - image: "https://avatars.githubusercontent.com/u/133582566?v=4", - description: "Student @ IIIT Jabalpur", - github: "https://github.com/Meetjain1", - linkedin: "https://www.linkedin.com/in/meet-jain-413015265/", - twitter: "https://x.com/Meetjain_100", - isWeSponsor: true, - }, - { - name: "Hemant Lohar", - image: "https://avatars.githubusercontent.com/u/131635107?v=4", - description: "Student, India", - github: "https://github.com/Hemantlohar", - linkedin: "#", - isWeSponsor: true, - }, - { - name: "Chiluka Akshitha", - image: "https://avatars.githubusercontent.com/u/120377576?v=4", - description: "Student at IIT Madras", - github: "https://github.com/AKSHITHA-CHILUKA", - linkedin: "https://www.linkedin.com/in/akshitha-chiluka-b19245259", - twitter: "https://x.com/AkshithaChiluka?t=5ztRGbV2DDB6Wf5tlCyHrw&s=09", - isWeSponsor: true, - }, - { - name: "Himangshu Sharma", - image: "https://avatars.githubusercontent.com/u/120270398?v=4", - description: "Opensource developer", - github: "https://github.com/HimangshuSharma01", - linkedin: "https://www.linkedin.com/in/himangshusharma01", - isWeSponsor: true, - }, - { - name: "Siddheya Kulkarni", - image: "https://avatars.githubusercontent.com/u/115717746?v=4", - description: "Student, Opensource developer", - github: "https://github.com/Asymtode712", - linkedin: "https://www.linkedin.com/in/siddheya-kulkarni/", - twitter: "https://x.com/SidKulkarni712", - isWeSponsor: true, - }, - { - name: "Prithwi Hegde", - image: "https://avatars.githubusercontent.com/u/115262737?v=4", - description: "Student at JSSSSU", - github: "https://github.com/Prithwi32", - linkedin: "https://www.linkedin.com/in/prithwi-hegde/", - isWeSponsor: true, - }, - { - name: "Vansh Chaurasiya", - image: "https://avatars.githubusercontent.com/u/114163734?v=4", - description: "Intern at GoComet", - github: "https://github.com/vansh-codes", - linkedin: "https://www.linkedin.com/in/vanshchaurasiya24/", - twitter: "https://x.com/VanshChaurasiy4", - isWeSponsor: true, - }, - { - name: "Hemanth kumar", - image: "https://avatars.githubusercontent.com/u/106808387?v=4", - description: "Tech Lead at GSSOC", - github: "https://github.com/Hemu21", - linkedin: "https://www.linkedin.com/in/hemu21/", - twitter: "https://x.com/Hemu21_", - isWeSponsor: true, - }, - { - name: "Eduardo San Martin", - image: "https://avatars.githubusercontent.com/u/664177?v=4", - description: "Member of the @vuejs", - github: "https://github.com/posva", - twitter: "https://x.com/posva", - isWeSponsor: true, - }, - { - name: "Md Azfar Alam", - image: "https://avatars.githubusercontent.com/u/100375390?v=4", - description: "Devops Engineer", - github: "https://github.com/mdazfar2", - linkedin: "https://www.linkedin.com/in/md-azfar-alam/", - twitter: "https://x.com/azfarxx_", - isWeSponsor: true, - }, - { - name: "Ajay Dhangar", - image: "https://avatars.githubusercontent.com/u/99037494?v=4", - description: "Founder at CodeHarborHub", - github: "https://github.com/ajay-dhangar", - linkedin: "https://www.linkedin.com/in/ajay-dhangar/", - twitter: "https://x.com/CodesWithAjay", - isWeSponsor: true, - }, - { - name: "Sneha kumari", - image: "https://avatars.githubusercontent.com/u/95492939?v=4", - description: "Developer at GHCL", - github: "https://github.com/Snehsk", - linkedin: "https://www.linkedin.com/in/sneha-kumari1/", - isWeSponsor: true, - }, - { - name: "Swarnendu Bhandari", - image: "https://media.licdn.com/dms/image/v2/D5603AQExzsjM2S4ojA/profile-displayphoto-shrink_400_400/profile-displayphoto-shrink_400_400/0/1724809628013?e=1753920000&v=beta&t=PRD0i8nyd-EVblyVMHkJWJrCrLxcmsB5bJWsPOa46x8", - description: "Student at IIT Kharagpur", - github: "https://github.com/Swarnendu0123", - linkedin: "https://www.linkedin.com/in/swarnendu-bhandari/", - isWeSponsor: true, - }, - { - name: "Alex Cerezo", - image: "https://avatars.githubusercontent.com/u/92682715?v=4", - description: "Developer at Outlier", - github: "https://github.com/alexcerezo", - linkedin: "https://www.linkedin.com/in/alexcerezocontreras", - twitter: "https://x.com/alexcerezx", - isWeSponsor: true, - }, - { - name: "Aditya Bhaumik", - image: "https://avatars.githubusercontent.com/u/92214013?v=4", - description: "Student at VIT", - github: "https://github.com/aditya-bhaumik", - linkedin: "https://www.linkedin.com/in/aditya-bhaumik-62b6b2220/", - isWeSponsor: true, - }, - { - name: "Vivek Vardhan", - image: "https://avatars.githubusercontent.com/u/91594529?v=4", - description: "Student at VIT", - github: "https://github.com/vivekvardhan2810", - linkedin: "https://www.linkedin.com/in/vivek-vardhan-23682521b/", - isWeSponsor: true, - }, - { - name: "Dinesh Talwadker", - image: "https://media.licdn.com/dms/image/v2/D4D35AQEPaJ17Vq2zMw/profile-framedphoto-shrink_200_200/B4DZgO2PCnHAAc-/0/1752595755484?e=1753635600&v=beta&t=ltSZKvnsXqQavgb4LISSOevZSIU3uhEi--Nx_FtTSQU", - description: "Co-Founder at Sanity Esports", - github: "https://github.com/dinxsh", - linkedin: "https://www.linkedin.com/in/dineshtalwadker/", - twitter: "https://x.com/dineshcodes", - isWeSponsor: true, - }, - { - name: "Sanya Dureja", - image: "https://avatars.githubusercontent.com/u/84080312?v=4", - description: "SDE at Paypal", - github: "https://github.com/sanyadureja", - linkedin: "https://www.linkedin.com/in/sanya-dureja-13960122a/", - isWeSponsor: true, - }, - { - name: "Razvan Stoenescu", - image: "https://avatars.githubusercontent.com/u/4665641?v=4", - description: "Team lead of Quasar Framework", - github: "https://github.com/rstoenescu", - linkedin: "#", - isWeSponsor: true, - }, - { - name: "Sarah Drasner", - image: "https://avatars.githubusercontent.com/u/2281088?v=4", - description: "Director at Google", - github: "https://github.com/sdras", - linkedin: "#", - twitter: "https://x.com/sarah_edo", - isWeSponsor: true, - }, - { - name: "Homebrew", - image: "https://avatars.githubusercontent.com/u/1503512?s=200&v=4", - description: "package manager for macOS", - github: "https://github.com/Homebrew", - linkedin: "#", - isWeSponsor: true, - }, -]; -exports.default = sponsors; diff --git a/src/lib/firebase.js b/src/lib/firebase.js deleted file mode 100644 index ab0b74fc..00000000 --- a/src/lib/firebase.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.auth = exports.app = void 0; -var app_1 = require("firebase/app"); -var auth_1 = require("firebase/auth"); -var firebaseConfig = { - apiKey: "AIzaSyBSiO9d5tHuyyAeUCt37pxDWTT7jPSigaU", - authDomain: "awesome-github-profiles.firebaseapp.com", - databaseURL: "https://awesome-github-profiles-default-rtdb.firebaseio.com", - projectId: "awesome-github-profiles", - storageBucket: "awesome-github-profiles.firebasestorage.app", - messagingSenderId: "490821849262", - appId: "1:490821849262:web:7e97984d98f578b81f9d3f", - measurementId: "G-WM33JZYEV0" -}; -var app = (0, app_1.getApps)().length ? (0, app_1.getApp)() : (0, app_1.initializeApp)(firebaseConfig); -exports.app = app; -var auth = (0, auth_1.getAuth)(app); -exports.auth = auth; diff --git a/src/lib/statsProvider.js b/src/lib/statsProvider.js deleted file mode 100644 index 96fdc4ae..00000000 --- a/src/lib/statsProvider.js +++ /dev/null @@ -1,477 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.convertStatToText = exports.useCommunityStatsContext = exports.CommunityStatsContext = void 0; -exports.CommunityStatsProvider = CommunityStatsProvider; -var jsx_runtime_1 = require("react/jsx-runtime"); -/** @jsxImportSource react */ -var react_1 = __importStar(require("react")); -var githubService_1 = require("../services/githubService"); -var useDocusaurusContext_1 = __importDefault(require("@docusaurus/useDocusaurusContext")); -exports.CommunityStatsContext = (0, react_1.createContext)(undefined); -var GITHUB_ORG = "recodehive"; -var POINTS_PER_PR = 10; -var MAX_CONCURRENT_REQUESTS = 8; -var CACHE_DURATION = 5 * 60 * 1000; // 5 minutes cache -var MAX_PAGES_PER_REPO = 20; -// Time filter utility functions -var getTimeFilterDate = function (filter) { - var now = new Date(); - switch (filter) { - case 'week': - return new Date(now.getTime() - 7 * 24 * 60 * 60 * 1000); - case 'month': { - var lastMonth = new Date(now); - lastMonth.setMonth(now.getMonth() - 1); - return lastMonth; - } - case 'year': - return new Date(now.getTime() - 365 * 24 * 60 * 60 * 1000); - case 'all': - default: - return null; // No filter - } -}; -var isPRInTimeRange = function (mergedAt, filter) { - if (filter === 'all') - return true; - var filterDate = getTimeFilterDate(filter); - if (!filterDate) - return true; - var prDate = new Date(mergedAt); - return prDate >= filterDate; -}; -function CommunityStatsProvider(_a) { - var _this = this; - var children = _a.children; - var customFields = (0, useDocusaurusContext_1.default)().siteConfig.customFields; - var token = (customFields === null || customFields === void 0 ? void 0 : customFields.gitToken) || ""; - var _b = (0, react_1.useState)(true), loading = _b[0], setLoading = _b[1]; - var _c = (0, react_1.useState)(null), error = _c[0], setError = _c[1]; - var _d = (0, react_1.useState)(0), githubStarCount = _d[0], setGithubStarCount = _d[1]; - var _e = (0, react_1.useState)(0), githubContributorsCount = _e[0], setGithubContributorsCount = _e[1]; - var _f = (0, react_1.useState)(0), githubForksCount = _f[0], setGithubForksCount = _f[1]; - var _g = (0, react_1.useState)(0), githubReposCount = _g[0], setGithubReposCount = _g[1]; - var _h = (0, react_1.useState)(0), githubDiscussionsCount = _h[0], setGithubDiscussionsCount = _h[1]; - var _j = (0, react_1.useState)(null), lastUpdated = _j[0], setLastUpdated = _j[1]; - // Time filter state - var _k = (0, react_1.useState)('all'), currentTimeFilter = _k[0], setCurrentTimeFilter = _k[1]; - // Enhanced state for leaderboard data (stores all contributors with full PR history) - var _l = (0, react_1.useState)([]), allContributors = _l[0], setAllContributors = _l[1]; - var _m = (0, react_1.useState)(null), stats = _m[0], setStats = _m[1]; - // Cache state (stores raw data without filters) - var _o = (0, react_1.useState)({ data: null, timestamp: 0 }), cache = _o[0], setCache = _o[1]; - // Computed filtered contributors based on current time filter - var contributors = (0, react_1.useMemo)(function () { - if (!allContributors.length) - return []; - var filteredContributors = allContributors - .map(function (contributor) { - var filteredPRs = contributor.allPRDetails.filter(function (pr) { - return isPRInTimeRange(pr.mergedAt, currentTimeFilter); - }); - return { - username: contributor.username, - avatar: contributor.avatar, - profile: contributor.profile, - points: filteredPRs.length * POINTS_PER_PR, - prs: filteredPRs.length, - prDetails: filteredPRs, // For backward compatibility, though we'll use the new function - }; - }) - .filter(function (contributor) { return contributor.prs > 0; }) // Only show contributors with PRs in the time range - .sort(function (a, b) { return b.points - a.points || b.prs - a.prs; }); - return filteredContributors; - }, [allContributors, currentTimeFilter]); - // Update stats when contributors change - (0, react_1.useEffect)(function () { - if (contributors.length > 0) { - setStats({ - flooredTotalPRs: contributors.reduce(function (sum, c) { return sum + c.prs; }, 0), - totalContributors: contributors.length, - flooredTotalPoints: contributors.reduce(function (sum, c) { return sum + c.points; }, 0), - }); - } - }, [contributors]); - // Function to get filtered PRs for a specific contributor (for PR view modal) - var getFilteredPRsForContributor = (0, react_1.useCallback)(function (username) { - var contributor = allContributors.find(function (c) { return c.username === username; }); - if (!contributor) - return []; - return contributor.allPRDetails - .filter(function (pr) { return isPRInTimeRange(pr.mergedAt, currentTimeFilter); }) - .sort(function (a, b) { return new Date(b.mergedAt).getTime() - new Date(a.mergedAt).getTime(); }); // Sort by newest first - }, [allContributors, currentTimeFilter]); - // Time filter setter function - var setTimeFilter = (0, react_1.useCallback)(function (filter) { - setCurrentTimeFilter(filter); - }, []); - var fetchAllOrgRepos = (0, react_1.useCallback)(function (headers) { return __awaiter(_this, void 0, void 0, function () { - var repos, page, resp, data; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - repos = []; - page = 1; - _a.label = 1; - case 1: - if (!true) return [3 /*break*/, 4]; - return [4 /*yield*/, fetch("https://api.github.com/orgs/".concat(GITHUB_ORG, "/repos?type=public&per_page=100&page=").concat(page), { - headers: headers, - })]; - case 2: - resp = _a.sent(); - if (!resp.ok) { - throw new Error("Failed to fetch org repos: ".concat(resp.status, " ").concat(resp.statusText)); - } - return [4 /*yield*/, resp.json()]; - case 3: - data = _a.sent(); - repos.push.apply(repos, data); - if (!Array.isArray(data) || data.length < 100) - return [3 /*break*/, 4]; - page++; - return [3 /*break*/, 1]; - case 4: return [2 /*return*/, repos]; - } - }); - }); }, []); - var fetchMergedPRsForRepo = (0, react_1.useCallback)(function (repoName, headers) { return __awaiter(_this, void 0, void 0, function () { - var mergedPRs, firstResp, firstPRs, firstPageMerged, pagePromises, maxPages, i, remainingPages; - var _this = this; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - mergedPRs = []; - return [4 /*yield*/, fetch("https://api.github.com/repos/".concat(GITHUB_ORG, "/").concat(repoName, "/pulls?state=closed&per_page=100&page=1"), { headers: headers })]; - case 1: - firstResp = _a.sent(); - if (!firstResp.ok) { - console.warn("Failed to fetch PRs for ".concat(repoName, ": ").concat(firstResp.status, " ").concat(firstResp.statusText)); - return [2 /*return*/, []]; - } - return [4 /*yield*/, firstResp.json()]; - case 2: - firstPRs = _a.sent(); - if (!Array.isArray(firstPRs) || firstPRs.length === 0) - return [2 /*return*/, []]; - firstPageMerged = firstPRs.filter(function (pr) { return Boolean(pr.merged_at); }); - mergedPRs.push.apply(mergedPRs, firstPageMerged); - // If we got less than 100, that's all there is - if (firstPRs.length < 100) - return [2 /*return*/, mergedPRs]; - pagePromises = []; - maxPages = Math.min(MAX_PAGES_PER_REPO, 10); - for (i = 2; i <= maxPages; i++) { - pagePromises.push(fetch("https://api.github.com/repos/".concat(GITHUB_ORG, "/").concat(repoName, "/pulls?state=closed&per_page=100&page=").concat(i), { headers: headers }) - .then(function (resp) { return __awaiter(_this, void 0, void 0, function () { - var prs; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!resp.ok) - return [2 /*return*/, []]; - return [4 /*yield*/, resp.json()]; - case 1: - prs = _a.sent(); - if (!Array.isArray(prs)) - return [2 /*return*/, []]; - return [2 /*return*/, prs.filter(function (pr) { return Boolean(pr.merged_at); })]; - } - }); - }); }) - .catch(function () { return []; })); - } - return [4 /*yield*/, Promise.all(pagePromises)]; - case 3: - remainingPages = _a.sent(); - remainingPages.forEach(function (pagePRs) { - if (pagePRs.length > 0) - mergedPRs.push.apply(mergedPRs, pagePRs); - }); - return [2 /*return*/, mergedPRs]; - } - }); - }); }, []); - // Enhanced processing function that stores all PR data without filtering - var processBatch = (0, react_1.useCallback)(function (repos, headers) { return __awaiter(_this, void 0, void 0, function () { - var contributorMap, totalMergedPRs, i, batch, promises, results; - var _this = this; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - contributorMap = new Map(); - totalMergedPRs = 0; - i = 0; - _a.label = 1; - case 1: - if (!(i < repos.length)) return [3 /*break*/, 4]; - batch = repos.slice(i, i + MAX_CONCURRENT_REQUESTS); - promises = batch.map(function (repo) { return __awaiter(_this, void 0, void 0, function () { - var mergedPRs, error_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (repo.archived) - return [2 /*return*/, { mergedPRs: [], repoName: repo.name }]; - _a.label = 1; - case 1: - _a.trys.push([1, 3, , 4]); - return [4 /*yield*/, fetchMergedPRsForRepo(repo.name, headers)]; - case 2: - mergedPRs = _a.sent(); - return [2 /*return*/, { mergedPRs: mergedPRs, repoName: repo.name }]; - case 3: - error_1 = _a.sent(); - console.warn("Skipping repo ".concat(repo.name, " due to error:"), error_1); - return [2 /*return*/, { mergedPRs: [], repoName: repo.name }]; - case 4: return [2 /*return*/]; - } - }); - }); }); - return [4 /*yield*/, Promise.all(promises)]; - case 2: - results = _a.sent(); - // Process results from this batch - results.forEach(function (_a) { - var mergedPRs = _a.mergedPRs, repoName = _a.repoName; - totalMergedPRs += mergedPRs.length; - mergedPRs.forEach(function (pr) { - var username = pr.user.login; - if (!contributorMap.has(username)) { - contributorMap.set(username, { - username: username, - avatar: pr.user.avatar_url, - profile: pr.user.html_url, - points: 0, // Will be calculated later based on filter - prs: 0, // Will be calculated later based on filter - allPRDetails: [], // Store all PRs here - }); - } - var contributor = contributorMap.get(username); - // Add detailed PR information to the full list - if (pr.title && pr.html_url && pr.merged_at && pr.number) { - contributor.allPRDetails.push({ - title: pr.title, - url: pr.html_url, - mergedAt: pr.merged_at, - repoName: repoName, - number: pr.number, - }); - } - }); - }); - _a.label = 3; - case 3: - i += MAX_CONCURRENT_REQUESTS; - return [3 /*break*/, 1]; - case 4: return [2 /*return*/, { contributorMap: contributorMap, totalMergedPRs: totalMergedPRs }]; - } - }); - }); }, [fetchMergedPRsForRepo]); - var fetchAllStats = (0, react_1.useCallback)(function (signal) { return __awaiter(_this, void 0, void 0, function () { - var now, headers, _a, orgStats, repos, _b, contributorMap, totalMergedPRs, contributorsArray, err_1; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - setLoading(true); - setError(null); - now = Date.now(); - if (cache.data && (now - cache.timestamp) < CACHE_DURATION) { - setAllContributors(cache.data.contributors); - setLoading(false); - return [2 /*return*/]; - } - if (!token) { - setError("GitHub token not found. Please set customFields.gitToken in docusaurus.config.js."); - setLoading(false); - return [2 /*return*/]; - } - _c.label = 1; - case 1: - _c.trys.push([1, 4, 5, 6]); - headers = { - Authorization: "token ".concat(token), - Accept: "application/vnd.github.v3+json", - }; - return [4 /*yield*/, Promise.all([ - githubService_1.githubService.fetchOrganizationStats(signal), - fetchAllOrgRepos(headers) - ])]; - case 2: - _a = _c.sent(), orgStats = _a[0], repos = _a[1]; - // Set org stats immediately - setGithubStarCount(orgStats.totalStars); - setGithubContributorsCount(orgStats.totalContributors); - setGithubForksCount(orgStats.totalForks); - setGithubReposCount(orgStats.publicRepositories); - setGithubDiscussionsCount(orgStats.discussionsCount); - setLastUpdated(new Date(orgStats.lastUpdated)); - return [4 /*yield*/, processBatch(repos, headers)]; - case 3: - _b = _c.sent(), contributorMap = _b.contributorMap, totalMergedPRs = _b.totalMergedPRs; - contributorsArray = Array.from(contributorMap.values()); - setAllContributors(contributorsArray); - // Cache the results (raw data without filtering) - setCache({ - data: { - contributors: contributorsArray, - rawStats: { totalPRs: totalMergedPRs } - }, - timestamp: now - }); - return [3 /*break*/, 6]; - case 4: - err_1 = _c.sent(); - if (err_1.name !== 'AbortError') { - console.error("Error fetching GitHub organization stats:", err_1); - setError(err_1 instanceof Error ? err_1.message : 'Failed to fetch GitHub stats'); - // Set fallback values on error - setGithubStarCount(0); - setGithubContributorsCount(140); - setGithubForksCount(0); - setGithubReposCount(20); - setGithubDiscussionsCount(0); - } - return [3 /*break*/, 6]; - case 5: - setLoading(false); - return [7 /*endfinally*/]; - case 6: return [2 /*return*/]; - } - }); - }); }, [token, fetchAllOrgRepos, processBatch, cache]); - var clearCache = (0, react_1.useCallback)(function () { - githubService_1.githubService.clearCache(); - setCache({ data: null, timestamp: 0 }); - var abortController = new AbortController(); - fetchAllStats(abortController.signal); - }, [fetchAllStats]); - (0, react_1.useEffect)(function () { - var abortController = new AbortController(); - fetchAllStats(abortController.signal); - return function () { - abortController.abort(); - }; - }, [fetchAllStats]); - var githubStarCountText = (0, react_1.useMemo)(function () { return (0, exports.convertStatToText)(githubStarCount); }, [githubStarCount]); - var githubContributorsCountText = (0, react_1.useMemo)(function () { return (0, exports.convertStatToText)(githubContributorsCount); }, [githubContributorsCount]); - var githubForksCountText = (0, react_1.useMemo)(function () { return (0, exports.convertStatToText)(githubForksCount); }, [githubForksCount]); - var githubReposCountText = (0, react_1.useMemo)(function () { return (0, exports.convertStatToText)(githubReposCount); }, [githubReposCount]); - var githubDiscussionsCountText = (0, react_1.useMemo)(function () { return (0, exports.convertStatToText)(githubDiscussionsCount); }, [githubDiscussionsCount]); - var value = { - githubStarCount: githubStarCount, - githubStarCountText: githubStarCountText, - githubContributorsCount: githubContributorsCount, - githubContributorsCountText: githubContributorsCountText, - githubForksCount: githubForksCount, - githubForksCountText: githubForksCountText, - githubReposCount: githubReposCount, - githubReposCountText: githubReposCountText, - githubDiscussionsCount: githubDiscussionsCount, - githubDiscussionsCountText: githubDiscussionsCountText, - loading: loading, - error: error, - lastUpdated: lastUpdated, - refetch: fetchAllStats, - clearCache: clearCache, - contributors: contributors, - stats: stats, - currentTimeFilter: currentTimeFilter, - setTimeFilter: setTimeFilter, - getFilteredPRsForContributor: getFilteredPRsForContributor, - }; - return ((0, jsx_runtime_1.jsx)(exports.CommunityStatsContext.Provider, { value: value, children: children })); -} -var useCommunityStatsContext = function () { - var context = (0, react_1.useContext)(exports.CommunityStatsContext); - if (context === undefined) { - throw new Error("useCommunityStatsContext must be used within a CommunityStatsProvider"); - } - return context; -}; -exports.useCommunityStatsContext = useCommunityStatsContext; -var convertStatToText = function (num) { - var hasIntlSupport = typeof Intl === "object" && Intl && typeof Intl.NumberFormat === "function"; - if (!hasIntlSupport) { - return "".concat((num / 1000).toFixed(1), "k"); - } - var formatter = new Intl.NumberFormat("en-US", { - notation: "compact", - compactDisplay: "short", - maximumSignificantDigits: 3, - }); - return formatter.format(num); -}; -exports.convertStatToText = convertStatToText; diff --git a/src/lib/utils.js b/src/lib/utils.js deleted file mode 100644 index ea9e8f4c..00000000 --- a/src/lib/utils.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.cn = cn; -var clsx_1 = require("clsx"); -var tailwind_merge_1 = require("tailwind-merge"); -function cn() { - var inputs = []; - for (var _i = 0; _i < arguments.length; _i++) { - inputs[_i] = arguments[_i]; - } - return (0, tailwind_merge_1.twMerge)((0, clsx_1.clsx)(inputs)); -} diff --git a/src/pages/License/index.js b/src/pages/License/index.js deleted file mode 100644 index bc68e177..00000000 --- a/src/pages/License/index.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importDefault(require("react")); -var Layout_1 = __importDefault(require("@theme/Layout")); -var styled_components_1 = __importDefault(require("styled-components")); -// Styled Components -var LicensingContainer = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n max-width: 800px;\n margin: 0 auto;\n padding: 20px;\n border-radius: 5px;\n box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);\n margin-top: 20px;\n margin-bottom: 20px;\n font-size: 16px;\n line-height: 1.6;\n font-family: 'Open Sans', sans-serif;\n text-align: justify;\n"], ["\n max-width: 800px;\n margin: 0 auto;\n padding: 20px;\n border-radius: 5px;\n box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);\n margin-top: 20px;\n margin-bottom: 20px;\n font-size: 16px;\n line-height: 1.6;\n font-family: 'Open Sans', sans-serif;\n text-align: justify;\n"]))); -var Title = styled_components_1.default.h2(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n margin-bottom: 24px;\n font-family: 'Open Sans', sans-serif;\n font-weight: 700;\n line-height: 1.6;\n text-align: center;\n font-size: 27px;\n"], ["\n margin-bottom: 24px;\n font-family: 'Open Sans', sans-serif;\n font-weight: 700;\n line-height: 1.6;\n text-align: center;\n font-size: 27px;\n"]))); -var SubTitle = styled_components_1.default.h3(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n margin-bottom: 20px;\n font-weight: 700;\n"], ["\n margin-bottom: 20px;\n font-weight: 700;\n"]))); -var Content = styled_components_1.default.p(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n margin-bottom: 20px;\n"], ["\n margin-bottom: 20px;\n"]))); -// Licensing Component -var Licensing = function () { - return ((0, jsx_runtime_1.jsx)(Layout_1.default, { title: "Licensing", description: "Licensing information for RecodeHive", children: (0, jsx_runtime_1.jsxs)(LicensingContainer, { children: [(0, jsx_runtime_1.jsx)(Title, { children: "Licensing" }), (0, jsx_runtime_1.jsx)(Content, { children: "Welcome to RecodeHive. This project is licensed under the MIT License. This page outlines the terms of the license and provides details on how you can use, modify, and distribute our project." }), (0, jsx_runtime_1.jsxs)(Content, { children: [(0, jsx_runtime_1.jsx)(SubTitle, { children: "MIT License" }), (0, jsx_runtime_1.jsxs)(Content, { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Copyright (c) 2025 recodehive" }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {}), "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {}), "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {}), "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {})] })] })] }) })); -}; -exports.default = Licensing; -var templateObject_1, templateObject_2, templateObject_3, templateObject_4; diff --git a/src/pages/badges/github-badges.js b/src/pages/badges/github-badges.js deleted file mode 100644 index b6247bbb..00000000 --- a/src/pages/badges/github-badges.js +++ /dev/null @@ -1,122 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importStar(require("react")); -var Head_1 = __importDefault(require("@docusaurus/Head")); -var framer_motion_1 = require("framer-motion"); -var Layout_1 = __importDefault(require("@theme/Layout")); -var ExecutionEnvironment_1 = __importDefault(require("@docusaurus/ExecutionEnvironment")); -// Safe hook for color mode that handles SSR -function useSafeColorMode() { - var _a = (0, react_1.useState)(false), mounted = _a[0], setMounted = _a[1]; - (0, react_1.useEffect)(function () { - setMounted(true); - }, []); - var colorMode = 'light'; - var isDark = false; - if (mounted && ExecutionEnvironment_1.default.canUseDOM) { - try { - var useColorModeHook = require('@docusaurus/theme-common').useColorMode; - var colorModeResult = useColorModeHook(); - colorMode = colorModeResult.colorMode; - isDark = colorMode === 'dark'; - } - catch (error) { - console.warn('Failed to get color mode:', error); - } - } - return { colorMode: colorMode, isDark: isDark, mounted: mounted }; -} -var github_badges_module_css_1 = __importDefault(require("./github-badges.module.css")); -var GithubBadgesContent = function () { - var _a = useSafeColorMode(), colorMode = _a.colorMode, isDark = _a.isDark, mounted = _a.mounted; - // Scroll to top button logic - (0, react_1.useEffect)(function () { - var scrollToTopBtn = document.getElementById("scrollToTop"); - var handleScroll = function () { - if (!scrollToTopBtn) - return; - if (window.scrollY > 200) { - scrollToTopBtn.classList.add("show"); - } - else { - scrollToTopBtn.classList.remove("show"); - } - // Progress bar logic - var progressBar = document.getElementById("progressBar"); - if (progressBar) { - var scrollTop = window.scrollY; - var docHeight = document.documentElement.scrollHeight - window.innerHeight; - var scrollPercent = (scrollTop / docHeight) * 100; - progressBar.style.width = "".concat(scrollPercent, "%"); - } - }; - window.addEventListener("scroll", handleScroll); - return function () { return window.removeEventListener("scroll", handleScroll); }; - }, []); - var handleScrollToTop = function () { - window.scrollTo({ top: 0, behavior: "smooth" }); - }; - return ((0, jsx_runtime_1.jsx)(Layout_1.default, { title: "GitHub Achievements - RecodeHive", description: "Explore GitHub achievements and badges", children: (0, jsx_runtime_1.jsxs)("div", { className: "".concat(github_badges_module_css_1.default["github-badges-page"], " transition-colors duration-300 ").concat(isDark ? 'dark-bg-primary dark-text-primary' : 'bg-white text-black'), children: [(0, jsx_runtime_1.jsxs)(Head_1.default, { children: [(0, jsx_runtime_1.jsx)("title", { children: "GitHub Achievements - RecodeHive" }), (0, jsx_runtime_1.jsx)("meta", { name: "description", content: "Explore GitHub achievements and badges" }), (0, jsx_runtime_1.jsx)("link", { rel: "stylesheet", href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css", integrity: "sha512-iecdLmaskl7CVkqkXNQ/ZH/XLlvWZOJyj7Yy7tcenmpD1ypASozpmT/E0iPtmFIB46ZmdtAc9eNBvH0H/ZpiBw==", crossOrigin: "anonymous", referrerPolicy: "no-referrer" })] }), " ", (0, jsx_runtime_1.jsx)(framer_motion_1.motion.h1, { initial: { opacity: 0, y: -30 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.7, ease: "easeOut" }, style: { display: 'flex', alignItems: 'center', justifyContent: 'center', gap: 10 }, className: github_badges_module_css_1.default.title, children: "\uD83C\uDFC6 GitHub Achievements \uD83C\uDFC6" }), (0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.bannerAchievements, children: (0, jsx_runtime_1.jsx)("strong", { children: "Achievements Banner" }) }), (0, jsx_runtime_1.jsx)("h2", { children: "\uD83D\uDCC3 Achievement List \uD83D\uDCC3" }), (0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.tableWrapper, children: (0, jsx_runtime_1.jsxs)("table", { className: github_badges_module_css_1.default.achievementsTable, children: [(0, jsx_runtime_1.jsx)("thead", { children: (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("th", { children: "Badge" }), (0, jsx_runtime_1.jsx)("th", { children: "Name" }), (0, jsx_runtime_1.jsx)("th", { children: "How to get" }), (0, jsx_runtime_1.jsxs)("th", { children: ["Needed Amount", (0, jsx_runtime_1.jsx)("br", {})] })] }) }), (0, jsx_runtime_1.jsxs)("tbody", { children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.tr, { initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: 0.05 }, whileHover: { scale: 1.02 }, style: { boxShadow: "0 4px 20px rgba(0,0,0,0.07)" }, children: [(0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.img, { src: "https://github.githubassets.com/images/modules/profile/achievements/starstruck-default.png", alt: "Starstruck", className: github_badges_module_css_1.default.badgeImgSmall, whileHover: { scale: 1.13, rotate: -6 }, transition: { type: "spring", stiffness: 300 } }) }), (0, jsx_runtime_1.jsx)("td", { children: "Starstruck" }), (0, jsx_runtime_1.jsxs)("td", { children: ["Create a repository with a lot of stars.", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/sanjay-kv/Open-source-Practice", target: "_blank", rel: "noopener noreferrer", children: "Sample repo" }), (0, jsx_runtime_1.jsx)("br", {}), "If you get the first 16 stars you will unlock the badge.", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("a", { href: "https://youtu.be/v2Pai1TY_Lg", target: "_blank", rel: "noopener noreferrer", children: "Watch the Video Tutorial" })] }), (0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsxs)("div", { className: github_badges_module_css_1.default.badgeLevels, children: [(0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.levelText, children: "Levels: Default, Bronze, Silver, Gold" }), (0, jsx_runtime_1.jsxs)("div", { className: github_badges_module_css_1.default.levelImages, children: [(0, jsx_runtime_1.jsx)("img", { src: "https://github.githubassets.com/images/modules/profile/achievements/starstruck-default.png", alt: "Starstruck Default", title: "Default (16)", className: github_badges_module_css_1.default.badgeImgSmall }), (0, jsx_runtime_1.jsx)("img", { src: "https://github.githubassets.com/images/modules/profile/achievements/starstruck-bronze.png", alt: "Starstruck Bronze", title: "Bronze (128)", className: github_badges_module_css_1.default.badgeImgSmall }), (0, jsx_runtime_1.jsx)("img", { src: "https://github.githubassets.com/images/modules/profile/achievements/starstruck-silver.png", alt: "Starstruck Silver", title: "Silver (512)", className: github_badges_module_css_1.default.badgeImgSmall }), (0, jsx_runtime_1.jsx)("img", { src: "https://github.githubassets.com/images/modules/profile/achievements/starstruck-gold.png", alt: "Starstruck Gold", title: "Gold (4096)", className: github_badges_module_css_1.default.badgeImgSmall })] }), (0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.neededAmount, children: "Needed: 16, 128, 512, 4096" })] }) })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.tr, { initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: 0.10 }, whileHover: { scale: 1.02, boxShadow: "0 4px 20px rgba(0,0,0,0.07)" }, children: [(0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.img, { src: "https://github.githubassets.com/images/modules/profile/achievements/quickdraw-default.png", alt: "Quickdraw", className: github_badges_module_css_1.default.badgeImgSmall, whileHover: { scale: 1.13, rotate: 6 }, transition: { type: "spring", stiffness: 300 } }) }), (0, jsx_runtime_1.jsx)("td", { children: "Quickdraw" }), (0, jsx_runtime_1.jsxs)("td", { children: ["Gitty up!", (0, jsx_runtime_1.jsx)("br", {}), "If you closed an issue / pull request within 5 minutes of opening you will unlock this badge"] }), (0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsxs)("div", { className: github_badges_module_css_1.default.singleBadge, children: [(0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.levelText, children: "Level: Default" }), (0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Quick-Draw/PNG/Skin-Tones/QuickDraw_SkinTone1.png", alt: "Quickdraw Default", className: github_badges_module_css_1.default.badgeImgSmall }), (0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.neededAmount, children: "Needed: 1" })] }) })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.tr, { initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: 0.15 }, whileHover: { scale: 1.02, boxShadow: "0 4px 20px rgba(0,0,0,0.07)" }, children: [(0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.img, { src: "https://github.githubassets.com/images/modules/profile/achievements/pair-extraordinaire-default.png", alt: "Pair Extraordinaire", className: github_badges_module_css_1.default.badgeImgSmall, whileHover: { scale: 1.13, rotate: -8 }, transition: { type: "spring", stiffness: 300 } }) }), (0, jsx_runtime_1.jsx)("td", { children: "Pair Extraordinaire" }), (0, jsx_runtime_1.jsxs)("td", { children: ["Coauthored commits on merged pull request", (0, jsx_runtime_1.jsx)("br", {}), "Requirement: VSCode IDE (bit difficult to get)", (0, jsx_runtime_1.jsx)("br", {}), "You can raise a sample PR ", (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/recodehive/Opensource-practice", target: "_blank", rel: "noopener noreferrer", children: "here" }), " by adding to the existing readme file and tag ", (0, jsx_runtime_1.jsx)("b", { children: "@sanjay-kv" }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("a", { href: "https://youtu.be/BNKSlT8jLQ0", target: "_blank", rel: "noopener noreferrer", children: "Watch the Video Tutorial" })] }), (0, jsx_runtime_1.jsxs)("td", { children: [(0, jsx_runtime_1.jsx)("b", { children: "Needed:" }), " 1, 10, 24, 48", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsxs)("div", { style: { display: "flex", gap: 8, marginTop: 6 }, children: [(0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Pair-Extraordinaire/PNG/PairExtraordinaire.png", alt: "Starstruck Default", title: "Default (16)", className: github_badges_module_css_1.default.badgeImgSmall }), (0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Pair-Extraordinaire/PNG/PairExtraordinaire_Bronze.png", alt: "Starstruck Bronze", title: "Bronze (128)", className: github_badges_module_css_1.default.badgeImgSmall }), (0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Pair-Extraordinaire/PNG/PairExtraordinaire_Silver.png", alt: "Starstruck Silver", title: "Silver (512)", className: github_badges_module_css_1.default.badgeImgSmall }), (0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Pair-Extraordinaire/PNG/PairExtraordinaire_Gold.png", alt: "Starstruck Gold", title: "Gold (4096)", className: github_badges_module_css_1.default.badgeImgSmall })] }), (0, jsx_runtime_1.jsx)("b", { children: "Levels:" }), " Default, Bronze, Silver, Gold"] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.tr, { initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: 0.20 }, whileHover: { scale: 1.02, boxShadow: "0 4px 20px rgba(0,0,0,0.07)" }, children: [(0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.img, { src: "https://github.githubassets.com/images/modules/profile/achievements/pull-shark-default.png", alt: "Pull Shark", className: github_badges_module_css_1.default.badgeImgSmall, whileHover: { scale: 1.13, rotate: 6 }, transition: { type: "spring", stiffness: 300 } }) }), (0, jsx_runtime_1.jsx)("td", { children: "Pull Shark" }), (0, jsx_runtime_1.jsxs)("td", { children: ["Opened a pull request and it should be merged", (0, jsx_runtime_1.jsx)("br", {}), "You can raise a sample PR ", (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/recodehive/resume-pitch", target: "_blank", rel: "noopener noreferrer", children: "here" }), " by adding on existing readme file and tag ", (0, jsx_runtime_1.jsx)("b", { children: "@sanjay-kv" }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("a", { href: "https://youtu.be/7uKMWBFN2jQ", target: "_blank", rel: "noopener noreferrer", children: "Watch the Video Tutorial" })] }), (0, jsx_runtime_1.jsxs)("td", { children: [(0, jsx_runtime_1.jsx)("b", { children: "Needed:" }), " 2, 16, 128, 1024", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsxs)("div", { style: { display: "flex", gap: 8, marginTop: 6 }, children: [(0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Pull-Shark/PNG/PullShark.png", alt: "Starstruck Default", title: "Default (16)", className: github_badges_module_css_1.default.badgeImgSmall }), (0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Pull-Shark/PNG/PullShark_Bronze.png", alt: "Starstruck Bronze", title: "Bronze (128)", className: github_badges_module_css_1.default.badgeImgSmall }), (0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Pull-Shark/PNG/PullShark_Silver.png", alt: "Starstruck Silver", title: "Silver (512)", className: github_badges_module_css_1.default.badgeImgSmall }), (0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Pull-Shark/PNG/PullShark_Gold.png", alt: "Starstruck Gold", title: "Gold (4096)", className: github_badges_module_css_1.default.badgeImgSmall })] }), (0, jsx_runtime_1.jsx)("b", { children: "Levels:" }), " Default, Bronze, Silver, Gold"] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.tr, { initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: 0.25 }, whileHover: { scale: 1.02, boxShadow: "0 4px 20px rgba(0,0,0,0.07)" }, children: [(0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.img, { src: "https://github.githubassets.com/images/modules/profile/achievements/galaxy-brain-default.png", alt: "Galaxy Brain", className: github_badges_module_css_1.default.badgeImgSmall, whileHover: { scale: 1.13, rotate: -8 }, transition: { type: "spring", stiffness: 300 } }) }), (0, jsx_runtime_1.jsx)("td", { children: "Galaxy Brain" }), (0, jsx_runtime_1.jsxs)("td", { children: ["Answered a discussion and someone marked your reply as answer", (0, jsx_runtime_1.jsx)("br", {}), "You can answer some of the discussions ", (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/orgs/recodehive/discussions", target: "_blank", rel: "noopener noreferrer", children: "here" }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("a", { href: "https://youtu.be/v2Pai1TY_Lg", target: "_blank", rel: "noopener noreferrer", children: "Watch the Video Tutorial" })] }), (0, jsx_runtime_1.jsxs)("td", { children: [(0, jsx_runtime_1.jsx)("b", { children: "Needed:" }), " 2, 8, 16, 32", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsxs)("div", { style: { display: "flex", gap: 8, marginTop: 6 }, children: [(0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Galaxy-Brain/PNG/GalaxyBrain.png", alt: "Starstruck Default", title: "Default (16)", className: github_badges_module_css_1.default.badgeImgSmall }), (0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Galaxy-Brain/PNG/GalaxyBrain_Bronze.png", alt: "Starstruck Bronze", title: "Bronze (128)", className: github_badges_module_css_1.default.badgeImgSmall }), (0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Galaxy-Brain/PNG/GalaxyBrain_Silver.png", alt: "Starstruck Silver", title: "Silver (512)", className: github_badges_module_css_1.default.badgeImgSmall }), (0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Galaxy-Brain/PNG/GalaxyBrain_Gold.png", alt: "Starstruck Gold", title: "Gold (4096)", className: github_badges_module_css_1.default.badgeImgSmall })] }), (0, jsx_runtime_1.jsx)("b", { children: "Levels:" }), " Default, Bronze, Silver, Gold"] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.tr, { initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: 0.30 }, whileHover: { scale: 1.02, boxShadow: "0 4px 20px rgba(0,0,0,0.07)" }, children: [(0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.img, { src: "https://github.githubassets.com/images/modules/profile/achievements/yolo-default.png", alt: "YOLO", className: github_badges_module_css_1.default.badgeImgSmall, whileHover: { scale: 1.13, rotate: 8 }, transition: { type: "spring", stiffness: 300 } }) }), (0, jsx_runtime_1.jsx)("td", { children: "YOLO" }), (0, jsx_runtime_1.jsxs)("td", { children: ["Merged a pull request without a review", (0, jsx_runtime_1.jsx)("br", {}), "You can raise a PR ", (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/recodehive/machine-learning-repos", target: "_blank", rel: "noopener noreferrer", children: "here" }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("a", { href: "https://youtu.be/GnHNScuGKrg", target: "_blank", rel: "noopener noreferrer", children: "Watch the Video Tutorial" })] }), (0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsxs)("div", { className: github_badges_module_css_1.default.singleBadge, children: [(0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.levelText, children: "Level: Default" }), (0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/YOLO/PNG/YOLO_Badge.png", alt: "Starstruck Default", title: "Default (16)", className: github_badges_module_css_1.default.badgeImgSmall }), (0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.neededAmount, children: "Needed: 1" })] }) })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.tr, { initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: 0.35 }, whileHover: { scale: 1.02, boxShadow: "0 4px 20px rgba(0,0,0,0.07)" }, children: [(0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.img, { src: "https://github.githubassets.com/images/modules/profile/achievements/public-sponsor-default.png", alt: "Public Sponsor", className: github_badges_module_css_1.default.badgeImgSmall, whileHover: { scale: 1.13, rotate: -6 }, transition: { type: "spring", stiffness: 300 } }) }), (0, jsx_runtime_1.jsx)("td", { children: "Public Sponsor" }), (0, jsx_runtime_1.jsxs)("td", { children: ["GitHub Sponsors.", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/sponsors", target: "_blank", rel: "noopener noreferrer", children: "GitHub Sponsors" }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("a", { href: "https://youtu.be/dcdpkD7lYDg", target: "_blank", rel: "noopener noreferrer", children: "Watch the Video Tutorial" })] }), (0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsxs)("div", { className: github_badges_module_css_1.default.singleBadge, children: [(0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.levelText, children: "Level: Default" }), (0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/GitHub-Sponsor/PNG/GitHubSponsorBadge.png", alt: "Starstruck Default", title: "Default (16)", className: github_badges_module_css_1.default.badgeImgSmall }), (0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.neededAmount, children: "Needed: 1" })] }) })] })] })] }) }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.h2, { className: github_badges_module_css_1.default.skinHeading, initial: { opacity: 0, x: -40 }, whileInView: { opacity: 1, x: 0 }, viewport: { once: true }, transition: { duration: 0.7, delay: 0.1 }, children: [(0, jsx_runtime_1.jsx)("span", { role: "img", "aria-label": "wave", children: "\uD83D\uDC4B" }), " Achievement Skin Tone ", (0, jsx_runtime_1.jsx)("span", { role: "img", "aria-label": "wave", children: "\uD83D\uDC4B" })] }), (0, jsx_runtime_1.jsxs)("p", { className: github_badges_module_css_1.default.paragraph, style: { textAlign: "center" }, children: ["Some achievements' appearance depends on your Emoji Skin Tone Preference.", (0, jsx_runtime_1.jsx)("br", {}), "You can change your preferred Skin Tone by going to", (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/settings/appearance", target: "_blank", rel: "noopener noreferrer", children: "appearance settings" }), "."] }), (0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.tableWrapper, children: (0, jsx_runtime_1.jsxs)("table", { className: github_badges_module_css_1.default.skinToneTable, children: [(0, jsx_runtime_1.jsxs)("thead", { children: [(0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("th", { children: "Badge" }), (0, jsx_runtime_1.jsx)("th", { children: "Name" }), (0, jsx_runtime_1.jsx)("th", { colSpan: 6, children: "Skin Tone Versions" })] }), (0, jsx_runtime_1.jsx)("tr", {})] }), (0, jsx_runtime_1.jsxs)("tbody", { children: [(0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsx)("img", { src: "https://github.githubassets.com/images/modules/profile/achievements/starstruck-default.png", alt: "Starstruck", className: github_badges_module_css_1.default.badgeImgSmall }) }), (0, jsx_runtime_1.jsx)("td", { children: "Starstruck" }), (0, jsx_runtime_1.jsxs)("td", { children: [(0, jsx_runtime_1.jsx)("img", { src: "https://github.githubassets.com/images/modules/profile/achievements/starstruck-default.png", className: github_badges_module_css_1.default.badgeImgSmall }), " \uD83D\uDC4B"] }), (0, jsx_runtime_1.jsxs)("td", { children: [(0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Star-Struck/PNG/Skin-Tones/StarStruck_SkinTone2.png", className: github_badges_module_css_1.default.badgeImgSmall }), " \uD83D\uDC4B\uD83C\uDFFB"] }), (0, jsx_runtime_1.jsxs)("td", { children: [(0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Star-Struck/PNG/Skin-Tones/StarStruck_SkinTone3.png", className: github_badges_module_css_1.default.badgeImgSmall }), " \uD83D\uDC4B\uD83C\uDFFC"] }), (0, jsx_runtime_1.jsxs)("td", { children: [(0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Star-Struck/PNG/Skin-Tones/StarStruck_SkinTone4.png", className: github_badges_module_css_1.default.badgeImgSmall }), " \uD83D\uDC4B\uD83C\uDFFD"] }), (0, jsx_runtime_1.jsxs)("td", { children: [(0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Star-Struck/PNG/Skin-Tones/StarStruck_SkinTone5.png", className: github_badges_module_css_1.default.badgeImgSmall }), " \uD83D\uDC4B\uD83C\uDFFE"] }), (0, jsx_runtime_1.jsxs)("td", { children: [(0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Star-Struck/PNG/Skin-Tones/StarStruck_SkinTone6.png", className: github_badges_module_css_1.default.badgeImgSmall }), " \uD83D\uDC4B\uD83C\uDFFF"] })] }), (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsx)("img", { src: "https://github.githubassets.com/images/modules/profile/achievements/quickdraw-default.png", alt: "Quickdraw", className: github_badges_module_css_1.default.badgeImgSmall }) }), (0, jsx_runtime_1.jsx)("td", { children: "Quickdraw" }), (0, jsx_runtime_1.jsxs)("td", { children: [(0, jsx_runtime_1.jsx)("img", { src: "https://github.githubassets.com/images/modules/profile/achievements/quickdraw-default.png", className: github_badges_module_css_1.default.badgeImgSmall }), " \uD83D\uDC4B"] }), (0, jsx_runtime_1.jsxs)("td", { children: [(0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Quick-Draw/PNG/Skin-Tones/QuickDraw_SkinTone2.png", className: github_badges_module_css_1.default.badgeImgSmall }), " \uD83D\uDC4B\uD83C\uDFFB"] }), (0, jsx_runtime_1.jsxs)("td", { children: [(0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Quick-Draw/PNG/Skin-Tones/QuickDraw_SkinTone3.png", className: github_badges_module_css_1.default.badgeImgSmall }), " \uD83D\uDC4B\uD83C\uDFFC"] }), (0, jsx_runtime_1.jsxs)("td", { children: [(0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Quick-Draw/PNG/Skin-Tones/QuickDraw_SkinTone4.png", className: github_badges_module_css_1.default.badgeImgSmall }), " \uD83D\uDC4B\uD83C\uDFFD"] }), (0, jsx_runtime_1.jsxs)("td", { children: [(0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Quick-Draw/PNG/Skin-Tones/QuickDraw_SkinTone5.png", className: github_badges_module_css_1.default.badgeImgSmall }), " \uD83D\uDC4B\uD83C\uDFFE"] }), (0, jsx_runtime_1.jsxs)("td", { children: [(0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Quick-Draw/PNG/Skin-Tones/QuickDraw_SkinTone6.png", className: github_badges_module_css_1.default.badgeImgSmall }), " \uD83D\uDC4B\uD83C\uDFFF"] })] })] })] }) }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.h2, { className: github_badges_module_css_1.default.highlightsHeading, initial: { opacity: 0, x: 40 }, whileInView: { opacity: 1, x: 0 }, viewport: { once: true }, transition: { duration: 0.7, delay: 0.1 }, children: "\u2728 Highlights Badges \u2728" }), (0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.tableWrapper, children: (0, jsx_runtime_1.jsxs)("table", { className: github_badges_module_css_1.default.highlightsTable, children: [(0, jsx_runtime_1.jsx)("thead", { children: (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("th", { children: "Badge" }), (0, jsx_runtime_1.jsx)("th", { children: "Name" }), (0, jsx_runtime_1.jsx)("th", { children: "How to get" })] }) }), (0, jsx_runtime_1.jsxs)("tbody", { children: [(0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { children: "\u2B50" }), (0, jsx_runtime_1.jsx)("td", { children: "Pro" }), (0, jsx_runtime_1.jsxs)("td", { children: ["Pay for ", (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/pricing", target: "_blank", rel: "noopener noreferrer", children: "GitHub Pro" }), " or if you are student get it free: ", (0, jsx_runtime_1.jsx)("a", { href: "https://youtu.be/knr5gBv-c9c", target: "_blank", rel: "noopener noreferrer", children: "Watch Video" })] })] }), (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { children: "\uD83D\uDCCB" }), (0, jsx_runtime_1.jsx)("td", { children: "Developer Program Member" }), (0, jsx_runtime_1.jsxs)("td", { children: ["Be a registered member of the ", (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/developers", target: "_blank", rel: "noopener noreferrer", children: "GitHub Developer Program" })] })] }), (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { children: "\uD83D\uDD12" }), (0, jsx_runtime_1.jsx)("td", { children: "Security Bug Bounty Hunter" }), (0, jsx_runtime_1.jsxs)("td", { children: ["Helped out hunting down security vulnerabilities at ", (0, jsx_runtime_1.jsx)("a", { href: "https://bounty.github.com/", target: "_blank", rel: "noopener noreferrer", children: "GitHub Security" })] })] }), (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { children: "\uD83C\uDF93" }), (0, jsx_runtime_1.jsx)("td", { children: "GitHub Campus Expert" }), (0, jsx_runtime_1.jsxs)("td", { children: ["Participate in the ", (0, jsx_runtime_1.jsx)("a", { href: "https://education.github.com/experts", target: "_blank", rel: "noopener noreferrer", children: "GitHub Campus Program" })] })] }), (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { children: "\u26A0\uFE0F" }), (0, jsx_runtime_1.jsx)("td", { children: "Security advisory credit" }), (0, jsx_runtime_1.jsxs)("td", { children: ["Have your security advisory submitted to the ", (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/advisories", target: "_blank", rel: "noopener noreferrer", children: "GitHub Advisory Database" }), " accepted"] })] })] })] }) }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.h2, { className: github_badges_module_css_1.default.retiredHeading, initial: { opacity: 0, y: 40 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.7, delay: 0.1 }, children: "\u274C Badges no longer earnable \u274C" }), (0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.tableWrapper, children: (0, jsx_runtime_1.jsxs)("table", { className: github_badges_module_css_1.default.retiredTable, children: [(0, jsx_runtime_1.jsx)("thead", { children: (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("th", { children: "Badge" }), (0, jsx_runtime_1.jsx)("th", { children: "Name" }), (0, jsx_runtime_1.jsx)("th", { children: "How to get" }), (0, jsx_runtime_1.jsx)("th", { children: "Needed Amount" })] }) }), (0, jsx_runtime_1.jsxs)("tbody", { children: [(0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Mars-2020-Contributor/PNG/Mars2020ContributorBadge.png", alt: "Mars 2020 Contributor", className: github_badges_module_css_1.default.badgeImgSmall }) }), (0, jsx_runtime_1.jsx)("td", { children: "Mars 2020 Contributor" }), (0, jsx_runtime_1.jsxs)("td", { children: ["Contributed code to a repository used in the ", (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/readme/featured/nasa-ingenuity-helicopter", target: "_blank", rel: "noopener noreferrer", children: "Mars 2020 Helicopter Mission" })] }), (0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsxs)("div", { className: github_badges_module_css_1.default.neededBox, children: [(0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.neededLabel, children: "DEFAULT" }), (0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/Mars-2020-Contributor/PNG/Mars2020ContributorBadge.png", alt: "Mars 2020 Contributor", className: github_badges_module_css_1.default.badgeImgSmall }), (0, jsx_runtime_1.jsx)("div", { children: "1" })] }) })] }), (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/2020-Arctic-Code-Vault-Contributor/PNG/2020ArcticCodeVaultBadge.png", alt: "Arctic Code Vault Contributor", className: github_badges_module_css_1.default.badgeImgSmall }) }), (0, jsx_runtime_1.jsx)("td", { children: "Arctic Code Vault Contributor" }), (0, jsx_runtime_1.jsxs)("td", { children: ["Contributed code to a repository in the ", (0, jsx_runtime_1.jsx)("a", { href: "https://archiveprogram.github.com/", target: "_blank", rel: "noopener noreferrer", children: "2020 GitHub Archive Program" })] }), (0, jsx_runtime_1.jsx)("td", { children: (0, jsx_runtime_1.jsxs)("div", { className: github_badges_module_css_1.default.neededBox, children: [(0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.neededLabel, children: "DEFAULT" }), (0, jsx_runtime_1.jsx)("img", { src: "https://raw.githubusercontent.com/recodehive/awesome-github-profiles/main/assets/Badges/2020-Arctic-Code-Vault-Contributor/PNG/2020ArcticCodeVaultBadge.png", alt: "Arctic Code Vault Contributor", className: github_badges_module_css_1.default.badgeImgSmall }), (0, jsx_runtime_1.jsx)("div", { children: "1" })] }) })] })] })] }) }), " ", (0, jsx_runtime_1.jsx)("hr", { className: github_badges_module_css_1.default.hr }), (0, jsx_runtime_1.jsxs)("div", { style: { textAlign: "center" }, children: [(0, jsx_runtime_1.jsx)("h2", { className: github_badges_module_css_1.default.subheading, children: "\uD83D\uDEC8 More Information \uD83D\uDEC8" }), (0, jsx_runtime_1.jsxs)("p", { className: github_badges_module_css_1.default.paragraph, children: ["You can find more information about GitHub Badges under this", ' ', (0, jsx_runtime_1.jsx)("a", { href: "https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile", target: "_blank", rel: "noopener noreferrer", children: "link" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: github_badges_module_css_1.default.certificationHero, style: { - display: "flex", - alignItems: "center", - gap: "100px", - flexWrap: "wrap", - borderRadius: "24px", - padding: "32px", - width: "100%", - maxWidth: "100vw", - margin: "0 auto", - }, children: [(0, jsx_runtime_1.jsx)("div", { style: { flex: 1, minWidth: 260 }, children: (0, jsx_runtime_1.jsx)("h1", { style: { margin: 0 }, children: "Showcase your expertise with GitHub" }) }), (0, jsx_runtime_1.jsx)("div", { style: { flex: 1, display: "flex", justifyContent: "flex-end", minWidth: 220, borderRadius: "20px" }, children: (0, jsx_runtime_1.jsx)("img", { src: "https://images.ctfassets.net/wfutmusr1t3h/6eWM76bx8skN2B4Jpvkcil/3ccdafea4229f02802abbd9fc6634a3b/Certifiedtocat_full__2_.svg?w=1280&q=75", alt: "GitHub Certification", style: { - maxHeight: "320px", - width: "auto", - borderRadius: "20px", - maxWidth: "100%", - objectFit: "contain", - background: "#f6f8fa", - padding: "8px" - } }) }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("p", { style: { fontSize: "1.2rem", margin: "16px 0", color: "#000", textAlign: "left" }, children: "Getting GitHub certified is a strong endorsement of your skills and knowledge of the technologies and developer tools used by millions of developers worldwide." }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: github_badges_module_css_1.default.certificationCards, children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "".concat(github_badges_module_css_1.default.certCard), initial: { opacity: 0, x: -50 }, whileInView: { opacity: 1, x: 0 }, viewport: { once: true }, transition: { duration: 0.5 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: github_badges_module_css_1.default.cardContent, children: [(0, jsx_runtime_1.jsx)("h2", { children: "GitHub Foundations" }), (0, jsx_runtime_1.jsx)("p", { children: "Highlight your understanding of the foundational topics and concepts of collaborating, contributing, and working on GitHub. This exam covers collaboration, GitHub products, Git basics, and working within GitHub repositories." }), (0, jsx_runtime_1.jsx)("a", { href: "https://examregistration.github.com/waitlist/foundations", className: github_badges_module_css_1.default.certLink, target: "_blank", rel: "noopener noreferrer", children: "Prepare for the GitHub Foundations exam \u2192" })] }), (0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.certBadge, children: (0, jsx_runtime_1.jsx)("img", { src: "https://images.ctfassets.net/wfutmusr1t3h/1GLjOPbAzxSyIZy7Cvu2Do/4220986cedca60a0cb3eaa1ed21ca5fc/foundations-river-image__1_.png?w=1280&q=75", alt: "GitHub Foundations Badge", style: { borderRadius: "30px" } }) })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "".concat(github_badges_module_css_1.default.certCard), initial: { opacity: 0, x: 50 }, whileInView: { opacity: 1, x: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: 0.1 }, children: [(0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.certBadge, children: (0, jsx_runtime_1.jsx)("img", { src: "https://images.ctfassets.net/wfutmusr1t3h/7xYtTWmQ24xRlS68Do9qiG/a785c50083a579f2530863c230198e98/actions-river-image__1_.png?w=1280&q=75", alt: "GitHub Actions Badge", style: { borderRadius: "30px" } }) }), (0, jsx_runtime_1.jsxs)("div", { className: github_badges_module_css_1.default.cardContent, children: [(0, jsx_runtime_1.jsx)("h2", { children: "GitHub Actions" }), (0, jsx_runtime_1.jsx)("p", { children: "Certify your proficiency in automating workflows and accelerating development with GitHub Actions. Test your skills in streamlining workflows, automating tasks, and optimizing software pipelines, including CI/CD\u2014all within customizable workflows." }), (0, jsx_runtime_1.jsx)("a", { href: "https://examregistration.github.com/waitlist/actions", className: github_badges_module_css_1.default.certLink, target: "_blank", rel: "noopener noreferrer", children: "Prepare for the GitHub Actions exam \u2192" })] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "".concat(github_badges_module_css_1.default.certCard), initial: { opacity: 0, x: -50 }, whileInView: { opacity: 1, x: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: 0.2 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: github_badges_module_css_1.default.cardContent, children: [(0, jsx_runtime_1.jsx)("h2", { children: "GitHub Advanced Security" }), (0, jsx_runtime_1.jsx)("p", { children: "Highlight your code security knowledge with the GitHub Advanced Security certification. Validate your expertise in vulnerability identification, workflow security, and robust security implementation\u2014elevating software integrity standards." }), (0, jsx_runtime_1.jsx)("a", { href: "https://examregistration.github.com/waitlist/security", className: github_badges_module_css_1.default.certLink, target: "_blank", rel: "noopener noreferrer", children: "Prepare for the GitHub Advanced Security exam \u2192" })] }), (0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.certBadge, children: (0, jsx_runtime_1.jsx)("img", { src: "https://images.ctfassets.net/wfutmusr1t3h/1GLjOPbAzxSyIZy7Cvu2Do/4220986cedca60a0cb3eaa1ed21ca5fc/foundations-river-image__1_.png?w=1280&q=75", alt: "GitHub Advanced Security Badge", style: { borderRadius: "30px" } }) })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "".concat(github_badges_module_css_1.default.certCard), initial: { opacity: 0, x: 50 }, whileInView: { opacity: 1, x: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: 0.3 }, children: [(0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.certBadge, children: (0, jsx_runtime_1.jsx)("img", { src: "https://images.ctfassets.net/wfutmusr1t3h/1GLjOPbAzxSyIZy7Cvu2Do/4220986cedca60a0cb3eaa1ed21ca5fc/foundations-river-image__1_.png?w=1280&q=75", alt: "GitHub Administration Badge", style: { borderRadius: "30px" } }) }), (0, jsx_runtime_1.jsxs)("div", { className: github_badges_module_css_1.default.cardContent, children: [(0, jsx_runtime_1.jsx)("h2", { children: "GitHub Administration" }), (0, jsx_runtime_1.jsx)("p", { children: "Certify your ability to optimize and manage a healthy GitHub environment with the GitHub Admin exam. Highlight your expertise in repository management, workflow optimization, and efficient collaboration to support successful projects on GitHub." }), (0, jsx_runtime_1.jsx)("a", { href: "https://examregistration.github.com/waitlist/admin", className: github_badges_module_css_1.default.certLink, target: "_blank", rel: "noopener noreferrer", children: "Prepare for the GitHub Administration exam \u2192" })] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "".concat(github_badges_module_css_1.default.certCard), initial: { opacity: 0, y: 50 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: 0.4 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: github_badges_module_css_1.default.cardContent, children: [(0, jsx_runtime_1.jsx)("h2", { children: "GitHub Copilot" }), (0, jsx_runtime_1.jsx)("p", { children: "The GitHub Copilot certification exam evaluates your skill in using the AI-driven code completion tool in various programming languages, certifying your capability to optimize software development workflows efficiently." }), (0, jsx_runtime_1.jsx)("a", { href: "https://examregistration.github.com/waitlist/copilot", className: github_badges_module_css_1.default.certLink, target: "_blank", rel: "noopener noreferrer", children: "Coming Soon! Join the waitlist now for priority access \u2192" })] }), (0, jsx_runtime_1.jsx)("div", { className: github_badges_module_css_1.default.certBadge, children: (0, jsx_runtime_1.jsx)("img", { src: "https://images.ctfassets.net/wfutmusr1t3h/KdVTNopvz0GZy60xzXCq0/86148a36ddf27ea1d22226f0113b8711/admin-river-image__1_.png?w=1280&q=75", alt: "GitHub Copilot Badge", style: { borderRadius: "50px" } }) }), " "] })] })] }) })); -}; -var handleScrollToTop = function () { - window.scrollTo({ top: 0, behavior: "smooth" }); -}; -var GithubBadges = function () { - return (0, jsx_runtime_1.jsx)(GithubBadgesContent, {}); -}; -exports.default = GithubBadges; diff --git a/src/pages/blogs/index.js b/src/pages/blogs/index.js deleted file mode 100644 index ebee2a75..00000000 --- a/src/pages/blogs/index.js +++ /dev/null @@ -1,105 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = Blogs; -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importStar(require("react")); -var useDocusaurusContext_1 = __importDefault(require("@docusaurus/useDocusaurusContext")); -var Layout_1 = __importDefault(require("@theme/Layout")); -var Link_1 = __importDefault(require("@docusaurus/Link")); -var index_1 = __importDefault(require("../../database/blogs/index")); -var Head_1 = __importDefault(require("@docusaurus/Head")); -require("./blogs-new.css"); -// Author mapping based on actual blog posts -var authorMapping = { - "streamline-ux-ui": ["Sowmiya Venketashan", "Sanjay Viswanthan"], - "ux-ui-design-job": ["Sowmiya Venketashan", "Sanjay Viswanthan"], - "ux-designers-ai": ["Sowmiya Venketashan", "Sanjay Viswanthan"], - "google-deepmind": ["Sowmiya Venketashan", "Sanjay Viswanthan"], - "google-backlinks": ["Sanjay Viswanthan"], - "git-coding-agent": ["Sanjay Viswanthan"], - "spark-architecture": ["Aditya Singh Rathore", "Sanjay Viswanthan"], - "n8n-workflow-automation": ["Aditya Singh Rathore"], -}; -function Blogs() { - var siteConfig = (0, useDocusaurusContext_1.default)().siteConfig; - var _a = (0, react_1.useState)(""), searchTerm = _a[0], setSearchTerm = _a[1]; - var _b = (0, react_1.useState)(index_1.default), filteredBlogs = _b[0], setFilteredBlogs = _b[1]; - // Filter blogs based on search term - (0, react_1.useEffect)(function () { - if (searchTerm.trim() === "") { - setFilteredBlogs(index_1.default); - } - else { - var filtered = index_1.default.filter(function (blog) { - var _a; - return blog.title.toLowerCase().includes(searchTerm.toLowerCase()) || - blog.description.toLowerCase().includes(searchTerm.toLowerCase()) || - ((_a = blog.tags) === null || _a === void 0 ? void 0 : _a.some(function (tag) { return tag.toLowerCase().includes(searchTerm.toLowerCase()); })); - }); - setFilteredBlogs(filtered); - } - }, [searchTerm]); - var handleSearchChange = function (e) { - setSearchTerm(e.target.value); - }; - return ((0, jsx_runtime_1.jsxs)(Layout_1.default, { title: "Blogs from ".concat(siteConfig.title), description: "Welcome to RecodeHive Blogs. Learn the basics to advanced concepts of web development including HTML, CSS, JavaScript, React, Node.js, DSA, and more.", children: [(0, jsx_runtime_1.jsxs)(Head_1.default, { children: [(0, jsx_runtime_1.jsx)("link", { rel: "preconnect", href: "https://fonts.googleapis.com" }), (0, jsx_runtime_1.jsx)("link", { rel: "preconnect", href: "https://fonts.gstatic.com", crossOrigin: "anonymous" }), (0, jsx_runtime_1.jsx)("link", { href: "https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap", rel: "stylesheet" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "blog-page", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-shapes", children: [(0, jsx_runtime_1.jsx)("div", { className: "bg-shape bg-shape-1" }), (0, jsx_runtime_1.jsx)("div", { className: "bg-shape bg-shape-2" }), (0, jsx_runtime_1.jsx)("div", { className: "bg-shape bg-shape-3" }), (0, jsx_runtime_1.jsx)("div", { className: "bg-shape bg-shape-4" }), (0, jsx_runtime_1.jsx)("div", { className: "bg-shape bg-shape-5" })] }), (0, jsx_runtime_1.jsxs)("section", { className: "blog-hero-section", children: [(0, jsx_runtime_1.jsxs)("div", { className: "floating-particles", children: [(0, jsx_runtime_1.jsx)("div", { className: "particle particle-1" }), (0, jsx_runtime_1.jsx)("div", { className: "particle particle-2" }), (0, jsx_runtime_1.jsx)("div", { className: "particle particle-3" }), (0, jsx_runtime_1.jsx)("div", { className: "particle particle-4" }), (0, jsx_runtime_1.jsx)("div", { className: "particle particle-5" }), (0, jsx_runtime_1.jsx)("div", { className: "particle particle-6" })] }), (0, jsx_runtime_1.jsx)("div", { className: "blog-hero-container", children: (0, jsx_runtime_1.jsxs)("div", { className: "hero-content", children: [(0, jsx_runtime_1.jsxs)("h1", { className: "blog-main-title", children: ["Welcome to ", (0, jsx_runtime_1.jsx)("span", { className: "gradient-text", children: "RecodeHive" }), " Blogs"] }), (0, jsx_runtime_1.jsx)("p", { className: "blog-main-subtitle", children: "Discover comprehensive web development articles, tutorials, and insights covering everything from HTML & CSS fundamentals to advanced JavaScript, React, Node.js, Data Structures & Algorithms, and cutting-edge technologies." })] }) })] }), (0, jsx_runtime_1.jsx)("section", { className: "latest-articles-section", children: (0, jsx_runtime_1.jsxs)("div", { className: "articles-container", children: [(0, jsx_runtime_1.jsx)("div", { className: "section-header", children: (0, jsx_runtime_1.jsx)("div", { className: "search-container", children: (0, jsx_runtime_1.jsxs)("div", { className: "search-wrapper", children: [(0, jsx_runtime_1.jsxs)("svg", { className: "search-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", children: [(0, jsx_runtime_1.jsx)("circle", { cx: "11", cy: "11", r: "8" }), (0, jsx_runtime_1.jsx)("path", { d: "m21 21-4.35-4.35" })] }), (0, jsx_runtime_1.jsx)("input", { type: "text", placeholder: "Search articles by title, description, or topic...", className: "search-input", value: searchTerm, onChange: handleSearchChange }), searchTerm && ((0, jsx_runtime_1.jsx)("button", { className: "clear-search-icon", onClick: function () { return setSearchTerm(""); }, "aria-label": "Clear search", children: (0, jsx_runtime_1.jsxs)("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", children: [(0, jsx_runtime_1.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), (0, jsx_runtime_1.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })] }) }))] }) }) }), searchTerm && ((0, jsx_runtime_1.jsx)("div", { className: "search-results-info", children: (0, jsx_runtime_1.jsx)("p", { children: filteredBlogs.length > 0 - ? "Found ".concat(filteredBlogs.length, " article").concat(filteredBlogs.length !== 1 ? 's' : '', " for \"").concat(searchTerm, "\"") - : "No articles found for \"".concat(searchTerm, "\"") }) })), (0, jsx_runtime_1.jsx)("div", { className: "articles-grid", children: filteredBlogs.length > 0 ? (filteredBlogs.map(function (blog, index) { return ((0, jsx_runtime_1.jsx)(BlogCard, { blog: blog, index: index }, blog.id)); })) : ((0, jsx_runtime_1.jsx)("div", { className: "no-results", children: (0, jsx_runtime_1.jsxs)("div", { className: "no-results-content", children: [(0, jsx_runtime_1.jsx)("div", { className: "no-results-icon", children: "\uD83D\uDD0D" }), (0, jsx_runtime_1.jsx)("h3", { children: "No articles found" }), (0, jsx_runtime_1.jsx)("p", { children: "Try adjusting your search terms or browse all articles." }), (0, jsx_runtime_1.jsx)("button", { className: "clear-search-btn", onClick: function () { return setSearchTerm(""); }, children: "Clear Search" })] }) })) })] }) })] })] })); -} -var BlogCard = function (_a) { - var blog = _a.blog, index = _a.index; - // Get category from blog title or description for demo purposes - var getCategory = function (title) { - if (title.toLowerCase().includes('design') || title.toLowerCase().includes('ux')) - return 'Design'; - if (title.toLowerCase().includes('ai') || title.toLowerCase().includes('deepmind')) - return 'AI & Tech'; - if (title.toLowerCase().includes('github') || title.toLowerCase().includes('git')) - return 'Development'; - return 'Resources'; - }; - // Get authors for this blog post - var getAuthors = function (slug) { - var authors = authorMapping[slug] || ["RecodeHive Team"]; - return authors.length > 1 ? authors.join(" & ") : authors[0]; - }; - var category = getCategory(blog.title); - var authorName = getAuthors(blog.slug); - return ((0, jsx_runtime_1.jsxs)("div", { className: "article-card", children: [(0, jsx_runtime_1.jsx)("div", { className: "card-category", children: category }), (0, jsx_runtime_1.jsx)("div", { className: "card-image", children: (0, jsx_runtime_1.jsx)("img", { src: blog.image, alt: blog.title }) }), (0, jsx_runtime_1.jsxs)("div", { className: "card-content", children: [(0, jsx_runtime_1.jsx)("h3", { className: "card-title", children: blog.title }), (0, jsx_runtime_1.jsx)("p", { className: "card-description", children: blog.description }), (0, jsx_runtime_1.jsxs)("div", { className: "card-meta", children: [(0, jsx_runtime_1.jsxs)("div", { className: "card-author", children: [(0, jsx_runtime_1.jsx)("span", { className: "author-avatar", children: "\uD83D\uDC64" }), (0, jsx_runtime_1.jsx)("span", { className: "author-name", "data-full-name": authorName, children: authorName })] }), (0, jsx_runtime_1.jsx)("span", { className: "card-read-time", children: "5 min read" })] }), (0, jsx_runtime_1.jsx)(Link_1.default, { to: "/blog/".concat(blog.slug), className: "card-read-more", children: "Read Article \u2192" })] })] })); -}; diff --git a/src/pages/broadcasts/details.js b/src/pages/broadcasts/details.js deleted file mode 100644 index 8df9dab3..00000000 --- a/src/pages/broadcasts/details.js +++ /dev/null @@ -1,161 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = VideoDetails; -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importStar(require("react")); -var Layout_1 = __importDefault(require("@theme/Layout")); -var router_1 = require("@docusaurus/router"); -require("./video.css"); -require("./index.css"); -require("./details.css"); -// Function to extract YouTube video ID from URL -var getYoutubeVideoId = function (url) { - var videoId = ''; - var normalMatch = url.match(/(?:youtube\.com\/watch\?v=|youtu\.be\/)([^&\s]+)/); - var shortsMatch = url.match(/youtube\.com\/shorts\/([^&\s]+)/); - if (normalMatch) { - videoId = normalMatch[1]; - } - else if (shortsMatch) { - videoId = shortsMatch[1]; - } - return videoId; -}; -function VideoDetails() { - var _this = this; - var location = (0, router_1.useLocation)(); - var history = (0, router_1.useHistory)(); - var state = location.state; - var video = state === null || state === void 0 ? void 0 : state.video; - var _a = (0, react_1.useState)('Loading...'), title = _a[0], setTitle = _a[1]; - (0, react_1.useEffect)(function () { - var fetchVideoTitle = function () { return __awaiter(_this, void 0, void 0, function () { - var response, data, error_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!(video === null || video === void 0 ? void 0 : video.youtubeUrl)) - return [2 /*return*/]; - _a.label = 1; - case 1: - _a.trys.push([1, 4, , 5]); - return [4 /*yield*/, fetch("https://www.youtube.com/oembed?url=".concat(encodeURIComponent(video.youtubeUrl), "&format=json"))]; - case 2: - response = _a.sent(); - return [4 /*yield*/, response.json()]; - case 3: - data = _a.sent(); - setTitle(data.title); - return [3 /*break*/, 5]; - case 4: - error_1 = _a.sent(); - setTitle('Video Title Unavailable'); - console.error('Error fetching video title:', error_1); - return [3 /*break*/, 5]; - case 5: return [2 /*return*/]; - } - }); - }); }; - fetchVideoTitle(); - }, [video === null || video === void 0 ? void 0 : video.youtubeUrl]); - // Random descriptive text about videos - var descriptions = [ - "Watch engaging content that inspires and educates.", - "Experience the power of visual storytelling.", - "Join us on a journey of learning through video.", - "Explore new concepts through dynamic video content.", - "Get inspired by expert insights and demonstrations.", - "Discover trending topics and timely tutorials.", - "Learn from the best in the field.", - "Stay updated with the latest trends and techniques.", - "Enhance your skills through visual learning.", - ]; - // Get a random description - var randomDescription = descriptions[Math.floor(Math.random() * descriptions.length)]; - if (!video) { - return ((0, jsx_runtime_1.jsx)(Layout_1.default, { children: (0, jsx_runtime_1.jsxs)("div", { className: "video-container", children: [(0, jsx_runtime_1.jsx)("h1", { children: "Video Not Found" }), (0, jsx_runtime_1.jsx)("p", { children: "Sorry, we couldn't find the video you're looking for." })] }) })); - } - return ((0, jsx_runtime_1.jsx)(Layout_1.default, { children: (0, jsx_runtime_1.jsx)("div", { className: "video-container", children: (0, jsx_runtime_1.jsx)("div", { className: "video-card details-card", children: (0, jsx_runtime_1.jsxs)("div", { className: "video-content", children: [(0, jsx_runtime_1.jsxs)("div", { className: "video-info", children: [(0, jsx_runtime_1.jsxs)("div", { className: "video-title", children: [(0, jsx_runtime_1.jsx)("h1", { children: title }), (0, jsx_runtime_1.jsx)("div", { className: "video-type", children: video.type === 'shorts' ? '📱 Shorts' : '🎥 Video' })] }), (0, jsx_runtime_1.jsx)("div", { className: "video-description", children: (0, jsx_runtime_1.jsx)("p", { children: randomDescription }) })] }), (0, jsx_runtime_1.jsx)("div", { className: "video-embed-large", children: (0, jsx_runtime_1.jsx)("iframe", { src: "https://www.youtube.com/embed/".concat(getYoutubeVideoId(video.youtubeUrl)).concat(video.type === 'shorts' ? '?loop=1' : ''), frameBorder: "0", allowFullScreen: true, allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture", loading: "eager", title: title }) }), (0, jsx_runtime_1.jsx)("div", { className: "video-meta", children: (0, jsx_runtime_1.jsx)("p", { children: "Watch in full screen for the best viewing experience" }) }), (0, jsx_runtime_1.jsx)("div", { className: "pagination", style: { marginTop: '30px' }, children: (0, jsx_runtime_1.jsx)("button", { onClick: function () { return history.push('/broadcasts'); }, style: { - display: 'inline-block', - padding: '12px 24px', - backgroundColor: '#007bff', - color: 'white', - borderRadius: '8px', - fontWeight: 'bold', - textDecoration: 'none', - boxShadow: '0 4px 6px rgba(0,0,0,0.1)', - border: 'none' - }, children: "\u2190 Back to Videos" }) })] }) }) }) })); -} diff --git a/src/pages/broadcasts/index.js b/src/pages/broadcasts/index.js deleted file mode 100644 index 467abb67..00000000 --- a/src/pages/broadcasts/index.js +++ /dev/null @@ -1,264 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importStar(require("react")); -var Layout_1 = __importDefault(require("@theme/Layout")); -var router_1 = require("@docusaurus/router"); -require("./video.css"); -var getYoutubeVideoId = function (url) { - // Handle youtu.be short links - if (url.includes('youtu.be/')) { - var match = url.match(/youtu\.be\/([^?&\s]+)/); - return match ? match[1].split('?')[0] : ''; - } - // Handle youtube.com/watch?v= links - if (url.includes('youtube.com/watch')) { - var match = url.match(/[?&]v=([^&\s]+)/); - return match ? match[1].split('&')[0] : ''; - } - // Handle youtube.com/shorts/ links - if (url.includes('youtube.com/shorts/')) { - var match = url.match(/shorts\/([^?&\s]+)/); - return match ? match[1].split('?')[0] : ''; - } - return ''; -}; -// Updated function to determine video type -var getYoutubeContentType = function (url) { - if (url.includes('youtu.be/rbi6XhWp2TU') || url.includes('youtu.be/aGyfIrxx1H8') || url.includes('youtu.be/vFS6ZU1WAPA') || url.includes('youtu.be/DWxyEl-t48g')) { - return 'live'; - } - else if (url.includes('/shorts/')) { - return 'other'; // Changed 'shorts' to 'other' - } - else { - return 'video'; - } -}; -// Youtube Video URLS -// List of both videos and shorts which will be handeled by the component -var videoUrls = [ - "https://youtu.be/3dnQ2lDNeGI?list=PLrLTYhoDFx-kiuFiGQqVpYYZ56pIhUW63", - "https://youtu.be/XWjx-RjmhRM?list=PLrLTYhoDFx-kiuFiGQqVpYYZ56pIhUW63", - "https://youtu.be/R7NReLBCT_8?list=PLrLTYhoDFx-kiuFiGQqVpYYZ56pIhUW63", - "https://youtu.be/sbyXpflAXkQ?list=PLrLTYhoDFx-kiuFiGQqVpYYZ56pIhUW63", - "https://youtu.be/7uKMWBFN2jQ?list=PLrLTYhoDFx-kiuFiGQqVpYYZ56pIhUW63", - "https://youtu.be/v2Pai1TY_Lg?list=PLrLTYhoDFx-kiuFiGQqVpYYZ56pIhUW63", - "https://youtu.be/P-P3L7YzlyE?list=PLrLTYhoDFx-kiuFiGQqVpYYZ56pIhUW63", - "https://youtu.be/BNKSlT8jLQ0?list=PLrLTYhoDFx-kiuFiGQqVpYYZ56pIhUW63", - "https://youtu.be/GnHNScuGKrg?list=PLrLTYhoDFx-kiuFiGQqVpYYZ56pIhUW63", - "https://youtu.be/RSR5E1bhu5Y?list=PLrLTYhoDFx-kiuFiGQqVpYYZ56pIhUW63", - "https://youtu.be/knr5gBv-c9c?list=PLrLTYhoDFx-kiuFiGQqVpYYZ56pIhUW63", - "https://youtu.be/4JX-SIkM3uk?list=PLrLTYhoDFx-kiuFiGQqVpYYZ56pIhUW63", - "https://youtu.be/V2nvZYe_q7g?list=PLrLTYhoDFx-kiuFiGQqVpYYZ56pIhUW63", - "https://youtu.be/rbi6XhWp2TU", - "https://youtu.be/aGyfIrxx1H8", - "https://youtu.be/GTe2DJQ-enU", - "https://youtu.be/vFS6ZU1WAPA", - "https://youtu.be/DWxyEl-t48g", -]; -var VideoCard = function (_a) { - var video = _a.video, onClick = _a.onClick; - var _b = (0, react_1.useState)('Loading...'), title = _b[0], setTitle = _b[1]; - var _c = (0, react_1.useState)(''), thumbnailUrl = _c[0], setThumbnailUrl = _c[1]; - var videoId = getYoutubeVideoId(video.youtubeUrl); - // Try different thumbnail qualities in sequence - var tryThumbnailUrl = function (url) { - if (!videoId) - return; - var img = new Image(); - img.crossOrigin = 'anonymous'; // Handle CORS if needed - img.onload = function () { - // Only set the URL if it's not an error image - if (img.width > 0 && img.height > 0) { - setThumbnailUrl(url); - } - else { - handleThumbnailError(url); - } - }; - img.onerror = function () { return handleThumbnailError(url); }; - img.src = url; - }; - var handleThumbnailError = function (failedUrl) { - console.log("Failed to load thumbnail: ".concat(failedUrl)); - if (failedUrl.includes('maxresdefault')) { - // Try hqdefault if maxresdefault fails - tryThumbnailUrl("https://i.ytimg.com/vi/".concat(videoId, "/hqdefault.jpg")); - } - else if (failedUrl.includes('hqdefault')) { - // Try mqdefault if hqdefault fails - tryThumbnailUrl("https://i.ytimg.com/vi/".concat(videoId, "/mqdefault.jpg")); - } - else if (failedUrl.includes('mqdefault')) { - // Try default if mqdefault fails - tryThumbnailUrl("https://i.ytimg.com/vi/".concat(videoId, "/default.jpg")); - } - else { - // All options failed, show placeholder - setThumbnailUrl(''); - } - }; - (0, react_1.useEffect)(function () { - if (!videoId) - return; - // Start with the highest quality thumbnail - console.log("Loading thumbnails for video ID: ".concat(videoId)); - tryThumbnailUrl("https://i.ytimg.com/vi/".concat(videoId, "/maxresdefault.jpg")); - // Also try the first frame as a fallback (sometimes works when others don't) - var firstFrameUrl = "https://img.youtube.com/vi/".concat(videoId, "/0.jpg"); - setTimeout(function () { - if (!thumbnailUrl) { - console.log('Trying first frame as fallback'); - tryThumbnailUrl(firstFrameUrl); - } - }, 1000); - // Fetch video title - var fetchVideoTitle = function () { return __awaiter(void 0, void 0, void 0, function () { - var response, data, error_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 3, , 4]); - return [4 /*yield*/, fetch("https://www.youtube.com/oembed?url=".concat(encodeURIComponent(video.youtubeUrl), "&format=json"))]; - case 1: - response = _a.sent(); - return [4 /*yield*/, response.json()]; - case 2: - data = _a.sent(); - setTitle(data.title); - return [3 /*break*/, 4]; - case 3: - error_1 = _a.sent(); - setTitle('Video Title Unavailable'); - console.error('Error fetching video title:', error_1); - return [3 /*break*/, 4]; - case 4: return [2 /*return*/]; - } - }); - }); }; - fetchVideoTitle(); - }, [video.youtubeUrl, videoId]); - return ((0, jsx_runtime_1.jsx)("div", { className: "video-card", onClick: function (e) { return onClick(video, e); }, role: "button", tabIndex: 0, onKeyDown: function (e) { - if (e.key === 'Enter' || e.key === ' ') - onClick(video, e); - }, children: (0, jsx_runtime_1.jsxs)("div", { className: "video-content", children: [(0, jsx_runtime_1.jsxs)("div", { className: "video-info", children: [(0, jsx_runtime_1.jsx)("div", { className: "video-title", style: { color: '#333', fontWeight: '600' }, children: title }), (0, jsx_runtime_1.jsx)("div", { className: "video-type" })] }), (0, jsx_runtime_1.jsx)("div", { className: "video-thumbnail", children: (0, jsx_runtime_1.jsx)("div", { className: "thumbnail-container", children: thumbnailUrl ? ((0, jsx_runtime_1.jsx)("img", { src: thumbnailUrl, alt: title, className: "thumbnail-img", style: { objectFit: 'cover' }, loading: "lazy", onError: function (e) { - var img = e.target; - console.log('Image error:', img.src); - // Let the parent component handle the error - setThumbnailUrl(''); - } })) : ((0, jsx_runtime_1.jsx)("div", { className: "thumbnail-placeholder", children: (0, jsx_runtime_1.jsx)("span", { children: "Loading thumbnail..." }) })) }) })] }) })); -}; -var VideoSection = function (_a) { - var title = _a.title, videos = _a.videos, onClick = _a.onClick; - if (videos.length === 0) - return null; - return ((0, jsx_runtime_1.jsxs)("div", { className: "video-section", children: [(0, jsx_runtime_1.jsx)("h2", { children: title }), (0, jsx_runtime_1.jsx)("div", { className: "video-grid", children: videos.map(function (video) { return ((0, jsx_runtime_1.jsx)(VideoCard, { video: video, onClick: onClick }, video.id)); }) })] })); -}; -var Pagination = function (_a) { - var currentPage = _a.currentPage, totalPages = _a.totalPages, setCurrentPage = _a.setCurrentPage; - return ((0, jsx_runtime_1.jsxs)("div", { className: "pagination", children: [(0, jsx_runtime_1.jsx)("button", { disabled: currentPage === 1, onClick: function () { return setCurrentPage(currentPage - 1); }, title: "Previous page", children: "\u2190 Previous" }), (0, jsx_runtime_1.jsxs)("span", { children: ["Page ", currentPage, " of ", totalPages] }), (0, jsx_runtime_1.jsx)("button", { disabled: currentPage === totalPages, onClick: function () { return setCurrentPage(currentPage + 1); }, title: "Next page", children: "Next \u2192" })] })); -}; -function BroadcastsPage() { - var history = (0, router_1.useHistory)(); - var _a = (0, react_1.useState)(1), currentPage = _a[0], setCurrentPage = _a[1]; - var _b = (0, react_1.useState)('videos'), activeTab = _b[0], setActiveTab = _b[1]; // Changed 'shorts' to 'live' - var videosPerPage = 12; - var videoData = videoUrls.map(function (url, index) { return ({ - id: String(index + 1), - youtubeUrl: url, - type: getYoutubeContentType(url), - }); }); - var regularVideos = videoData.filter(function (video) { return video.type === 'video'; }); - var liveVideos = videoData.filter(function (video) { return video.type === 'live'; }); // Changed 'shorts' to 'live' - var otherVideos = videoData.filter(function (video) { return video.type === 'other'; }); - var indexOfLastVideo = currentPage * videosPerPage; - var indexOfFirstVideo = indexOfLastVideo - videosPerPage; - var paginatedVideos = regularVideos.slice(indexOfFirstVideo, indexOfLastVideo); - var paginatedLiveVideos = liveVideos.slice(indexOfFirstVideo, indexOfLastVideo); // Changed 'shorts' to 'live' - var totalPages = Math.ceil((activeTab === 'videos' ? regularVideos.length : liveVideos.length) / videosPerPage); // Changed 'shorts' to 'live' - (0, react_1.useEffect)(function () { - setCurrentPage(1); - }, [activeTab]); - var handleVideoClick = function (video, event) { - var target = event.target; - if (target.tagName === 'IFRAME' || target.className === 'video-embed') - return; - history.push('/broadcasts/details', { video: video }); - }; - return ((0, jsx_runtime_1.jsx)(Layout_1.default, { children: (0, jsx_runtime_1.jsxs)("div", { className: "video-container", children: [(0, jsx_runtime_1.jsx)("h1", { children: "Featured Content" }), (0, jsx_runtime_1.jsx)("p", { className: "video-subtitle", children: "Watch our curated collection of videos and shorts" }), (0, jsx_runtime_1.jsxs)("div", { className: "video-tabs", children: [(0, jsx_runtime_1.jsx)("button", { className: "tab-button ".concat(activeTab === 'videos' ? 'active' : ''), onClick: function () { return setActiveTab('videos'); }, children: "\uD83C\uDFA5 Videos" }), (0, jsx_runtime_1.jsx)("button", { className: "tab-button ".concat(activeTab === 'live' ? 'active' : ''), onClick: function () { return setActiveTab('live'); }, children: "\uD83D\uDD34 Past Live" })] }), activeTab === 'videos' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(VideoSection, { title: "Latest Videos", videos: paginatedVideos, onClick: handleVideoClick }), (0, jsx_runtime_1.jsx)(Pagination, { currentPage: currentPage, totalPages: totalPages, setCurrentPage: setCurrentPage })] })), activeTab === 'live' && ( // Changed 'shorts' to 'live' - (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(VideoSection, { title: "Past Live Videos", videos: paginatedLiveVideos, onClick: handleVideoClick }), (0, jsx_runtime_1.jsx)(Pagination, { currentPage: currentPage, totalPages: totalPages, setCurrentPage: setCurrentPage })] }))] }) })); -} -exports.default = BroadcastsPage; diff --git a/src/pages/careers/index.js b/src/pages/careers/index.js deleted file mode 100644 index 964ff620..00000000 --- a/src/pages/careers/index.js +++ /dev/null @@ -1,280 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = CareersPage; -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importStar(require("react")); -var Layout_1 = __importDefault(require("@theme/Layout")); -var Head_1 = __importDefault(require("@docusaurus/Head")); -var framer_motion_1 = require("framer-motion"); -var Link_1 = __importDefault(require("@docusaurus/Link")); -// removed useColorMode import to avoid provider + SSR issues -var ExecutionEnvironment_1 = __importDefault(require("@docusaurus/ExecutionEnvironment")); -// Safe hook for color mode that handles SSR -function useSafeColorMode() { - var _a = (0, react_1.useState)(false), mounted = _a[0], setMounted = _a[1]; - var _b = (0, react_1.useState)('light'), colorMode = _b[0], setColorMode = _b[1]; - var _c = (0, react_1.useState)(false), isDark = _c[0], setIsDark = _c[1]; - (0, react_1.useEffect)(function () { - setMounted(true); - if (!ExecutionEnvironment_1.default.canUseDOM) - return; - var getThemeFromDOM = function () { - return document.documentElement.getAttribute('data-theme') || 'light'; - }; - var applyTheme = function () { - var mode = getThemeFromDOM(); - setColorMode(mode); - setIsDark(mode === 'dark'); - }; - // set immediately on mount - applyTheme(); - // watch for changes when navbar toggle is clicked - var observer = new MutationObserver(applyTheme); - observer.observe(document.documentElement, { - attributes: true, - attributeFilter: ['data-theme'], - }); - return function () { return observer.disconnect(); }; - }, []); - return { colorMode: colorMode, isDark: isDark, mounted: mounted }; -} -// Animation variants for consistent animations -var fadeIn = { - hidden: { opacity: 0, y: 20 }, - visible: { opacity: 1, y: 0, transition: { duration: 0.6 } } -}; -var staggerContainer = { - hidden: {}, - visible: { - transition: { - staggerChildren: 0.2 - } - } -}; -// Sample data for the careers page -var perks = [ - { - icon: "🏠", - title: "Remote First", - description: "Work from anywhere in the world with flexible hours that suit your lifestyle." - }, - { - icon: "💰", - title: "Competitive Salary", - description: "We offer competitive compensation packages with equity options." - }, - { - icon: "🎓", - title: "Learning & Development", - description: "Annual learning budget and conference allowances to grow your skills." - }, - { - icon: "🏥", - title: "Health & Wellness", - description: "Comprehensive health insurance and wellness programs for you and your family." - }, - { - icon: "🌴", - title: "Unlimited PTO", - description: "Take the time you need to recharge and maintain work-life balance." - }, - { - icon: "🚀", - title: "Career Growth", - description: "Clear career progression paths with mentorship and leadership opportunities." - } -]; -var cultureValues = [ - { - title: "Innovation First", - description: "We embrace new technologies and creative solutions to solve complex problems.", - image: "/img/culture-innovation.jpg" - }, - { - title: "Collaboration", - description: "We believe in the power of teamwork and diverse perspectives.", - image: "/img/culture-collaboration.jpg" - }, - { - title: "Growth Mindset", - description: "We're committed to continuous learning and personal development.", - image: "/img/culture-growth.jpg" - } -]; -var jobOpenings = [ - { - title: "Frontend Developer", - department: "Engineering", - location: "Remote", - type: "Full-time", - description: "Build beautiful and responsive user interfaces using React and modern web technologies." - }, - { - title: "Backend Developer", - department: "Engineering", - location: "Remote", - type: "Full-time", - description: "Design and develop scalable backend services and APIs using Node.js and cloud technologies." - }, - { - title: "DevOps Engineer", - department: "Engineering", - location: "Remote", - type: "Full-time", - description: "Manage infrastructure, CI/CD pipelines, and ensure system reliability and scalability." - }, - { - title: "Technical Writer", - department: "Content", - location: "Remote", - type: "Part-time", - description: "Create engaging technical documentation and educational content for our community." - } -]; -var testimonials = [ - { - name: "Sarah Chen", - role: "Senior Frontend Developer", - content: "RecodeHive has given me the opportunity to work on cutting-edge projects while maintaining an amazing work-life balance. The team is incredibly supportive and collaborative.", - avatar: "/img/testimonial-sarah.jpg" - }, - { - name: "Marcus Johnson", - role: "DevOps Engineer", - content: "I love the remote-first culture here. The flexibility to work from anywhere has allowed me to travel while building my career. The learning opportunities are endless.", - avatar: "/img/testimonial-marcus.jpg" - }, - { - name: "Priya Patel", - role: "Product Manager", - content: "The growth mindset at RecodeHive is real. I've been able to take on new challenges and expand my skill set with full support from leadership.", - avatar: "/img/testimonial-priya.jpg" - } -]; -function CareersContent() { - var _a = useSafeColorMode(), colorMode = _a.colorMode, isDark = _a.isDark, mounted = _a.mounted; - var _b = (0, react_1.useState)(0), activeTestimonial = _b[0], setActiveTestimonial = _b[1]; - (0, react_1.useEffect)(function () { - var interval = setInterval(function () { - setActiveTestimonial(function (prev) { return (prev + 1) % testimonials.length; }); - }, 5000); - return function () { return clearInterval(interval); }; - }, []); - return ((0, jsx_runtime_1.jsxs)(Layout_1.default, { title: "Careers - Join RecodeHive", description: "Join our team of passionate developers and help shape the future of coding education. Explore career opportunities at RecodeHive.", children: [(0, jsx_runtime_1.jsxs)(Head_1.default, { children: [(0, jsx_runtime_1.jsx)("title", { children: "Careers - Join RecodeHive" }), (0, jsx_runtime_1.jsx)("meta", { name: "description", content: "Join our team of passionate developers and help shape the future of coding education. Explore career opportunities at RecodeHive." })] }), (0, jsx_runtime_1.jsxs)("div", { className: "careers-page transition-colors duration-300 min-h-screen ".concat(isDark - ? 'bg-gray-900' - : 'bg-gradient-to-b from-white to-gray-50'), children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.section, { className: "hero-section py-20 px-4 text-center bg-gradient-to-br from-blue-600 via-purple-600 to-blue-800 text-white relative overflow-hidden", initial: "hidden", animate: "visible", variants: staggerContainer, children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 bg-black/20" }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10 max-w-4xl mx-auto", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.h1, { className: "text-5xl md:text-6xl font-bold mb-6 bg-clip-text text-transparent bg-gradient-to-r from-white to-blue-100", variants: fadeIn, children: "Join the Future of Code Education" }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.p, { className: "text-xl md:text-2xl mb-8 text-blue-100", variants: fadeIn, children: "Help us build the next generation of developers. Work with a passionate team creating impact through education." }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "flex flex-col sm:flex-row gap-4 justify-center", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)(Link_1.default, { href: "#open-positions", className: "bg-white text-blue-600 px-8 py-4 rounded-lg font-semibold hover:bg-blue-50 transition-all duration-300 transform hover:scale-105 shadow-lg", children: "View Open Positions" }), (0, jsx_runtime_1.jsx)(Link_1.default, { href: "#our-culture", className: "bg-white text-blue-600 px-8 py-4 rounded-lg font-semibold hover:bg-blue-50 transition-all duration-300 transform hover:scale-105 shadow-lg", children: "Learn About Our Culture" })] })] })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.section, { id: "culture", className: "culture-section py-20 px-4", style: { - backgroundColor: isDark ? '#111827' : '#ffffff' - }, initial: "hidden", whileInView: "visible", viewport: { once: true }, variants: staggerContainer, children: (0, jsx_runtime_1.jsxs)("div", { className: "max-w-6xl mx-auto", children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "text-center mb-16", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("h2", { className: "text-4xl md:text-5xl font-bold mb-6", id: "our-culture", style: { - color: isDark ? '#ffffff' : '#111827' - }, children: "Our Culture & Values" }), (0, jsx_runtime_1.jsx)("div", { className: "w-full flex justify-center", style: { - display: 'flex', - justifyContent: 'center', - alignItems: 'center' - }, children: (0, jsx_runtime_1.jsx)("p", { className: "text-xl max-w-3xl", style: { - color: isDark ? '#d1d5db' : '#4b5563', - textAlign: 'center', - margin: '0 auto' - }, children: "We're building more than just a company\u2014we're creating a community of learners, innovators, and leaders." }) })] }), (0, jsx_runtime_1.jsx)("div", { className: "grid md:grid-cols-3 gap-8", children: cultureValues.map(function (value, index) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "culture-card rounded-xl shadow-lg p-8 hover:shadow-xl transition-all duration-300 transform hover:scale-105", style: { - backgroundColor: isDark ? '#0f172a' : '#ffffff' - }, variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("div", { className: "h-48 bg-gradient-to-br from-blue-400 to-purple-500 rounded-lg mb-6 flex items-center justify-center", children: (0, jsx_runtime_1.jsx)("span", { className: "text-6xl", children: "\uD83D\uDE80" }) }), (0, jsx_runtime_1.jsx)("h3", { className: "text-2xl font-bold mb-4", style: { - color: isDark ? '#ffffff' : '#111827' - }, children: value.title }), (0, jsx_runtime_1.jsx)("p", { style: { - color: isDark ? '#d1d5db' : '#4b5563' - }, children: value.description })] }, index)); }) })] }) }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.section, { className: "perks-section py-20 px-4", style: { - backgroundColor: isDark ? '#0f172a' : '#f9fafb' - }, initial: "hidden", whileInView: "visible", viewport: { once: true }, variants: staggerContainer, children: (0, jsx_runtime_1.jsxs)("div", { className: "max-w-6xl mx-auto", children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "text-center mb-16", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("h2", { className: "text-4xl md:text-5xl font-bold mb-6", style: { - color: isDark ? '#ffffff' : '#111827' - }, children: "Perks & Benefits" }), (0, jsx_runtime_1.jsx)("div", { className: "w-full flex justify-center", style: { - display: 'flex', - justifyContent: 'center', - alignItems: 'center' - }, children: (0, jsx_runtime_1.jsx)("p", { className: "text-xl max-w-3xl", style: { - color: isDark ? '#d1d5db' : '#4b5563', - textAlign: 'center', - margin: '0 auto' - }, children: "We take care of our team so they can focus on doing their best work." }) })] }), (0, jsx_runtime_1.jsx)("div", { className: "grid md:grid-cols-2 lg:grid-cols-3 gap-8", children: perks.map(function (perk, index) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "perk-card rounded-xl p-6 shadow-lg hover:shadow-xl transition-all duration-300 transform hover:scale-105", style: { - backgroundColor: isDark ? '#1f2937' : '#ffffff' - }, variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("div", { className: "text-4xl mb-4", children: perk.icon }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-bold mb-3", style: { - color: isDark ? '#ffffff' : '#111827' - }, children: perk.title }), (0, jsx_runtime_1.jsx)("p", { style: { - color: isDark ? '#d1d5db' : '#4b5563' - }, children: perk.description })] }, index)); }) })] }) }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.section, { id: "openings", className: "jobs-section py-20 px-4", style: { - backgroundColor: isDark ? '#111827' : '#ffffff' - }, initial: "hidden", whileInView: "visible", viewport: { once: true }, variants: staggerContainer, children: (0, jsx_runtime_1.jsxs)("div", { className: "max-w-6xl mx-auto", children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "text-center mb-16", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("h2", { className: "text-4xl md:text-5xl font-bold mb-6", id: "open-positions", style: { - color: isDark ? '#ffffff' : '#111827' - }, children: "Open Positions" }), (0, jsx_runtime_1.jsx)("p", { className: "text-xl max-w-3xl mx-auto text-center", style: { - color: isDark ? '#d1d5db' : '#4b5563' - }, children: "Find your next opportunity and help us build the future of coding education." })] }), (0, jsx_runtime_1.jsx)("div", { className: "space-y-6", children: jobOpenings.map(function (job, index) { return ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "job-card rounded-xl p-6 shadow-lg hover:shadow-xl transition-all duration-300", style: { - backgroundColor: isDark ? '#1f2937' : '#ffffff' - }, variants: fadeIn, children: (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col md:flex-row md:items-center md:justify-between", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex-1", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col md:flex-row md:items-center gap-4 mb-4", children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-2xl font-bold", style: { - color: isDark ? '#ffffff' : '#111827' - }, children: job.title }), (0, jsx_runtime_1.jsxs)("div", { className: "flex gap-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "px-3 py-1 rounded-full text-sm ".concat(isDark - ? 'bg-blue-900 text-blue-200' - : 'bg-blue-100 text-blue-800'), children: job.department }), (0, jsx_runtime_1.jsx)("span", { className: "px-3 py-1 rounded-full text-sm ".concat(isDark - ? 'bg-green-900 text-green-200' - : 'bg-green-100 text-green-800'), children: job.location }), (0, jsx_runtime_1.jsx)("span", { className: "px-3 py-1 rounded-full text-sm ".concat(isDark - ? 'bg-purple-900 text-purple-200' - : 'bg-purple-100 text-purple-800'), children: job.type })] })] }), (0, jsx_runtime_1.jsx)("p", { className: "mb-4", style: { - color: isDark ? '#d1d5db' : '#4b5563' - }, children: job.description })] }), (0, jsx_runtime_1.jsx)("div", { className: "md:ml-6", children: (0, jsx_runtime_1.jsx)(Link_1.default, { to: "/contact-us", className: "bg-blue-600 hover:bg-blue-700 px-6 py-3 rounded-lg font-semibold transition-all duration-300 transform hover:scale-105 shadow-lg inline-block", style: { - color: '#ffffff', - textDecoration: 'none' - }, children: "Apply Now" }) })] }) }, index)); }) })] }) }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.section, { className: "testimonials-section py-20 px-4", style: { - backgroundColor: isDark ? '#0f172a' : '#f9fafb' - }, initial: "hidden", whileInView: "visible", viewport: { once: true }, variants: staggerContainer, children: (0, jsx_runtime_1.jsxs)("div", { className: "max-w-4xl mx-auto", children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "text-center mb-16", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("h2", { className: "text-4xl md:text-5xl font-bold mb-6", style: { - color: isDark ? '#ffffff' : '#111827' - }, children: "What Our Team Says" }), (0, jsx_runtime_1.jsx)("p", { className: "text-xl text-center", style: { - color: isDark ? '#d1d5db' : '#4b5563' - }, children: "Hear from our team members about their experience at RecodeHive." })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "testimonial-carousel rounded-xl p-8 shadow-lg", style: { - backgroundColor: isDark ? '#111827' : '#ffffff' - }, variants: fadeIn, children: [(0, jsx_runtime_1.jsxs)("div", { className: "testimonial-content text-center", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-20 h-20 bg-gradient-to-br from-blue-400 to-purple-500 rounded-full mx-auto mb-6 flex items center justify-center", children: (0, jsx_runtime_1.jsx)("span", { className: "text-2xl", children: "\uD83D\uDC64" }) }), (0, jsx_runtime_1.jsxs)("blockquote", { className: "text-lg md:text-xl mb-6 italic", style: { - color: isDark ? '#d1d5db' : '#374151' - }, children: ["\"", testimonials[activeTestimonial].content, "\""] }), (0, jsx_runtime_1.jsxs)("div", { className: "testimonial-author", children: [(0, jsx_runtime_1.jsx)("h4", { className: "text-xl font-bold", style: { - color: isDark ? '#ffffff' : '#111827' - }, children: testimonials[activeTestimonial].name }), (0, jsx_runtime_1.jsx)("p", { style: { - color: isDark ? '#9ca3af' : '#4b5563' - }, children: testimonials[activeTestimonial].role })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "flex justify-center mt-8 gap-2", children: testimonials.map(function (_, index) { return ((0, jsx_runtime_1.jsx)("button", { className: "w-3 h-3 rounded-full transition-all duration-300 ".concat(index === activeTestimonial - ? 'bg-blue-600 scale-110' - : isDark - ? 'bg-gray-600 hover:bg-gray-500' - : 'bg-gray-300 hover:bg-gray-400'), onClick: function () { return setActiveTestimonial(index); } }, index)); }) })] })] }) }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.section, { className: "cta-section py-20 px-4 bg-gradient-to-br from-blue-600 via-purple-600 to-blue-800 text-white text-center", initial: "hidden", whileInView: "visible", viewport: { once: true }, variants: staggerContainer, children: (0, jsx_runtime_1.jsxs)("div", { className: "max-w-4xl mx-auto", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.h2, { className: "text-4xl md:text-5xl font-bold mb-6", variants: fadeIn, children: "Ready to Shape the Future?" }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.p, { className: "text-xl mb-8 text-blue-100", variants: fadeIn, children: "Don't see a perfect fit? We're always looking for talented individuals to join our mission." }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "flex flex-col sm:flex-row gap-4 justify-center", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)(Link_1.default, { to: "/contact-us", className: "bg-white text-blue-600 px-8 py-4 rounded-lg font-semibold hover:bg-blue-50 transition-all duration-300 transform hover:scale-105 shadow-lg", children: "Get In Touch" }), (0, jsx_runtime_1.jsx)(Link_1.default, { to: "/community", className: "bg-white text-blue-600 px-8 py-4 rounded-lg font-semibold hover:bg-blue-50 transition-all duration-300 transform hover:scale-105 shadow-lg", children: "Join Our Community" })] })] }) })] })] })); -} -function CareersPage() { - return (0, jsx_runtime_1.jsx)(CareersContent, {}); -} diff --git a/src/pages/code-of-conduct/index.js b/src/pages/code-of-conduct/index.js deleted file mode 100644 index 9e244393..00000000 --- a/src/pages/code-of-conduct/index.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importDefault(require("react")); -var Layout_1 = __importDefault(require("@theme/Layout")); -var Link_1 = __importDefault(require("@docusaurus/Link")); -var Section = function (_a) { - var title = _a.title, children = _a.children; - return ((0, jsx_runtime_1.jsxs)("section", { className: "mb-6", children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-semibold mb-4", children: title }), children] })); -}; -var ListItem = function (_a) { - var title = _a.title, description = _a.description; - return ((0, jsx_runtime_1.jsxs)("li", { className: "mb-4", children: [(0, jsx_runtime_1.jsx)("strong", { className: "font-medium", children: title }), (0, jsx_runtime_1.jsx)("p", { children: description })] })); -}; -var LastUpdated = function () { return ((0, jsx_runtime_1.jsxs)("p", { className: "text-sm text-gray-600 dark:text-gray-500 mb-4", children: [(0, jsx_runtime_1.jsx)("strong", { children: "Last Updated:" }), " 25th May 2025"] })); }; -var OurPledge = function () { return ((0, jsx_runtime_1.jsxs)(Section, { title: "Our Pledge", children: [(0, jsx_runtime_1.jsx)("p", { className: "mb-4", children: "We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation." }), (0, jsx_runtime_1.jsx)("p", { children: "We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community." })] })); }; -var OurStandards = function () { return ((0, jsx_runtime_1.jsxs)(Section, { title: "Our Standards", children: [(0, jsx_runtime_1.jsx)("p", { className: "mb-4", children: "Examples of behavior that contributes to a positive environment for our community include:" }), (0, jsx_runtime_1.jsxs)("ul", { className: "list-disc list-inside mb-4", children: [(0, jsx_runtime_1.jsx)("li", { children: "Demonstrating empathy and kindness toward other people" }), (0, jsx_runtime_1.jsx)("li", { children: "Being respectful of differing opinions, viewpoints, and experiences" }), (0, jsx_runtime_1.jsx)("li", { children: "Giving and gracefully accepting constructive feedback" }), (0, jsx_runtime_1.jsx)("li", { children: "Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience" }), (0, jsx_runtime_1.jsx)("li", { children: "Focusing on what is best not just for us as individuals, but for the overall community" })] }), (0, jsx_runtime_1.jsx)("p", { className: "mb-4", children: "Examples of unacceptable behavior include:" }), (0, jsx_runtime_1.jsxs)("ul", { className: "list-disc list-inside mb-4", children: [(0, jsx_runtime_1.jsx)("li", { children: "The use of sexualized language or imagery, and sexual attention or advances of any kind" }), (0, jsx_runtime_1.jsx)("li", { children: "Trolling, insulting or derogatory comments, and personal or political attacks" }), (0, jsx_runtime_1.jsx)("li", { children: "Public or private harassment" }), (0, jsx_runtime_1.jsx)("li", { children: "Publishing others' private information, such as a physical or email address, without their explicit permission" }), (0, jsx_runtime_1.jsx)("li", { children: "Other conduct which could reasonably be considered inappropriate in a professional setting" })] })] })); }; -var EnforcementResponsibilities = function () { return ((0, jsx_runtime_1.jsxs)(Section, { title: "Enforcement Responsibilities", children: [(0, jsx_runtime_1.jsx)("p", { className: "mb-4", children: "Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful." }), (0, jsx_runtime_1.jsx)("p", { children: "Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate." })] })); }; -var Scope = function () { return ((0, jsx_runtime_1.jsx)(Section, { title: "Scope", children: (0, jsx_runtime_1.jsx)("p", { children: "This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event." }) })); }; -var Enforcement = function () { return ((0, jsx_runtime_1.jsx)(Section, { title: "Enforcement", children: (0, jsx_runtime_1.jsx)("p", { children: "Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at Email. All complaints will be reviewed and investigated promptly and fairly. All community leaders are obligated to respect the privacy and security of the reporter of any incident." }) })); }; -var EnforcementGuidelines = function () { return ((0, jsx_runtime_1.jsxs)(Section, { title: "Enforcement Guidelines", children: [(0, jsx_runtime_1.jsx)("p", { className: "mb-4", children: "Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:" }), (0, jsx_runtime_1.jsxs)("ol", { className: "list-decimal list-inside mb-4", children: [(0, jsx_runtime_1.jsx)(ListItem, { title: "Correction", description: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Community Impact:" }), " Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("strong", { children: "Consequence:" }), " A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested."] }) }), (0, jsx_runtime_1.jsx)(ListItem, { title: "Warning", description: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Community Impact:" }), " A violation through a single incident or series of actions.", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("strong", { children: "Consequence:" }), " A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period. Violating these terms may lead to a temporary or permanent ban."] }) }), (0, jsx_runtime_1.jsx)(ListItem, { title: "Temporary Ban", description: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Community Impact:" }), " A serious violation of community standards, including sustained inappropriate behavior.", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("strong", { children: "Consequence:" }), " A temporary ban from any interaction or public communication with the community for a specified period. Violating these terms may lead to a permanent ban."] }) }), (0, jsx_runtime_1.jsx)(ListItem, { title: "Permanent Ban", description: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Community Impact:" }), " Demonstrating a pattern of violation of community standards, including harassment of an individual, or disparagement of groups.", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("strong", { children: "Consequence:" }), " A permanent ban from any sort of public interaction within the community."] }) })] })] })); }; -var Attribution = function () { return ((0, jsx_runtime_1.jsxs)(Section, { title: "Attribution", children: [(0, jsx_runtime_1.jsxs)("p", { className: "mb-2", children: ["This Code of Conduct is adapted from the ", (0, jsx_runtime_1.jsx)(Link_1.default, { to: "https://www.contributor-covenant.org/", target: "_blank", rel: "noopener noreferrer", children: "Contributor Covenant" }), ", version 2.0."] }), (0, jsx_runtime_1.jsxs)("p", { children: ["For more details, visit ", (0, jsx_runtime_1.jsx)(Link_1.default, { to: "https://www.contributor-covenant.org/version/2/0/code_of_conduct/", target: "_blank", rel: "noopener noreferrer", children: "here" }), "."] })] })); }; -var CodeOfConduct = function () { return ((0, jsx_runtime_1.jsx)(Layout_1.default, { children: (0, jsx_runtime_1.jsxs)("div", { className: "max-w-4xl mx-auto p-6 mt-5 mb-5 rounded-lg shadow-md", children: [(0, jsx_runtime_1.jsx)("h2", { className: "text-center text-2xl font-bold mb-5", children: "Code Of Conduct" }), (0, jsx_runtime_1.jsxs)("div", { className: "space-y-6", children: [(0, jsx_runtime_1.jsx)(LastUpdated, {}), (0, jsx_runtime_1.jsx)(OurPledge, {}), (0, jsx_runtime_1.jsx)(OurStandards, {}), (0, jsx_runtime_1.jsx)(EnforcementResponsibilities, {}), (0, jsx_runtime_1.jsx)(Scope, {}), (0, jsx_runtime_1.jsx)(Enforcement, {}), (0, jsx_runtime_1.jsx)(EnforcementGuidelines, {}), (0, jsx_runtime_1.jsx)(Attribution, {})] })] }) })); }; -exports.default = CodeOfConduct; diff --git a/src/pages/community/index.js b/src/pages/community/index.js deleted file mode 100644 index 3f3145a8..00000000 --- a/src/pages/community/index.js +++ /dev/null @@ -1,217 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = CommunityPage; -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importStar(require("react")); -var Layout_1 = __importDefault(require("@theme/Layout")); -var Head_1 = __importDefault(require("@docusaurus/Head")); -var framer_motion_1 = require("framer-motion"); -var bottom_to_top_1 = __importDefault(require("@site/src/components/scroll/bottom-to-top")); -require("./community.css"); -var contributionSections = [ - { - id: 'code', - title: 'Code', - icon: '💻', - description: "If you're a developer, you can:", - items: [ - 'Access coding standards 🧑‍💻', - 'Find debugging tips 🐞', - 'Propose new features 🚀' - ], - details: [ - 'Access coding standards and setup instructions to streamline your work with the team\'s codebase.', - 'Find tips for debugging, troubleshooting common errors, and submitting clear bug reports.', - 'Read about how to propose new features, collaborate on pull requests, and review peer code.' - ], - links: [ - { text: 'GitHub', url: 'https://github.com/recodehive' }, - { text: 'GitLab', url: 'https://gitlab.com' } - ], - color: '#8b5cf6' - }, - { - id: 'documentation', - title: 'Documentation', - icon: '📚', - description: "If you're a writer or educator, you can:", - items: [ - 'Improve documentation 🖋️', - 'Structure tutorials 📚', - 'Translate content 🌍' - ], - details: [ - 'Explore detailed guides for improving existing documentation, including style and terminology tips.', - 'Learn how to structure tutorials, add examples, and make learning resources more accessible.', - 'See guidelines for translating technical content into different languages or for various backgrounds.' - ], - links: [ - { text: 'GitHub Docs', url: 'https://www.recodehive.com/docs' } - ], - color: '#f59e0b' - }, - { - id: 'community', - title: 'Community', - icon: '🤝', - description: "If you're a community-minded person, you can:", - items: [ - 'Connect with members 👥', - 'Support newcomers 💬', - 'Share resources 📝' - ], - details: [ - 'Connect with fellow members by joining active discussions in forums and chats.', - 'Offer support to newcomers by guiding them through onboarding and answering beginner questions.', - 'Share resources, tutorials, and best practices to help others grow.' - ], - links: [ - { text: 'Discord', url: 'https://discord.com/invite/w2V2aH6U' }, - { text: 'Whatsapp', url: 'https://chat.whatsapp.com/Izl2yfbFlmY8CExjnIpNkX?mode=ems_copy_t' } - ], - color: '#10b981' - }, - { - id: 'get-started', - title: 'Get Started', - icon: '🚀', - description: 'To begin your journey with RecodeHive:', - items: [ - 'Sign up and introduce yourself 👋', - 'Discover key repositories 🔍', - 'Browse beginner tasks 📋' - ], - details: [ - 'Learn how to sign up and introduce yourself in the welcome channels on Discord or Slack.', - 'Discover key open source repositories and find out how you can contribute, regardless of experience level.', - 'Browse a list of beginner-friendly tasks and guides to help select your first area of involvement.' - ], - links: [ - { text: 'Discord', url: 'https://discord.com/invite/w2V2aH6U' }, - { text: 'Whatsapp', url: 'https://chat.whatsapp.com/Izl2yfbFlmY8CExjnIpNkX?mode=ems_copy_t' }, - { text: 'GitHub', url: 'https://github.com/recodehive' } - ], - color: '#6366f1' - } -]; -var tableOfContents = [ - { id: 'how-you-can-contribute', title: 'How You Can Contribute', icon: '⚡' }, - { id: 'code', title: 'Code', icon: '💻' }, - { id: 'documentation', title: 'Documentation', icon: '📚' }, - { id: 'community', title: 'Community', icon: '🤝' }, - { id: 'get-started', title: 'Get Started', icon: '🚀' }, - { id: 'thank-you', title: 'Thank You', icon: '💚' } -]; -function CommunityPage() { - var _a = (0, react_1.useState)(['how-you-can-contribute']), activeSections = _a[0], setActiveSections = _a[1]; - var _b = (0, react_1.useState)(null), selectedSection = _b[0], setSelectedSection = _b[1]; - var _c = (0, react_1.useState)([]), openDropdowns = _c[0], setOpenDropdowns = _c[1]; - (0, react_1.useEffect)(function () { - var handleScroll = function () { - var sections = tableOfContents.map(function (item) { return item.id; }); - var midpoint = window.innerHeight * 0.4; - var visible = []; - sections.forEach(function (id) { - var el = document.getElementById(id); - if (el) { - var rect = el.getBoundingClientRect(); - if (rect.top <= midpoint && rect.bottom >= midpoint) { - visible.push(id); - } - } - }); - if (visible.length === 1) { - var current_1 = visible[0]; - var element = document.getElementById(current_1); - if (element) { - var rowTop_1 = element.offsetTop; - var siblings = sections.filter(function (id) { - var sib = document.getElementById(id); - return sib && sib.offsetTop === rowTop_1; - }); - visible.push.apply(visible, siblings.filter(function (id) { return id !== current_1; })); - } - } - if (visible.length > 0) { - setActiveSections(visible); - if (selectedSection && !visible.includes(selectedSection)) { - setSelectedSection(null); - } - } - }; - window.addEventListener("scroll", handleScroll); - handleScroll(); - return function () { return window.removeEventListener("scroll", handleScroll); }; - }, [selectedSection]); - var scrollToSection = function (sectionId) { - var element = document.getElementById(sectionId); - if (element) { - var offset = 80; - var top_1 = element.offsetTop - offset; - window.scrollTo({ top: top_1, behavior: "smooth" }); - setSelectedSection(sectionId); - } - }; - var toggleDropdown = function (itemId) { - setOpenDropdowns(function (prev) { - return prev.includes(itemId) - ? prev.filter(function (id) { return id !== itemId; }) - : __spreadArray(__spreadArray([], prev, true), [itemId], false); - }); - }; - var _d = (0, react_1.useState)(false), isMobile = _d[0], setIsMobile = _d[1]; - (0, react_1.useEffect)(function () { - var checkMobile = function () { return setIsMobile(window.innerWidth < 768); }; - checkMobile(); - window.addEventListener('resize', checkMobile); - return function () { return window.removeEventListener('resize', checkMobile); }; - }, []); - return ((0, jsx_runtime_1.jsx)(Layout_1.default, { title: "Hive Community", description: "Welcome to RecodeHive \u2014 a community built for everyone to learn, share, and grow.", children: (0, jsx_runtime_1.jsxs)("div", { className: "community-page", children: [(0, jsx_runtime_1.jsxs)(Head_1.default, { children: [(0, jsx_runtime_1.jsx)("meta", { property: "og:title", content: "Hive Community - RecodeHive" }), (0, jsx_runtime_1.jsx)("meta", { property: "og:description", content: "Join our thriving community of developers, designers, and creators." })] }), (0, jsx_runtime_1.jsxs)("main", { className: "community-page", children: [(0, jsx_runtime_1.jsxs)("section", { className: "community-hero", children: [(0, jsx_runtime_1.jsxs)("div", { className: "community-hero-background", children: [(0, jsx_runtime_1.jsx)("div", { className: "hero-particle" }), (0, jsx_runtime_1.jsx)("div", { className: "hero-particle" }), (0, jsx_runtime_1.jsx)("div", { className: "hero-particle" })] }), (0, jsx_runtime_1.jsx)("div", { className: "container", children: (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "community-hero-content", initial: { opacity: 0, y: 30 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.8 }, children: [(0, jsx_runtime_1.jsx)("div", { className: "hero-icon", children: "\uD83D\uDC1D" }), (0, jsx_runtime_1.jsx)("h1", { className: "community-hero-title", children: "Welcome to Hive Community" }), (0, jsx_runtime_1.jsxs)("p", { className: "community-hero-description", children: ["Welcome to ", (0, jsx_runtime_1.jsx)("strong", { children: "RecodeHive" }), " \u2014 a community built for everyone to", ' ', (0, jsx_runtime_1.jsx)("span", { className: "highlight", children: "learn" }), ", ", (0, jsx_runtime_1.jsx)("span", { className: "highlight", children: "share" }), ", and", ' ', (0, jsx_runtime_1.jsx)("span", { className: "highlight", children: "grow" }), ". Whether you're a", ' ', (0, jsx_runtime_1.jsx)("span", { className: "highlight", children: "developer \uD83D\uDC68\u200D\uD83D\uDCBB" }), ", ", (0, jsx_runtime_1.jsx)("span", { className: "highlight", children: "designer \uD83C\uDFA8" }), ", or just someone interested in exploring new ideas \uD83D\uDCA1, we're excited to have you here!"] })] }) })] }), (0, jsx_runtime_1.jsx)("section", { id: "how-you-can-contribute", className: "contribution-header", children: (0, jsx_runtime_1.jsx)("div", { className: "container", children: (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "contribution-header-content", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.6, delay: 0.3 }, children: [(0, jsx_runtime_1.jsx)("div", { className: "contribution-icon", children: "\u26A1" }), (0, jsx_runtime_1.jsx)("h2", { className: "contribution-title", children: "How You Can Contribute" }), (0, jsx_runtime_1.jsx)("p", { className: "contribution-description", children: "There are many ways to get involved in RecodeHive. Here's how you can contribute:" })] }) }) }), (0, jsx_runtime_1.jsx)("section", { className: "community-content", children: (0, jsx_runtime_1.jsx)("div", { className: "container", children: (0, jsx_runtime_1.jsxs)("div", { className: "community-layout", children: [(0, jsx_runtime_1.jsxs)("div", { className: "contribution-sections", children: [contributionSections.map(function (section, index) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { id: section.id, className: "contribution-section ".concat((isMobile ? activeSections.includes(section.id) : selectedSection === section.id) - ? 'selected' - : ''), initial: { opacity: 0, y: 30 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.6, delay: 0.1 * index }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "section-header", children: [(0, jsx_runtime_1.jsx)("div", { className: "section-icon", style: { backgroundColor: section.color }, children: section.icon }), (0, jsx_runtime_1.jsx)("h3", { className: "section-title", children: section.title })] }), (0, jsx_runtime_1.jsx)("p", { className: "section-description", children: section.description }), (0, jsx_runtime_1.jsx)("ul", { className: "section-items", children: section.items.map(function (item, itemIndex) { return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.li, { className: "section-item", initial: { opacity: 0, x: -20 }, animate: { opacity: 1, x: 0 }, transition: { duration: 0.3, delay: (0.1 * index) + (0.05 * itemIndex) }, onClick: function () { return toggleDropdown("".concat(section.id, "-").concat(itemIndex)); }, style: { cursor: 'pointer' }, children: [(0, jsx_runtime_1.jsx)("span", { className: "item-arrow ".concat(openDropdowns.includes("".concat(section.id, "-").concat(itemIndex)) ? 'rotate' : ''), children: "\u25B6" }), item] }), section.details && openDropdowns.includes("".concat(section.id, "-").concat(itemIndex)) && ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "section-item-details", initial: { opacity: 0, height: 0 }, animate: { opacity: 1, height: 'auto' }, transition: { duration: 0.3 }, children: (0, jsx_runtime_1.jsx)("p", { children: section.details[itemIndex] }) }))] }, itemIndex)); }) }), section.links.length > 0 && ((0, jsx_runtime_1.jsxs)("div", { className: "section-links", children: [(0, jsx_runtime_1.jsxs)("div", { className: "links-header", children: [(0, jsx_runtime_1.jsx)("span", { className: "links-icon", children: "\uD83D\uDD17" }), (0, jsx_runtime_1.jsxs)("span", { children: ["Find our ", section.id === 'code' ? 'codebase' : section.id === 'documentation' ? 'documentation' : section.id === 'community' ? 'conversation' : 'resources', " on:"] })] }), (0, jsx_runtime_1.jsx)("div", { className: "links-container", children: section.links.map(function (link, linkIndex) { return ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.a, { href: link.url, className: "resource-link", target: "_blank", rel: "noopener noreferrer", style: { '--link-color': section.color }, whileHover: { scale: 1.05 }, whileTap: { scale: 0.95 }, children: link.text }, linkIndex)); }) })] }))] }, section.id)); }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { id: "thank-you", className: "thank-you-section", initial: { opacity: 0, y: 30 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.6, delay: 0.8 }, children: (0, jsx_runtime_1.jsxs)("div", { className: "thank-you-card", children: [(0, jsx_runtime_1.jsxs)("div", { className: "thank-you-header", children: [(0, jsx_runtime_1.jsxs)("div", { className: "thank-you-icons", children: [(0, jsx_runtime_1.jsx)("span", { className: "thank-icon", children: "\uD83D\uDC9A" }), (0, jsx_runtime_1.jsx)("span", { className: "thank-icon", children: "\uD83C\uDF89" }), (0, jsx_runtime_1.jsx)("span", { className: "thank-icon", children: "\u2728" })] }), (0, jsx_runtime_1.jsx)("h3", { children: "Thank You!" }), (0, jsx_runtime_1.jsx)("div", { className: "thank-you-subtitle", children: "You're Amazing" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "thank-you-content", children: [(0, jsx_runtime_1.jsxs)("p", { className: "thank-you-main", children: ["Thank you for your interest in ", (0, jsx_runtime_1.jsx)("strong", { children: "RecodeHive" }), "!"] }), (0, jsx_runtime_1.jsxs)("p", { className: "thank-you-description", children: ["We're thrilled to have you here and can't wait to", ' ', (0, jsx_runtime_1.jsx)("span", { className: "highlight collaborate", children: "collaborate" }), ",", ' ', (0, jsx_runtime_1.jsx)("span", { className: "highlight learn", children: "learn" }), ", and", ' ', (0, jsx_runtime_1.jsx)("span", { className: "highlight grow", children: "grow" }), " \u2014 together. \uD83C\uDF31"] }), (0, jsx_runtime_1.jsxs)("div", { className: "thank-you-features", children: [(0, jsx_runtime_1.jsxs)("div", { className: "feature-item", children: [(0, jsx_runtime_1.jsx)("span", { className: "feature-icon", children: "\uD83D\uDE80" }), (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/recodehive/recode-website", target: "_blank", rel: "noopener noreferrer", style: { color: 'inherit' }, children: (0, jsx_runtime_1.jsx)("span", { children: "Build Amazing Projects" }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "feature-item", children: [(0, jsx_runtime_1.jsx)("span", { className: "feature-icon", children: "\uD83E\uDD1D" }), (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/orgs/recodehive/people", target: "_blank", rel: "noopener noreferrer", style: { color: 'inherit' }, children: (0, jsx_runtime_1.jsx)("span", { children: "Connect with Developers" }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "feature-item", children: [(0, jsx_runtime_1.jsx)("span", { className: "feature-icon", children: "\uD83D\uDCDA" }), (0, jsx_runtime_1.jsx)("a", { href: "https://www.recodehive.com/docs", target: "_blank", rel: "noopener noreferrer", style: { color: 'inherit' }, children: (0, jsx_runtime_1.jsx)("span", { children: "Learn & Share Knowledge" }) })] })] }), (0, jsx_runtime_1.jsxs)("blockquote", { className: "thank-you-quote", children: [(0, jsx_runtime_1.jsx)("div", { className: "quote-icon", children: "\uD83D\uDC1D" }), (0, jsx_runtime_1.jsx)("em", { children: "Let's make this community the best it can bee!" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "support-section", children: [(0, jsx_runtime_1.jsx)("div", { className: "support-icon", children: "\uD83D\uDCAC" }), (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/recodehive/recode-website/discussions", target: "_blank", rel: "noopener noreferrer", style: { color: 'inherit' }, children: (0, jsx_runtime_1.jsx)("p", { className: "support-text", children: "We're here to help and support you throughout your journey \u2014 don't hesitate to reach out." }) })] })] })] }) })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "table-of-contents", initial: { opacity: 0, x: 30 }, animate: { opacity: 1, x: 0 }, transition: { duration: 0.6, delay: 0.4 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "toc-header", children: [(0, jsx_runtime_1.jsx)("span", { className: "toc-icon", children: "\u26A1" }), (0, jsx_runtime_1.jsx)("h4", { children: "How You Can Contribute" })] }), (0, jsx_runtime_1.jsx)("nav", { className: "toc-nav", children: tableOfContents.map(function (item) { return ((0, jsx_runtime_1.jsxs)("button", { className: "toc-item ".concat(activeSections.includes(item.id) ? 'active' : ''), onClick: function () { return scrollToSection(item.id); }, children: [(0, jsx_runtime_1.jsx)("span", { className: "toc-item-icon", children: item.icon }), (0, jsx_runtime_1.jsx)("span", { className: "toc-item-text", children: item.title })] }, item.id)); }) })] })] }) }) })] }), (0, jsx_runtime_1.jsx)(bottom_to_top_1.default, {})] }) })); -} diff --git a/src/pages/contact-us/index.css b/src/pages/contact-us/index.css index dba5797c..3552551a 100644 --- a/src/pages/contact-us/index.css +++ b/src/pages/contact-us/index.css @@ -503,4 +503,86 @@ html[data-theme='light'] { .resources-title { font-size: 1.25rem; } -} \ No newline at end of file +} + +/* Form validation and status styles */ +.form-error { + display: block; + color: #ef4444; + font-size: 0.875rem; + margin-top: 0.25rem; + font-weight: 500; +} + +.form-input.error, +.form-select.error, +.form-textarea.error { + border-color: #ef4444; + background: rgba(239, 68, 68, 0.05); +} + +.form-input.error:focus, +.form-select.error:focus, +.form-textarea.error:focus { + border-color: #ef4444; + box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2); +} + +.required { + color: #ef4444; + font-weight: 600; +} + +.form-status-message { + padding: 1rem; + border-radius: 0.75rem; + margin-bottom: 1.5rem; + font-weight: 500; + animation: slideIn 0.3s ease-out; +} + +.form-status-message.success { + background: rgba(16, 185, 129, 0.1); + border: 1px solid rgba(16, 185, 129, 0.3); + color: #10b981; +} + +[data-theme='light'] .form-status-message.success { + background: rgba(16, 185, 129, 0.15); + border: 1px solid rgba(16, 185, 129, 0.4); + color: #059669; +} + +.form-status-message.error { + background: rgba(239, 68, 68, 0.1); + border: 1px solid rgba(239, 68, 68, 0.3); + color: #ef4444; +} + +[data-theme='light'] .form-status-message.error { + background: rgba(239, 68, 68, 0.15); + border: 1px solid rgba(239, 68, 68, 0.4); + color: #dc2626; +} + +.submit-button:disabled { + opacity: 0.6; + cursor: not-allowed; + transform: none; +} + +.submit-button:disabled:hover { + box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3); + transform: none; +} + +@keyframes slideIn { + from { + opacity: 0; + transform: translateY(-10px); + } + to { + opacity: 1; + transform: translateY(0); + } +} diff --git a/src/pages/contact-us/index.js b/src/pages/contact-us/index.js deleted file mode 100644 index 013e4a73..00000000 --- a/src/pages/contact-us/index.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importDefault(require("react")); -var Layout_1 = __importDefault(require("@theme/Layout")); -var lucide_react_1 = require("lucide-react"); -require("./index.css"); -var ContactUs = function () { - return ((0, jsx_runtime_1.jsx)(Layout_1.default, { title: "Contact Us", description: "Get in touch with the RecodeHive team. We're here to help with your questions, feedback, and collaboration opportunities.", children: (0, jsx_runtime_1.jsx)("div", { className: "enhanced-contact-container", children: (0, jsx_runtime_1.jsxs)("div", { className: "contact-content-wrapper", children: [(0, jsx_runtime_1.jsxs)("div", { className: "contact-header", children: [(0, jsx_runtime_1.jsx)("h1", { className: "contact-title", children: "Get In Touch" }), (0, jsx_runtime_1.jsx)("p", { className: "contact-description", children: "Have questions, feedback, or want to collaborate? We'd love to hear from you. Reach out to us and we'll get back to you as soon as possible." })] }), (0, jsx_runtime_1.jsxs)("div", { className: "contact-grid", children: [(0, jsx_runtime_1.jsxs)("div", { className: "contact-info-section", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h2", { className: "contact-info-title", children: "Contact Information" }), (0, jsx_runtime_1.jsxs)("div", { className: "contact-info-items", children: [(0, jsx_runtime_1.jsxs)("div", { className: "contact-info-item", children: [(0, jsx_runtime_1.jsx)("div", { className: "contact-icon-wrapper", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Mail, { className: "w-6 h-6", style: { color: 'var(--contact-accent-primary)' } }) }), (0, jsx_runtime_1.jsxs)("div", { className: "contact-info-details", children: [(0, jsx_runtime_1.jsx)("h3", { children: "Email" }), (0, jsx_runtime_1.jsx)("a", { href: "mailto:sanjay@recodehive.com", children: "sanjay@recodehive.com" }), (0, jsx_runtime_1.jsx)("p", { children: "General inquiries and support" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "contact-info-item", children: [(0, jsx_runtime_1.jsx)("div", { className: "contact-icon-wrapper", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Clock, { className: "w-6 h-6", style: { color: 'var(--contact-accent-primary)' } }) }), (0, jsx_runtime_1.jsxs)("div", { className: "contact-info-details", children: [(0, jsx_runtime_1.jsx)("h3", { children: "Response Time" }), (0, jsx_runtime_1.jsx)("p", { style: { marginTop: 0, color: 'var(--contact-text-secondary)' }, children: "Within 24-48 hours" }), (0, jsx_runtime_1.jsx)("p", { children: "We'll get back to you promptly" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "contact-info-item", children: [(0, jsx_runtime_1.jsx)("div", { className: "contact-icon-wrapper", children: (0, jsx_runtime_1.jsx)(lucide_react_1.MapPin, { className: "w-6 h-6", style: { color: 'var(--contact-accent-primary)' } }) }), (0, jsx_runtime_1.jsxs)("div", { className: "contact-info-details", children: [(0, jsx_runtime_1.jsx)("h3", { children: "Location" }), (0, jsx_runtime_1.jsx)("p", { style: { marginTop: 0, color: 'var(--contact-text-secondary)' }, children: "Online & Global" }), (0, jsx_runtime_1.jsx)("p", { children: "Serving developers worldwide" })] })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "contact-info-box", children: [(0, jsx_runtime_1.jsx)("h3", { children: "What we can help you with:" }), (0, jsx_runtime_1.jsxs)("ul", { children: [(0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("span", { className: "bullet" }), (0, jsx_runtime_1.jsx)("span", { children: "Learning resources and tutorials" })] }), (0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("span", { className: "bullet" }), (0, jsx_runtime_1.jsx)("span", { children: "Technical support and guidance" })] }), (0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("span", { className: "bullet" }), (0, jsx_runtime_1.jsx)("span", { children: "Collaboration opportunities" })] }), (0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("span", { className: "bullet" }), (0, jsx_runtime_1.jsx)("span", { children: "Partnership inquiries" })] }), (0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("span", { className: "bullet" }), (0, jsx_runtime_1.jsx)("span", { children: "Content suggestions and feedback" })] })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "contact-form-section", children: [(0, jsx_runtime_1.jsx)("h2", { className: "contact-form-title", children: "Send us a message" }), (0, jsx_runtime_1.jsxs)("form", { className: "contact-form", children: [(0, jsx_runtime_1.jsxs)("div", { className: "form-row", children: [(0, jsx_runtime_1.jsxs)("div", { className: "form-group", children: [(0, jsx_runtime_1.jsx)("label", { htmlFor: "firstName", className: "form-label", children: "First Name" }), (0, jsx_runtime_1.jsx)("input", { type: "text", id: "firstName", name: "firstName", className: "form-input", placeholder: "Your first name", required: true })] }), (0, jsx_runtime_1.jsxs)("div", { className: "form-group", children: [(0, jsx_runtime_1.jsx)("label", { htmlFor: "lastName", className: "form-label", children: "Last Name" }), (0, jsx_runtime_1.jsx)("input", { type: "text", id: "lastName", name: "lastName", className: "form-input", placeholder: "Your last name", required: true })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "form-group", children: [(0, jsx_runtime_1.jsx)("label", { htmlFor: "email", className: "form-label", children: "Email Address" }), (0, jsx_runtime_1.jsx)("input", { type: "email", id: "email", name: "email", className: "form-input", placeholder: "your.email@example.com", required: true })] }), (0, jsx_runtime_1.jsxs)("div", { className: "form-group", children: [(0, jsx_runtime_1.jsx)("label", { htmlFor: "subject", className: "form-label", children: "Subject" }), (0, jsx_runtime_1.jsxs)("select", { id: "subject", name: "subject", className: "form-select", required: true, children: [(0, jsx_runtime_1.jsx)("option", { value: "", children: "Select a subject" }), (0, jsx_runtime_1.jsx)("option", { value: "general", children: "General Inquiry" }), (0, jsx_runtime_1.jsx)("option", { value: "support", children: "Technical Support" }), (0, jsx_runtime_1.jsx)("option", { value: "collaboration", children: "Collaboration" }), (0, jsx_runtime_1.jsx)("option", { value: "partnership", children: "Partnership" }), (0, jsx_runtime_1.jsx)("option", { value: "feedback", children: "Feedback" }), (0, jsx_runtime_1.jsx)("option", { value: "other", children: "Other" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "form-group", children: [(0, jsx_runtime_1.jsx)("label", { htmlFor: "message", className: "form-label", children: "Message" }), (0, jsx_runtime_1.jsx)("textarea", { id: "message", name: "message", rows: 6, className: "form-textarea", placeholder: "Tell us more about your inquiry...", required: true })] }), (0, jsx_runtime_1.jsx)("button", { type: "submit", className: "submit-button", children: "Send Message" })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "contact-resources", children: [(0, jsx_runtime_1.jsx)("h2", { className: "resources-title", children: "Other Ways to Connect" }), (0, jsx_runtime_1.jsxs)("div", { className: "resources-grid", children: [(0, jsx_runtime_1.jsxs)("a", { href: "/community", className: "resource-card", children: [(0, jsx_runtime_1.jsx)("div", { className: "resource-icon", children: "\uD83D\uDCDA" }), (0, jsx_runtime_1.jsx)("h3", { children: "Community" }), (0, jsx_runtime_1.jsx)("p", { children: "Join our community and connect with fellow developers" })] }), (0, jsx_runtime_1.jsxs)("a", { href: "/docs", className: "resource-card", children: [(0, jsx_runtime_1.jsx)("div", { className: "resource-icon", children: "\uD83D\uDCD6" }), (0, jsx_runtime_1.jsx)("h3", { children: "Documentation" }), (0, jsx_runtime_1.jsx)("p", { children: "Explore our comprehensive learning resources" })] }), (0, jsx_runtime_1.jsxs)("a", { href: "/blogs", className: "resource-card", children: [(0, jsx_runtime_1.jsx)("div", { className: "resource-icon", children: "\u270D\uFE0F" }), (0, jsx_runtime_1.jsx)("h3", { children: "Blog" }), (0, jsx_runtime_1.jsx)("p", { children: "Read our latest articles and tutorials" })] })] })] })] }) }) })); -}; -exports.default = ContactUs; diff --git a/src/pages/contact-us/index.tsx b/src/pages/contact-us/index.tsx index ac07b87a..06f1aa76 100644 --- a/src/pages/contact-us/index.tsx +++ b/src/pages/contact-us/index.tsx @@ -1,9 +1,131 @@ -import React from "react"; +import React, { useState } from "react"; import Layout from "@theme/Layout"; import { Mail, MapPin, Clock } from "lucide-react"; import "./index.css"; +interface FormData { + firstName: string; + lastName: string; + email: string; + subject: string; + message: string; +} + +interface FormErrors { + firstName?: string; + lastName?: string; + email?: string; + subject?: string; + message?: string; +} + const ContactUs: React.FC = () => { + const [formData, setFormData] = useState({ + firstName: "", + lastName: "", + email: "", + subject: "", + message: "", + }); + + const [errors, setErrors] = useState({}); + const [isSubmitting, setIsSubmitting] = useState(false); + const [submitStatus, setSubmitStatus] = useState<{ + type: "success" | "error" | null; + message: string; + }>({ type: null, message: "" }); + + // Handle input changes + const handleChange = ( + e: React.ChangeEvent + ) => { + const { name, value } = e.target; + setFormData((prev) => ({ + ...prev, + [name]: value, + })); + // Clear error for this field when user starts typing + if (errors[name as keyof FormErrors]) { + setErrors((prev) => ({ + ...prev, + [name]: undefined, + })); + } + }; + + // Validate form + const validateForm = (): boolean => { + const newErrors: FormErrors = {}; + + if (!formData.firstName.trim()) { + newErrors.firstName = "First name is required"; + } + + if (!formData.lastName.trim()) { + newErrors.lastName = "Last name is required"; + } + + if (!formData.email.trim()) { + newErrors.email = "Email is required"; + } else if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(formData.email)) { + newErrors.email = "Please enter a valid email address"; + } + + if (!formData.subject) { + newErrors.subject = "Please select a subject"; + } + + if (!formData.message.trim()) { + newErrors.message = "Message is required"; + } else if (formData.message.trim().length < 10) { + newErrors.message = "Message must be at least 10 characters long"; + } + + setErrors(newErrors); + return Object.keys(newErrors).length === 0; + }; + + // Handle form submission + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + + // Validate form + if (!validateForm()) { + return; + } + + setIsSubmitting(true); + setSubmitStatus({ type: null, message: "" }); + + try { + // Simulate API call (replace with actual API endpoint) + await new Promise((resolve) => setTimeout(resolve, 1500)); + + // Success + setSubmitStatus({ + type: "success", + message: "Thank you for your message! We'll get back to you within 24-48 hours.", + }); + + // Reset form + setFormData({ + firstName: "", + lastName: "", + email: "", + subject: "", + message: "", + }); + } catch (error) { + // Error + setSubmitStatus({ + type: "error", + message: "Something went wrong. Please try again later.", + }); + } finally { + setIsSubmitting(false); + } + }; + return ( { Send us a message -
+ {submitStatus.type && ( +
+ {submitStatus.message} +
+ )} + +
+ {errors.firstName && ( + + {errors.firstName} + + )}
+ {errors.lastName && ( + + {errors.lastName} + + )}
+ {errors.email && ( + + {errors.email} + + )}
+ {errors.subject && ( + + {errors.subject} + + )}
+ {errors.message && ( + + {errors.message} + + )}
diff --git a/src/pages/courses/index.js b/src/pages/courses/index.js deleted file mode 100644 index 8bc0abb1..00000000 --- a/src/pages/courses/index.js +++ /dev/null @@ -1,293 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = CoursesLanding; -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importStar(require("react")); -var Layout_1 = __importDefault(require("@theme/Layout")); -var Head_1 = __importDefault(require("@docusaurus/Head")); -var framer_motion_1 = require("framer-motion"); -require("./courses.css"); -// Animation variants for consistent animations -var fadeIn = { - hidden: { opacity: 0, y: 20 }, - visible: { opacity: 1, y: 0, transition: { duration: 0.6 } } -}; -var techTags = [ - "AWS", "Apache Airflow", "Parquet", "Avro", "Microsoft Azure", "Google BigQuery", "CSV", "Databricks", "Azure Data Factory", "Docker", "Kafka", "Google Cloud", "GitHub", "Apache NiFi", "Snowflake", "Looker", "MAGE", "NumPy", "Pandas", "PostgreSQL", "Python", "Apache Spark", "SQL" -]; -var partnerLogos = [ - "https://dummyimage.com/80x40/222/fff&text=Samsung", - "https://dummyimage.com/80x40/333/fff&text=Oracle", - "https://dummyimage.com/80x40/444/fff&text=Segment", - "https://dummyimage.com/80x40/555/fff&text=Monday.com", - "https://dummyimage.com/80x40/666/fff&text=Protonet", -]; -var projects = [ - "https://dummyimage.com/200x120/222/fff&text=Project+1", - "https://dummyimage.com/200x120/333/fff&text=Project+2", - "https://dummyimage.com/200x120/444/fff&text=Project+3", - "https://dummyimage.com/200x120/555/fff&text=Project+4", - "https://dummyimage.com/200x120/555/fff&text=Project+5", - "https://dummyimage.com/200x120/555/fff&text=Project+6", - "https://dummyimage.com/200x120/555/fff&text=Project+7", -]; -var testimonials = [ - { - img: "https://dummyimage.com/80x80/222/fff&text=S", - name: "Sachin", - review: "Sanjay has been a great support in knowing various career paths and upcoming tech. The call was very crisp but valueable at the same time. For sure I am gonna schedule a call probably next month to give him updates. Thanks a ton Sanjay :)", - stars: 5, - }, - { - img: "https://dummyimage.com/80x80/333/fff&text=KP", - name: "Kumar Priyanshu", - review: "I was thoroughly impressed by his clear, engaging communication and deep understanding of my issue. He listened attentively and offered valuable insights and solutions, leaving me extremely satisfied and confident in the guidance I received.", - stars: 5, - }, - { - img: "https://dummyimage.com/80x80/444/fff&text=AV", - name: "Aman Vohra", - review: "It was an amazing session with you. And i can't thank you enough for your time and the great and valuable insights you have given me. Thank you so much🙌🏻", - stars: 5, - }, -]; -var courses = [ - { - number: "01", - title: "Python for Data Engineering", - desc: "Learn to harness the power of Python for transforming and processing data at scale in our hands-on 'Python for Data Engineering' course. Build the skills needed to design robust data pipelines and optimize data workflows effectively.", - img: "https://dummyimage.com/300x150/222/fff&text=Python+for+DE", - }, - { - number: "02", - title: "SQL for Data Engineering", - desc: "Unlock the potential of data manipulation and management with our 'SQL for Data Engineering' course. Gain proficiency in crafting and optimizing complex queries to build and maintain efficient data pipelines.", - img: "https://dummyimage.com/300x150/333/fff&text=SQL+for+DE", - }, - { - number: "03", - title: "Data Warehouse with Snowflake", - desc: "Discover the modern approach to data warehousing using Snowflake in our course. Learn to design, implement, and manage a high-performance data warehouse for seamless analytics and insights.", - img: "https://dummyimage.com/300x150/444/fff&text=Snowflake", - }, - { - number: "04", - title: "Spark for Data Engineering", - desc: "Learn to leverage the power of Apache Spark for efficient and scalable data engineering in our comprehensive course. Master the art of processing and transforming data to build robust pipelines and drive data-centric applications.", - img: "https://dummyimage.com/300x150/555/fff&text=Spark+for+DE", - }, - { - number: "05", - title: "Workflow Orchestration (Airflow, Mage, Prefect)", - desc: "Explore the world of workflow orchestration with our course covering Airflow, Luigi, Mage, and Prefect. Gain expertise in seamlessly coordinating and automating complex data pipelines for enhanced efficiency and productivity.", - img: "https://dummyimage.com/300x150/666/fff&text=Workflow+Orchestration", - }, - { - number: "06", - title: "Apache Kafka for DE (Coming Soon)", - desc: "Dive into the realm of data engineering with Apache Kafka in our course. Learn to build real-time, scalable data pipelines that enable efficient data movement and processing for diverse applications.", - img: "https://dummyimage.com/300x150/777/fff&text=Kafka+for+DE", - }, - { - number: "07", - title: "Cloud Computing AWS, GCP, Azure (Coming Soon)", - desc: "Embark on a journey through major cloud platforms with our course on AWS, GCP, and Azure. Acquire the skills to deploy, manage, and optimize cloud-based solutions for diverse business needs.", - img: "https://dummyimage.com/300x150/888/fff&text=Cloud+Computing", - }, -]; -var projectReviews = [ - { - img: "https://dummyimage.com/100x100/222/fff&text=AP", - name: "Abhi Patel", - review: "Excited to share the Spotify End to End ETL pipeline project using AWS and Python...", - }, - { - img: "https://dummyimage.com/100x100/333/fff&text=AM", - name: "Ajosh Mungesan", - review: "Learning & sharing my Spotify ETL project using Python & AWS...", - }, - { - img: "https://dummyimage.com/100x100/444/fff&text=HR", - name: "Hariharan R", - review: "Excited to share the Spotify End to End ETL pipeline project using AWS and Python...", - }, -]; -var topics = [ - "ETL", "Data Modelling", "SQL", "Data Pipelines", "Cloud Data Warehousing", "Spark", "Databricks", "DataFrames", "RDDs", "PySpark", "Spark SQL", "MLlib", "Spark Streaming", "Cluster Management", "Fault Tolerance", "Big Data", "Apache Hadoop", "Data Ingestion", "Data Transformation", "Data Analytics", "Schema Design", "Machine Learning", "Snowflake", "Data Lake", "Business Intelligence", "Analytics", "OLAP", "Data Architecture", "Python", "Data Wrangling", "Pandas", "NumPy", "Data Visualisation", "Jupyter Notebooks", "Web Scraping", "APIs", "Data Cleaning", "Data Security", "Scalability", "Stored Procedures", "Triggers", "Views", "Normalization", "Relational Databases", "Data Integrity", "Data Consistency", "Query Performance", "Window Functions", "Transactions", "Indexing", "Batch Processing", "Real-Time Processing", "Data Orchestration", "Workflow Automation", "Data Quality", "Data Lineage", "Metadata Management", "Data Cataloging" -]; -// Modified stats with numerical values for animation -var stats = [ - { label: "Youtube", value: 160, suffix: "K+" }, - { label: "LinkedIn", value: 100, suffix: "K+" }, - { label: "Twitter", value: 25, suffix: "K+" }, -]; -var faqs = [ - { q: "Who can enroll in the programs?", a: "Anyone interested in data engineering, from beginners to professionals." }, - { q: "Will I receive a certificate?", a: "Yes, you will receive a certificate upon successful completion of the course." }, - { q: "Is the course in Hindi or English?", a: "Courses are available in both Hindi and English." }, - { q: "How can I contact you if I have questions?", a: "You can contact us via the contact form or email provided on the website." }, - { q: "Do I need to learn anything before this course starts?", a: "No prior experience is required. All fundamentals will be covered." }, -]; -function CoursesContent() { - var _a = (0, react_1.useState)(false), showAllTopics = _a[0], setShowAllTopics = _a[1]; - var _b = (0, react_1.useState)({ open: false, content: "" }), modal = _b[0], setModal = _b[1]; - var _c = (0, react_1.useState)(null), openFaq = _c[0], setOpenFaq = _c[1]; - var _d = (0, react_1.useState)(0), activeProjectIndex = _d[0], setActiveProjectIndex = _d[1]; - var _e = (0, react_1.useState)({ - Youtube: 0, - LinkedIn: 0, - Twitter: 0 - }), animatedStats = _e[0], setAnimatedStats = _e[1]; - var _f = (0, react_1.useState)(false), isStatsVisible = _f[0], setIsStatsVisible = _f[1]; - var projectCarouselRef = (0, react_1.useRef)(null); - var techTagsRef = (0, react_1.useRef)(null); - var statsRef = (0, react_1.useRef)(null); - // Horizontal scrolling for tech tags - (0, react_1.useEffect)(function () { - if (techTagsRef.current) { - var scrollInterval_1 = setInterval(function () { - if (techTagsRef.current) { - var currentScroll = techTagsRef.current.scrollLeft; - var maxScroll = techTagsRef.current.scrollWidth - techTagsRef.current.clientWidth; - if (currentScroll >= maxScroll) { - techTagsRef.current.scrollLeft = 0; - } - else { - techTagsRef.current.scrollLeft += 1; - } - } - }, 30); - return function () { return clearInterval(scrollInterval_1); }; - } - }, []); - // Set up automatic carousel rotation - (0, react_1.useEffect)(function () { - var interval = setInterval(function () { - setActiveProjectIndex(function (prevIndex) { - return prevIndex === projects.length - 1 ? 0 : prevIndex + 1; - }); - }, 5000); - return function () { return clearInterval(interval); }; - }, []); - // Animate stats counter when visible - (0, react_1.useEffect)(function () { - if (!statsRef.current) - return; - var observer = new IntersectionObserver(function (entries) { - if (entries[0].isIntersecting && !isStatsVisible) { - setIsStatsVisible(true); - // Start animation for each stat - stats.forEach(function (stat) { - var label = stat.label, value = stat.value; - var startValue = 0; - var duration = 2000; // 2 seconds - var increment = value / (duration / 16); // ~60fps - var timer = setInterval(function () { - startValue += increment; - if (startValue >= value) { - clearInterval(timer); - setAnimatedStats(function (prev) { - var _a; - return (__assign(__assign({}, prev), (_a = {}, _a[label] = value, _a))); - }); - } - else { - setAnimatedStats(function (prev) { - var _a; - return (__assign(__assign({}, prev), (_a = {}, _a[label] = Math.floor(startValue), _a))); - }); - } - }, 16); - }); - } - }, { threshold: 0.1 }); - observer.observe(statsRef.current); - return function () { return observer.disconnect(); }; - }, [isStatsVisible]); - var handleCourseClick = function (course) { - if (course.title.includes("Coming Soon")) { - setModal({ open: true, content: "This course is coming soon!" }); - } - else { - window.location.href = "/courses/".concat(course.title.toLowerCase().replace(/ /g, "-")); - } - }; - var handleAction = function (type) { - setModal({ open: true, content: type === "enroll" ? "Enrollment flow coming soon!" : "Purchase flow coming soon!" }); - }; - var scrollProjects = function (dir) { - var newIndex = activeProjectIndex + dir; - if (newIndex >= 0 && newIndex < projects.length) { - setActiveProjectIndex(newIndex); - } - else if (newIndex < 0) { - // Loop to the end if going backwards from first slide - setActiveProjectIndex(projects.length - 1); - } - else { - // Loop to the beginning if going forward from last slide - setActiveProjectIndex(0); - } - }; - var goToProjectSlide = function (index) { - setActiveProjectIndex(index); - }; - var handleInfo = function (info) { return setModal({ open: true, content: info }); }; - return ((0, jsx_runtime_1.jsxs)(Layout_1.default, { title: "Courses", description: "Explore our available courses and resources.", children: [(0, jsx_runtime_1.jsxs)(Head_1.default, { children: [(0, jsx_runtime_1.jsx)("meta", { name: "description", content: "Landing page for all available courses." }), (0, jsx_runtime_1.jsx)("style", { children: "\n /* Hide scrollbar for carousel */\n .hide-scrollbar::-webkit-scrollbar {\n display: none;\n }\n .hide-scrollbar {\n -ms-overflow-style: none;\n scrollbar-width: none;\n }\n\n /* Custom animations */\n @keyframes float {\n 0% { transform: translateY(0px); }\n 50% { transform: translateY(-10px); }\n 100% { transform: translateY(0px); }\n }\n\n @keyframes slide {\n 0% { transform: translateX(0); }\n 100% { transform: translateX(-100%); }\n }\n\n .float-animation {\n animation: float 3s ease-in-out infinite;\n }\n\n .animate-slide {\n display: inline-block;\n white-space: nowrap;\n padding-right: 100%;\n }\n\n /* Fade-in animation */\n @keyframes fadeIn {\n from { opacity: 0; transform: translateY(20px); }\n to { opacity: 1; transform: translateY(0); }\n }\n\n .animate-fadeIn {\n animation: fadeIn 0.5s ease-out forwards;\n }\n\n /* Scale-in animation */\n @keyframes scaleIn {\n from { opacity: 0; transform: scale(0.9); }\n to { opacity: 1; transform: scale(1); }\n }\n\n .animate-scaleIn {\n animation: scaleIn 0.3s ease-out forwards;\n }\n\n /* Slide-in animation */\n @keyframes slideInUp {\n from { opacity: 0; transform: translateY(30px); }\n to { opacity: 1; transform: translateY(0); }\n }\n\n .animate-slideInUp {\n animation: slideInUp 0.5s ease-out forwards;\n }\n\n /* Pulse animation */\n @keyframes pulse {\n 0% { transform: scale(1); }\n 50% { transform: scale(1.05); }\n 100% { transform: scale(1); }\n }\n\n .animate-pulse {\n animation: pulse 2s infinite;\n }\n " })] }), (0, jsx_runtime_1.jsxs)("main", { className: "courses-page min-h-screen transition-all duration-500", children: [modal.open && ((0, jsx_runtime_1.jsx)("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-60 courses-fade-in p-4", children: (0, jsx_runtime_1.jsxs)("div", { className: "courses-modal p-6 md:p-8 max-w-md w-full text-center relative courses-scale-in", children: [(0, jsx_runtime_1.jsx)("button", { className: "courses-icon-button absolute top-3 right-3 text-xl md:text-2xl transition-transform hover:scale-110", onClick: function () { return setModal({ open: false, content: "" }); }, children: "\u00D7" }), (0, jsx_runtime_1.jsx)("div", { className: "courses-body pt-4", children: modal.content })] }) })), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.section, { className: "courses-hero py-16 md:py-24 px-4 text-center relative overflow-hidden transition-all duration-500 border-b", initial: "hidden", animate: "visible", variants: { - hidden: { opacity: 0 }, - visible: { opacity: 1, transition: { staggerChildren: 0.2 } } - }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "courses-container", children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.h1, { className: "courses-heading-1 courses-text-gradient mb-6 md:mb-8 relative z-10 tracking-tight", variants: fadeIn, children: ["Transform Your Career", (0, jsx_runtime_1.jsx)("br", { className: "hidden md:block" }), (0, jsx_runtime_1.jsx)("span", { className: "block md:inline", children: "in Data Engineering" })] }), (0, jsx_runtime_1.jsx)("div", { className: "w-full flex justify-center", children: (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.p, { className: "courses-text-secondary courses-body-large max-w-2xl leading-relaxed font-medium mb-8 md:mb-12 text-center", variants: fadeIn, children: ["Master the art of data engineering with industry-leading courses designed for", ' ', (0, jsx_runtime_1.jsx)("span", { className: "font-bold courses-text-gradient", children: "modern tech careers" }), "."] }) }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "flex flex-col sm:flex-row gap-4 md:gap-6 justify-center mb-12 md:mb-16 max-w-md md:max-w-none mx-auto", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("button", { className: "courses-button-primary group relative px-8 md:px-10 py-3 md:py-4 overflow-hidden rounded-2xl font-bold text-base md:text-lg shadow-2xl transition-all duration-300 hover:scale-105 hover:shadow-blue-500/30 border border-blue-400/20 courses-backdrop-blur", onClick: function () { return handleAction("enroll"); }, children: (0, jsx_runtime_1.jsxs)("span", { className: "relative z-10 flex items-center justify-center gap-2", children: ["Explore Courses", (0, jsx_runtime_1.jsx)("svg", { className: "w-4 h-4 md:w-5 md:h-5 group-hover:translate-x-1 transition-transform", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 7l5 5m0 0l-5 5m5-5H6" }) })] }) }), (0, jsx_runtime_1.jsx)("button", { className: "courses-button-secondary group relative px-8 md:px-10 py-3 md:py-4 overflow-hidden rounded-2xl font-bold text-base md:text-lg shadow-2xl transition-all duration-300 hover:scale-105", onClick: function () { return handleAction("curriculum"); }, children: (0, jsx_runtime_1.jsxs)("span", { className: "relative z-10 flex items-center justify-center gap-2", children: ["View Curriculum", (0, jsx_runtime_1.jsx)("svg", { className: "w-4 h-4 md:w-5 md:h-5 group-hover:translate-x-1 transition-transform", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) })] }) })] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "courses-container", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("div", { ref: techTagsRef, className: "flex overflow-x-auto courses-hide-scrollbar gap-2 mb-8 pb-4 whitespace-nowrap", style: { scrollBehavior: 'smooth' }, children: (0, jsx_runtime_1.jsx)("div", { className: "flex gap-2 px-4 md:px-0", children: techTags.map(function (tag, idx) { return ((0, jsx_runtime_1.jsx)("span", { className: "courses-topic-tag flex-shrink-0", children: tag }, idx)); }) }) }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-8", children: [(0, jsx_runtime_1.jsx)("h3", { className: "courses-text-secondary courses-body text-center font-medium mb-6", children: "Students now available at" }), (0, jsx_runtime_1.jsx)("div", { className: "flex flex-wrap justify-center items-center gap-6 md:gap-8", children: partnerLogos.map(function (logo, idx) { return ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.img, { src: logo, alt: "Partner Logo", className: "h-10 md:h-12 w-auto object-contain opacity-70 hover:opacity-100 transition-opacity", whileHover: { scale: 1.1 }, transition: { type: "spring", stiffness: 400, damping: 10 } }, idx)); }) })] })] })] }), (0, jsx_runtime_1.jsxs)("section", { className: "courses-section py-16 md:py-24 px-4 relative overflow-hidden transition-all duration-500 border-b", children: [(0, jsx_runtime_1.jsx)("div", { className: "courses-bg-overlay absolute inset-0" }), (0, jsx_runtime_1.jsxs)("div", { className: "courses-container", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.h2, { className: "courses-heading-2 courses-gradient-text text-center mb-12 md:mb-16 tracking-tight leading-tight", initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5 }, children: "Explore over 14+ extensive projects" }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "relative z-10 max-w-2xl mx-auto", initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: 0.2 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "relative", children: [(0, jsx_runtime_1.jsx)("button", { className: "courses-nav-button absolute left-2 md:left-0 top-1/2 -translate-y-1/2 z-10 shadow-xl transform transition-all duration-300 hover:scale-110", onClick: function () { return scrollProjects(-1); }, children: "<" }), (0, jsx_runtime_1.jsx)("div", { ref: projectCarouselRef, className: "overflow-hidden courses-hide-scrollbar mx-12 md:mx-16", children: (0, jsx_runtime_1.jsx)("div", { className: "flex transition-transform duration-500 ease-in-out", style: { transform: "translateX(-".concat(activeProjectIndex * 100, "%)") }, children: projects.map(function (img, idx) { return ((0, jsx_runtime_1.jsx)("div", { className: "min-w-full flex justify-center px-2 md:px-4", style: { width: '100%', flexShrink: 0 }, children: (0, jsx_runtime_1.jsx)("img", { src: img, alt: "Project ".concat(idx + 1), className: "rounded-xl shadow-lg hover:shadow-blue-500/30 transition transform hover:scale-105 cursor-pointer border-2 border-gray-700/50 hover:border-blue-500/50 w-full max-w-xs md:max-w-sm h-auto", style: { aspectRatio: '16/10' } }) }, idx)); }) }) }), (0, jsx_runtime_1.jsx)("button", { className: "courses-nav-button absolute right-2 md:right-0 top-1/2 -translate-y-1/2 z-10 shadow-xl transform transition-all duration-300 hover:scale-110", onClick: function () { return scrollProjects(1); }, children: ">" })] }), (0, jsx_runtime_1.jsx)("div", { className: "courses-carousel-indicators mt-6", children: projects.map(function (_, idx) { return ((0, jsx_runtime_1.jsx)("button", { className: "courses-carousel-indicator ".concat(idx === activeProjectIndex ? 'active' : ''), onClick: function () { return goToProjectSlide(idx); } }, idx)); }) })] })] })] }), (0, jsx_runtime_1.jsxs)("section", { className: "courses-section py-16 md:py-24 px-4 relative overflow-hidden transition-all duration-500 border-b", children: [(0, jsx_runtime_1.jsx)("div", { className: "courses-bg-overlay absolute inset-0" }), (0, jsx_runtime_1.jsxs)("div", { className: "courses-container-wide", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.h2, { className: "courses-heading-2 courses-gradient-text text-center mb-12 md:mb-16 tracking-tight leading-tight", initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5 }, children: "Kind Words from Our Students" }), (0, jsx_runtime_1.jsx)("div", { className: "courses-grid courses-grid-3 relative z-10", children: testimonials.map(function (t, idx) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "courses-card group cursor-pointer flex flex-col items-center text-center", initial: { opacity: 0, y: 30 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: idx * 0.1 }, whileHover: { scale: 1.02 }, onClick: function () { return handleInfo(t.review); }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "relative w-20 h-20 md:w-24 md:h-24 mb-6", children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 rounded-full blur-lg opacity-50 group-hover:opacity-70 transition-opacity duration-300 bg-gradient-to-r from-blue-500 to-purple-500" }), (0, jsx_runtime_1.jsx)("img", { src: t.img, alt: t.name, className: "relative w-full h-full rounded-full object-cover border-3 transition-all duration-300 z-10 shadow-lg border-blue-400/50 group-hover:border-blue-400 shadow-blue-500/30" })] }), (0, jsx_runtime_1.jsx)("h4", { className: "courses-heading-4 courses-text-gradient mb-4", children: t.name }), (0, jsx_runtime_1.jsx)("div", { className: "flex mb-4 gap-1", children: Array.from({ length: t.stars }).map(function (_, i) { return ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "text-yellow-400 text-lg", initial: { opacity: 0, scale: 0.5 }, animate: { opacity: 1, scale: 1 }, transition: { delay: i * 0.1 }, children: "\u2605" }, i)); }) }), (0, jsx_runtime_1.jsx)("p", { className: "courses-body-small text-center line-clamp-4 transition-colors duration-300 leading-relaxed courses-text-secondary", children: t.review })] }, idx)); }) })] })] }), (0, jsx_runtime_1.jsx)("section", { className: "courses-section py-16 md:py-24 px-4 transition-all duration-500 border-b", children: (0, jsx_runtime_1.jsxs)("div", { className: "courses-container-wide", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.h2, { className: "courses-heading-2 courses-gradient-text text-center mb-6 tracking-tight leading-tight", initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5 }, children: "Courses Available" }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.h3, { className: "courses-body-large courses-text-secondary text-center mb-12 md:mb-16", initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: 0.1 }, children: "Courses Covered In the Program" }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col lg:flex-row w-full gap-8 lg:gap-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "flex-1 flex flex-col gap-6 lg:gap-8", children: courses.filter(function (_, i) { return i % 2 === 0; }).map(function (course, idx) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "courses-timeline-card flex flex-col sm:flex-row items-start sm:items-center gap-4 sm:gap-6 cursor-pointer group", onClick: function () { return handleCourseClick(course); }, initial: { opacity: 0, x: -30 }, whileInView: { opacity: 1, x: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: idx * 0.1 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "relative w-full sm:w-32 md:w-40 h-32 sm:h-20 md:h-24 overflow-hidden rounded-lg flex-shrink-0", children: [(0, jsx_runtime_1.jsx)("img", { src: course.img, alt: course.title, className: "w-full h-full object-cover transition-transform duration-300 group-hover:scale-110" }), (0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 bg-gradient-to-t from-black/50 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex-1 min-w-0", children: [(0, jsx_runtime_1.jsx)("h3", { className: "courses-heading-4 courses-text-gradient mb-2 md:mb-3 line-clamp-2", children: course.title }), (0, jsx_runtime_1.jsx)("p", { className: "courses-body-small courses-text-secondary line-clamp-2 md:line-clamp-3 leading-relaxed", children: course.desc })] }), (0, jsx_runtime_1.jsx)("svg", { className: "w-5 h-5 md:w-6 md:h-6 group-hover:text-blue-400 transform group-hover:translate-x-1 transition-all duration-300 courses-text-muted flex-shrink-0", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) })] }, course.number)); }) }), (0, jsx_runtime_1.jsxs)("div", { className: "hidden lg:flex flex-col items-center mx-6 xl:mx-8 relative", children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute top-0 bottom-0 w-1 left-1/2 -translate-x-1/2 bg-gradient-to-b from-purple-500 to-indigo-500" }), courses.map(function (course, idx) { return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "flex flex-col items-center relative z-10", initial: { opacity: 0, scale: 0.8 }, whileInView: { opacity: 1, scale: 1 }, viewport: { once: true }, transition: { duration: 0.3, delay: idx * 0.1 }, children: [(0, jsx_runtime_1.jsx)("div", { className: "w-12 h-12 xl:w-16 xl:h-16 flex items-center justify-center rounded-full border-4 text-lg xl:text-2xl font-bold mb-2 bg-gradient-to-br from-purple-600 to-indigo-600 border-purple-400 text-white shadow-lg shadow-purple-500/50", children: course.number }), idx !== courses.length - 1 && (0, jsx_runtime_1.jsx)("div", { className: "w-1 h-12 xl:h-16 bg-transparent" })] }) }, course.number)); }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.button, { className: "courses-button-primary mt-8 xl:mt-12 py-3 xl:py-4 px-8 xl:px-10 rounded-2xl shadow-2xl transform transition-all duration-300 hover:scale-110 relative z-10", onClick: function () { return handleAction("enroll"); }, initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: 0.8 }, whileHover: { y: -5 }, whileTap: { y: 0 }, children: "Enroll now" })] }), (0, jsx_runtime_1.jsx)("div", { className: "flex-1 flex flex-col gap-6 lg:gap-8", children: courses.filter(function (_, i) { return i % 2 === 1; }).map(function (course, idx) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "courses-timeline-card flex flex-col sm:flex-row items-start sm:items-center gap-4 sm:gap-6 cursor-pointer group", onClick: function () { return handleCourseClick(course); }, initial: { opacity: 0, x: 30 }, whileInView: { opacity: 1, x: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: idx * 0.1 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex-1 min-w-0 order-2 sm:order-1", children: [(0, jsx_runtime_1.jsx)("h3", { className: "courses-heading-4 courses-text-gradient mb-2 md:mb-3 line-clamp-2", children: course.title }), (0, jsx_runtime_1.jsx)("p", { className: "courses-body-small courses-text-secondary line-clamp-2 md:line-clamp-3 leading-relaxed", children: course.desc })] }), (0, jsx_runtime_1.jsxs)("div", { className: "relative w-full sm:w-32 md:w-40 h-32 sm:h-20 md:h-24 overflow-hidden rounded-lg flex-shrink-0 order-1 sm:order-2", children: [(0, jsx_runtime_1.jsx)("img", { src: course.img, alt: course.title, className: "w-full h-full object-cover transition-transform duration-300 group-hover:scale-110" }), (0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 bg-gradient-to-t from-black/50 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300" })] }), (0, jsx_runtime_1.jsx)("svg", { className: "w-5 h-5 md:w-6 md:h-6 group-hover:text-blue-400 transform group-hover:translate-x-1 transition-all duration-300 courses-text-muted flex-shrink-0 order-3", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) })] }, course.number)); }) }), (0, jsx_runtime_1.jsx)("div", { className: "lg:hidden mt-8 flex justify-center", children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.button, { className: "courses-button-primary py-3 px-8 rounded-2xl shadow-2xl transform transition-all duration-300 hover:scale-105", onClick: function () { return handleAction("enroll"); }, initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: 0.8 }, whileHover: { y: -3 }, whileTap: { y: 0 }, children: "Enroll now" }) })] })] }) }), (0, jsx_runtime_1.jsx)("section", { className: "courses-stats-section py-16 md:py-20 px-4 transition-all duration-500 border-b", children: (0, jsx_runtime_1.jsxs)("div", { className: "courses-container-wide", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.h2, { className: "courses-heading-2 courses-text-primary text-center mb-8 md:mb-12", initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5 }, children: "Project reviews from students" }), (0, jsx_runtime_1.jsx)("div", { className: "courses-grid courses-grid-3 mb-8 md:mb-12", children: projectReviews.map(function (review, idx) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "courses-card flex flex-col items-center text-center cursor-pointer group", initial: { opacity: 0, y: 30 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: idx * 0.1 }, whileHover: { scale: 1.02 }, onClick: function () { return handleInfo(review.review); }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "relative w-16 h-16 md:w-20 md:h-20 mb-4 md:mb-6", children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 rounded-full blur-md opacity-50 group-hover:opacity-70 transition-opacity duration-300 bg-gradient-to-r from-green-400 to-emerald-500" }), (0, jsx_runtime_1.jsx)("img", { src: review.img, alt: review.name, className: "relative w-full h-full rounded-full object-cover border-3 border-green-400 group-hover:border-green-300 transition-all duration-300 z-10 shadow-lg" })] }), (0, jsx_runtime_1.jsx)("h4", { className: "courses-heading-4 courses-text-gradient mb-3 md:mb-4", children: review.name }), (0, jsx_runtime_1.jsx)("p", { className: "courses-body-small courses-text-secondary text-center leading-relaxed line-clamp-4", children: review.review })] }, idx)); }) })] }) }), (0, jsx_runtime_1.jsxs)("section", { className: "courses-section py-16 md:py-20 px-4 transition-all duration-500 border-b", children: [(0, jsx_runtime_1.jsxs)("div", { className: "courses-container-wide", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.h3, { className: "courses-heading-3 courses-text-primary text-center mb-6 md:mb-8", initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5 }, children: "100+ topics taught..." }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "flex flex-wrap justify-center gap-2 md:gap-3 mb-6 transition-all duration-500 ".concat(showAllTopics ? 'max-h-none' : 'max-h-32 md:max-h-40 overflow-hidden'), initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: 0.1 }, children: (showAllTopics ? topics : topics.slice(0, 20)).map(function (topic, idx) { return ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "courses-topic-tag", whileHover: { scale: 1.05 }, transition: { type: "spring", stiffness: 400, damping: 10 }, children: topic }, idx)); }) }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "flex justify-center mb-8 md:mb-12", initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: 0.2 }, children: (0, jsx_runtime_1.jsx)("button", { className: "courses-button-ghost px-6 md:px-8 py-2 md:py-3 rounded-full font-semibold transform transition-all duration-300 hover:scale-105", onClick: function () { return setShowAllTopics(function (v) { return !v; }); }, children: showAllTopics ? "Show less" : "Show more" }) })] }), (0, jsx_runtime_1.jsx)("div", { ref: statsRef, className: "courses-grid courses-grid-3 mt-8 md:mt-12", children: stats.map(function (stat, idx) { return ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "courses-stat-card group text-center", initial: { opacity: 0, y: 30 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: idx * 0.1 }, whileHover: { scale: 1.02 }, children: (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-3xl md:text-4xl lg:text-5xl font-bold mb-3 md:mb-4 flex justify-center items-baseline courses-text-gradient", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "inline-block", initial: { opacity: 0, scale: 0.5 }, animate: { opacity: 1, scale: 1 }, transition: { duration: 0.5 }, children: isStatsVisible ? animatedStats[stat.label] : 0 }), (0, jsx_runtime_1.jsx)("span", { className: "inline-block ml-1 text-lg md:text-xl lg:text-2xl", children: stat.suffix })] }), (0, jsx_runtime_1.jsx)("div", { className: "courses-body-large courses-text-secondary font-semibold transition-colors duration-300 mb-4 md:mb-6", children: stat.label }), (0, jsx_runtime_1.jsx)("div", { className: "h-2 w-full rounded-full overflow-hidden bg-gradient-to-r from-gray-200 to-gray-300", children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "h-full bg-gradient-to-r from-blue-500 to-purple-500", initial: { width: "0%" }, animate: { width: isStatsVisible ? "100%" : "0%" }, transition: { duration: 1, delay: idx * 0.2 } }) })] }) }, idx)); }) })] }), (0, jsx_runtime_1.jsx)("section", { className: "courses-faq-section py-16 md:py-20 px-4 transition-all duration-500 border-b", children: (0, jsx_runtime_1.jsxs)("div", { className: "courses-container", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.h2, { className: "courses-heading-2 courses-text-primary text-center mb-8 md:mb-12", initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5 }, children: "Commonly asked questions" }), (0, jsx_runtime_1.jsx)("div", { className: "max-w-3xl mx-auto", children: faqs.map(function (faq, idx) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "courses-faq-item mb-4 md:mb-6", initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { duration: 0.5, delay: idx * 0.1 }, children: [(0, jsx_runtime_1.jsxs)("button", { className: "courses-faq-button w-full text-left py-4 md:py-6 px-4 md:px-6 courses-body md:courses-body-large font-semibold flex justify-between items-center focus:outline-none transition-all duration-300", onClick: function () { return setOpenFaq(openFaq === idx ? null : idx); }, children: [(0, jsx_runtime_1.jsx)("span", { className: "pr-4", children: faq.q }), (0, jsx_runtime_1.jsx)("span", { className: "transform transition-transform duration-300 text-xl md:text-2xl flex-shrink-0", style: { transform: openFaq === idx ? 'rotate(45deg)' : 'rotate(0)' }, children: "+" })] }), (0, jsx_runtime_1.jsx)("div", { className: "transition-all duration-300 overflow-hidden", style: { - maxHeight: openFaq === idx ? '500px' : '0', - opacity: openFaq === idx ? 1 : 0 - }, children: (0, jsx_runtime_1.jsx)("div", { className: "courses-faq-answer py-4 md:py-6 px-4 md:px-6 courses-body leading-relaxed", children: faq.a }) })] }, idx)); }) })] }) })] })] })); -} -function CoursesLanding() { - return (0, jsx_runtime_1.jsx)(CoursesContent, {}); -} diff --git a/src/pages/dashboard/giveaway/index.js b/src/pages/dashboard/giveaway/index.js deleted file mode 100644 index 9392c133..00000000 --- a/src/pages/dashboard/giveaway/index.js +++ /dev/null @@ -1,244 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importStar(require("react")); -var Layout_1 = __importDefault(require("@theme/Layout")); -var Head_1 = __importDefault(require("@docusaurus/Head")); -var framer_motion_1 = require("framer-motion"); -var react_slot_counter_1 = __importDefault(require("react-slot-counter")); -var NavbarIcon_1 = __importDefault(require("../../../components/navbar/NavbarIcon")); -var router_1 = require("@docusaurus/router"); -var lucide_react_1 = require("lucide-react"); -require("../dashboard.css"); -// Giveaway-specific styles -var giveawayStyles = "\n.dashboard-stats-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));\n gap: 24px;\n margin-bottom: 40px;\n}\n\n.giveaway-stats-banner {\n display: flex;\n justify-content: space-between;\n gap: 0.75rem;\n margin-bottom: 2rem;\n padding: 0 1rem;\n}\n\n.stat-item {\n flex: 1;\n display: flex;\n align-items: center;\n gap: 0.5rem;\n background: var(--ifm-background-color);\n border: 1px solid var(--ifm-color-emphasis-200);\n border-radius: 8px;\n padding: 0.5rem;\n transition: all 0.3s ease;\n box-shadow: 0 2px 8px var(--ifm-color-emphasis-200);\n}\n\n.stat-item:hover {\n transform: translateY(-2px);\n box-shadow: 0 4px 16px var(--ifm-color-emphasis-300);\n}\n\n.timer-icon {\n background: linear-gradient(135deg, #ff6b6b, #ffa726) !important;\n}\n\n.entries-icon {\n background: linear-gradient(135deg, #4ecdc4, #44a08d) !important;\n}\n\n.score-icon {\n background: linear-gradient(135deg, #667eea, #764ba2) !important;\n}\n\n.winners-icon {\n background: linear-gradient(135deg, #f093fb, #f5576c) !important;\n}\n\n.stat-icon {\n width: 28px;\n height: 28px;\n border-radius: 6px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 0.9rem;\n flex-shrink: 0;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n}\n\n.stat-content {\n min-width: 0;\n}\n\n.stat-content h3 {\n font-size: 0.65rem;\n font-weight: 600;\n color: var(--ifm-color-emphasis-700);\n margin: 0 0 0.15rem 0;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.stat-value {\n font-size: 1.1rem;\n font-weight: 800;\n color: var(--ifm-color-emphasis-900);\n display: flex;\n align-items: baseline;\n gap: 0.15rem;\n margin-bottom: 0.15rem;\n}\n\n.stat-value span {\n font-size: 0.6rem;\n font-weight: 600;\n color: var(--ifm-color-emphasis-600);\n}\n\n.stat-content p {\n font-size: 0.55rem;\n color: var(--ifm-color-emphasis-500);\n margin: 0;\n}\n\n[data-theme='dark'] .stat-item {\n background: var(--ifm-color-emphasis-100);\n border-color: var(--ifm-color-emphasis-300);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);\n}\n\n[data-theme='dark'] .stat-item:hover {\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);\n}\n\n.giveaway-leaderboard-section {\n margin: 3rem 0;\n padding: 0 1rem;\n}\n\n.giveaway-leaderboard-header {\n text-align: center;\n margin-bottom: 2rem;\n}\n\n.giveaway-leaderboard-title {\n font-size: 2.5rem;\n font-weight: 800;\n margin-bottom: 0.5rem;\n color: var(--ifm-color-emphasis-900);\n}\n\n.giveaway-leaderboard-subtitle {\n font-size: 1.1rem;\n color: var(--ifm-color-emphasis-700);\n margin: 0;\n}\n\n.giveaway-loading {\n text-align: center;\n padding: 3rem;\n color: var(--ifm-color-emphasis-700);\n}\n\n.giveaway-leaderboard-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n gap: 1.5rem;\n max-width: 1200px;\n margin: 0 auto;\n}\n\n.giveaway-leaderboard-card {\n background: var(--ifm-background-color);\n border: 1px solid var(--ifm-color-emphasis-300);\n border-radius: 16px;\n padding: 1.5rem;\n position: relative;\n overflow: hidden;\n transition: all 0.3s ease;\n box-shadow: 0 4px 12px var(--ifm-color-emphasis-200);\n}\n\n.giveaway-leaderboard-card:hover {\n box-shadow: 0 8px 25px var(--ifm-color-emphasis-300);\n border-color: var(--ifm-color-primary);\n transform: translateY(-2px);\n}\n\n.giveaway-leaderboard-card.rank-1 {\n background: linear-gradient(135deg, #ffd700, #ffed4e);\n border-color: #ffd700;\n}\n\n.giveaway-leaderboard-card.rank-2 {\n background: linear-gradient(135deg, #c0c0c0, #e8e8e8);\n border-color: #c0c0c0;\n}\n\n.giveaway-leaderboard-card.rank-3 {\n background: linear-gradient(135deg, #cd7f32, #daa520);\n border-color: #cd7f32;\n}\n\n[data-theme='dark'] .giveaway-leaderboard-card {\n background: var(--ifm-color-emphasis-100);\n border-color: var(--ifm-color-emphasis-400);\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);\n}\n\n[data-theme='dark'] .giveaway-leaderboard-card:hover {\n box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);\n}\n\n[data-theme='dark'] .giveaway-leaderboard-card.rank-1 {\n background: linear-gradient(135deg, #b8860b, #daa520);\n}\n\n[data-theme='dark'] .giveaway-leaderboard-card.rank-2 {\n background: linear-gradient(135deg, #708090, #a9a9a9);\n}\n\n[data-theme='dark'] .giveaway-leaderboard-card.rank-3 {\n background: linear-gradient(135deg, #8b4513, #cd853f);\n}\n\n.giveaway-rank-badge {\n position: absolute;\n top: 1rem;\n right: 1rem;\n width: 40px;\n height: 40px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n font-weight: bold;\n font-size: 0.9rem;\n background: var(--ifm-color-primary);\n color: var(--ifm-color-primary-contrast-background);\n}\n\n.giveaway-avatar {\n position: relative;\n width: 80px;\n height: 80px;\n margin: 0 auto 1rem;\n}\n\n.giveaway-avatar img {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n object-fit: cover;\n border: 3px solid var(--ifm-color-primary);\n}\n\n.giveaway-badge {\n position: absolute;\n bottom: -5px;\n left: 50%;\n transform: translateX(-50%);\n background: var(--ifm-color-primary);\n color: var(--ifm-color-primary-contrast-background);\n padding: 0.25rem 0.5rem;\n border-radius: 12px;\n font-size: 0.7rem;\n font-weight: 600;\n white-space: nowrap;\n}\n\n.giveaway-info {\n text-align: center;\n margin-bottom: 1rem;\n}\n\n.giveaway-name {\n font-size: 1.2rem;\n font-weight: 700;\n margin-bottom: 0.5rem;\n color: var(--ifm-color-emphasis-900);\n}\n\n.giveaway-leaderboard-card.rank-1 .giveaway-name,\n.giveaway-leaderboard-card.rank-2 .giveaway-name,\n.giveaway-leaderboard-card.rank-3 .giveaway-name {\n color: var(--ifm-color-emphasis-1000);\n}\n\n.giveaway-stats {\n display: flex;\n justify-content: space-around;\n gap: 1rem;\n}\n\n.giveaway-stat {\n text-align: center;\n}\n\n.giveaway-stat .stat-value {\n display: block;\n font-size: 1.5rem;\n font-weight: 700;\n color: var(--ifm-color-primary);\n}\n\n.giveaway-leaderboard-card.rank-1 .stat-value,\n.giveaway-leaderboard-card.rank-2 .stat-value,\n.giveaway-leaderboard-card.rank-3 .stat-value {\n color: var(--ifm-color-emphasis-1000);\n}\n\n.giveaway-stat .stat-label {\n font-size: 0.8rem;\n color: var(--ifm-color-emphasis-600);\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.giveaway-leaderboard-card.rank-1 .stat-label,\n.giveaway-leaderboard-card.rank-2 .stat-label,\n.giveaway-leaderboard-card.rank-3 .stat-label {\n color: var(--ifm-color-emphasis-800);\n}\n\n.giveaway-profile-btn {\n display: block;\n width: 100%;\n padding: 0.75rem;\n background: var(--ifm-color-primary);\n color: var(--ifm-color-primary-contrast-background);\n text-decoration: none;\n border-radius: 8px;\n text-align: center;\n font-weight: 600;\n transition: all 0.3s ease;\n}\n\n.giveaway-profile-btn:hover {\n background: var(--ifm-color-primary-dark);\n color: var(--ifm-color-primary-contrast-background);\n text-decoration: none;\n transform: translateY(-2px);\n}\n\n.giveaway-leaderboard-card.rank-1 .giveaway-profile-btn,\n.giveaway-leaderboard-card.rank-2 .giveaway-profile-btn,\n.giveaway-leaderboard-card.rank-3 .giveaway-profile-btn {\n background: var(--ifm-color-emphasis-800);\n color: var(--ifm-color-emphasis-0);\n}\n\n.giveaway-leaderboard-card.rank-1 .giveaway-profile-btn:hover,\n.giveaway-leaderboard-card.rank-2 .giveaway-profile-btn:hover,\n.giveaway-leaderboard-card.rank-3 .giveaway-profile-btn:hover {\n background: var(--ifm-color-emphasis-900);\n color: var(--ifm-color-emphasis-0);\n}\n\n@media (max-width: 768px) {\n .giveaway-stats-banner {\n flex-direction: column;\n gap: 0.5rem;\n }\n \n .stat-item {\n padding: 0.4rem;\n }\n \n .stat-icon {\n width: 24px;\n height: 24px;\n font-size: 0.8rem;\n }\n \n .stat-value {\n font-size: 1rem;\n }\n \n .stat-content h3 {\n font-size: 0.6rem;\n }\n \n .stat-content p {\n font-size: 0.5rem;\n }\n \n .giveaway-leaderboard-grid {\n grid-template-columns: 1fr;\n gap: 1rem;\n }\n \n .giveaway-leaderboard-title {\n font-size: 2rem;\n }\n}\n\n/* Dashboard styles for consistency */\n.dashboard-stats-section {\n margin-bottom: 60px;\n}\n\n.section-title {\n font-size: 1.8rem;\n font-weight: 700;\n margin-bottom: 30px;\n text-align: center;\n color: var(--ifm-color-content);\n}\n\n.dashboard-stat-card {\n background: var(--ifm-background-surface-color);\n border: 1px solid var(--ifm-color-emphasis-200);\n border-radius: 16px;\n padding: 32px 24px;\n text-align: center;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);\n transition: all 0.3s ease;\n position: relative;\n overflow: hidden;\n}\n\n.dashboard-stat-value {\n font-size: 2.5rem;\n font-weight: 800;\n margin-bottom: 10px;\n color: var(--ifm-color-primary);\n min-height: 60px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n@media (max-width: 996px) {\n .dashboard-main-content {\n padding: 80px 20px 40px;\n }\n}\n"; -// Inject styles -if (typeof document !== 'undefined') { - var existingStyle = document.getElementById('giveaway-styles'); - if (!existingStyle) { - var styleSheet = document.createElement('style'); - styleSheet.id = 'giveaway-styles'; - styleSheet.textContent = giveawayStyles; - document.head.appendChild(styleSheet); - } -} -var GiveawayPage = function () { - var _a, _b, _c; - var history = (0, router_1.useHistory)(); - var _d = (0, react_1.useState)(false), showDashboardMenu = _d[0], setShowDashboardMenu = _d[1]; - var _e = (0, react_1.useState)([]), leaderboard = _e[0], setLeaderboard = _e[1]; - var _f = (0, react_1.useState)(true), loading = _f[0], setLoading = _f[1]; - var _g = (0, react_1.useState)("giveaway"), activeTab = _g[0], setActiveTab = _g[1]; - // Close dashboard menu when clicking outside - (0, react_1.useEffect)(function () { - var handleClickOutside = function (event) { - var target = event.target; - // Close menu when clicking on overlay or anywhere outside the menu - if (showDashboardMenu && - (!target.closest('.dashboard-mobile-menu > div:last-child') && - !target.closest('.dashboard-menu-btn') || - target.closest('.dashboard-menu-overlay'))) { - setShowDashboardMenu(false); - } - }; - if (showDashboardMenu) { - document.addEventListener('mousedown', handleClickOutside); - } - return function () { - document.removeEventListener('mousedown', handleClickOutside); - }; - }, [showDashboardMenu]); - // Ensure active tab is set correctly when page loads - (0, react_1.useEffect)(function () { - // We're on the giveaway page, so the active tab should be "giveaway" - setActiveTab("giveaway"); - }, []); - (0, react_1.useEffect)(function () { - // Simulate fetching leaderboard data - var fetchLeaderboard = function () { return __awaiter(void 0, void 0, void 0, function () { - var mockData; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - setLoading(true); - // Simulate API delay - return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, 1000); })]; - case 1: - // Simulate API delay - _a.sent(); - mockData = [ - { - rank: 1, - name: "sanjay-kv", - avatar: "https://avatars.githubusercontent.com/u/30715153?v=4", - points: 2500, - contributions: 45, - github_url: "https://github.com/sanjay-kv", - badge: "🏆 Champion" - }, - { - rank: 2, - name: "vansh-codes", - avatar: "https://avatars.githubusercontent.com/u/114163734?v=4", - points: 2100, - contributions: 38, - github_url: "https://github.com/vansh-codes", - badge: "🥈 Runner-up" - }, - { - rank: 3, - name: "Hemu21", - avatar: "https://avatars.githubusercontent.com/u/106808387?v=4", - points: 1850, - contributions: 32, - github_url: "https://github.com/Hemu21", - badge: "🥉 Third Place" - }, - { - rank: 4, - name: "contributor4", - avatar: "https://avatars.githubusercontent.com/u/1?v=4", - points: 1600, - contributions: 28, - github_url: "https://github.com/contributor4" - }, - { - rank: 5, - name: "contributor5", - avatar: "https://avatars.githubusercontent.com/u/2?v=4", - points: 1400, - contributions: 24, - github_url: "https://github.com/contributor5" - } - ]; - setLeaderboard(mockData); - setLoading(false); - return [2 /*return*/]; - } - }); - }); }; - fetchLeaderboard(); - }, []); - var handleTabChange = function (tab) { - setActiveTab(tab); - setShowDashboardMenu(false); - // When navigating from giveaway page to other tabs, we need to - // ensure we're using consistent paths with the dashboard page - if (tab === "discuss") { - // Navigate to main dashboard page with discuss hash - history.push("/dashboard#discuss"); - } - else if (tab === "contributors") { - // Navigate to main dashboard page with leaderboard hash - history.push("/dashboard#leaderboard"); - } - else if (tab === "home") { - // Navigate to main dashboard page - history.push("/dashboard"); - } - else if (tab === "giveaway") { - // Already on giveaway page, just scroll to top - window.scrollTo(0, 0); - } - }; - var StatCard = function (_a) { - var icon = _a.icon, title = _a.title, value = _a.value, valueText = _a.valueText, description = _a.description; - return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "dashboard-stat-card", initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, transition: { duration: 0.5 }, viewport: { once: true }, whileHover: { scale: 1.02 }, children: [(0, jsx_runtime_1.jsx)("div", { className: "dashboard-stat-icon", children: icon }), (0, jsx_runtime_1.jsxs)("div", { className: "dashboard-stat-content", children: [(0, jsx_runtime_1.jsx)("h3", { className: "dashboard-stat-title", children: title }), (0, jsx_runtime_1.jsx)("div", { className: "dashboard-stat-value", children: (0, jsx_runtime_1.jsx)(react_slot_counter_1.default, { value: valueText, autoAnimationStart: true, duration: 1 }) }), (0, jsx_runtime_1.jsx)("p", { className: "dashboard-stat-description", children: description })] })] })); - }; - return ((0, jsx_runtime_1.jsxs)(Layout_1.default, { title: "Giveaway", description: "RecodeHive Giveaway", noFooter: true, children: [(0, jsx_runtime_1.jsx)(Head_1.default, { children: (0, jsx_runtime_1.jsx)("title", { children: "\uD83C\uDF81 RecodeHive Giveaway" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "dashboard-layout", children: [(0, jsx_runtime_1.jsx)("button", { className: "dashboard-menu-btn ".concat(showDashboardMenu ? "open" : ""), onClick: function () { return setShowDashboardMenu(!showDashboardMenu); }, "aria-label": "Toggle dashboard menu", children: showDashboardMenu ? (0, jsx_runtime_1.jsx)("span", { "aria-hidden": "true", children: "\u2715" }) : (0, jsx_runtime_1.jsx)("span", { "aria-hidden": "true", children: "\u2630" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "dashboard-mobile-menu ".concat(showDashboardMenu ? "show" : ""), children: [(0, jsx_runtime_1.jsx)("div", { className: "dashboard-menu-overlay", onClick: function () { return setShowDashboardMenu(false); } }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { className: "dashboard-menu-header", children: [(0, jsx_runtime_1.jsx)("h3", { children: "Dashboard Menu" }), (0, jsx_runtime_1.jsx)("button", { className: "close-menu-btn", onClick: function () { return setShowDashboardMenu(false); }, "aria-label": "Close menu", children: "\u2715" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "dashboard-menu-items", children: [(0, jsx_runtime_1.jsxs)("div", { className: "menu-item ".concat(activeTab === "home" ? "active" : ""), onClick: function () { - handleTabChange("home"); - setShowDashboardMenu(false); - }, children: [(0, jsx_runtime_1.jsx)("span", { className: "menu-icon", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Home, { size: 18 }) }), " Home"] }), (0, jsx_runtime_1.jsxs)("div", { className: "menu-item ".concat(activeTab === "discuss" ? "active" : ""), onClick: function () { - handleTabChange("discuss"); - setShowDashboardMenu(false); - }, children: [(0, jsx_runtime_1.jsx)("span", { className: "menu-icon", children: (0, jsx_runtime_1.jsx)(lucide_react_1.MessageCircle, { size: 18 }) }), " Discussions"] }), (0, jsx_runtime_1.jsxs)("div", { className: "menu-item ".concat(activeTab === "contributors" ? "active" : ""), onClick: function () { - handleTabChange("contributors"); - setShowDashboardMenu(false); - }, children: [(0, jsx_runtime_1.jsx)("span", { className: "menu-icon", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Trophy, { size: 18 }) }), " LeaderBoard"] }), (0, jsx_runtime_1.jsxs)("div", { className: "menu-item ".concat(activeTab === "giveaway" ? "active" : ""), onClick: function () { - handleTabChange("giveaway"); - setShowDashboardMenu(false); - }, children: [(0, jsx_runtime_1.jsx)("span", { className: "menu-icon", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Gift, { size: 18 }) }), " Giveaways"] })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "dashboard-sidebar", children: [(0, jsx_runtime_1.jsx)("div", { className: "sidebar-header", children: (0, jsx_runtime_1.jsx)("button", { className: "back-button", onClick: function () { - // If we came from the dashboard, go back, otherwise go to dashboard - if (history.length > 2) { - history.goBack(); - } - else { - history.push('/dashboard'); - } - }, "aria-label": "Go back to dashboard", children: (0, jsx_runtime_1.jsx)(lucide_react_1.ArrowLeft, { size: 20 }) }) }), (0, jsx_runtime_1.jsxs)("div", { className: "sidebar-nav", children: [(0, jsx_runtime_1.jsx)(NavbarIcon_1.default, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.Home, { size: 20 }), text: "Home", active: activeTab === "home", onClick: function () { return handleTabChange("home"); } }), (0, jsx_runtime_1.jsx)(NavbarIcon_1.default, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.MessageCircle, { size: 20 }), text: "Discussions", active: activeTab === "discuss", onClick: function () { return handleTabChange("discuss"); } }), (0, jsx_runtime_1.jsx)(NavbarIcon_1.default, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.Trophy, { size: 20 }), text: "LeaderBoard", active: activeTab === "contributors", onClick: function () { return handleTabChange("contributors"); } }), (0, jsx_runtime_1.jsx)(NavbarIcon_1.default, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.Gift, { size: 20 }), text: "Giveaways", active: activeTab === "giveaway", onClick: function () { return handleTabChange("giveaway"); } })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "dashboard-main-content", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.section, { className: "dashboard-hero", initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.8 }, children: (0, jsx_runtime_1.jsxs)("div", { className: "hero-content", children: [(0, jsx_runtime_1.jsxs)("h1", { className: "dashboard-title", children: ["\uD83C\uDF81 ", (0, jsx_runtime_1.jsx)("span", { className: "highlight", children: "Giveaway" })] }), (0, jsx_runtime_1.jsx)("p", { className: "dashboard-subtitle", children: "Participate in exclusive giveaways and win exciting prizes!" })] }) }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.section, { className: "dashboard-stats-section", initial: { opacity: 0, y: 10 }, whileInView: { opacity: 1 }, transition: { duration: 0.6 }, viewport: { once: true }, children: (0, jsx_runtime_1.jsxs)("div", { className: "dashboard-stats-grid", children: [(0, jsx_runtime_1.jsx)(StatCard, { icon: "\u23F3", title: "Next Giveaway", value: 5, valueText: "5 Days", description: "Time remaining" }), (0, jsx_runtime_1.jsx)(StatCard, { icon: "\uD83C\uDFAB", title: "Entries", value: leaderboard.length, valueText: leaderboard.length.toString(), description: "Total participants" }), (0, jsx_runtime_1.jsx)(StatCard, { icon: "\uD83D\uDCC8", title: "Top Score", value: ((_a = leaderboard[0]) === null || _a === void 0 ? void 0 : _a.points) || 0, valueText: ((_c = (_b = leaderboard[0]) === null || _b === void 0 ? void 0 : _b.points) === null || _c === void 0 ? void 0 : _c.toString()) || "0", description: "Leading participant" }), (0, jsx_runtime_1.jsx)(StatCard, { icon: "\uD83C\uDFC5", title: "Total Winners", value: 3, valueText: "3", description: "Winners per giveaway" })] }) }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.section, { className: "giveaway-leaderboard-section", initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, transition: { duration: 0.6, delay: 0.2 }, viewport: { once: true }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "giveaway-leaderboard-header", children: [(0, jsx_runtime_1.jsxs)("h2", { className: "giveaway-leaderboard-title", children: ["\uD83C\uDF81 Giveaway ", (0, jsx_runtime_1.jsx)("span", { className: "highlight", children: "Leaderboard" })] }), (0, jsx_runtime_1.jsx)("p", { className: "giveaway-leaderboard-subtitle", children: "Top contributors competing for amazing prizes!" })] }), loading ? ((0, jsx_runtime_1.jsxs)("div", { className: "giveaway-loading", children: [(0, jsx_runtime_1.jsx)("div", { className: "loading-spinner", children: "Loading..." }), (0, jsx_runtime_1.jsx)("p", { children: "Fetching leaderboard data..." })] })) : ((0, jsx_runtime_1.jsx)("div", { className: "giveaway-leaderboard-grid", children: leaderboard.map(function (entry, index) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "giveaway-leaderboard-card rank-".concat(entry.rank <= 3 ? entry.rank : 'other'), initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5, delay: index * 0.1 }, whileHover: { scale: 1.02, y: -5 }, children: [(0, jsx_runtime_1.jsx)("div", { className: "giveaway-rank-badge", children: entry.rank <= 3 ? (entry.rank === 1 ? (0, jsx_runtime_1.jsx)(lucide_react_1.Crown, { size: 20 }) : - entry.rank === 2 ? (0, jsx_runtime_1.jsx)(lucide_react_1.Award, { size: 20 }) : - (0, jsx_runtime_1.jsx)(lucide_react_1.Star, { size: 20 })) : ("#".concat(entry.rank)) }), (0, jsx_runtime_1.jsxs)("div", { className: "giveaway-avatar", children: [(0, jsx_runtime_1.jsx)("img", { src: entry.avatar, alt: entry.name }), entry.badge && ((0, jsx_runtime_1.jsx)("div", { className: "giveaway-badge", children: entry.badge }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "giveaway-info", children: [(0, jsx_runtime_1.jsx)("h3", { className: "giveaway-name", children: entry.name }), (0, jsx_runtime_1.jsxs)("div", { className: "giveaway-stats", children: [(0, jsx_runtime_1.jsxs)("div", { className: "giveaway-stat", children: [(0, jsx_runtime_1.jsx)("span", { className: "stat-value", children: entry.points }), (0, jsx_runtime_1.jsx)("span", { className: "stat-label", children: "Points" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "giveaway-stat", children: [(0, jsx_runtime_1.jsx)("span", { className: "stat-value", children: entry.contributions }), (0, jsx_runtime_1.jsx)("span", { className: "stat-label", children: "Contributions" })] })] })] }), (0, jsx_runtime_1.jsx)("a", { href: entry.github_url, target: "_blank", rel: "noopener noreferrer", className: "giveaway-profile-btn", children: "View Profile" })] }, entry.rank)); }) }))] })] })] })] })); -}; -exports.default = GiveawayPage; diff --git a/src/pages/dashboard/index.js b/src/pages/dashboard/index.js deleted file mode 100644 index c3a62de4..00000000 --- a/src/pages/dashboard/index.js +++ /dev/null @@ -1,345 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importStar(require("react")); -var Layout_1 = __importDefault(require("@theme/Layout")); -var Head_1 = __importDefault(require("@docusaurus/Head")); -var BrowserOnly_1 = __importDefault(require("@docusaurus/BrowserOnly")); -var framer_motion_1 = require("framer-motion"); -var statsProvider_1 = require("@site/src/lib/statsProvider"); -var react_slot_counter_1 = __importDefault(require("react-slot-counter")); -var router_1 = require("@docusaurus/router"); -var githubService_1 = require("@site/src/services/githubService"); -var DiscussionCard_1 = __importDefault(require("@site/src/components/discussions/DiscussionCard")); -var lucide_react_1 = require("lucide-react"); -var NavbarIcon_1 = __importDefault(require("@site/src/components/navbar/NavbarIcon")); -require("@site/src/components/discussions/discussions.css"); -require("./dashboard.css"); -var leaderboard_1 = __importDefault(require("@site/src/components/dashboard/LeaderBoard/leaderboard")); -var categories = [ - "all", - "announcements", - "ideas", - "q-a", - "show-and-tell", - "general", -]; -var DashboardContent = function () { - var location = (0, router_1.useLocation)(); - var history = (0, router_1.useHistory)(); - var _a = (0, react_1.useState)("home"), activeTab = _a[0], setActiveTab = _a[1]; - // Discussion state management - var _b = (0, react_1.useState)("discussions"), activeDiscussionTab = _b[0], setActiveDiscussionTab = _b[1]; - var _c = (0, react_1.useState)("all"), selectedCategory = _c[0], setSelectedCategory = _c[1]; - var _d = (0, react_1.useState)("most_popular"), sortBy = _d[0], setSortBy = _d[1]; - var _e = (0, react_1.useState)(""), searchQuery = _e[0], setSearchQuery = _e[1]; - var _f = (0, react_1.useState)([]), discussions = _f[0], setDiscussions = _f[1]; - var _g = (0, react_1.useState)(true), discussionsLoading = _g[0], setDiscussionsLoading = _g[1]; - var _h = (0, react_1.useState)(null), discussionsError = _h[0], setDiscussionsError = _h[1]; - var _j = (0, react_1.useState)(false), showDashboardMenu = _j[0], setShowDashboardMenu = _j[1]; - // Close dashboard menu when clicking outside - (0, react_1.useEffect)(function () { - var handleClickOutside = function (event) { - var target = event.target; - if (showDashboardMenu && - !target.closest('.dashboard-mobile-menu') && - !target.closest('.dashboard-menu-btn')) { - setShowDashboardMenu(false); - } - }; - if (showDashboardMenu) { - document.addEventListener('mousedown', handleClickOutside); - } - return function () { - document.removeEventListener('mousedown', handleClickOutside); - }; - }, [showDashboardMenu]); - (0, react_1.useEffect)(function () { - // Set active tab based on URL hash - if (location.hash === "#discuss") { - setActiveTab("discuss"); - } - else if (location.hash === "#leaderboard") { - setActiveTab("contributors"); - } - else if (location.hash === "#giveaway") { - setActiveTab("giveaway"); - } - else { - setActiveTab("home"); - } - }, [location]); - // Fetch discussions when discuss tab is active - (0, react_1.useEffect)(function () { - if (activeTab === "discuss") { - fetchDiscussions(); - } - }, [activeTab]); - var fetchDiscussions = function () { return __awaiter(void 0, void 0, void 0, function () { - var discussionsData, error_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, 3, 4]); - setDiscussionsLoading(true); - setDiscussionsError(null); - return [4 /*yield*/, githubService_1.githubService.fetchDiscussions(20)]; - case 1: - discussionsData = _a.sent(); - setDiscussions(discussionsData); - return [3 /*break*/, 4]; - case 2: - error_1 = _a.sent(); - console.error("Failed to fetch discussions:", error_1); - setDiscussionsError(error_1 instanceof Error ? error_1.message : "Failed to load discussions"); - return [3 /*break*/, 4]; - case 3: - setDiscussionsLoading(false); - return [7 /*endfinally*/]; - case 4: return [2 /*return*/]; - } - }); - }); }; - // Discussion handlers - var handleDiscussionTabChange = function (tab) { - setActiveDiscussionTab(tab); - }; - var handleCategoryChange = function (category) { - setSelectedCategory(category); - }; - var getCategoryIcon = function (category) { - var iconMap = { - all: null, - announcements: (0, jsx_runtime_1.jsx)(lucide_react_1.Megaphone, { size: 14 }), - ideas: (0, jsx_runtime_1.jsx)(lucide_react_1.Lightbulb, { size: 14 }), - "q-a": (0, jsx_runtime_1.jsx)(lucide_react_1.HelpCircle, { size: 14 }), - "show-and-tell": (0, jsx_runtime_1.jsx)(lucide_react_1.Star, { size: 14 }), - general: (0, jsx_runtime_1.jsx)(lucide_react_1.MessageCircle, { size: 14 }), - }; - return iconMap[category] || null; - }; - var getCategoryDisplayName = function (category) { - var categoryMap = { - all: "All", - announcements: "Announcements", - ideas: "Ideas", - "q-a": "Q&A", - "show-and-tell": "Show & Tell", - general: "General", - }; - return categoryMap[category] || category; - }; - var handleSortChange = function (event) { - setSortBy(event.target.value); - }; - var handleSearchChange = function (event) { - setSearchQuery(event.target.value); - }; - var handleNewDiscussion = function () { - window.open("https://github.com/recodehive/recode-website/discussions/new", "_blank"); - }; - // Filter discussions based on current state and tab - var getFilteredDiscussions = function (discussions) { - return discussions - .filter(function (discussion) { - // First apply tab filter - switch (activeDiscussionTab) { - case "trending": - return discussion.reactions.total_count > 5; - case "unanswered": - return discussion.comments === 0; - default: - return true; - } - }) - .filter(function (discussion) { - // Then apply category filter - if (selectedCategory !== "all") { - var categoryName = discussion.category.name.toLowerCase(); - var selectedCat = selectedCategory.toLowerCase(); - // Map GitHub discussion categories to our filter categories - if (selectedCat === "q-a" && - (categoryName.includes("q&a") || categoryName.includes("question"))) { - return true; - } - if (selectedCat === "show-and-tell" && - categoryName.includes("show")) { - return true; - } - if (selectedCat === "announcements" && - categoryName.includes("announcement")) { - return true; - } - if (selectedCat === "ideas" && categoryName.includes("idea")) { - return true; - } - if (selectedCat === "general" && - (categoryName.includes("general") || - categoryName.includes("discussion"))) { - return true; - } - return categoryName.includes(selectedCat); - } - return true; - }) - .filter(function (discussion) { - // Then apply search filter - if (searchQuery) { - return (discussion.title - .toLowerCase() - .includes(searchQuery.toLowerCase()) || - discussion.body.toLowerCase().includes(searchQuery.toLowerCase())); - } - return true; - }) - .sort(function (a, b) { - // Finally sort the results - switch (sortBy) { - case "latest": - return (new Date(b.created_at).getTime() - - new Date(a.created_at).getTime()); - case "oldest": - return (new Date(a.created_at).getTime() - - new Date(b.created_at).getTime()); - default: - return b.reactions.total_count - a.reactions.total_count; - } - }); - }; - var filteredDiscussions = react_1.default.useMemo(function () { return getFilteredDiscussions(discussions); }, [discussions, activeDiscussionTab, selectedCategory, searchQuery, sortBy]); - var handleTabChange = function (tab) { - setActiveTab(tab); - setShowDashboardMenu(false); - if (tab === "discuss") { - history.push("#discuss"); - window.scrollTo(0, 0); - } - else if (tab === "giveaway") { - history.push("/dashboard/giveaway"); - } - else if (tab === "contributors") { - history.push("#leaderboard"); - window.scrollTo(0, 0); - } - else { - history.push("#"); - } - }; - var _k = (0, statsProvider_1.useCommunityStatsContext)(), githubStarCount = _k.githubStarCount, githubContributorsCount = _k.githubContributorsCount, githubForksCount = _k.githubForksCount, githubReposCount = _k.githubReposCount, loading = _k.loading, error = _k.error; - var _l = (0, react_1.useState)({ - totalContributors: 0, - totalRepositories: 0, - totalStars: 0, - totalForks: 0, - }), dashboardStats = _l[0], setDashboardStats = _l[1]; - (0, react_1.useEffect)(function () { - setDashboardStats({ - totalContributors: githubContributorsCount, - totalRepositories: githubReposCount, - totalStars: githubStarCount, - totalForks: githubForksCount, - }); - }, [ - githubContributorsCount, - githubReposCount, - githubStarCount, - githubForksCount, - ]); - var StatCard = function (_a) { - var icon = _a.icon, title = _a.title, value = _a.value, valueText = _a.valueText, description = _a.description; - return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "dashboard-stat-card", initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, transition: { duration: 0.5 }, viewport: { once: true }, whileHover: { scale: 1.02 }, children: [(0, jsx_runtime_1.jsx)("div", { className: "dashboard-stat-icon", children: icon }), (0, jsx_runtime_1.jsxs)("div", { className: "dashboard-stat-content", children: [(0, jsx_runtime_1.jsx)("h3", { className: "dashboard-stat-title", children: title }), (0, jsx_runtime_1.jsx)("div", { className: "dashboard-stat-value", children: loading ? ((0, jsx_runtime_1.jsx)("div", { className: "loading-spinner" })) : ((0, jsx_runtime_1.jsx)(react_slot_counter_1.default, { value: valueText, autoAnimationStart: true, duration: 1 })) }), (0, jsx_runtime_1.jsx)("p", { className: "dashboard-stat-description", children: description })] })] })); - }; - return ((0, jsx_runtime_1.jsxs)("div", { className: "dashboard-layout", children: [(0, jsx_runtime_1.jsx)("button", { className: "dashboard-menu-btn ".concat(showDashboardMenu ? "open" : ""), onClick: function () { return setShowDashboardMenu(!showDashboardMenu); }, "aria-label": "Toggle dashboard menu", children: showDashboardMenu ? "✕" : "☰" }), (0, jsx_runtime_1.jsxs)("div", { className: "dashboard-mobile-menu ".concat(showDashboardMenu ? "show" : ""), children: [showDashboardMenu && ((0, jsx_runtime_1.jsx)("div", { className: "dashboard-menu-overlay", onClick: function () { return setShowDashboardMenu(false); } })), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { className: "dashboard-menu-header", children: [(0, jsx_runtime_1.jsx)("h3", { children: "Dashboard Menu" }), (0, jsx_runtime_1.jsx)("button", { className: "close-menu-btn", onClick: function () { return setShowDashboardMenu(false); }, "aria-label": "Close menu", children: "\u2715" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "dashboard-menu-items", children: [(0, jsx_runtime_1.jsxs)("div", { className: "menu-item ".concat(activeTab === "home" ? "active" : ""), onClick: function () { - handleTabChange("home"); - setShowDashboardMenu(false); - }, children: [(0, jsx_runtime_1.jsx)("span", { className: "menu-icon", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Home, { size: 18 }) }), " Home"] }), (0, jsx_runtime_1.jsxs)("div", { className: "menu-item ".concat(activeTab === "discuss" ? "active" : ""), onClick: function () { - handleTabChange("discuss"); - setShowDashboardMenu(false); - }, children: [(0, jsx_runtime_1.jsx)("span", { className: "menu-icon", children: (0, jsx_runtime_1.jsx)(lucide_react_1.MessageCircle, { size: 18 }) }), " Discussions"] }), (0, jsx_runtime_1.jsxs)("div", { className: "menu-item ".concat(activeTab === "contributors" ? "active" : ""), onClick: function () { - handleTabChange("contributors"); - setShowDashboardMenu(false); - }, children: [(0, jsx_runtime_1.jsx)("span", { className: "menu-icon", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Users, { size: 18 }) }), " LeaderBoard"] }), (0, jsx_runtime_1.jsxs)("div", { className: "menu-item ".concat(activeTab === "giveaway" ? "active" : ""), onClick: function () { - handleTabChange("giveaway"); - setShowDashboardMenu(false); - }, children: [(0, jsx_runtime_1.jsx)("span", { className: "menu-icon", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Gift, { size: 18 }) }), " Giveaways"] })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "dashboard-sidebar", children: [(0, jsx_runtime_1.jsx)("div", { className: "sidebar-header", children: (0, jsx_runtime_1.jsx)("button", { className: "back-button", onClick: function () { return history.goBack(); }, "aria-label": "Go back", children: (0, jsx_runtime_1.jsx)(lucide_react_1.ArrowLeft, { size: 20 }) }) }), (0, jsx_runtime_1.jsxs)("div", { className: "sidebar-nav", children: [(0, jsx_runtime_1.jsx)(NavbarIcon_1.default, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.Home, { size: 20 }), text: "Home", active: activeTab === "home", onClick: function () { return handleTabChange("home"); } }), (0, jsx_runtime_1.jsx)(NavbarIcon_1.default, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.MessageCircle, { size: 20 }), text: "Discussions", active: activeTab === "discuss", onClick: function () { return handleTabChange("discuss"); } }), (0, jsx_runtime_1.jsx)(NavbarIcon_1.default, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.Users, { size: 20 }), text: "LeaderBoard\n", active: activeTab === "contributors", onClick: function () { return handleTabChange("contributors"); } }), (0, jsx_runtime_1.jsx)(NavbarIcon_1.default, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.Gift, { size: 20 }), text: "Giveaways", active: activeTab === "giveaway", onClick: function () { return handleTabChange("giveaway"); } })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "dashboard-main-content", children: [(0, jsx_runtime_1.jsx)(Head_1.default, { children: (0, jsx_runtime_1.jsx)("title", { children: "Dashboard | Recode Hive" }) }), activeTab === "home" && ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "dashboard-home-container", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5 }, children: [(0, jsx_runtime_1.jsx)("h1", { className: "dashboard-main-title", children: "Recode Hive Community Dashboard" }), (0, jsx_runtime_1.jsx)("p", { className: "dashboard-description", children: "Welcome to the Recode Hive community hub! Explore our stats, engage in discussions, and connect with fellow contributors." }), (0, jsx_runtime_1.jsxs)("section", { className: "dashboard-stats-section", children: [(0, jsx_runtime_1.jsx)("h2", { className: "section-title", children: "Community At a Glance" }), (0, jsx_runtime_1.jsxs)("div", { className: "stat-cards-container", children: [(0, jsx_runtime_1.jsx)(StatCard, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.Star, { size: 24 }), title: "Total Stars", value: dashboardStats.totalStars, valueText: (0, statsProvider_1.useCommunityStatsContext)().githubStarCountText || "937", description: "Stars across all our public repositories" }), (0, jsx_runtime_1.jsx)(StatCard, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.Users, { size: 24 }), title: "Contributors", value: dashboardStats.totalContributors, valueText: (0, statsProvider_1.useCommunityStatsContext)().githubContributorsCountText || "444", description: "Amazing community members" }), (0, jsx_runtime_1.jsx)(StatCard, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.GitFork, { size: 24 }), title: "Forks", value: dashboardStats.totalForks, valueText: (0, statsProvider_1.useCommunityStatsContext)().githubForksCountText || "1.03K", description: "Community contributions" })] })] })] })), activeTab === "discuss" && ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "dashboard-discussions", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "discussions-header", children: [(0, jsx_runtime_1.jsx)("h1", { children: "Community Discussions" }), (0, jsx_runtime_1.jsx)("p", { children: "Engage with the community, ask questions, and share your projects." })] }), (0, jsx_runtime_1.jsxs)("div", { className: "discussions-controls", children: [(0, jsx_runtime_1.jsxs)("div", { className: "discussion-tabs", children: [(0, jsx_runtime_1.jsxs)("button", { onClick: function () { return handleDiscussionTabChange("discussions"); }, className: "tab-button ".concat(activeDiscussionTab === "discussions" ? "active" : ""), children: [(0, jsx_runtime_1.jsx)(lucide_react_1.MessageCircle, { size: 18 }), " All Discussions"] }), (0, jsx_runtime_1.jsxs)("button", { onClick: function () { return handleDiscussionTabChange("trending"); }, className: "tab-button ".concat(activeDiscussionTab === "trending" ? "active" : ""), children: [(0, jsx_runtime_1.jsx)(lucide_react_1.TrendingUp, { size: 18 }), " Trending"] }), (0, jsx_runtime_1.jsxs)("button", { onClick: function () { return handleDiscussionTabChange("unanswered"); }, className: "tab-button ".concat(activeDiscussionTab === "unanswered" ? "active" : ""), children: [(0, jsx_runtime_1.jsx)(lucide_react_1.HelpCircle, { size: 18 }), " Unanswered"] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "search-and-sort", children: [(0, jsx_runtime_1.jsxs)("div", { className: "search-bar", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Search, { size: 16 }), (0, jsx_runtime_1.jsx)("input", { type: "text", placeholder: "Search discussions...", value: searchQuery, onChange: handleSearchChange })] }), (0, jsx_runtime_1.jsxs)("select", { onChange: handleSortChange, value: sortBy, children: [(0, jsx_runtime_1.jsx)("option", { value: "most_popular", children: "Most Popular" }), (0, jsx_runtime_1.jsx)("option", { value: "latest", children: "Latest" }), (0, jsx_runtime_1.jsx)("option", { value: "oldest", children: "Oldest" })] }), (0, jsx_runtime_1.jsx)("button", { className: "new-discussion-btn", onClick: handleNewDiscussion, children: "New Discussion" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "discussions-main-content", children: [(0, jsx_runtime_1.jsxs)("div", { className: "category-sidebar", children: [(0, jsx_runtime_1.jsx)("h3", { children: "Categories" }), (0, jsx_runtime_1.jsx)("ul", { children: categories.map(function (cat) { return ((0, jsx_runtime_1.jsxs)("li", { className: selectedCategory === cat ? "active" : "", onClick: function () { return handleCategoryChange(cat); }, children: [getCategoryIcon(cat), " ", getCategoryDisplayName(cat)] }, cat)); }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "discussion-list", children: [discussionsLoading && ((0, jsx_runtime_1.jsx)("div", { className: "loading-spinner-container", children: (0, jsx_runtime_1.jsx)("div", { className: "loading-spinner" }) })), discussionsError && ((0, jsx_runtime_1.jsx)("div", { className: "discussions-error-message", children: (0, jsx_runtime_1.jsx)("p", { children: discussionsError }) })), !discussionsLoading && - !discussionsError && - filteredDiscussions.length === 0 && ((0, jsx_runtime_1.jsx)("div", { className: "no-discussions-found", children: (0, jsx_runtime_1.jsx)("p", { children: "No discussions found matching your criteria." }) })), !discussionsLoading && - !discussionsError && - filteredDiscussions.map(function (discussion) { return ((0, jsx_runtime_1.jsx)(DiscussionCard_1.default, { discussion: discussion }, discussion.id)); })] })] })] })), activeTab === "contributors" && ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "dashboard-contributors", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5 }, children: (0, jsx_runtime_1.jsx)(leaderboard_1.default, {}) })), activeTab === "giveaway" && ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5 }, className: "giveaway-section", children: [(0, jsx_runtime_1.jsx)("h1", { children: "Giveaways" }), (0, jsx_runtime_1.jsx)("p", { children: "Participate in our exciting giveaways for a chance to win awesome prizes!" }), (0, jsx_runtime_1.jsx)("div", { className: "giveaway-content", children: (0, jsx_runtime_1.jsx)("p", { children: "Stay tuned for our next giveaway. Follow our social media channels for updates!" }) })] }))] })] })); -}; -var Dashboard = function () { - return ((0, jsx_runtime_1.jsxs)(Layout_1.default, { children: [(0, jsx_runtime_1.jsxs)(Head_1.default, { children: [(0, jsx_runtime_1.jsx)("link", { rel: "preconnect", href: "https://fonts.googleapis.com" }), (0, jsx_runtime_1.jsx)("link", { rel: "preconnect", href: "https://fonts.gstatic.com", crossOrigin: "anonymous" }), (0, jsx_runtime_1.jsx)("link", { href: "https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap", rel: "stylesheet" })] }), (0, jsx_runtime_1.jsx)(BrowserOnly_1.default, { fallback: (0, jsx_runtime_1.jsx)("div", { children: "Loading Dashboard..." }), children: function () { return ((0, jsx_runtime_1.jsx)(statsProvider_1.CommunityStatsProvider, { children: (0, jsx_runtime_1.jsx)(DashboardContent, {}) })); } })] })); -}; -exports.default = Dashboard; diff --git a/src/pages/get-started/index.js b/src/pages/get-started/index.js deleted file mode 100644 index 3c8f1daf..00000000 --- a/src/pages/get-started/index.js +++ /dev/null @@ -1,429 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = GetStarted; -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importStar(require("react")); -var Layout_1 = __importDefault(require("@theme/Layout")); -var Link_1 = __importDefault(require("@docusaurus/Link")); -var useDocusaurusContext_1 = __importDefault(require("@docusaurus/useDocusaurusContext")); -var framer_motion_1 = require("framer-motion"); -var Head_1 = __importDefault(require("@docusaurus/Head")); -var ExecutionEnvironment_1 = __importDefault(require("@docusaurus/ExecutionEnvironment")); -// Safe hook for color mode that handles SSR -function useSafeColorMode() { - var _a = (0, react_1.useState)(false), mounted = _a[0], setMounted = _a[1]; - (0, react_1.useEffect)(function () { - setMounted(true); - }, []); - var colorMode = "light"; - var isDark = false; - if (mounted && ExecutionEnvironment_1.default.canUseDOM) { - try { - var useColorModeHook = require("@docusaurus/theme-common").useColorMode; - var colorModeResult = useColorModeHook(); - colorMode = colorModeResult.colorMode; - isDark = colorMode === "dark"; - } - catch (error) { - console.warn("Failed to get color mode:", error); - } - } - return { colorMode: colorMode, isDark: isDark, mounted: mounted }; -} -var styles_module_css_1 = __importDefault(require("./styles.module.css")); -// Animated component for staggered animations -var AnimatedSection = function (_a) { - var children = _a.children, _b = _a.delay, delay = _b === void 0 ? 0 : _b; - var controls = (0, framer_motion_1.useAnimation)(); - var ref = (0, react_1.useRef)(null); - var isInView = (0, framer_motion_1.useInView)(ref, { once: true }); - (0, react_1.useEffect)(function () { - if (isInView) { - controls.start({ - opacity: 1, - y: 0, - transition: { - duration: 0.8, - delay: delay * 0.15, - ease: [0.16, 1, 0.3, 1], - staggerChildren: 0.1, - }, - }); - } - }, [controls, isInView, delay]); - return ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { ref: ref, initial: { opacity: 0, y: 30 }, animate: controls, style: { - willChange: "opacity, transform", - backfaceVisibility: "hidden", - WebkitFontSmoothing: "subpixel-antialiased", - }, children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: { opacity: 0 }, animate: isInView ? { opacity: 1 } : { opacity: 0 }, transition: { duration: 0.5, delay: 0.2 + delay * 0.1 }, children: children }) })); -}; -function GetStartedHeader() { - var siteConfig = (0, useDocusaurusContext_1.default)().siteConfig; - // Remove unused siteConfig or use it if needed - var _a = (0, react_1.useState)(0), textIndex = _a[0], setTextIndex = _a[1]; - var texts = ["Code", "Build", "Deploy", "Learn"]; - (0, react_1.useEffect)(function () { - var interval = setInterval(function () { - setTextIndex(function (prevIndex) { return (prevIndex + 1) % texts.length; }); - }, 2000); - return function () { return clearInterval(interval); }; - }, []); - return ((0, jsx_runtime_1.jsxs)("header", { className: styles_module_css_1.default.heroBanner, children: [(0, jsx_runtime_1.jsx)("div", { className: styles_module_css_1.default.heroOverlay }), (0, jsx_runtime_1.jsx)("div", { className: "container", children: (0, jsx_runtime_1.jsxs)("div", { className: styles_module_css_1.default.heroContent, children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.h1, { className: "hero__title ".concat(styles_module_css_1.default.heroTitle), initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.8, ease: "easeOut" }, children: ["Transform Your Career in", " ", (0, jsx_runtime_1.jsx)("span", { className: styles_module_css_1.default.highlight, children: "Tech" })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.p, { className: "hero__subtitle ".concat(styles_module_css_1.default.heroSubtitle), initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.8, delay: 0.2, ease: "easeOut" }, children: "Master the art of coding with our comprehensive learning paths and hands-on challenges" }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: styles_module_css_1.default.typingContainer, initial: { opacity: 0 }, animate: { opacity: 1 }, transition: { delay: 0.4 }, children: (0, jsx_runtime_1.jsxs)("div", { className: styles_module_css_1.default.staticText, children: [(0, jsx_runtime_1.jsx)("span", { className: styles_module_css_1.default.staticText, children: "Start\u00A0" }), (0, jsx_runtime_1.jsxs)("span", { className: styles_module_css_1.default.dynamicText, children: [(0, jsx_runtime_1.jsx)("span", { className: styles_module_css_1.default.typingWord, children: "Code" }), (0, jsx_runtime_1.jsx)("span", { className: styles_module_css_1.default.typingWord, children: "Build" }), (0, jsx_runtime_1.jsx)("span", { className: styles_module_css_1.default.typingWord, children: "Deploy" }), (0, jsx_runtime_1.jsx)("span", { className: styles_module_css_1.default.typingWord, children: "Learn" })] }), (0, jsx_runtime_1.jsx)("span", { className: styles_module_css_1.default.staticText, children: "\u00A0Today" })] }) }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: styles_module_css_1.default.heroButtons, initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.8, delay: 0.6, ease: "easeOut" }, children: [(0, jsx_runtime_1.jsxs)(Link_1.default, { className: "".concat(styles_module_css_1.default.button, " ").concat(styles_module_css_1.default.buttonPrimary), to: "/courses/", children: ["Start Learning Now", (0, jsx_runtime_1.jsx)("span", { className: styles_module_css_1.default.buttonIcon, "aria-hidden": "true", children: (0, jsx_runtime_1.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: (0, jsx_runtime_1.jsx)("path", { d: "M5 12h14M12 5l7 7-7 7" }) }) })] }), (0, jsx_runtime_1.jsxs)(Link_1.default, { className: "".concat(styles_module_css_1.default.button, " ").concat(styles_module_css_1.default.buttonOutline), to: "/docs/GitHub/intro-github", children: ["Explore Docs", (0, jsx_runtime_1.jsx)("span", { className: styles_module_css_1.default.buttonIcon, "aria-hidden": "true", children: (0, jsx_runtime_1.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [(0, jsx_runtime_1.jsx)("path", { d: "M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z" }), (0, jsx_runtime_1.jsx)("path", { d: "M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z" })] }) })] })] })] }) })] })); -} -var features = [ - { - title: "Hands-on Coding Challenges", - description: "Master programming through practical coding challenges with real-world applications", - icon: "💻", - color: "#3b82f6", - }, - { - title: "Real Interview Practice", - description: "Prepare with questions from top tech companies like Google, Amazon, and Microsoft", - icon: "🎯", - color: "#8b5cf6", - }, - { - title: "Structured Learning Paths", - description: "Follow expert-designed roadmaps for different tech stacks and skill levels", - icon: "🛣️", - color: "#10b981", - }, - { - title: "Interactive Environment", - description: "Code directly in your browser with instant feedback and debugging tools", - icon: "⚡", - color: "#f59e0b", - }, - { - title: "100+ Problems", - description: "Curated collection of real-world coding interview questions and solutions", - icon: "🔢", - color: "#ec4899", - }, - { - title: "Multiple Languages", - description: "Support for popular programming languages including Python, JavaScript, and more", - icon: "🌐", - color: "#06b6d4", - }, -]; -var stats = [ - { value: "10,000+", label: "Active Learners" }, - { value: "100+", label: "Hours of Content" }, - { value: "24/7", label: "Community Support" }, - { value: "4.9/5", label: "Average Rating" }, -]; -var learningPaths = [ - { - title: "Web Development", - description: "Master full-stack development with modern frameworks like React, Node.js, and databases. Build responsive, interactive web applications.", - icon: "🖥️", - color: "#4f46e5", - }, - { - title: "Data Science", - description: "Learn data analysis, visualization, and machine learning with Python, Pandas, and TensorFlow. Turn data into actionable insights.", - icon: "📊", - color: "#8b5cf6", - }, - { - title: "Mobile Apps", - description: "Create beautiful, performant cross-platform mobile applications using React Native and modern mobile development practices.", - icon: "📱", - color: "#10b981", - }, - { - title: "DevOps", - description: "Master CI/CD, Docker, Kubernetes, and cloud deployment to build scalable, reliable infrastructure and deployment pipelines.", - icon: "⚙️", - color: "#f59e0b", - }, -]; -function Feature(_a) { - var title = _a.title, description = _a.description, icon = _a.icon, color = _a.color; - var _b = (0, react_1.useState)(false), isHovered = _b[0], setIsHovered = _b[1]; - // Create a ref to apply the custom property - var featureRef = (0, react_1.useRef)(null); - // Apply the color as a CSS variable when the component mounts or color changes - (0, react_1.useEffect)(function () { - if (featureRef.current) { - featureRef.current.style.setProperty("--feature-color", color); - } - }, [color]); - var iconStyle = { - background: "linear-gradient(135deg, ".concat(color, "10, ").concat(color, "20)"), - color: color, - }; - return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.article, { ref: featureRef, className: styles_module_css_1.default.feature, onHoverStart: function () { return setIsHovered(true); }, onHoverEnd: function () { return setIsHovered(false); }, whileHover: { - y: -10, - boxShadow: "0 20px 40px ".concat(color, "20"), - }, "aria-label": title, children: [(0, jsx_runtime_1.jsx)("div", { className: styles_module_css_1.default.featureIcon, style: iconStyle, "aria-hidden": "true", children: icon }), (0, jsx_runtime_1.jsx)("h3", { className: styles_module_css_1.default.featureTitle, children: title }), (0, jsx_runtime_1.jsx)("p", { className: styles_module_css_1.default.featureDescription, children: description }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: styles_module_css_1.default.featureHover, initial: { width: 0 }, animate: { width: isHovered ? "100%" : 0 }, transition: { duration: 0.3, ease: "easeInOut" }, "aria-hidden": "true" })] })); -} -function StatCard(_a) { - var value = _a.value, label = _a.label, _b = _a.index, index = _b === void 0 ? 0 : _b; - return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.article, { className: styles_module_css_1.default.statCard, initial: { opacity: 0, y: 30 }, whileInView: { - opacity: 1, - y: 0, - transition: { - duration: 0.6, - delay: index * 0.1, - ease: "easeOut", - }, - }, viewport: { once: true, margin: "-50px" }, whileHover: { - y: -5, - boxShadow: "0 15px 30px rgba(0, 0, 0, 0.2)", - }, children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: styles_module_css_1.default.statValue, "aria-label": value, initial: { scale: 0.9 }, whileInView: { - scale: 1, - transition: { - delay: 0.2 + index * 0.05, - type: "spring", - stiffness: 100, - }, - }, viewport: { once: true }, children: value }), (0, jsx_runtime_1.jsx)("div", { className: styles_module_css_1.default.statLabel, children: label }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: styles_module_css_1.default.statGlow, initial: { opacity: 0 }, whileInView: { - opacity: 0.3, - transition: { delay: 0.3 + index * 0.1 }, - }, viewport: { once: true } })] })); -} -var LearningPath = function (_a) { - var title = _a.title, description = _a.description, icon = _a.icon, _b = _a.color, color = _b === void 0 ? "#3b82f6" : _b, _c = _a.index, index = _c === void 0 ? 0 : _c, _d = _a.isCompleted, isCompleted = _d === void 0 ? false : _d, _e = _a.onToggleComplete, onToggleComplete = _e === void 0 ? function () { } : _e; - var isEven = index % 2 === 0; - var delay = index * 0.15; - var _f = react_1.default.useState(false), isHovered = _f[0], setIsHovered = _f[1]; - // State for responsive position and layout - var _g = react_1.default.useState({ - isMobile: false, - isTablet: false, - isLargeTablet: false, - spacing: 200, - cardWidth: "calc(50% - 1.5rem)", - }), layout = _g[0], setLayout = _g[1]; - // Update position on window resize - react_1.default.useEffect(function () { - var handleResize = function () { - var width = window.innerWidth; - var isMobileView = width < 768; - var isTableView = width >= 768 && width < 960; - var isLargeTableView = width >= 960 && width < 1024; - // Calculate spacing based on viewport - var spacing, cardWidth; - if (isMobileView) { - spacing = 160; - cardWidth = "100%"; - } - else if (isTableView) { - spacing = 180; - cardWidth = "calc(50% - 1rem)"; - } - else if (isLargeTableView) { - spacing = 200; - cardWidth = "calc(50% - 1.25rem)"; - } - else { - spacing = 220; - cardWidth = "calc(50% - 2rem)"; - } - setLayout({ - isMobile: isMobileView, - isTablet: isTableView || isLargeTableView, - isLargeTablet: isLargeTableView, - spacing: spacing, - cardWidth: cardWidth, - }); - }; - var resizeObserver = new ResizeObserver(handleResize); - resizeObserver.observe(document.body); - handleResize(); - window.addEventListener("resize", handleResize); - return function () { - window.removeEventListener("resize", handleResize); - resizeObserver.disconnect(); - }; - }, [index]); - return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.article, { className: "".concat(styles_module_css_1.default.pathCard, " group relative overflow-hidden"), style: __assign({ "--card-color": color, "--card-color-light": "".concat(color, "20"), "--card-color-dark": "".concat(color, "80"), position: layout.isMobile ? "relative" : "absolute", margin: layout.isMobile ? "0 auto 1.25rem" : "0", maxWidth: "100%", width: layout.isMobile ? "100%" : layout.cardWidth, top: layout.isMobile ? "auto" : "".concat(80 + index * layout.spacing, "px"), left: layout.isMobile ? "auto" : isEven ? "50%" : "auto", right: layout.isMobile ? "auto" : isEven ? "auto" : "50%", transform: layout.isMobile - ? "none" - : isEven - ? "none" - : "translateX(50%)", marginLeft: layout.isMobile ? "auto" : isEven ? 0 : "auto", marginRight: layout.isMobile ? "auto" : isEven ? "auto" : 0, opacity: isCompleted ? 0.9 : 1, filter: isCompleted ? "saturate(0.9)" : "none", transition: "all 0.3s ease-in-out", border: "1px solid ".concat(isCompleted ? "".concat(color, "40") : "rgba(255, 255, 255, 0.1)"), background: "linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98))", boxShadow: "0 8px 20px -5px rgba(0, 0, 0, 0.15)", transformOrigin: "center", zIndex: isHovered ? 10 : 1 }, (!layout.isMobile && { - "@media (min-width: 960px)": { - width: "calc(50% - 1.5rem)", - }, - "@media (min-width: 1024px)": { - width: "calc(50% - 2rem)", - }, - "@media (min-width: 1280px)": { - width: "calc(50% - 3rem)", - }, - "@media (min-width: 1440px)": { - width: "calc(50% - 4rem)", - }, - })), initial: { opacity: 0, x: isEven ? -100 : 100, y: 20 }, animate: { - opacity: 1, - x: 0, - y: 0, - scale: isHovered ? 1.02 : 1, - boxShadow: isHovered - ? "0 20px 40px -10px rgba(0, 0, 0, 0.3)" - : "0 10px 25px -5px rgba(0, 0, 0, 0.1)", - transition: { - type: "spring", - damping: 15, - stiffness: 100, - delay: delay, - }, - }, whileHover: { - scale: 1.02, - transition: { duration: 0.2 }, - }, onHoverStart: function () { return setIsHovered(true); }, onHoverEnd: function () { return setIsHovered(false); }, children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "absolute inset-0 bg-gradient-to-br from-transparent via-transparent to-black/20 opacity-0 group-hover:opacity-100 transition-opacity duration-300 z-0", style: { - background: "radial-gradient(circle at 70% 30%, ".concat(color, "10 0%, transparent 70%)"), - } }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col sm:flex-row items-start gap-3 sm:gap-4 p-4 sm:p-5 md:p-6", children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "flex-shrink-0 w-10 h-10 sm:w-12 sm:h-12 md:w-14 md:h-14 flex items-center justify-center rounded-xl text-lg sm:text-xl md:text-2xl relative overflow-hidden", style: { - background: "linear-gradient(135deg, ".concat(color, ", ").concat(color, "80)"), - boxShadow: "0 4px 15px -5px ".concat(color, "80"), - opacity: isCompleted ? 0.9 : 1, - }, whileHover: { - scale: 1.1, - rotate: isCompleted ? 0 : 5, - transition: { duration: 0.2 }, - }, children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 bg-gradient-to-br from-white/10 to-transparent opacity-50" }), (0, jsx_runtime_1.jsx)("span", { className: "relative z-10", children: icon })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex-1", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col sm:flex-row sm:items-center justify-between w-full gap-2", children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-base sm:text-lg md:text-xl font-bold text-white break-words leading-tight", children: title }), isCompleted && ((0, jsx_runtime_1.jsxs)("div", { className: "ml-2 px-2 py-0.5 bg-green-500/20 text-green-400 text-xs font-medium rounded-full flex items-center whitespace-nowrap", children: [(0, jsx_runtime_1.jsx)("svg", { className: "w-3 h-3 mr-1 flex-shrink-0", fill: "currentColor", viewBox: "0 0 20 20", children: (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z", clipRule: "evenodd" }) }), (0, jsx_runtime_1.jsx)("span", { className: "hidden sm:inline", children: "Completed" }), (0, jsx_runtime_1.jsx)("span", { className: "sm:hidden", children: "\u2713" })] }))] }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-300 mb-4 leading-relaxed", children: description }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between mt-4 pt-3 border-t border-gray-700/50", children: [(0, jsx_runtime_1.jsxs)(Link_1.default, { to: "/docs/GitHub/intro-github", className: "inline-flex items-center text-sm font-medium transition-all duration-200 ".concat(isCompleted - ? "text-green-400 hover:text-green-300" - : "text-blue-400 hover:text-blue-300", " group-hover:underline"), children: [isCompleted ? "Continue Learning" : "Start Learning", (0, jsx_runtime_1.jsx)("svg", { className: "w-4 h-4 ml-2 transition-transform duration-300 group-hover:translate-x-1 ".concat(isCompleted ? "text-green-400" : "text-blue-400"), fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.button, { onClick: function (e) { - e.preventDefault(); - onToggleComplete(); - }, className: "relative inline-flex items-center h-6 rounded-full w-11 transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 ".concat(isCompleted - ? "bg-green-500 focus:ring-green-500" - : "bg-gray-600 hover:bg-gray-500 focus:ring-blue-500"), whileTap: { scale: 0.95 }, "aria-pressed": isCompleted, "aria-label": isCompleted ? "Mark as incomplete" : "Mark as complete", children: [(0, jsx_runtime_1.jsx)("span", { className: "sr-only", children: isCompleted ? "Mark as incomplete" : "Mark as complete" }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "inline-block w-4 h-4 transform bg-white rounded-full transition-all duration-200 ease-in-out flex items-center justify-center ".concat(isCompleted ? "translate-x-6" : "translate-x-1"), layout: true, children: isCompleted && ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.svg, { className: "w-3 h-3 text-green-500", fill: "currentColor", viewBox: "0 0 20 20", xmlns: "http://www.w3.org/2000/svg", initial: { scale: 0 }, animate: { scale: 1 }, transition: { - type: "spring", - stiffness: 500, - damping: 30, - }, children: (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z", clipRule: "evenodd" }) })) })] })] })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "absolute bottom-0 left-0 right-0 h-px bg-gray-700/50" }), (0, jsx_runtime_1.jsx)("div", { className: "absolute -inset-1 bg-gradient-to-r from-blue-500 to-purple-500 rounded-lg opacity-0 group-hover:opacity-10 blur transition-opacity duration-300 -z-10" })] }), (0, jsx_runtime_1.jsx)("div", { className: "absolute top-0 right-0 w-16 h-16 -mr-8 -mt-8 bg-gradient-to-br from-blue-500/20 to-transparent rounded-full" }), (0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 opacity-5", style: { - backgroundImage: "url(\"data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E\")", - backgroundSize: "60px 60px", - } })] })); -}; -function GetStartedContent() { - var siteConfig = (0, useDocusaurusContext_1.default)().siteConfig; - var _a = useSafeColorMode(), colorMode = _a.colorMode, isDark = _a.isDark, mounted = _a.mounted; - var _b = (0, react_1.useState)(function () { - if (typeof window !== "undefined") { - try { - var saved = localStorage.getItem("completedPaths"); - return saved ? JSON.parse(saved) : {}; - } - catch (e) { - console.error("Failed to parse completedPaths from localStorage", e); - return {}; - } - } - return {}; - }), completedPaths = _b[0], setCompletedPaths = _b[1]; - // Toggle completion status for a path - var togglePathCompletion = react_1.default.useCallback(function (pathTitle) { - setCompletedPaths(function (prev) { - var _a; - return (__assign(__assign({}, prev), (_a = {}, _a[pathTitle] = !prev[pathTitle], _a))); - }); - }, []); - // Calculate completion percentage - var completionPercentage = Math.round((Object.values(completedPaths).filter(Boolean).length / - learningPaths.length) * - 100) || 0; - // Save to localStorage whenever completedPaths changes - (0, react_1.useEffect)(function () { - if (typeof window !== "undefined") { - try { - localStorage.setItem("completedPaths", JSON.stringify(completedPaths)); - } - catch (e) { - console.error("Failed to save completedPaths to localStorage", e); - } - } - }, [completedPaths]); - return ((0, jsx_runtime_1.jsxs)(Layout_1.default, { title: "Get Started | ".concat((siteConfig === null || siteConfig === void 0 ? void 0 : siteConfig.title) || "Recode Hive"), description: "Start your coding journey with Recode Hive. Learn to code with our interactive platform and structured learning paths.", children: [(0, jsx_runtime_1.jsxs)(Head_1.default, { children: [(0, jsx_runtime_1.jsx)("meta", { name: "theme-color", content: "#1e40af" }), (0, jsx_runtime_1.jsx)("link", { rel: "preconnect", href: "https://fonts.googleapis.com" }), (0, jsx_runtime_1.jsx)("link", { rel: "preconnect", href: "https://fonts.gstatic.com", crossOrigin: "anonymous" }), (0, jsx_runtime_1.jsx)("link", { href: "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@700;800&display=swap", rel: "stylesheet" })] }), (0, jsx_runtime_1.jsx)(GetStartedHeader, {}), (0, jsx_runtime_1.jsxs)("main", { className: "transition-colors duration-300 ".concat(isDark ? "dark-bg-primary dark-text-primary" : "bg-white text-black"), children: [(0, jsx_runtime_1.jsx)("section", { className: styles_module_css_1.default.features, children: (0, jsx_runtime_1.jsxs)("div", { className: "container", children: [(0, jsx_runtime_1.jsxs)(AnimatedSection, { children: [(0, jsx_runtime_1.jsxs)("div", { className: styles_module_css_1.default.sectionHeader, children: [(0, jsx_runtime_1.jsx)("h2", { children: "Why Choose Recode Hive?" }), (0, jsx_runtime_1.jsx)("p", { children: "Discover the perfect learning experience tailored for your coding journey" })] }), (0, jsx_runtime_1.jsx)("div", { className: styles_module_css_1.default.featuresGrid, children: features.map(function (props, idx) { return ((0, jsx_runtime_1.jsx)(Feature, __assign({}, props), idx)); }) })] }), (0, jsx_runtime_1.jsx)(AnimatedSection, { delay: 1, children: (0, jsx_runtime_1.jsx)("div", { className: styles_module_css_1.default.section, children: (0, jsx_runtime_1.jsx)("div", { className: styles_module_css_1.default.container, children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: styles_module_css_1.default.statsSection, initial: "hidden", whileInView: "visible", viewport: { once: true, amount: 0.5 }, variants: { - hidden: { opacity: 0 }, - visible: { - opacity: 1, - transition: { - staggerChildren: 0.1, - }, - }, - }, children: stats.map(function (stat, index) { return ((0, jsx_runtime_1.jsx)(StatCard, { value: stat.value, label: stat.label, index: index }, index)); }) }) }) }) })] }) }), (0, jsx_runtime_1.jsx)(AnimatedSection, { delay: 2, children: (0, jsx_runtime_1.jsxs)("section", { className: styles_module_css_1.default.learningPaths, style: { - width: "100vw", - marginLeft: "50%", - transform: "translateX(-50%)", - }, children: [(0, jsx_runtime_1.jsx)("div", { className: "w-full bg-gray-900 py-16", children: (0, jsx_runtime_1.jsx)("div", { className: "container mx-auto", children: (0, jsx_runtime_1.jsx)("div", { className: "text-center mb-16", children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.h2, { className: "text-3xl md:text-4xl font-bold mb-4 px-6 py-3 inline-block rounded-xl bg-blue-100 text-gray-900", initial: { opacity: 0, y: 20 }, whileInView: { - opacity: 1, - y: 0, - transition: { - duration: 0.8, - ease: "easeOut", - }, - }, viewport: { once: true, margin: "-100px 0px -100px 0px" }, style: { - textShadow: "0 0 10px rgba(255, 213, 0, 0.5)", - }, children: "Start Your Journey" }) }) }) }), (0, jsx_runtime_1.jsxs)("div", { className: "container mx-auto -mt-10 relative", children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "mb-12 p-6 bg-gray-800/50 backdrop-blur-sm rounded-2xl border border-gray-700/50 shadow-lg", initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true, margin: "-50px 0px -50px 0px" }, transition: { duration: 0.5, delay: 0.2 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col md:flex-row md:items-center md:justify-between gap-4 mb-4", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-bold mb-4 px-6 py-3 inline-block rounded-xl bg-gradient-to-r from-blue-200 to-purple-200 text-gray-800 shadow-md", children: "Your Learning Progress" }), (0, jsx_runtime_1.jsxs)("p", { className: "text-gray-300 text-sm", children: [completionPercentage, "% Complete \u2022", " ", Object.values(completedPaths).filter(Boolean).length, " of", " ", learningPaths.length, " paths started"] })] }), (0, jsx_runtime_1.jsx)("div", { className: "text-right", children: (0, jsx_runtime_1.jsxs)("span", { className: "text-2xl font-bold bg-gradient-to-r from-blue-400 to-purple-400 bg-clip-text text-transparent", children: [completionPercentage, "%"] }) })] }), (0, jsx_runtime_1.jsx)("div", { className: "w-full h-3 bg-gray-700/50 rounded-full overflow-hidden", children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "h-full bg-gradient-to-r from-blue-500 to-purple-500 rounded-full relative", initial: { width: 0 }, animate: { width: "".concat(completionPercentage, "%") }, transition: { duration: 1, ease: "easeOut" }, children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "absolute inset-0 bg-white/20", animate: { - left: ["0%", "100%"], - }, transition: { - duration: 1.5, - repeat: Infinity, - repeatType: "loop", - ease: "easeInOut", - }, style: { - width: "20%", - height: "100%", - background: "linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent)", - transform: "skewX(-20deg)", - } }) }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: styles_module_css_1.default.timelineContainer, children: [(0, jsx_runtime_1.jsx)("div", { className: styles_module_css_1.default.timeline, children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "absolute left-0 top-0 w-1 bg-gradient-to-b from-blue-400 to-purple-500 h-0", initial: { height: 0 }, animate: { - height: "".concat((completionPercentage / 100) * 100, "%"), - }, transition: { duration: 1.5, ease: "easeInOut" } }) }), (0, jsx_runtime_1.jsx)("div", { className: styles_module_css_1.default.pathsContainer, children: learningPaths.map(function (path, idx) { return ((0, jsx_runtime_1.jsx)(LearningPath, { title: path.title, description: path.description, icon: path.icon, color: path.color, index: idx, isCompleted: !!completedPaths[path.title], onToggleComplete: function () { return togglePathCompletion(path.title); } }, path.title)); }) })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "text-center mt-12 pb-12", initial: { opacity: 0, y: 20 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true, margin: "-50px 0px -50px 0px" }, transition: { duration: 0.5, delay: 0.3 }, children: (0, jsx_runtime_1.jsxs)(Link_1.default, { to: "/courses", className: "group inline-flex items-center px-8 py-4 bg-gradient-to-r from-blue-200 to-blue-300 font-semibold text-lg rounded-xl hover:from-blue-300 hover:to-blue-400 transition-all duration-300 shadow-lg hover:shadow-xl hover:-translate-y-1 hover:no-underline", style: { - textShadow: "0 2px 4px rgba(0, 0, 0, 0.2)", - }, children: [(0, jsx_runtime_1.jsx)("span", { className: "relative z-10 text-gray-900 group-hover:text-gray-900", children: "Explore All Paths" }), (0, jsx_runtime_1.jsx)("svg", { className: "w-6 h-6 ml-3 transform text-gray-900 group-hover:translate-x-1 group-hover:text-gray-900 transition-transform duration-300", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2.5, children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M14 5l7 7m0 0l-7 7m7-7H3" }) })] }) })] })] }) })] })] })); -} -function GetStarted() { - return (0, jsx_runtime_1.jsx)(GetStartedContent, {}); -} diff --git a/src/pages/index.js b/src/pages/index.js deleted file mode 100644 index 165656e5..00000000 --- a/src/pages/index.js +++ /dev/null @@ -1,81 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = Home; -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importStar(require("react")); -var useDocusaurusContext_1 = __importDefault(require("@docusaurus/useDocusaurusContext")); -var Layout_1 = __importDefault(require("@theme/Layout")); -var Head_1 = __importDefault(require("@docusaurus/Head")); -var header_1 = __importDefault(require("../components/header/header")); -var bottom_to_top_1 = __importDefault(require("../components/scroll/bottom-to-top")); -var top_to_bottom_1 = __importDefault(require("../components/scroll/top-to-bottom")); -var blogCarousel_1 = require("../components/blogCarousel/blogCarousel"); -var projects_1 = __importDefault(require("../database/projects/projects")); -var ourProjects_1 = __importDefault(require("../components/ourProjects")); -var TopMateSection_1 = __importDefault(require("../components/topmate/TopMateSection")); -var TestimonialCarousel_1 = require("../components/testimonials/TestimonialCarousel"); -var statsProvider_1 = require("../lib/statsProvider"); -var Community_1 = require("../components/Community"); -var faqs_1 = __importDefault(require("../components/faqs/faqs")); -function Home() { - var siteConfig = (0, useDocusaurusContext_1.default)().siteConfig; - var _a = (0, react_1.useState)(true), showTopmate = _a[0], setShowTopmate = _a[1]; - (0, react_1.useEffect)(function () { - // Add page transition animation on mount - var mainElement = document.querySelector("main"); - if (mainElement) { - mainElement.style.opacity = "0"; - mainElement.style.transform = "translateY(20px)"; - mainElement.style.transition = - "opacity 0.6s ease-out, transform 0.6s ease-out"; - // Trigger animation after a brief delay - setTimeout(function () { - mainElement.style.opacity = "1"; - mainElement.style.transform = "translateY(0)"; - }, 100); - } - }, []); - return ((0, jsx_runtime_1.jsxs)(Layout_1.default, { title: "".concat(siteConfig.title), description: "Welcome to Recodehive. Learn the basics to advanced concepts of web development. sql, python, Cloud, GitHub and more.", children: [(0, jsx_runtime_1.jsx)(Head_1.default, { children: (0, jsx_runtime_1.jsx)("script", { async: true, "custom-element": "amp-auto-ads", src: "https://cdn.ampproject.org/v0/amp-auto-ads-0.1.js" }) }), (0, jsx_runtime_1.jsx)("div", { className: "transition-colors duration-300", style: { - backgroundColor: "var(--ifm-background-color)", - color: "var(--ifm-font-color-base)", - }, children: (0, jsx_runtime_1.jsxs)("main", { className: "transition-colors duration-300 page-enter", style: { - backgroundColor: "var(--ifm-background-color)", - color: "var(--ifm-font-color-base)", - }, children: [(0, jsx_runtime_1.jsx)("div", { className: "m-4", children: (0, jsx_runtime_1.jsx)(header_1.default, {}) }), (0, jsx_runtime_1.jsx)("div", { className: "blog-carousel-section", children: (0, jsx_runtime_1.jsx)(blogCarousel_1.BlogCarousel, {}) }), (0, jsx_runtime_1.jsx)("div", { className: "m-4", onClick: function () { return (window.location.href = "https://www.sanjaykv.com/"); }, children: (0, jsx_runtime_1.jsx)("img", { src: "/selfhero.png", alt: "recodehive", className: "w-full h-full object-cover rounded-2xl cursor-pointer" }) }), (0, jsx_runtime_1.jsx)("div", { className: "m-4", children: (0, jsx_runtime_1.jsx)(ourProjects_1.default, { OurProjectsData: projects_1.default }) }), (0, jsx_runtime_1.jsxs)("div", { className: "m-4 grid grid-cols-1 md:grid-cols-3 gap-4 md:gap-8", children: [showTopmate && ((0, jsx_runtime_1.jsx)("div", { className: "col-span-1", children: (0, jsx_runtime_1.jsx)(TopMateSection_1.default, { setShowTopmate: setShowTopmate }) })), (0, jsx_runtime_1.jsx)("div", { className: showTopmate ? "col-span-2" : "col-span-3", children: (0, jsx_runtime_1.jsx)(TestimonialCarousel_1.TestimonialCarousel, {}) })] }), (0, jsx_runtime_1.jsx)("div", { className: "m-4", children: (0, jsx_runtime_1.jsx)(statsProvider_1.CommunityStatsProvider, { children: (0, jsx_runtime_1.jsx)(Community_1.LandingCommunity, { className: "recodehive" }) }) }), (0, jsx_runtime_1.jsx)("div", { className: "m-4", children: (0, jsx_runtime_1.jsx)(faqs_1.default, {}) }), (0, jsx_runtime_1.jsx)(top_to_bottom_1.default, {}), (0, jsx_runtime_1.jsx)(bottom_to_top_1.default, {})] }) })] })); -} diff --git a/src/pages/interview-prep/BehavioralTab.js b/src/pages/interview-prep/BehavioralTab.js deleted file mode 100644 index 6172d645..00000000 --- a/src/pages/interview-prep/BehavioralTab.js +++ /dev/null @@ -1,133 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importDefault(require("react")); -var framer_motion_1 = require("framer-motion"); -var Link_1 = __importDefault(require("@docusaurus/Link")); -var fadeIn = { hidden: { opacity: 0, y: 20 }, visible: { opacity: 1, y: 0, transition: { duration: 0.6 } } }; -var staggerContainer = { hidden: {}, visible: { transition: { staggerChildren: 0.2 } } }; -var BehavioralTab = function (_a) { - var _b = _a.behavioralQuestions, behavioralQuestions = _b === void 0 ? [] : _b, _c = _a.expandedCategories, expandedCategories = _c === void 0 ? [] : _c, toggleCategory = _a.toggleCategory; - return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { initial: "hidden", animate: "visible", variants: staggerContainer, children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "text-center mb-12", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("h2", { className: "text-4xl font-bold mb-4 text-white", children: "Behavioral Interview Preparation" }), (0, jsx_runtime_1.jsx)("p", { className: "text-xl text-center ml-3 text-gray-600 dark:text-gray-300 ", children: "Master the art of storytelling and showcase your soft skills with confidence" })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "bg-gradient-to-r from-blue-50 to-purple-50 dark:from-blue-900/20 dark:to-purple-900/20 rounded-xl p-8 mb-12", variants: fadeIn, children: (0, jsx_runtime_1.jsxs)("div", { className: "max-w-4xl mx-auto", children: [(0, jsx_runtime_1.jsxs)("h3", { className: "text-2xl font-bold mb-6 text-white flex items-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-3xl mr-3", children: "\uD83E\uDD1D" }), "What are Behavioral Interviews?"] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid md:grid-cols-2 gap-12", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("p", { className: "text-gray-700 dark:text-gray-300 mb-4", children: "Behavioral interviews focus on how you've handled situations in the past to predict your future performance. These questions typically start with phrases like \"Tell me about a time when...\" or \"Describe a situation where...\"" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-700 dark:text-gray-300", children: "Unlike technical interviews that test your coding skills, behavioral interviews evaluate your soft skills, cultural fit, and ability to work in a team environment." })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white dark:bg-gray-800 rounded-lg p-6 -mt-10", children: [(0, jsx_runtime_1.jsx)("h4", { className: "font-bold text-gray-900 dark:text-white mb-4", children: "Why They Matter" }), (0, jsx_runtime_1.jsxs)("ul", { className: "space-y-2 text-sm", children: [(0, jsx_runtime_1.jsxs)("li", { className: "flex items-start", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-blue-500 rounded-full mt-2 mr-3 flex-shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-gray-600 dark:text-gray-300", children: "70% of hiring decisions are based on cultural fit" })] }), (0, jsx_runtime_1.jsxs)("li", { className: "flex items-start", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-blue-500 rounded-full mt-2 mr-3 flex-shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-gray-600 dark:text-gray-300", children: "Assess leadership and communication skills" })] }), (0, jsx_runtime_1.jsxs)("li", { className: "flex items-start", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-blue-500 rounded-full mt-2 mr-3 flex-shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-gray-600 dark:text-gray-300", children: "Evaluate problem-solving approach" })] }), (0, jsx_runtime_1.jsxs)("li", { className: "flex items-start", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-blue-500 rounded-full mt-2 mr-3 flex-shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-gray-600 dark:text-gray-300", children: "Determine team collaboration ability" })] })] })] })] })] }) }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-gradient-to-r from-green-50 to-blue-50 dark:from-green-900/20 dark:to-blue-900/20 rounded-xl p-8 mb-12", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-2xl font-bold mb-6 text-gray-900 dark:text-white text-center", children: "The STAR Method Framework" }), (0, jsx_runtime_1.jsx)("div", { className: "grid md:grid-cols-4 gap-6 mb-8", children: [ - { - letter: "S", - word: "Situation", - desc: "Set the context and background of your story", - color: "bg-red-500", - }, - { - letter: "T", - word: "Task", - desc: "Describe your responsibility or goal", - color: "bg-yellow-500", - }, - { - letter: "A", - word: "Action", - desc: "Explain the specific steps you took", - color: "bg-green-500", - }, - { - letter: "R", - word: "Result", - desc: "Share the outcome and what you learned", - color: "bg-blue-500", - }, - ].map(function (item, i) { return ((0, jsx_runtime_1.jsxs)("div", { className: "text-center", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-16 h-16 ".concat(item.color, " text-white rounded-full flex items-center justify-center text-2xl font-bold mx-auto mb-3 shadow-lg"), children: item.letter }), (0, jsx_runtime_1.jsx)("h4", { className: "font-bold text-gray-900 dark:text-white mb-2", children: item.word }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300", children: item.desc })] }, i)); }) }), (0, jsx_runtime_1.jsxs)("div", { className: "grid md:grid-cols-2 gap-8", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-white dark:bg-gray-800 rounded-lg p-6", children: [(0, jsx_runtime_1.jsxs)("h4", { className: "font-bold text-gray-900 dark:text-white mb-4 flex items-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-xl mr-2", children: "\uD83D\uDCA1" }), "Example 1: Leadership Challenge"] }), (0, jsx_runtime_1.jsxs)("div", { className: "space-y-3 text-sm", children: [(0, jsx_runtime_1.jsxs)("div", { className: "border-l-4 border-red-500 star-border-red pl-4", children: [(0, jsx_runtime_1.jsx)("strong", { className: "text-red-600 dark:text-red-400", children: "Situation:" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 mt-1", children: "\"During my internship, our team was behind schedule on a critical project with only 2 weeks left before the deadline.\"" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "border-l-4 border-yellow-500 star-border-yellow pl-4", children: [(0, jsx_runtime_1.jsx)("strong", { className: "text-yellow-600 dark:text-yellow-400", children: "Task:" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 mt-1", children: "\"As the junior developer, I needed to help coordinate efforts and find ways to accelerate our progress.\"" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "border-l-4 border-green-500 star-border-green pl-4", children: [(0, jsx_runtime_1.jsx)("strong", { className: "text-green-600 dark:text-green-400", children: "Action:" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 mt-1", children: "\"I organized daily stand-ups, created a shared task board, and volunteered to work extra hours on critical features.\"" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "border-l-4 border-blue-500 star-border-blue pl-4", children: [(0, jsx_runtime_1.jsx)("strong", { className: "text-blue-600 dark:text-blue-400", children: "Result:" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 mt-1", children: "\"We delivered the project on time, and my manager praised my initiative. I learned the importance of proactive communication.\"" })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white dark:bg-gray-800 rounded-lg p-6", children: [(0, jsx_runtime_1.jsxs)("h4", { className: "font-bold text-gray-900 dark:text-white mb-4 flex items-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-xl mr-2", children: "\uD83D\uDD27" }), "Example 2: Problem Solving"] }), (0, jsx_runtime_1.jsxs)("div", { className: "space-y-3 text-sm", children: [(0, jsx_runtime_1.jsxs)("div", { className: "border-l-4 border-red-500 star-border-red pl-4", children: [(0, jsx_runtime_1.jsx)("strong", { className: "text-red-600 dark:text-red-400", children: "Situation:" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 mt-1", children: "\"Our main application was experiencing frequent crashes affecting 30% of users during peak hours.\"" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "border-l-4 border-yellow-500 star-border-yellow pl-4", children: [(0, jsx_runtime_1.jsx)("strong", { className: "text-yellow-600 dark:text-yellow-400", children: "Task:" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 mt-1", children: "\"I was assigned to identify the root cause and implement a solution within 48 hours.\"" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "border-l-4 border-green-500 star-border-green pl-4", children: [(0, jsx_runtime_1.jsx)("strong", { className: "text-green-600 dark:text-green-400", children: "Action:" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 mt-1", children: "\"I analyzed logs, reproduced the issue, and discovered a memory leak in our caching system. I implemented a fix and added monitoring.\"" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "border-l-4 border-blue-500 star-border-blue pl-4", children: [(0, jsx_runtime_1.jsx)("strong", { className: "text-blue-600 dark:text-blue-400", children: "Result:" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 mt-1", children: "\"Crashes reduced by 95%, user satisfaction improved, and we prevented similar issues with better monitoring.\"" })] })] })] })] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "mb-12", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-2xl font-bold mb-8 text-gray-900 dark:text-white text-center", children: "Common Behavioral Questions by Category" }), (0, jsx_runtime_1.jsx)("div", { className: "space-y-6", children: [ - { - category: "Leadership & Initiative", - icon: "👑", - color: "from-purple-500 to-pink-500", - questions: [ - "Tell me about yourself", - "Tell me about a time you led a team through a difficult project", - "Describe a situation where you had to influence others without authority", - "How do you handle team conflicts?", - "Give an example of when you took initiative on a project", - ], - }, - { - category: "Problem Solving & Challenges", - icon: "🧩", - color: "from-blue-500 to-cyan-500", - questions: [ - "Describe a challenging situation you faced and how you handled it", - "Tell me about the most challenging technical problem you've solved", - "Describe a time you failed and what you learned", - "How do you approach debugging complex issues?", - "Tell me about a time you had to make a decision with incomplete information", - ], - }, - { - category: "Teamwork & Communication", - icon: "🤝", - color: "from-green-500 to-teal-500", - questions: [ - "How do you handle conflict with team members?", - "Explain a complex technical concept to a non-technical person", - "Tell me about a time you had to give difficult feedback", - "Describe a time you disagreed with your manager", - "How do you handle disagreements with stakeholders?", - ], - }, - { - category: "Growth & Learning", - icon: "📚", - color: "from-orange-500 to-red-500", - questions: [ - "How do you stay updated with new technologies?", - "Tell me about a time you had to learn something completely new", - "What's the most important thing you've learned in your career?", - "Describe a time you received constructive criticism", - "How do you handle tight deadlines and pressure?", - ], - }, - ].map(function (section, index) { return ((0, jsx_runtime_1.jsxs)("div", { className: "bg-white dark:bg-gray-800 rounded-xl shadow-lg overflow-hidden", children: [(0, jsx_runtime_1.jsx)("button", { onClick: function () { return toggleCategory(index); }, className: "w-full bg-gradient-to-r ".concat(section.color, " p-6 text-left hover:opacity-90 transition-opacity"), children: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between", children: [(0, jsx_runtime_1.jsxs)("h4", { className: "text-xl font-bold text-white flex items-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-2xl mr-3", children: section.icon }), section.category] }), (0, jsx_runtime_1.jsx)("span", { className: "text-white text-2xl transform transition-transform duration-200", style: { transform: expandedCategories[index] ? "rotate(180deg)" : "rotate(0deg)" }, children: "\u25BC" })] }) }), expandedCategories[index] && ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "p-6", initial: { opacity: 0, height: 0 }, animate: { opacity: 1, height: "auto" }, exit: { opacity: 0, height: 0 }, transition: { duration: 0.3 }, children: (0, jsx_runtime_1.jsx)("div", { className: "grid gap-3", children: section.questions.map(function (question, i) { return ((0, jsx_runtime_1.jsx)("div", { className: "p-4 interview-prep-sidebar bg-gray-50 dark:bg-gray-700 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-600 transition-colors cursor-pointer border-l-4 border-gray-300 dark:border-gray-600 hover:border-blue-500", children: (0, jsx_runtime_1.jsxs)("p", { className: "text-gray-700 dark:text-gray-300 font-medium", children: ["\"", question, "\""] }) }, i)); }) }) }))] }, index)); }) })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-white dark:bg-gray-800 rounded-xl shadow-lg p-8 mb-12", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-2xl font-bold mb-8 text-gray-900 dark:text-white text-center", children: "Do's and Don'ts for Behavioral Interviews" }), (0, jsx_runtime_1.jsxs)("div", { className: "grid md:grid-cols-2 gap-8", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-green-50 dark:bg-green-900/20 rounded-lg p-6", children: [(0, jsx_runtime_1.jsxs)("h4", { className: "text-xl font-bold text-green-800 dark:text-green-300 mb-6 flex items-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-2xl mr-2", children: "\u2705" }), "Do's"] }), (0, jsx_runtime_1.jsx)("div", { className: "space-y-4", children: [ - "Practice with real scenarios from your experience", - "Be concise and specific in your answers", - "Show enthusiasm and passion for your work", - "Use the STAR method to structure responses", - "Prepare 5-7 strong examples beforehand", - "Focus on your individual contributions", - "Quantify results whenever possible", - "Show what you learned from each experience", - ].map(function (item, i) { return ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-start", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-green-500 rounded-full mt-2 mr-3 flex-shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-gray-700 dark:text-gray-300", children: item })] }, i)); }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-red-50 dark:bg-red-900/20 rounded-lg p-6", children: [(0, jsx_runtime_1.jsxs)("h4", { className: "text-xl font-bold text-red-800 dark:text-red-300 mb-6 flex items-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-2xl mr-2", children: "\u274C" }), "Don'ts"] }), (0, jsx_runtime_1.jsx)("div", { className: "space-y-4", children: [ - "Memorize robotic, scripted answers", - "Be vague or over-explain situations", - "Appear disinterested or unenthusiastic", - "Speak negatively about previous employers", - "Make up stories or exaggerate experiences", - "Focus only on team achievements without your role", - "Give answers without clear structure", - "Forget to mention the results or outcomes", - ].map(function (item, i) { return ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-start", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-red-500 rounded-full mt-2 mr-3 flex-shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-gray-700 dark:text-gray-300", children: item })] }, i)); }) })] })] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-gradient-to-r from-indigo-50 to-purple-50 dark:from-indigo-900/20 dark:to-purple-900/20 rounded-xl p-8 mb-12", variants: fadeIn, children: [(0, jsx_runtime_1.jsxs)("h3", { className: "text-2xl font-bold mb-8 text-gray-900 dark:text-white text-center flex items-center justify-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-3xl mr-3", children: "\uD83C\uDFA5" }), "Video Resources & Learning Materials"] }), (0, jsx_runtime_1.jsx)("div", { className: "grid md:grid-cols-3 gap-6 mb-8", children: [ - { - title: "Behavioral Interview Masterclass", - channel: "CareerVidz", - duration: "25 min", - description: "Complete guide to behavioral interviews with real examples", - url: "https://www.youtube.com/watch?v=PJKYqLP6MRE", - thumbnail: "../../img/Behavioural_Interviews1.png", - }, - { - title: "STAR Method Explained", - channel: "Interview Success", - duration: "15 min", - description: "Step-by-step breakdown of the STAR method with practice", - url: "https://www.youtube.com/watch?v=V0jktOX8Jog", - thumbnail: "../../img/Behavioural_Interviews2.png", - }, - { - title: "Mock Behavioral Interview", - channel: "Tech Interview Pro", - duration: "30 min", - description: "Real behavioral interview simulation with feedback", - url: "https://www.youtube.com/watch?v=1qw5ITr3k9E", - thumbnail: "../../img/Behavioural_Interviews3.png", - }, - ].map(function (video, i) { return ((0, jsx_runtime_1.jsxs)("div", { className: "bg-white dark:bg-gray-800 rounded-lg overflow-hidden shadow-lg hover:shadow-xl transition-all duration-300 transform hover:scale-105", children: [(0, jsx_runtime_1.jsx)("img", { src: video.thumbnail || "/placeholder.svg", alt: video.title, className: "w-full h-40 object-cover" }), (0, jsx_runtime_1.jsxs)("div", { className: "p-4", children: [(0, jsx_runtime_1.jsx)("h4", { className: "font-bold text-gray-900 dark:text-white mb-2", children: video.title }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300 mb-2", children: video.description }), (0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-center text-xs text-gray-500 dark:text-gray-400 mb-3", children: [(0, jsx_runtime_1.jsx)("span", { children: video.channel }), (0, jsx_runtime_1.jsx)("span", { children: video.duration })] }), (0, jsx_runtime_1.jsxs)("a", { href: video.url, target: "_blank", rel: "noopener noreferrer", className: "watch-video-btn", children: [(0, jsx_runtime_1.jsx)("span", { className: "mr-2", children: "\u25B6\uFE0F" }), "Watch Video"] })] })] }, i)); }) }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white dark:bg-gray-800 rounded-lg p-6", children: [(0, jsx_runtime_1.jsx)("h4", { className: "font-bold text-gray-900 dark:text-white mb-4", children: "Additional Learning Resources" }), (0, jsx_runtime_1.jsxs)("div", { className: "grid md:grid-cols-2 gap-4", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h5", { className: "font-semibold text-gray-800 dark:text-gray-200 mb-2", children: "\uD83D\uDCDA Recommended Books" }), (0, jsx_runtime_1.jsxs)("ul", { className: "space-y-1 text-sm text-gray-600 dark:text-gray-300", children: [(0, jsx_runtime_1.jsx)("li", { children: "\u2022 \"Cracking the Coding Interview\" by Gayle McDowell" }), (0, jsx_runtime_1.jsx)("li", { children: "\u2022 \"The Behavioral Interview Handbook\" by Lewis Lin" }), (0, jsx_runtime_1.jsx)("li", { children: "\u2022 \"What Color Is Your Parachute?\" by Richard N. Bolles" })] })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h5", { className: "font-semibold text-gray-800 dark:text-gray-200 mb-2", children: "\uD83C\uDF10 Online Platforms" }), (0, jsx_runtime_1.jsxs)("ul", { className: "space-y-1 text-sm text-gray-600 dark:text-gray-300", children: [(0, jsx_runtime_1.jsx)("li", { children: "\u2022 Pramp - Free mock interviews" }), (0, jsx_runtime_1.jsx)("li", { children: "\u2022 InterviewBit - Behavioral question bank" }), (0, jsx_runtime_1.jsx)("li", { children: "\u2022 Glassdoor - Company-specific questions" })] })] })] })] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-gradient-to-r interview-prep-join-comm from-yellow-50 to-orange-50 dark:from-yellow-900/20 dark:to-orange-900/20 rounded-xl p-8 border-2 border-yellow-200 dark:border-yellow-800 dark:outline dark:outline-2 dark:outline-yellow-800", variants: fadeIn, children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-center mb-6", children: [(0, jsx_runtime_1.jsxs)("h3", { className: "text-2xl font-bold text-gray-900 dark:text-white flex items-center justify-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-3xl mr-3", children: "\uD83E\uDD1D" }), "Join Our Community & Contribute"] }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 mt-2", children: "Help make this resource better for everyone in the RecodeHive community" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid md:grid-cols-3 gap-6 mb-8", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-center p-4 bg-white dark:bg-gray-800 rounded-lg", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-3xl mb-3", children: "\uD83D\uDCAC" }), (0, jsx_runtime_1.jsx)("h4", { className: "font-bold text-gray-900 dark:text-white mb-2", children: "Share Your Experience" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300", children: "Share your behavioral interview experiences, both successes and challenges" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-center p-4 bg-white dark:bg-gray-800 rounded-lg", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-3xl mb-3", children: "\uD83D\uDCDD" }), (0, jsx_runtime_1.jsx)("h4", { className: "font-bold text-gray-900 dark:text-white mb-2", children: "Suggest Resources" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300", children: "Recommend helpful videos, articles, or tools you've found useful" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-center p-4 bg-white dark:bg-gray-800 rounded-lg", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-3xl mb-3", children: "\uD83D\uDD27" }), (0, jsx_runtime_1.jsx)("h4", { className: "font-bold text-gray-900 dark:text-white mb-2", children: "Improve Content" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300", children: "Help us add more examples, questions, or improve existing content" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white dark:bg-gray-800 rounded-lg p-6", children: [(0, jsx_runtime_1.jsx)("h4", { className: "font-bold text-gray-900 dark:text-white mb-4 text-center", children: "How to Contribute" }), (0, jsx_runtime_1.jsxs)("div", { className: "grid md:grid-cols-2 gap-6", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h5", { className: "font-semibold text-gray-800 dark:text-gray-200 mb-3", children: "\uD83D\uDE80 Quick Ways to Help" }), (0, jsx_runtime_1.jsxs)("ul", { className: "space-y-2 text-sm", children: [(0, jsx_runtime_1.jsxs)("li", { className: "flex items-start", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-blue-500 rounded-full mt-2 mr-3 flex-shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-gray-600 dark:text-gray-300", children: "Join our Discord community and share tips" })] }), (0, jsx_runtime_1.jsxs)("li", { className: "flex items-start", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-blue-500 rounded-full mt-2 mr-3 flex-shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-gray-600 dark:text-gray-300", children: "Submit interview questions you've encountered" })] }), (0, jsx_runtime_1.jsxs)("li", { className: "flex items-start", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-blue-500 rounded-full mt-2 mr-3 flex-shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-gray-600 dark:text-gray-300", children: "Review and suggest improvements to examples" })] }), (0, jsx_runtime_1.jsxs)("li", { className: "flex items-start", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-blue-500 rounded-full mt-2 mr-3 flex-shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "text-gray-600 dark:text-gray-300", children: "Share company-specific behavioral interview tips" })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h5", { className: "font-semibold text-gray-800 dark:text-gray-200 mb-3", children: "\uD83D\uDCCB Getting Started" }), (0, jsx_runtime_1.jsxs)("div", { className: "space-y-3", children: [(0, jsx_runtime_1.jsx)(Link_1.default, { to: "/community", className: "block interview-prep-discord-btn text-white bg-blue-600 px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors text-center font-medium", children: "Join Discord Community" }), (0, jsx_runtime_1.jsx)(Link_1.default, { to: "/get-started", className: "block text-blue-600 dark:text-blue-400 px-4 py-2 rounded-lg dark:hover:bg-yellow-800/20 transition-colors text-center font-medium dark:outline dark:outline-2 dark:outline-yellow-800", children: "Contributing Guide" })] })] })] })] })] })] })); -}; -exports.default = BehavioralTab; diff --git a/src/pages/interview-prep/CompaniesTab.js b/src/pages/interview-prep/CompaniesTab.js deleted file mode 100644 index a960b69b..00000000 --- a/src/pages/interview-prep/CompaniesTab.js +++ /dev/null @@ -1,167 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importDefault(require("react")); -var react_2 = require("react"); -var framer_motion_1 = require("framer-motion"); -var Link_1 = __importDefault(require("@docusaurus/Link")); -var lucide_react_1 = require("lucide-react"); -var button_1 = require("../../components/ui/button"); -var input_1 = require("../../components/ui/input"); -var badge_1 = require("../../components/ui/badge"); -var card_1 = require("../../components/ui/card"); -var collapsible_1 = require("../../components/ui/collapsible"); -var fadeIn = { hidden: { opacity: 0, y: 20 }, visible: { opacity: 1, y: 0, transition: { duration: 0.6 } } }; -var staggerContainer = { hidden: {}, visible: { transition: { staggerChildren: 0.1 } } }; -var CompaniesTab = function (_a) { - var _b, _c; - var _d = _a.companyTips, companyTips = _d === void 0 ? [] : _d; - var _e = (0, react_2.useState)(""), searchTerm = _e[0], setSearchTerm = _e[1]; - var _f = (0, react_2.useState)(""), selectedIndustry = _f[0], setSelectedIndustry = _f[1]; - var _g = (0, react_2.useState)(""), selectedRole = _g[0], setSelectedRole = _g[1]; - var _h = (0, react_2.useState)({}), expandedQuestions = _h[0], setExpandedQuestions = _h[1]; - var filteredCompanies = (0, react_2.useMemo)(function () { - return (companyTips || []).filter(function (company) { - var matchesSearch = company.company.toLowerCase().includes(searchTerm.toLowerCase()) || - company.focus.toLowerCase().includes(searchTerm.toLowerCase()) || - company.focusAreas.some(function (area) { return area.toLowerCase().includes(searchTerm.toLowerCase()); }); - var matchesIndustry = !selectedIndustry || company.industry === selectedIndustry; - var matchesRole = !selectedRole || company.roleTypes.includes(selectedRole); - return matchesSearch && matchesIndustry && matchesRole; - }); - }, [companyTips, searchTerm, selectedIndustry, selectedRole]); - var industries = __spreadArray([], new Set((companyTips || []).map(function (c) { return c.industry; })), true); - var roles = __spreadArray([], new Set((companyTips || []).flatMap(function (c) { return c.roleTypes; })), true); - var toggleQuestion = function (companyIndex, questionIndex) { - var key = "".concat(companyIndex, "-").concat(questionIndex); - setExpandedQuestions(function (prev) { - var _a; - return (__assign(__assign({}, prev), (_a = {}, _a[key] = !prev[key], _a))); - }); - }; - var _j = (0, react_2.useState)({}), expandedCompanies = _j[0], setExpandedCompanies = _j[1]; - var toggleCompany = function (index) { - setExpandedCompanies(function (prev) { - var _a; - return (__assign(__assign({}, prev), (_a = {}, _a[index] = !prev[index], _a))); - }); - }; - return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { initial: "hidden", animate: "visible", variants: staggerContainer, className: "space-y-8", children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "text-center mb-16", variants: fadeIn, children: [(0, jsx_runtime_1.jsxs)("div", { className: "inline-flex items-center px-4 py-2 bg-blue-100 dark:bg-blue-900/30 rounded-full text-blue-600 dark:text-blue-400 text-sm font-medium mb-6", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-blue-500 rounded-full mr-2 animate-pulse" }), "Master FAANG+ Company Interviews"] }), (0, jsx_runtime_1.jsx)("h2", { className: "text-5xl font-bold mb-6 text-gray-900 dark:text-white", children: "Company-Specific Interview Prep" }), (0, jsx_runtime_1.jsx)("p", { className: "text-xl text-gray-600 dark:text-gray-300 leading-relaxed", children: "Get insider knowledge, real interview questions, and proven strategies for landing your dream job at top tech companies" })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "relative bg-gradient-to-br from-slate-50 via-blue-50 to-indigo-50 dark:from-slate-900/50 dark:via-blue-900/20 dark:to-indigo-900/20 rounded-3xl p-12 mb-16 overflow-hidden border company-blue-border", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 opacity-5", children: (0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0", style: { - backgroundImage: "radial-gradient(circle at 1px 1px, rgba(59, 130, 246, 0.3) 1px, transparent 0)", - backgroundSize: "20px 20px", - } }) }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10 max-w-6xl mx-auto", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-center mb-12", children: [(0, jsx_runtime_1.jsxs)("h3", { className: "text-3xl font-bold mb-4 text-gray-900 dark:text-white flex items-center justify-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-4xl mr-4", children: "\uD83C\uDFE2" }), "FAANG+ Companies Overview"] }), (0, jsx_runtime_1.jsx)("p", { className: "text-lg text-gray-600 dark:text-gray-300", children: "Navigate the unique interview processes of the world's most competitive tech companies" })] }), (0, jsx_runtime_1.jsx)("div", { className: "grid md:grid-cols-2 lg:grid-cols-4 gap-6 mb-12", children: (_b = [ - { - title: "Big Tech Focus", - icon: "🎯", - description: "Google, Amazon, Meta, Apple, Netflix, Microsoft + emerging unicorns", - color: "from-blue-500 to-blue-600", - bgColor: "bg-blue-500", - stats: "6+ Companies", - }, - { - title: "Interview Styles", - icon: "💼", - description: "System Design, Behavioral, Coding, Product Sense, Leadership", - color: "from-green-500 to-green-600", - bgColor: "bg-green-500", - stats: "5 Categories", - }, - { - title: "Success Factors", - icon: "⭐", - description: "Company culture fit, technical excellence, leadership principles", - color: "from-purple-500 to-purple-600", - bgColor: "bg-purple-500", - stats: "95% Success", - }, - { - title: "Real Questions", - icon: "❓", - description: "Actual questions from recent interviews with detailed answers", - color: "from-orange-500 to-orange-600", - bgColor: "bg-orange-500", - stats: "100+ Questions", - }, - ]) === null || _b === void 0 ? void 0 : _b.map(function (item, i) { return (item ? ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-white dark:bg-gray-800 rounded-2xl p-6 text-center shadow-lg hover:shadow-xl transition-all duration-300 transform hover:scale-105", whileHover: { y: -5 }, initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5, delay: i * 0.1 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "w-16 h-16 bg-gradient-to-br ".concat(item.color, " text-white rounded-2xl flex items-center justify-center text-2xl font-bold mx-auto mb-4 shadow-lg relative overflow-hidden"), children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "absolute inset-0 bg-white opacity-20 rounded-2xl", animate: { scale: [1, 1.2, 1] }, transition: { duration: 2, repeat: Number.POSITIVE_INFINITY, ease: "easeInOut" } }), (0, jsx_runtime_1.jsx)("span", { className: "relative z-10", children: item.icon })] }), (0, jsx_runtime_1.jsx)("h4", { className: "font-bold text-gray-900 dark:text-white mb-3 text-lg", children: item.title }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300 mb-3 leading-relaxed", children: item.description }), (0, jsx_runtime_1.jsx)("div", { className: "inline-flex items-center px-3 py-1 bg-gray-100 dark:bg-gray-700 rounded-full text-xs font-semibold text-gray-700 dark:text-gray-300", children: item.stats })] }, i)) : null); }) }), (0, jsx_runtime_1.jsx)("div", { className: "grid md:grid-cols-3 gap-8 rounded-xl", children: (_c = [ - { metric: "92%", label: "Interview Success Rate", icon: "📈", color: "text-green-600" }, - { metric: "150+", label: "Companies Covered", icon: "🏢", color: "text-blue-600" }, - { metric: "50K+", label: "Successful Candidates", icon: "👥", color: "text-purple-600" }, - ]) === null || _c === void 0 ? void 0 : _c.map(function (stat, i) { return (stat ? ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "text-center p-6 bg-white/50 dark:bg-gray-800/50 rounded-xl backdrop-blur-sm border company-border", initial: { opacity: 0, scale: 0.8 }, animate: { opacity: 1, scale: 1 }, transition: { duration: 0.5, delay: 0.5 + i * 0.1 }, children: [(0, jsx_runtime_1.jsx)("div", { className: "text-3xl font-bold ".concat(stat.color, " mb-2"), children: stat.metric }), (0, jsx_runtime_1.jsxs)("div", { className: "text-sm text-gray-600 dark:text-gray-300 flex items-center justify-center gap-2", children: [(0, jsx_runtime_1.jsx)("span", { children: stat.icon }), stat.label] })] }, i)) : null); }) })] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { variants: fadeIn, className: "bg-white dark:bg-gray-800 rounded-2xl p-8 shadow-xl border border-gray-100 dark:border-gray-700", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col md:flex-row gap-6 mb-8", children: [(0, jsx_runtime_1.jsxs)("div", { className: "relative flex-1", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Search, { className: "absolute left-4 top-1/2 transform -translate-y-1/2 text-gray-400 w-5 h-5" }), (0, jsx_runtime_1.jsx)(input_1.Input, { placeholder: "Search companies, focus areas, technologies, or interview types...", value: searchTerm, onChange: function (e) { return setSearchTerm(e.target.value); }, className: "pl-12 h-12 custom-input bg-gray-50 dark:bg-gray-700 text-white border-gray-200 dark:border-gray-600 rounded-xl text-lg" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex gap-3", children: [(0, jsx_runtime_1.jsxs)("select", { value: selectedIndustry, onChange: function (e) { return setSelectedIndustry(e.target.value); }, className: "px-4 py-3 border border-gray-200 dark:border-gray-600 rounded-xl bg-gray-50 dark:bg-gray-700 text-gray-900 dark:text-white min-w-[140px]", children: [(0, jsx_runtime_1.jsx)("option", { value: "", children: "All Industries" }), industries.map(function (industry) { return ((0, jsx_runtime_1.jsx)("option", { value: industry, children: industry }, industry)); })] }), (0, jsx_runtime_1.jsxs)("select", { value: selectedRole, onChange: function (e) { return setSelectedRole(e.target.value); }, className: " px-4 py-3 border border-gray-200 dark:border-gray-600 rounded-xl bg-gray-50 dark:bg-gray-700 text-gray-900 dark:text-white min-w-[120px]", children: [(0, jsx_runtime_1.jsx)("option", { value: "", children: "All Roles" }), roles.map(function (role) { return ((0, jsx_runtime_1.jsx)("option", { value: role, children: role }, role)); })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-sm text-gray-600 dark:text-gray-400 flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Building2, { className: "w-4 h-4" }), "Showing ", filteredCompanies.length, " of ", (companyTips === null || companyTips === void 0 ? void 0 : companyTips.length) || 0, " companies"] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2 text-xs text-gray-500 dark:text-gray-400", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Star, { className: "w-3 h-3" }), "Updated weekly with latest interview insights"] })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "space-y-12", children: filteredCompanies.map(function (company, companyIndex) { - var isOpen = expandedCompanies[companyIndex] || false; - return ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { variants: fadeIn, className: "group", children: (0, jsx_runtime_1.jsxs)(card_1.Card, { className: "overflow-hidden shadow-xl hover:shadow-2xl transition-all duration-500 transform hover:scale-[1.02] border-0", children: [(0, jsx_runtime_1.jsxs)(card_1.CardHeader, { className: "pb-6 bg-gradient-to-br from-gray-50 via-blue-50 to-indigo-50 dark:from-gray-800 dark:via-blue-900/20 dark:to-indigo-900/20 relative", children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 opacity-5", children: (0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0", style: { - backgroundImage: "radial-gradient(circle at 2px 2px, rgba(59, 130, 246, 0.3) 1px, transparent 0)", - backgroundSize: "24px 24px", - } }) }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10 mt-8", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-start gap-6 mb-6", children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "relative", whileHover: { scale: 1.1, rotate: 5 }, transition: { type: "spring", stiffness: 300 }, children: [(0, jsx_runtime_1.jsx)("img", { src: company.logo || "/placeholder.svg", alt: "".concat(company.company, " logo"), className: "w-20 h-20 rounded-2xl object-contain bg-white p-3 shadow-lg border border-gray-100" }), (0, jsx_runtime_1.jsx)("div", { className: "absolute -top-2 -right-2 w-6 h-6 bg-green-500 rounded-full flex items-center justify-center", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Award, { className: "w-3 h-3 text-white" }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex-1", children: [(0, jsx_runtime_1.jsx)(card_1.CardTitle, { className: "text-3xl mb-3 text-gray-900 dark:text-white group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors", children: company.company }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-2 mb-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "-mt-5", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Target, { className: "w-5 h-5 text-blue-600 flex-shrink-0" }) }), (0, jsx_runtime_1.jsxs)("p", { className: "text-blue-600 dark:text-blue-400 font-semibold text-lg leading-tight", children: ["Focus: ", company.focus] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-wrap gap-2 mb-4", children: [company.focusAreas.slice(0, 4).map(function (area, i) { return ((0, jsx_runtime_1.jsx)(badge_1.Badge, { variant: "secondary", className: "text-sm bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 px-3 py-1 rounded-full", children: area }, i)); }), company.focusAreas.length > 4 && ((0, jsx_runtime_1.jsxs)(badge_1.Badge, { variant: "outline", className: "text-sm px-3 py-1 rounded-full", children: ["+", company.focusAreas.length - 4, " more"] }))] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-right", children: [(0, jsx_runtime_1.jsxs)("div", { className: "inline-flex items-center px-3 py-1 bg-green-100 dark:bg-green-900/30 rounded-full text-green-700 dark:text-green-300 text-sm font-semibold mb-2", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.TrendingUp, { className: "w-3 h-3 mr-1" }), "High Demand"] }), (0, jsx_runtime_1.jsx)("div", { className: "text-sm text-gray-500 dark:text-gray-400", children: company.industry })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-wrap gap-2 justify-between items-center", children: [(0, jsx_runtime_1.jsxs)("span", { className: "text-sm text-gray-600 dark:text-gray-400 flex items-center gap-2 font-medium", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Users, { className: "w-4 h-4" }), "Common roles:", company.roleTypes.map(function (role, i) { return ((0, jsx_runtime_1.jsx)(badge_1.Badge, { variant: "outline", className: "text-sm border-gray-300 dark:border-gray-600 px-3 py-1 rounded-full company-border", children: role }, i)); })] }), (0, jsx_runtime_1.jsx)("button", { onClick: function () { return toggleCompany(companyIndex); }, className: "p-2 rounded-full hover:bg-gray-200 dark:hover:bg-gray-700 transition", children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { animate: { rotate: isOpen ? 180 : 0 }, transition: { duration: 0.2 }, children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { className: "w-6 h-6 text-gray-600 dark:text-gray-300" }) }) })] })] })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: false, animate: { height: isOpen ? "auto" : 0, opacity: isOpen ? 1 : 0 }, transition: { duration: 0.3 }, className: "overflow-hidden", children: (0, jsx_runtime_1.jsxs)(card_1.CardContent, { className: "space-y-8 p-8", children: [(0, jsx_runtime_1.jsxs)("div", { className: "grid lg:grid-cols-2 gap-8", children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-gradient-to-br from-green-50 to-emerald-50 dark:from-green-900/20 dark:to-emerald-900/20 rounded-2xl p-8 border border-green-100 dark:border-green-800 company-green-border", whileHover: { scale: 1.02 }, transition: { type: "spring", stiffness: 300 }, children: [(0, jsx_runtime_1.jsxs)("h4", { className: "font-bold text-gray-900 dark:text-white mb-6 flex items-center gap-3 text-xl", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-10 h-10 bg-green-500 rounded-xl flex items-center justify-center", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Lightbulb, { className: "w-5 h-5 text-white" }) }), "Key Preparation Tips"] }), (0, jsx_runtime_1.jsx)("ul", { className: "space-y-4", children: company.tips.map(function (tip, i) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.li, { className: "flex items-start gap-4 group", initial: { opacity: 0, x: -20 }, animate: { opacity: 1, x: 0 }, transition: { duration: 0.5, delay: i * 0.1 }, children: [(0, jsx_runtime_1.jsx)("div", { className: "w-6 h-6 bg-green-500 rounded-full flex items-center justify-center flex-shrink-0 mt-1 group-hover:scale-110 transition-transform", children: (0, jsx_runtime_1.jsx)("span", { className: "text-white text-xs font-bold", children: i + 1 }) }), (0, jsx_runtime_1.jsx)("span", { className: "text-gray-700 dark:text-gray-300 leading-relaxed", children: tip })] }, i)); }) })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-gradient-to-br from-purple-50 to-indigo-50 dark:from-purple-900/20 dark:to-indigo-900/20 rounded-2xl p-8 border border-purple-100 dark:border-purple-800 company-purple-border", whileHover: { scale: 1.02 }, transition: { type: "spring", stiffness: 300 }, children: [(0, jsx_runtime_1.jsxs)("h4", { className: "font-bold text-gray-900 dark:text-white mb-6 flex items-center gap-3 text-xl", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-10 h-10 bg-purple-500 rounded-xl flex items-center justify-center", children: (0, jsx_runtime_1.jsx)(lucide_react_1.MessageSquare, { className: "w-5 h-5 text-white" }) }), "Common Interview Questions"] }), (0, jsx_runtime_1.jsx)("div", { className: "space-y-4", children: company.commonQuestions.map(function (item, i) { - var questionKey = "".concat(companyIndex, "-").concat(i); - var isExpanded = expandedQuestions[questionKey]; - return ((0, jsx_runtime_1.jsxs)(collapsible_1.Collapsible, { children: [(0, jsx_runtime_1.jsx)(collapsible_1.CollapsibleTrigger, { onClick: function () { return toggleQuestion(companyIndex, i); }, className: "w-full text-left", children: (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "question-card flex items-start justify-between gap-3 p-4 rounded-xl border bg-white dark:bg-gray-800 hover:bg-gray-50 dark:hover:bg-gray-700 transition-all shadow-sm hover:shadow-md", whileHover: { scale: 1.02 }, whileTap: { scale: 0.98 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex-1", children: [(0, jsx_runtime_1.jsxs)("p", { className: "text-sm font-semibold text-gray-900 dark:text-white mb-2 leading-relaxed", children: ["\"", item.question, "\""] }), (0, jsx_runtime_1.jsx)(badge_1.Badge, { variant: "outline", className: "text-xs px-2 py-1 rounded-full ".concat(item.category === "System Design" - ? "badge-system border-blue-300 text-blue-700 dark:text-blue-300 bg-blue-50 dark:bg-blue-900/20" - : item.category === "Behavioral" - ? "badge-behavioral border-green-300 text-green-700 dark:text-green-300 bg-green-50 dark:bg-green-900/20" - : item.category === "Technical" - ? "badge-technical border-purple-300 text-purple-700 dark:text-purple-300 bg-purple-50 dark:bg-purple-900/20" - : "badge-other border-orange-300 text-orange-700 dark:text-orange-300 bg-orange-50 dark:bg-orange-900/20"), children: item.category })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { animate: { rotate: isExpanded ? 180 : 0 }, transition: { duration: 0.2 }, children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { className: "w-5 h-5 text-gray-500 flex-shrink-0" }) })] }) }), (0, jsx_runtime_1.jsx)(collapsible_1.CollapsibleContent, { children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "mt-3 p-6 bg-gradient-to-r from-blue-50 to-purple-50 dark:from-blue-900/20 dark:to-purple-900/20 rounded-xl border-l-4 border-blue-500 company-blue-border", initial: { opacity: 0, y: -10 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.3 }, children: (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-700 dark:text-gray-300 leading-relaxed", children: item.answer }) }) })] }, i)); - }) })] })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "border-t pt-8", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5, delay: 0.3 }, children: (0, jsx_runtime_1.jsxs)("div", { className: "bg-gradient-to-br from-yellow-50 via-orange-50 to-red-50 dark:from-yellow-900/20 dark:via-orange-900/20 dark:to-red-900/20 rounded-2xl p-8 border-2 border-yellow-200 dark:border-yellow-800 relative overflow-hidden technical-inner-success", children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute top-4 right-4 text-4xl opacity-20", children: "\uD83D\uDE80" }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-3 mb-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-10 h-10 bg-orange-500 rounded-xl flex items-center justify-center", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Users, { className: "w-5 h-5 text-white" }) }), (0, jsx_runtime_1.jsx)("h5", { className: "font-bold text-gray-900 dark:text-white text-xl", children: "Community Contributors Needed!" })] }), (0, jsx_runtime_1.jsxs)("p", { className: "text-gray-700 dark:text-gray-300 mb-6 leading-relaxed", children: ["Help keep ", company.company, "'s interview information current! Share recent questions, tips, or insights you've encountered to help fellow candidates succeed."] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-wrap gap-3", children: [(0, jsx_runtime_1.jsxs)(button_1.Button, { variant: "outline", size: "sm", className: "bg-white dark:bg-orange-900/20 hover:bg-orange-50 dark:hover:bg-orange-800 border-orange-200 dark:border-orange-700 text-orange-700 dark:text-orange-300 px-4 py-2 rounded-xl technical-inner-success", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Zap, { className: "w-4 h-4 mr-2" }), (0, jsx_runtime_1.jsx)(Link_1.default, { to: "/community", className: "company-tab-community-link", children: "Share Interview Experience" })] }), (0, jsx_runtime_1.jsxs)(button_1.Button, { variant: "outline", size: "sm", className: "bg-white dark:bg-orange-900/20 hover:bg-orange-50 dark:hover:bg-orange-800 border-orange-200 dark:border-orange-700 text-orange-700 dark:text-orange-300 px-4 py-2 rounded-xl technical-inner-success", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.MessageSquare, { className: "w-4 h-4 mr-2" }), (0, jsx_runtime_1.jsx)(Link_1.default, { to: "/community", className: "company-tab-community-link", children: "Add Recent Questions" })] })] })] })] }) })] }) })] }) }, companyIndex)); - }) }), filteredCompanies.length === 0 && ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { variants: fadeIn, className: "text-center py-12 bg-white dark:bg-gray-800 rounded-xl shadow-lg", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-6xl mb-4", children: "\uD83D\uDD0D" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-400 mb-4", children: "No companies match your current filters." }), (0, jsx_runtime_1.jsx)(button_1.Button, { variant: "outline", onClick: function () { - setSearchTerm(""); - setSelectedIndustry(""); - setSelectedRole(""); - }, className: "bg-blue-600 text-white hover:bg-blue-700", children: "Clear All Filters" })] })), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "relative bg-gradient-to-br from-indigo-50 via-purple-50 to-pink-50 dark:from-indigo-900/20 dark:via-purple-900/20 dark:to-pink-900/20 rounded-3xl p-12 border-2 border-indigo-200 dark:border-indigo-800 overflow-hidden company-blue-border", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute top-10 right-10 text-6xl opacity-10", children: "\uD83E\uDD1D" }), (0, jsx_runtime_1.jsx)("div", { className: "absolute bottom-10 left-10 text-4xl opacity-10", children: "\uD83D\uDCA1" }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-center mb-12", children: [(0, jsx_runtime_1.jsxs)("h3", { className: "text-4xl font-bold text-gray-900 dark:text-white flex items-center justify-center mb-4", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-5xl mr-4", children: "\uD83E\uDD1D" }), "Join Our Interview Prep Community"] }), (0, jsx_runtime_1.jsx)("p", { className: "text-xl text-gray-600 dark:text-gray-300", children: "Help build the most comprehensive company interview resource and accelerate your career growth" })] }), (0, jsx_runtime_1.jsx)("div", { className: "grid md:grid-cols-2 lg:grid-cols-4 gap-8 mb-12", children: [ - { - title: "Share Experiences", - icon: "💬", - description: "Recent interview questions and experiences from your interviews", - color: "from-blue-500 to-blue-600", - bgColor: "bg-blue-500", - benefit: "Help 1000+ candidates", - }, - { - title: "Update Tips", - icon: "💡", - description: "Company-specific preparation strategies and insider knowledge", - color: "from-green-500 to-green-600", - bgColor: "bg-green-500", - benefit: "Earn community points", - }, - { - title: "Add Companies", - icon: "🏢", - description: "Request coverage for new companies and emerging startups", - color: "from-purple-500 to-purple-600", - bgColor: "bg-purple-500", - benefit: "Shape our roadmap", - }, - { - title: "Improve Content", - icon: "✨", - description: "Enhance existing company profiles with updated information", - color: "from-orange-500 to-orange-600", - bgColor: "bg-orange-500", - benefit: "Get featured contributor", - }, - ].map(function (item, i) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-white dark:bg-gray-800 rounded-2xl p-8 text-center hover:shadow-2xl transition-all duration-300 transform hover:scale-105 border border-gray-100 dark:border-gray-700 company-border", whileHover: { y: -10 }, initial: { opacity: 0, y: 30 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5, delay: i * 0.1 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "w-20 h-20 bg-gradient-to-br ".concat(item.color, " text-white rounded-2xl flex items-center justify-center text-3xl font-bold mx-auto mb-6 shadow-lg relative overflow-hidden"), children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "absolute inset-0 bg-white opacity-20 rounded-2xl", animate: { scale: [1, 1.2, 1] }, transition: { duration: 3, repeat: Number.POSITIVE_INFINITY, ease: "easeInOut" } }), (0, jsx_runtime_1.jsx)("span", { className: "relative z-10", children: item.icon })] }), (0, jsx_runtime_1.jsx)("h4", { className: "font-bold text-gray-900 dark:text-white mb-3 text-lg", children: item.title }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300 mb-4 leading-relaxed", children: item.description }), (0, jsx_runtime_1.jsx)("div", { className: "inline-flex items-center px-3 py-1 bg-gray-100 dark:bg-gray-700 rounded-full text-xs font-semibold text-gray-700 dark:text-gray-300", children: item.benefit })] }, i)); }) }), (0, jsx_runtime_1.jsxs)("div", { className: "text-center mt-3", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { whileHover: { scale: 1.05 }, whileTap: { scale: 0.95 }, className: "company-border", children: (0, jsx_runtime_1.jsxs)(button_1.Button, { className: "bg-gradient-to-r from-indigo-600 to-purple-600 text-white hover:from-indigo-700 hover:to-purple-700 px-12 py-4 text-mdx`x rounded-2xl shadow-lg", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Users, { className: "w-5 h-5 mr-3" }), (0, jsx_runtime_1.jsx)(Link_1.default, { to: "/community", className: "company-tab-link", children: "Join Community Discord" })] }) }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-500 dark:text-gray-400 mt-4", children: "Join 50,000+ developers preparing for their dream jobs" })] })] })] })] })); -}; -exports.default = CompaniesTab; diff --git a/src/pages/interview-prep/OverviewTab.js b/src/pages/interview-prep/OverviewTab.js deleted file mode 100644 index f101e7db..00000000 --- a/src/pages/interview-prep/OverviewTab.js +++ /dev/null @@ -1,163 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importDefault(require("react")); -var framer_motion_1 = require("framer-motion"); -var fadeIn = { hidden: { opacity: 0, y: 20 }, visible: { opacity: 1, y: 0, transition: { duration: 0.6 } } }; -var staggerContainer = { hidden: {}, visible: { transition: { staggerChildren: 0.2 } } }; -var OverviewTab = function (_a) { - var _b; - var _c = _a.toggleTips, toggleTips = _c === void 0 ? function () { } : _c, _d = _a.toggleQuestions, toggleQuestions = _d === void 0 ? function () { } : _d, _e = _a.showTips, showTips = _e === void 0 ? {} : _e, _f = _a.showQuestions, showQuestions = _f === void 0 ? {} : _f, _g = _a.setActiveTab, setActiveTab = _g === void 0 ? function () { } : _g; - var stages = [ - { - step: "01", - title: "Resume Optimization", - subtitle: "Foundation Building Phase", - icon: "📄", - description: "Craft a compelling resume that showcases your achievements, aligns with job requirements, and passes ATS screening systems", - color: "from-blue-500 to-blue-600", - bgColor: "bg-blue-500", - duration: "Ongoing preparation", - difficulty: "Medium", - keyFocus: "Professional Presentation & ATS Optimization", - tips: [ - "Tailor resume for each specific role and company", - "Use action verbs and quantify achievements with metrics", - "Optimize for ATS with relevant keywords from job description", - "Keep format clean, consistent, and easy to scan", - "Include relevant projects, certifications, and technical skills", - ], - commonQuestions: [ - "Walk me through your resume", - "Tell me about this project on your resume", - "Why did you choose this career path?", - ], - }, - { - step: "02", - title: "Technical Assessment", - subtitle: "Core Competency Evaluation", - icon: "💻", - description: "Deep dive into coding abilities, algorithmic thinking, system design knowledge, and technical problem-solving approach", - color: "from-green-500 to-green-600", - bgColor: "bg-green-500", - duration: "60-120 minutes", - difficulty: "Hard", - keyFocus: "Problem Solving & Code Quality", - tips: [ - "Practice coding on whiteboard/shared editor daily", - "Think out loud - explain your thought process clearly", - "Ask clarifying questions before jumping into code", - "Test your solution with edge cases and optimize", - "Know time/space complexity of your solutions", - ], - commonQuestions: [ - "Implement [data structure/algorithm]", - "Design a system for [specific use case]", - "Optimize this code for better performance", - ], - }, - { - step: "03", - title: "Behavioral Deep-Dive", - subtitle: "Leadership & Culture Assessment", - icon: "🤝", - description: "Comprehensive evaluation of soft skills, leadership potential, conflict resolution abilities, and team collaboration style", - color: "from-purple-500 to-purple-600", - bgColor: "bg-purple-500", - duration: "45-75 minutes", - difficulty: "Medium", - keyFocus: "Leadership & Collaboration", - tips: [ - "Master the STAR method (Situation, Task, Action, Result)", - "Prepare 5-7 detailed stories covering different competencies", - "Show growth mindset - discuss lessons learned from failures", - "Demonstrate impact with specific metrics and outcomes", - "Practice active listening and ask follow-up questions", - ], - commonQuestions: [ - "Tell me about a time you led a difficult project", - "Describe a conflict with a teammate and resolution", - "Share an example of when you failed and what you learned", - ], - }, - { - step: "04", - title: "Final Alignment", - subtitle: "Mutual Fit Confirmation", - icon: "🎯", - description: "Final evaluation covering compensation expectations, role clarity, team dynamics, and long-term career alignment", - color: "from-orange-500 to-red-500", - bgColor: "bg-orange-500", - duration: "30-60 minutes", - difficulty: "Medium", - keyFocus: "Mutual Fit & Expectations", - tips: [ - "Research industry salary benchmarks thoroughly", - "Prepare thoughtful questions about team and growth", - "Show genuine enthusiasm for the role and company", - "Discuss career goals and how role aligns with them", - "Be ready to negotiate professionally and respectfully", - ], - commonQuestions: [ - "What are your career goals for the next 2-3 years?", - "How do you handle work-life balance?", - "What questions do you have for us?", - ], - }, - ]; - return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { initial: "hidden", animate: "visible", variants: staggerContainer, children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "mb-16", variants: fadeIn, children: (0, jsx_runtime_1.jsxs)("div", { className: "bg-gradient-to-br from-blue-50 via-indigo-50 to-purple-50 dark:from-blue-900/20 dark:via-indigo-900/20 dark:to-purple-900/20 rounded-2xl p-8 border border-blue-100 dark:border-blue-800", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-center mb-8", children: [(0, jsx_runtime_1.jsxs)("div", { className: "inline-flex items-center px-4 py-2 bg-blue-100 dark:bg-blue-900/30 rounded-full text-blue-600 dark:text-blue-400 text-sm font-medium mb-4", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-blue-500 rounded-full mr-2 animate-pulse" }), "Your Complete Interview Success Guide"] }), (0, jsx_runtime_1.jsx)("h2", { className: "text-4xl font-bold mb-6 text-gray-900 dark:text-white", children: "What Our Interview Prep Section Covers" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid md:grid-cols-2 gap-8 mb-8", children: [(0, jsx_runtime_1.jsxs)("div", { className: "space-y-4", children: [(0, jsx_runtime_1.jsxs)("h3", { className: "text-xl font-bold text-gray-900 dark:text-white flex items-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-8 h-8 bg-blue-500 text-white rounded-full flex items-center justify-center text-sm mr-3", children: "\uD83D\uDCDA" }), "Comprehensive Coverage"] }), (0, jsx_runtime_1.jsxs)("ul", { className: "space-y-3 text-gray-600 dark:text-gray-300", children: [(0, jsx_runtime_1.jsxs)("li", { className: "flex items-start", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-blue-500 rounded-full mr-3 mt-2 flex-shrink-0" }), (0, jsx_runtime_1.jsxs)("span", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Technical Mastery:" }), " 500+ coding problems, algorithms, data structures, and system design challenges"] })] }), (0, jsx_runtime_1.jsxs)("li", { className: "flex items-start", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-green-500 rounded-full mr-3 mt-2 flex-shrink-0" }), (0, jsx_runtime_1.jsxs)("span", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Behavioral Excellence:" }), " STAR method framework, leadership scenarios, and communication skills"] })] }), (0, jsx_runtime_1.jsxs)("li", { className: "flex items-start", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-purple-500 rounded-full mr-3 mt-2 flex-shrink-0" }), (0, jsx_runtime_1.jsxs)("span", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Company Intelligence:" }), " FAANG-specific strategies, culture insights, and insider tips"] })] }), (0, jsx_runtime_1.jsxs)("li", { className: "flex items-start", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-orange-500 rounded-full mr-3 mt-2 flex-shrink-0" }), (0, jsx_runtime_1.jsxs)("span", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Mock Practice:" }), " Real-time simulations with feedback and performance tracking"] })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "space-y-4", children: [(0, jsx_runtime_1.jsxs)("h3", { className: "text-xl font-bold text-gray-900 dark:text-white flex items-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-8 h-8 bg-green-500 text-white rounded-full flex items-center justify-center text-sm mr-3", children: "\u26A1" }), "Why Both Technical & Behavioral Matter"] }), (0, jsx_runtime_1.jsxs)("div", { className: "space-y-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-white dark:bg-gray-800 rounded-lg p-4 border-l-4 border-blue-500 overview-sidebar-blue", children: [(0, jsx_runtime_1.jsx)("h4", { className: "font-semibold text-gray-900 dark:text-white mb-2", children: "Technical Skills (60% Weight)" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300", children: "Prove you can solve complex problems, write clean code, and design scalable systems. Technical competence is your entry ticket." })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white dark:bg-gray-800 rounded-lg p-4 border-l-4 border-green-500 overview-sidebar-green", children: [(0, jsx_runtime_1.jsx)("h4", { className: "font-semibold text-gray-900 dark:text-white mb-2", children: "Behavioral Skills (40% Weight)" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300", children: "Demonstrate leadership, collaboration, and cultural fit. Many technically strong candidates fail here due to poor communication or team dynamics." })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "bg-gradient-to-r from-yellow-100 to-orange-100 dark:from-yellow-900/30 dark:to-orange-900/30 rounded-lg p-4 border border-yellow-200 dark:border-yellow-700", children: (0, jsx_runtime_1.jsxs)("p", { className: "text-sm text-gray-700 dark:text-gray-300", children: [(0, jsx_runtime_1.jsx)("strong", { children: "\uD83D\uDCA1 Key Insight:" }), " Top companies hire for both technical excellence AND cultural alignment. Neglecting either aspect significantly reduces your success rate."] }) })] })] })] }) }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "mb-20", variants: fadeIn, children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-center mb-12", children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-4xl font-bold text-gray-900 dark:text-white mb-4", children: "Interview Process Journey" }), (0, jsx_runtime_1.jsx)("p", { className: "text-lg text-gray-600 dark:text-gray-300", children: "Navigate each stage strategically with our comprehensive roadmap" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "relative bg-gradient-to-br from-slate-50 via-blue-50 to-indigo-50 dark:from-slate-900/50 dark:via-blue-900/20 dark:to-indigo-900/20 rounded-3xl p-8 overflow-hidden", children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 opacity-5", children: (0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0", style: { - backgroundImage: "radial-gradient(circle at 1px 1px, rgba(59, 130, 246, 0.3) 1px, transparent 0)", - backgroundSize: "20px 20px", - } }) }), (0, jsx_runtime_1.jsx)("div", { className: "relative", children: (stages || []).map(function (stage, index) { - var _a, _b, _c, _d; - return (stage ? ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "relative mb-20 last:mb-0", initial: { opacity: 0, x: index % 2 === 0 ? -50 : 50 }, whileInView: { opacity: 1, x: 0 }, transition: { duration: 0.6, delay: index * 0.2 }, viewport: { once: true }, children: [index < 3 && ((0, jsx_runtime_1.jsxs)("div", { className: "hidden md:block absolute top-full left-1/2 transform -translate-x-1/2 w-1 h-16 z-10", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-full h-full bg-gradient-to-b from-gray-300 to-gray-400 dark:from-gray-600 dark:to-gray-700 rounded-full relative overflow-hidden", children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "absolute inset-0 bg-gradient-to-b from-blue-500 to-purple-500 rounded-full", initial: { height: "0%" }, whileInView: { height: "100%" }, transition: { duration: 1, delay: index * 0.3 + 0.5 }, viewport: { once: true } }) }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "absolute -bottom-2 left-1/2 transform -translate-x-1/2 text-blue-500", initial: { opacity: 0, y: -10 }, whileInView: { opacity: 1, y: 0 }, transition: { duration: 0.5, delay: index * 0.3 + 1 }, viewport: { once: true }, children: (0, jsx_runtime_1.jsx)("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { d: "M6 0L12 6L6 12L4.5 10.5L8.25 6.75H0V5.25H8.25L4.5 1.5L6 0Z", transform: "rotate(90 6 6)" }) }) })] })), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col md:flex-row ".concat(index % 2 === 0 ? "md:flex-row" : "md:flex-row-reverse", " gap-8 items-center"), children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "flex-shrink-0 relative", whileHover: { scale: 1.05 }, transition: { type: "spring", stiffness: 300 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "w-20 h-20 rounded-full bg-gradient-to-br ".concat(stage.color, " flex items-center justify-center text-white font-bold text-lg shadow-lg relative overflow-hidden"), children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "absolute inset-0 bg-white opacity-20 rounded-full", animate: { scale: [1, 1.2, 1] }, transition: { duration: 2, repeat: Number.POSITIVE_INFINITY, ease: "easeInOut" } }), (0, jsx_runtime_1.jsx)("span", { className: "relative z-10", children: stage.step })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "absolute -top-2 -right-2 w-8 h-8 bg-white dark:bg-gray-800 rounded-full flex items-center justify-center shadow-md", animate: { y: [0, -4, 0] }, transition: { duration: 2, repeat: Number.POSITIVE_INFINITY, ease: "easeInOut" }, children: (0, jsx_runtime_1.jsx)("span", { className: "text-lg", children: stage.icon }) })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "flex-1 bg-white dark:bg-gray-800 rounded-2xl p-8 shadow-xl border border-gray-100 dark:border-gray-700 relative overflow-hidden group", whileHover: { y: -5, boxShadow: "0 25px 50px -12px rgba(0, 0, 0, 0.25)" }, transition: { type: "spring", stiffness: 300 }, children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 opacity-5 group-hover:opacity-10 transition-opacity duration-300", children: (0, jsx_runtime_1.jsx)("div", { className: "w-full h-full", style: { - backgroundImage: "radial-gradient(circle at 2px 2px, currentColor 1px, transparent 0)", - backgroundSize: "24px 24px", - } }) }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-start justify-between mb-6", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-2xl font-bold text-gray-900 dark:text-white mb-2 group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors", children: stage.title }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm font-medium text-blue-600 dark:text-blue-400 uppercase tracking-wider", children: stage.subtitle })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "px-3 py-1 rounded-full text-xs font-semibold ".concat(stage.difficulty === "Easy" - ? "bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200" - : stage.difficulty === "Medium" - ? "bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200" - : "bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200"), children: stage.difficulty }), (0, jsx_runtime_1.jsx)("span", { className: "px-3 py-1 rounded-full text-xs font-semibold bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-200", children: stage.duration })] })] }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 mb-6 leading-relaxed", children: stage.description }), (0, jsx_runtime_1.jsx)("div", { className: "mb-6 p-4 bg-gradient-to-r from-blue-50 to-purple-50 dark:from-blue-900/20 dark:to-purple-900/20 rounded-xl border-l-4 border-blue-500 overview-sidebar-blue", children: (0, jsx_runtime_1.jsxs)("h4", { className: "font-semibold text-gray-900 dark:text-white mb-2 flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-blue-500 rounded-full" }), "Key Focus: ", stage.keyFocus] }) }), (0, jsx_runtime_1.jsxs)("div", { className: "mb-6", children: [(0, jsx_runtime_1.jsxs)("button", { onClick: function () { return toggleTips(index); }, className: "w-full flex items-center justify-between p-3 bg-green-50 dark:bg-green-900/20 rounded-lg hover:bg-green-100 dark:hover:bg-green-900/30 transition-colors", children: [(0, jsx_runtime_1.jsxs)("h4", { className: "font-semibold text-gray-900 dark:text-white flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-green-500", children: "\uD83D\uDCA1" }), "Preparation Tips (", ((_a = stage.tips) === null || _a === void 0 ? void 0 : _a.length) || 0, ")"] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { animate: { rotate: showTips[index] ? 180 : 0 }, transition: { duration: 0.2 }, children: (0, jsx_runtime_1.jsx)("svg", { className: "w-5 h-5 text-gray-500", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { children: showTips[index] && ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: { opacity: 0, height: 0 }, animate: { opacity: 1, height: "auto" }, exit: { opacity: 0, height: 0 }, transition: { duration: 0.3 }, className: "overflow-hidden", children: (0, jsx_runtime_1.jsx)("ul", { className: "space-y-3 mt-4", children: (_b = stage.tips) === null || _b === void 0 ? void 0 : _b.map(function (tip, tipIndex) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.li, { className: "flex items-start gap-3 text-gray-600 dark:text-gray-300", initial: { opacity: 0, x: -20 }, animate: { opacity: 1, x: 0 }, transition: { duration: 0.4, delay: tipIndex * 0.1 }, children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-green-500 rounded-full mt-2 flex-shrink-0" }), (0, jsx_runtime_1.jsx)("span", { className: "leading-relaxed", children: tip })] }, tipIndex)); }) }) })) })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("button", { onClick: function () { return toggleQuestions(index); }, className: "w-full flex items-center justify-between p-3 bg-purple-50 dark:bg-purple-900/20 rounded-lg hover:bg-purple-100 dark:hover:bg-purple-900/30 transition-colors", children: [(0, jsx_runtime_1.jsxs)("h4", { className: "font-semibold text-gray-900 dark:text-white flex items-center gap-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-purple-500", children: "\u2753" }), "Common Questions (", ((_c = stage.commonQuestions) === null || _c === void 0 ? void 0 : _c.length) || 0, ")"] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { animate: { rotate: showQuestions[index] ? 180 : 0 }, transition: { duration: 0.2 }, children: (0, jsx_runtime_1.jsx)("svg", { className: "w-5 h-5 text-gray-500", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) }) })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { children: showQuestions[index] && ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: { opacity: 0, height: 0 }, animate: { opacity: 1, height: "auto" }, exit: { opacity: 0, height: 0 }, transition: { duration: 0.3 }, className: "overflow-hidden", children: (0, jsx_runtime_1.jsx)("div", { className: "space-y-2 mt-4", children: (_d = stage.commonQuestions) === null || _d === void 0 ? void 0 : _d.map(function (question, qIndex) { return ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "p-3 bg-gray-50 dark:bg-gray-700 rounded-lg border-l-3 border-purple-500 overview-sidebar-purple", initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.4, delay: qIndex * 0.1 }, children: (0, jsx_runtime_1.jsxs)("p", { className: "text-gray-700 dark:text-gray-300 italic", children: ["\"", question, "\""] }) }, qIndex)); }) }) })) })] })] })] })] })] }, index)) : null); - }) })] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "mb-16", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("div", { className: "text-center mb-12", children: (0, jsx_runtime_1.jsx)("h3", { className: "text-3xl font-bold text-gray-900 dark:text-white", children: "Preparation Strategy" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white dark:bg-gray-800 rounded-xl shadow-lg p-8", children: [(0, jsx_runtime_1.jsxs)("div", { className: "grid md:grid-cols-3 gap-8", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-center", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-20 h-20 bg-gradient-to-br from-blue-500 to-blue-600 text-white rounded-full flex items-center justify-center text-3xl mx-auto mb-4 shadow-lg", children: "\uD83E\uDDE0" }), (0, jsx_runtime_1.jsx)("h4", { className: "text-xl font-bold text-gray-900 dark:text-white mb-3", children: "Problem-Solving Mastery" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 text-sm", children: "Build strong algorithmic thinking through consistent practice. Focus on understanding patterns rather than memorizing solutions." })] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-center", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-20 h-20 bg-gradient-to-br from-green-500 to-green-600 text-white rounded-full flex items-center justify-center text-3xl mx-auto mb-4 shadow-lg", children: "\uD83D\uDCAC" }), (0, jsx_runtime_1.jsx)("h4", { className: "text-xl font-bold text-gray-900 dark:text-white mb-3", children: "Communication Excellence" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 text-sm", children: "Practice explaining complex concepts clearly. Develop your ability to think out loud and collaborate effectively." })] }), (0, jsx_runtime_1.jsxs)("div", { className: "text-center", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-20 h-20 bg-gradient-to-br from-purple-500 to-purple-600 text-white rounded-full flex items-center justify-center text-3xl mx-auto mb-4 shadow-lg", children: "\uD83C\uDFAD" }), (0, jsx_runtime_1.jsx)("h4", { className: "text-xl font-bold text-gray-900 dark:text-white mb-3", children: "Behavioral Readiness" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 text-sm", children: "Prepare compelling stories using the STAR method. Showcase leadership, growth mindset, and cultural alignment." })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-8 p-6 bg-gradient-to-r from-yellow-50 to-orange-50 dark:from-yellow-900/20 dark:to-orange-900/20 rounded-lg border-l-4 border-yellow-400 overview-sidebar-yellow", children: [(0, jsx_runtime_1.jsxs)("h5", { className: "font-bold text-gray-900 dark:text-white mb-2 flex items-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-xl mr-2", children: "\uD83D\uDCA1" }), "Pro Tip: Balance Your Preparation"] }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-700 dark:text-gray-300 text-sm", children: "Allocate 60% of your time to technical skills, 30% to behavioral preparation, and 10% to company research. This balance ensures you're well-rounded and confident in all interview stages." })] })] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "mb-16", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-3xl font-bold text-center mb-12 text-gray-900 dark:text-white", children: "Quick Access to Resources" }), (0, jsx_runtime_1.jsx)("div", { className: "grid md:grid-cols-2 lg:grid-cols-4 gap-6", children: (_b = [ - { - id: "technical", - title: "Technical Prep", - icon: "💻", - description: "Coding challenges, algorithms, system design", - color: "from-blue-500 to-blue-600", - items: ["500+ Problems", "System Design", "Code Review"], - }, - { - id: "behavioral", - title: "Behavioral Prep", - icon: "🤝", - description: "STAR method, leadership stories, soft skills", - color: "from-green-500 to-green-600", - items: ["STAR Framework", "Leadership", "Communication"], - }, - { - id: "companies", - title: "Company Guides", - icon: "🏢", - description: "Company-specific tips and strategies", - color: "from-purple-500 to-purple-600", - items: ["FAANG Tips", "Culture Fit", "Specific Questions"], - }, - { - id: "practice", - title: "Mock Practice", - icon: "🎯", - description: "Simulate real interview conditions", - color: "from-orange-500 to-orange-600", - items: ["Live Practice", "Feedback", "Time Management"], - }, - ]) === null || _b === void 0 ? void 0 : _b.map(function (section) { - var _a; - return (section ? ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-white dark:bg-gray-800 rounded-xl shadow-lg overflow-hidden hover:shadow-xl transition-all duration-300 transform hover:scale-105 cursor-pointer flex flex-col", variants: fadeIn, onClick: function () { return setActiveTab(section.id); }, whileHover: { y: -5 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-gradient-to-r ".concat(section.color, " p-6 text-white text-center"), children: [(0, jsx_runtime_1.jsx)("div", { className: "text-4xl mb-2", children: section.icon }), (0, jsx_runtime_1.jsx)("h4", { className: "text-xl font-bold", children: section.title })] }), (0, jsx_runtime_1.jsxs)("div", { className: "p-6 flex flex-col flex-grow", children: [(0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 text-sm mb-4", children: section.description }), (0, jsx_runtime_1.jsx)("div", { className: "space-y-2 mb-4", children: (_a = section.items) === null || _a === void 0 ? void 0 : _a.map(function (item, i) { return (item ? ((0, jsx_runtime_1.jsxs)("div", { className: "flex items-center text-xs text-gray-500 dark:text-gray-400", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-1.5 h-1.5 bg-blue-400 rounded-full mr-2" }), item] }, i)) : null); }) }), (0, jsx_runtime_1.jsx)("div", { className: "mt-auto pt-4 border-t border-gray-200 dark:border-gray-700", children: (0, jsx_runtime_1.jsx)("span", { className: "text-blue-600 dark:text-blue-400 text-sm font-medium hover:underline", children: "Explore Section \u2192" }) })] })] }, section.id)) : null); - }) })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "bg-gradient-to-r from-blue-600 to-purple-600 rounded-xl p-8 text-white", variants: fadeIn, children: (0, jsx_runtime_1.jsxs)("div", { className: "grid md:grid-cols-4 gap-8 text-center", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-3xl font-bold mb-2", children: "500+" }), (0, jsx_runtime_1.jsx)("div", { className: "text-blue-100", children: "Practice Questions" })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-3xl font-bold mb-2", children: "50+" }), (0, jsx_runtime_1.jsx)("div", { className: "text-blue-100", children: "System Design Topics" })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-3xl font-bold mb-2", children: "20+" }), (0, jsx_runtime_1.jsx)("div", { className: "text-blue-100", children: "Company Guides" })] }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "text-3xl font-bold mb-2", children: "95%" }), (0, jsx_runtime_1.jsx)("div", { className: "text-blue-100", children: "Success Rate" })] })] }) })] })); -}; -exports.default = OverviewTab; diff --git a/src/pages/interview-prep/PracticeTab.js b/src/pages/interview-prep/PracticeTab.js deleted file mode 100644 index 3aa431b8..00000000 --- a/src/pages/interview-prep/PracticeTab.js +++ /dev/null @@ -1,239 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importDefault(require("react")); -var react_2 = require("react"); -var framer_motion_1 = require("framer-motion"); -var fadeIn = { hidden: { opacity: 0, y: 20 }, visible: { opacity: 1, y: 0, transition: { duration: 0.6 } } }; -var staggerContainer = { hidden: {}, visible: { transition: { staggerChildren: 0.1 } } }; -var scaleIn = { hidden: { scale: 0.8, opacity: 0 }, visible: { scale: 1, opacity: 1, transition: { duration: 0.5 } } }; -var PracticeTab = function (_a) { - var _b = _a.mockInterviewQuestions, mockInterviewQuestions = _b === void 0 ? [] : _b, onTabChange = _a.onTabChange; - var _c = (0, react_2.useState)(null), selectedQuestion = _c[0], setSelectedQuestion = _c[1]; - var _d = (0, react_2.useState)(null), activeSession = _d[0], setActiveSession = _d[1]; - var _e = (0, react_2.useState)(0), timer = _e[0], setTimer = _e[1]; - var _f = (0, react_2.useState)(false), isTimerRunning = _f[0], setIsTimerRunning = _f[1]; - var _g = (0, react_2.useState)(new Set()), completedQuestions = _g[0], setCompletedQuestions = _g[1]; - var _h = (0, react_2.useState)({ - totalCompleted: 0, - averageTime: 0, - easyCompleted: 0, - mediumCompleted: 0, - hardCompleted: 0, - technicalCompleted: 0, - behavioralCompleted: 0, - systemDesignCompleted: 0, - }), practiceStats = _h[0], setPracticeStats = _h[1]; - var _j = (0, react_2.useState)("all"), filterType = _j[0], setFilterType = _j[1]; - var _k = (0, react_2.useState)("all"), filterDifficulty = _k[0], setFilterDifficulty = _k[1]; - var _l = (0, react_2.useState)(new Set()), showHints = _l[0], setShowHints = _l[1]; - var _m = (0, react_2.useState)(new Set()), showResources = _m[0], setShowResources = _m[1]; - var _o = (0, react_2.useState)(false), showConfetti = _o[0], setShowConfetti = _o[1]; - var _p = (0, react_2.useState)(null), recentlyCompleted = _p[0], setRecentlyCompleted = _p[1]; - var allQuestions = __spreadArray([], mockInterviewQuestions, true); - (0, react_2.useEffect)(function () { - var interval; - if (isTimerRunning && activeSession) { - interval = setInterval(function () { - setTimer(function (prev) { return prev + 1; }); - }, 1000); - } - return function () { - if (interval) - clearInterval(interval); - }; - }, [isTimerRunning, activeSession]); - (0, react_2.useEffect)(function () { - if (showConfetti) { - var timeout_1 = setTimeout(function () { return setShowConfetti(false); }, 3000); - return function () { return clearTimeout(timeout_1); }; - } - }, [showConfetti]); - var filteredQuestions = allQuestions.filter(function (q) { - var typeMatch = filterType === "all" || q.type === filterType; - var difficultyMatch = filterDifficulty === "all" || q.difficulty === filterDifficulty; - return typeMatch && difficultyMatch; - }); - var startPractice = function (question) { - var session = { - questionId: question.id, - timeSpent: 0, - completed: false, - startTime: Date.now(), - }; - setActiveSession(session); - setTimer(0); - setIsTimerRunning(true); - setSelectedQuestion(question.id); - }; - var completePractice = function () { - if (activeSession) { - var timeSpent_1 = Math.floor(timer / 60); - setCompletedQuestions(function (prev) { return new Set(__spreadArray(__spreadArray([], prev, true), [activeSession.questionId], false)); }); - setRecentlyCompleted(activeSession.questionId); - setShowConfetti(true); - var question = allQuestions.find(function (q) { return q.id === activeSession.questionId; }); - if (question) { - setPracticeStats(function (prev) { return (__assign(__assign({}, prev), { totalCompleted: prev.totalCompleted + 1, averageTime: Math.round((prev.averageTime * prev.totalCompleted + timeSpent_1) / (prev.totalCompleted + 1)) })); }); - } - } - setIsTimerRunning(false); - setActiveSession(null); - setSelectedQuestion(null); - setTimer(0); - setTimeout(function () { return setRecentlyCompleted(null); }, 2000); - }; - var formatTime = function (seconds) { - var mins = Math.floor(seconds / 60); - var secs = seconds % 60; - return "".concat(mins.toString().padStart(2, "0"), ":").concat(secs.toString().padStart(2, "0")); - }; - var getDifficultyColor = function (difficulty) { - switch (difficulty) { - case "Easy": - return "bg-gradient-to-r from-emerald-100 to-green-100 text-emerald-800 dark:from-emerald-900/30 dark:to-green-900/30 dark:text-emerald-200 border border-emerald-200 dark:border-emerald-700"; - case "Medium": - return "bg-gradient-to-r from-amber-100 to-yellow-100 text-amber-800 dark:from-amber-900/30 dark:to-yellow-900/30 dark:text-amber-200 border border-amber-200 dark:border-amber-700"; - case "Hard": - return "bg-gradient-to-r from-rose-100 to-red-100 text-rose-800 dark:from-rose-900/30 dark:to-red-900/30 dark:text-rose-200 border border-rose-200 dark:border-rose-700"; - default: - return "bg-gradient-to-r from-gray-100 to-slate-100 text-gray-800 dark:from-gray-700 dark:to-slate-700 dark:text-gray-200 border border-gray-200 dark:border-gray-600"; - } - }; - var getTypeColor = function (type) { - switch (type) { - case "technical": - return "bg-gradient-to-r from-blue-100 to-cyan-100 text-blue-800 dark:from-blue-900/30 dark:to-cyan-900/30 dark:text-blue-200 border border-blue-200 dark:border-blue-700"; - case "behavioral": - return "bg-gradient-to-r from-green-100 to-emerald-100 text-green-800 dark:from-green-900/30 dark:to-emerald-900/30 dark:text-green-200 border border-green-200 dark:border-green-700"; - case "system-design": - return "bg-gradient-to-r from-purple-100 to-violet-100 text-purple-800 dark:from-purple-900/30 dark:to-violet-900/30 dark:text-purple-200 border border-purple-200 dark:border-purple-700"; - default: - return "bg-gradient-to-r from-gray-100 to-slate-100 text-gray-800 dark:from-gray-700 dark:to-slate-700 dark:text-gray-200 border border-gray-200 dark:border-gray-600"; - } - }; - var toggleHints = function (questionId) { - setShowHints(function (prev) { - var newSet = new Set(prev); - if (newSet.has(questionId)) { - newSet.delete(questionId); - } - else { - newSet.add(questionId); - } - return newSet; - }); - }; - var toggleResources = function (questionId) { - setShowResources(function (prev) { - var newSet = new Set(prev); - if (newSet.has(questionId)) { - newSet.delete(questionId); - } - else { - newSet.add(questionId); - } - return newSet; - }); - }; - var handleTabNavigation = function (tab) { - if (onTabChange) { - onTabChange(tab); - } - }; - var progressPercentage = allQuestions.length > 0 ? (practiceStats.totalCompleted / allQuestions.length) * 100 : 0; - return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { initial: "hidden", animate: "visible", variants: staggerContainer, className: "relative", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { children: showConfetti && ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, className: "fixed inset-0 pointer-events-none z-50 flex items-center justify-center", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-6xl animate-bounce", children: "\uD83C\uDF89" }), (0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 bg-gradient-to-r from-yellow-400/20 via-pink-400/20 to-purple-400/20 animate-pulse" })] })) }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "mb-12", variants: fadeIn, children: (0, jsx_runtime_1.jsxs)("div", { className: "bg-gradient-to-br from-indigo-50 via-purple-50 to-pink-50 dark:from-indigo-900/20 dark:via-purple-900/20 dark:to-pink-900/20 rounded-3xl p-8 border-2 border-gradient-to-r from-indigo-200 to-purple-200 dark:from-indigo-800 dark:to-purple-800 shadow-2xl backdrop-blur-sm", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-center mb-8", children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "inline-flex items-center px-6 py-3 bg-gradient-to-r from-indigo-100 to-purple-100 dark:from-indigo-900/40 dark:to-purple-900/40 rounded-full text-indigo-700 dark:text-indigo-300 text-sm font-bold mb-6 shadow-lg border border-indigo-200 dark:border-indigo-700", whileHover: { scale: 1.05 }, whileTap: { scale: 0.95 }, children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "w-3 h-3 bg-gradient-to-r from-indigo-500 to-purple-500 rounded-full mr-3", animate: { scale: [1, 1.2, 1] }, transition: { duration: 2, repeat: Number.POSITIVE_INFINITY } }), "Interactive Practice Sessions"] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.h2, { className: "text-5xl font-black mb-6 bg-gradient-to-r from-indigo-600 via-purple-600 to-pink-600 bg-clip-text text-transparent", initial: { scale: 0.9 }, animate: { scale: 1 }, transition: { duration: 0.5 }, children: "Mock Interview Practice" }), (0, jsx_runtime_1.jsx)("p", { className: "text-xl text-gray-700 dark:text-gray-300 leading-relaxed", children: "Simulate real interview scenarios with our interactive practice sessions. Track your progress, time your responses, and get instant feedback to improve your interview performance." })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid md:grid-cols-3 gap-8 mb-8", children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-white/80 dark:bg-gray-800/80 backdrop-blur-sm rounded-2xl p-8 border-2 border-gray-200/50 dark:border-gray-700/50 hover:shadow-2xl transition-all duration-500 cursor-pointer group relative overflow-hidden", onClick: function () { return handleTabNavigation("technical"); }, whileHover: { scale: 1.03, y: -5 }, whileTap: { scale: 0.98 }, children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 bg-gradient-to-br from-blue-500/10 to-cyan-500/10 opacity-0 group-hover:opacity-100 transition-opacity duration-500" }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "w-16 h-16 bg-gradient-to-br from-blue-100 to-cyan-100 dark:from-blue-900/40 dark:to-cyan-900/40 rounded-2xl flex items-center justify-center mb-6 group-hover:scale-110 transition-transform duration-300 shadow-lg", whileHover: { rotate: 5 }, children: (0, jsx_runtime_1.jsx)("span", { className: "text-3xl", children: "\uD83D\uDCBB" }) }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-bold text-gray-900 dark:text-white mb-3", children: "Technical Deep Dive" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 mb-4 leading-relaxed", children: "Explore comprehensive technical resources, coding patterns, and algorithm practice." }), (0, jsx_runtime_1.jsxs)("div", { className: "text-blue-600 dark:text-blue-400 font-bold group-hover:text-blue-700 dark:group-hover:text-blue-300 flex items-center", children: ["Go to Technical Tab", (0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "ml-2", animate: { x: [0, 5, 0] }, transition: { duration: 1.5, repeat: Number.POSITIVE_INFINITY }, children: "\u2192" })] })] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-white/80 dark:bg-gray-800/80 backdrop-blur-sm rounded-2xl p-8 border-2 border-gray-200/50 dark:border-gray-700/50 hover:shadow-2xl transition-all duration-500 cursor-pointer group relative overflow-hidden", onClick: function () { return handleTabNavigation("behavioral"); }, whileHover: { scale: 1.03, y: -5 }, whileTap: { scale: 0.98 }, children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 bg-gradient-to-br from-green-500/10 to-emerald-500/10 opacity-0 group-hover:opacity-100 transition-opacity duration-500" }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "w-16 h-16 bg-gradient-to-br from-green-100 to-emerald-100 dark:from-green-900/40 dark:to-emerald-900/40 rounded-2xl flex items-center justify-center mb-6 group-hover:scale-110 transition-transform duration-300 shadow-lg", whileHover: { rotate: -5 }, children: (0, jsx_runtime_1.jsx)("span", { className: "text-3xl", children: "\uD83D\uDDE3\uFE0F" }) }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-bold text-gray-900 dark:text-white mb-3", children: "Behavioral Mastery" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 mb-4 leading-relaxed", children: "Master the STAR method and practice storytelling for behavioral interviews." }), (0, jsx_runtime_1.jsxs)("div", { className: "text-green-600 dark:text-green-400 font-bold group-hover:text-green-700 dark:group-hover:text-green-300 flex items-center", children: ["Go to Behavioral Tab", (0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "ml-2", animate: { x: [0, 5, 0] }, transition: { duration: 1.5, repeat: Number.POSITIVE_INFINITY, delay: 0.5 }, children: "\u2192" })] })] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-white/80 dark:bg-gray-800/80 backdrop-blur-sm rounded-2xl p-8 border-2 border-gray-200/50 dark:border-gray-700/50 hover:shadow-2xl transition-all duration-500 cursor-pointer group relative overflow-hidden", onClick: function () { return handleTabNavigation("companies"); }, whileHover: { scale: 1.03, y: -5 }, whileTap: { scale: 0.98 }, children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 bg-gradient-to-br from-purple-500/10 to-pink-500/10 opacity-0 group-hover:opacity-100 transition-opacity duration-500" }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "w-16 h-16 bg-gradient-to-br from-purple-100 to-pink-100 dark:from-purple-900/40 dark:to-pink-900/40 rounded-2xl flex items-center justify-center mb-6 group-hover:scale-110 transition-transform duration-300 shadow-lg", whileHover: { rotate: 5 }, children: (0, jsx_runtime_1.jsx)("span", { className: "text-3xl", children: "\uD83C\uDFE2" }) }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-bold text-gray-900 dark:text-white mb-3", children: "Company Research" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 mb-4 leading-relaxed", children: "Research specific companies, their interview processes, and preparation strategies." }), (0, jsx_runtime_1.jsxs)("div", { className: "text-purple-600 dark:text-purple-400 font-bold group-hover:text-purple-700 dark:group-hover:text-purple-300 flex items-center", children: ["Go to Companies Tab", (0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "ml-2", animate: { x: [0, 5, 0] }, transition: { duration: 1.5, repeat: Number.POSITIVE_INFINITY, delay: 1 }, children: "\u2192" })] })] })] })] })] }) }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "grid grid-cols-2 md:grid-cols-4 gap-6 mb-8", variants: fadeIn, children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-gradient-to-br from-blue-50 via-blue-100 to-indigo-100 dark:from-blue-900/30 dark:via-blue-800/40 dark:to-indigo-800/50 rounded-2xl shadow-lg p-8 text-center border-2 border-blue-200/50 dark:border-blue-700/50 relative overflow-hidden", whileHover: { scale: 1.05 }, variants: scaleIn, children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 bg-gradient-to-br from-blue-400/20 to-indigo-400/20 opacity-0 hover:opacity-100 transition-opacity duration-300" }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "text-4xl font-black text-blue-600 dark:text-blue-400 mb-2", animate: { scale: [1, 1.1, 1] }, transition: { duration: 2, repeat: Number.POSITIVE_INFINITY }, children: practiceStats.totalCompleted }), (0, jsx_runtime_1.jsx)("div", { className: "text-sm text-blue-700 dark:text-blue-300 font-bold", children: "Completed" })] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-gradient-to-br from-green-50 via-green-100 to-emerald-100 dark:from-green-900/30 dark:via-green-800/40 dark:to-emerald-800/50 rounded-2xl shadow-lg p-8 text-center border-2 border-green-200/50 dark:border-green-700/50 relative overflow-hidden", whileHover: { scale: 1.05 }, variants: scaleIn, children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 bg-gradient-to-br from-green-400/20 to-emerald-400/20 opacity-0 hover:opacity-100 transition-opacity duration-300" }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-4xl font-black text-green-600 dark:text-green-400 mb-2", children: [practiceStats.averageTime, "m"] }), (0, jsx_runtime_1.jsx)("div", { className: "text-sm text-green-700 dark:text-green-300 font-bold", children: "Avg Time" })] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-gradient-to-br from-purple-50 via-purple-100 to-violet-100 dark:from-purple-900/30 dark:via-purple-800/40 dark:to-violet-800/50 rounded-2xl shadow-lg p-8 text-center border-2 border-purple-200/50 dark:border-purple-700/50 relative overflow-hidden", whileHover: { scale: 1.05 }, variants: scaleIn, children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 bg-gradient-to-br from-purple-400/20 to-violet-400/20 opacity-0 hover:opacity-100 transition-opacity duration-300" }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-4xl font-black text-purple-600 dark:text-purple-400 mb-2", children: [Math.round(progressPercentage), "%"] }), (0, jsx_runtime_1.jsx)("div", { className: "text-sm text-purple-700 dark:text-purple-300 font-bold", children: "Progress" }), (0, jsx_runtime_1.jsx)("div", { className: "mt-3 w-full bg-purple-200 dark:bg-purple-800 rounded-full h-2", children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "bg-gradient-to-r from-purple-500 to-violet-500 h-2 rounded-full", initial: { width: 0 }, animate: { width: "".concat(progressPercentage, "%") }, transition: { duration: 1, ease: "easeOut" } }) })] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-gradient-to-br from-orange-50 via-orange-100 to-amber-100 dark:from-orange-900/30 dark:via-orange-800/40 dark:to-amber-800/50 rounded-2xl shadow-lg p-8 text-center border-2 border-orange-200/50 dark:border-orange-700/50 relative overflow-hidden", whileHover: { scale: 1.05 }, variants: scaleIn, children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 bg-gradient-to-br from-orange-400/20 to-amber-400/20 opacity-0 hover:opacity-100 transition-opacity duration-300" }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "text-4xl font-black text-orange-600 dark:text-orange-400 mb-2", animate: isTimerRunning ? { scale: [1, 1.1, 1] } : {}, transition: { duration: 1, repeat: Number.POSITIVE_INFINITY }, children: isTimerRunning ? formatTime(timer) : "00:00" }), (0, jsx_runtime_1.jsx)("div", { className: "text-sm text-orange-700 dark:text-orange-300 font-bold", children: "Current" }), isTimerRunning && ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "mt-2 w-2 h-2 bg-red-500 rounded-full mx-auto", animate: { opacity: [1, 0, 1] }, transition: { duration: 1, repeat: Number.POSITIVE_INFINITY } }))] })] })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "bg-white/90 dark:bg-gray-800/90 backdrop-blur-sm rounded-2xl shadow-xl p-8 mb-8 border-2 border-gray-200/50 dark:border-gray-700/50", variants: fadeIn, children: (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-wrap gap-8 items-center", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center space-x-4", children: [(0, jsx_runtime_1.jsx)("label", { className: "text-sm font-bold text-gray-700 dark:text-gray-300", children: "Filter by Type:" }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.select, { value: filterType, onChange: function (e) { return setFilterType(e.target.value); }, className: "px-6 py-3 border-2 border-gray-300 dark:border-gray-600 rounded-xl bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:ring-4 focus:ring-blue-500/50 focus:border-blue-500 transition-all shadow-lg font-medium", whileFocus: { scale: 1.02 }, children: [(0, jsx_runtime_1.jsx)("option", { value: "all", children: "All Types" }), (0, jsx_runtime_1.jsx)("option", { value: "technical", children: "Technical" }), (0, jsx_runtime_1.jsx)("option", { value: "behavioral", children: "Behavioral" }), (0, jsx_runtime_1.jsx)("option", { value: "system-design", children: "System Design" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center space-x-4", children: [(0, jsx_runtime_1.jsx)("label", { className: "text-sm font-bold text-gray-700 dark:text-gray-300", children: "Filter by Difficulty:" }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.select, { value: filterDifficulty, onChange: function (e) { return setFilterDifficulty(e.target.value); }, className: "px-6 py-3 border-2 border-gray-300 dark:border-gray-600 rounded-xl bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:ring-4 focus:ring-blue-500/50 focus:border-blue-500 transition-all shadow-lg font-medium", whileFocus: { scale: 1.02 }, children: [(0, jsx_runtime_1.jsx)("option", { value: "all", children: "All Levels" }), (0, jsx_runtime_1.jsx)("option", { value: "Easy", children: "Easy" }), (0, jsx_runtime_1.jsx)("option", { value: "Medium", children: "Medium" }), (0, jsx_runtime_1.jsx)("option", { value: "Hard", children: "Hard" })] })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "text-sm text-gray-600 dark:text-gray-400 bg-gradient-to-r from-gray-100 to-slate-100 dark:from-gray-700 dark:to-slate-700 px-6 py-3 rounded-xl font-bold shadow-lg border border-gray-200 dark:border-gray-600", whileHover: { scale: 1.05 }, children: [(0, jsx_runtime_1.jsx)("span", { className: "font-black text-blue-600 dark:text-blue-400", children: filteredQuestions.length }), " of", " ", (0, jsx_runtime_1.jsx)("span", { className: "font-black text-purple-600 dark:text-purple-400", children: allQuestions.length }), " questions"] })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "grid lg:grid-cols-2 gap-8 mb-12", children: (0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { children: filteredQuestions.map(function (question, index) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-white/95 dark:bg-gray-800/95 backdrop-blur-sm rounded-2xl shadow-xl hover:shadow-2xl transition-all duration-500 border-2 overflow-hidden flex flex-col h-full relative ".concat((activeSession === null || activeSession === void 0 ? void 0 : activeSession.questionId) === question.id - ? "border-blue-500 ring-4 ring-blue-200/50 dark:ring-blue-800/50 shadow-blue-200/50 dark:shadow-blue-800/50" - : recentlyCompleted === question.id - ? "border-green-500 ring-4 ring-green-200/50 dark:ring-green-800/50 shadow-green-200/50 dark:shadow-green-800/50" - : "border-gray-200/50 dark:border-gray-700/50 hover:border-gray-300/70 dark:hover:border-gray-600/70"), variants: fadeIn, initial: "hidden", animate: "visible", exit: "hidden", transition: { delay: index * 0.1 }, whileHover: { y: -8, scale: 1.02 }, layout: true, children: [(0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { children: recentlyCompleted === question.id && ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: { opacity: 0, scale: 0 }, animate: { opacity: 1, scale: 1 }, exit: { opacity: 0, scale: 0 }, className: "absolute inset-0 bg-gradient-to-br from-green-400/20 to-emerald-400/20 z-10 flex items-center justify-center rounded-2xl", children: (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { animate: { rotate: 360, scale: [1, 1.2, 1] }, transition: { duration: 1 }, className: "text-6xl", children: "\u2728" }) })) }), (0, jsx_runtime_1.jsxs)("div", { className: "p-8 pb-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-start mb-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center space-x-4", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "px-4 py-2 rounded-full text-sm font-bold shadow-lg ".concat(getTypeColor(question.type)), whileHover: { scale: 1.05 }, children: question.type === "system-design" - ? "System Design" - : question.type.charAt(0).toUpperCase() + question.type.slice(1) }), (0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { children: completedQuestions.has(question.id) && ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "flex items-center space-x-2 bg-gradient-to-r from-green-100 to-emerald-100 dark:from-green-900/40 dark:to-emerald-900/40 px-3 py-2 rounded-full border border-green-200 dark:border-green-700 shadow-lg", initial: { scale: 0, opacity: 0 }, animate: { scale: 1, opacity: 1 }, exit: { scale: 0, opacity: 0 }, whileHover: { scale: 1.1 }, children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "text-green-600 dark:text-green-400 text-lg", animate: { rotate: [0, 360] }, transition: { duration: 0.5 }, children: "\u2713" }), (0, jsx_runtime_1.jsx)("span", { className: "text-green-700 dark:text-green-300 text-xs font-bold", children: "Completed" })] })) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center space-x-3", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "px-4 py-2 rounded-full text-xs font-black shadow-lg ".concat(getDifficultyColor(question.difficulty)), whileHover: { scale: 1.05 }, children: question.difficulty }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "text-xs text-gray-500 dark:text-gray-400 bg-gradient-to-r from-gray-100 to-slate-100 dark:from-gray-700 dark:to-slate-700 px-3 py-2 rounded-full font-bold shadow-lg border border-gray-200 dark:border-gray-600", whileHover: { scale: 1.05 }, children: ["~", question.estimatedTime, "min"] })] })] }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-black mb-6 text-gray-900 dark:text-white leading-tight", children: question.question }), question.framework && ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "mb-6 p-4 bg-gradient-to-r from-blue-50 via-indigo-50 to-purple-50 dark:from-blue-900/30 dark:via-indigo-900/30 dark:to-purple-900/30 rounded-xl border-2 border-blue-200/50 dark:border-blue-700/50 shadow-lg", whileHover: { scale: 1.02 }, children: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center space-x-3 -mb-3", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "text-blue-600 dark:text-blue-400 text-xl -mt-5", animate: { rotate: [0, 10, -10, 0] }, transition: { duration: 2, repeat: Number.POSITIVE_INFINITY }, children: "\uD83D\uDCA1" }), (0, jsx_runtime_1.jsxs)("p", { className: "text-sm text-blue-700 dark:text-blue-300 font-bold", children: ["Framework: ", question.framework] })] }) })), question.category && ((0, jsx_runtime_1.jsxs)("div", { className: "mb-6 flex items-center space-x-3", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-gray-400 text-lg", children: "\uD83D\uDCC2" }), (0, jsx_runtime_1.jsx)("span", { className: "text-sm text-gray-600 dark:text-gray-400 font-bold bg-gray-100 dark:bg-gray-700 px-3 py-1 rounded-full", children: question.category })] }))] }), (0, jsx_runtime_1.jsxs)("div", { className: "px-8 pb-4 flex-1", children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.button, { onClick: function () { return toggleHints(question.id); }, className: "flex items-center space-x-3 text-sm text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200 transition-colors group bg-gray-50 dark:bg-gray-700/50 px-4 py-3 rounded-xl hover:bg-gray-100 dark:hover:bg-gray-600/50 w-full justify-between shadow-lg border border-gray-200 dark:border-gray-600", whileHover: { scale: 1.02 }, whileTap: { scale: 0.98 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center space-x-3", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "text-lg", animate: { rotate: showHints.has(question.id) ? 90 : 0 }, transition: { duration: 0.3 }, children: showHints.has(question.id) ? "🔽" : "▶️" }), (0, jsx_runtime_1.jsx)("span", { className: "font-bold", children: showHints.has(question.id) ? "Hide Hints" : "Show Hints" })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "text-xs bg-gradient-to-r from-blue-100 to-purple-100 dark:from-blue-900/40 dark:to-purple-900/40 text-blue-700 dark:text-blue-300 px-3 py-1 rounded-full font-bold border border-blue-200 dark:border-blue-700", whileHover: { scale: 1.1 }, children: question.hints.length })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { children: showHints.has(question.id) && ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "mt-6 bg-gradient-to-br from-gray-50 to-slate-50 dark:from-gray-700/50 dark:to-slate-700/50 rounded-xl p-6 border-2 border-gray-200/50 dark:border-gray-600/50 shadow-lg backdrop-blur-sm", initial: { opacity: 0, height: 0, y: -20 }, animate: { opacity: 1, height: "auto", y: 0 }, exit: { opacity: 0, height: 0, y: -20 }, transition: { duration: 0.3 }, children: [(0, jsx_runtime_1.jsxs)("h4", { className: "font-black text-gray-900 dark:text-white mb-4 flex items-center space-x-3", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { animate: { rotate: [0, 10, -10, 0] }, transition: { duration: 2, repeat: Number.POSITIVE_INFINITY }, children: "\uD83D\uDCA1" }), (0, jsx_runtime_1.jsx)("span", { children: "Helpful Hints:" })] }), (0, jsx_runtime_1.jsx)("ul", { className: "space-y-4", children: question.hints.map(function (hint, i) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.li, { className: "text-sm text-gray-700 dark:text-gray-300 flex items-start space-x-4", initial: { opacity: 0, x: -20 }, animate: { opacity: 1, x: 0 }, transition: { delay: i * 0.1 }, children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "text-blue-500 font-black text-xs bg-gradient-to-r from-blue-100 to-cyan-100 dark:from-blue-900/40 dark:to-cyan-900/40 w-6 h-6 rounded-full flex items-center justify-center flex-shrink-0 border border-blue-200 dark:border-blue-700 shadow-lg", whileHover: { scale: 1.2, rotate: 360 }, transition: { duration: 0.3 }, children: i + 1 }), (0, jsx_runtime_1.jsx)("span", { className: "leading-relaxed font-medium", children: hint })] }, i)); }) })] })) }), question.links && question.links.length > 0 && ((0, jsx_runtime_1.jsxs)("div", { className: "mt-6", children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.button, { onClick: function () { return toggleResources(question.id); }, className: "flex items-center space-x-3 text-sm text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200 transition-colors group bg-gradient-to-r from-indigo-50 via-purple-50 to-pink-50 dark:from-indigo-900/30 dark:via-purple-900/30 dark:to-pink-900/30 px-4 py-3 rounded-xl hover:from-indigo-100 hover:via-purple-100 hover:to-pink-100 dark:hover:from-indigo-800/40 dark:hover:via-purple-800/40 dark:hover:to-pink-800/40 w-full justify-between shadow-lg border-2 border-indigo-200/50 dark:border-indigo-700/50", whileHover: { scale: 1.02 }, whileTap: { scale: 0.98 }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center space-x-3", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "text-lg", animate: { rotate: showResources.has(question.id) ? 90 : 0 }, transition: { duration: 0.3 }, children: showResources.has(question.id) ? "🔽" : "▶️" }), (0, jsx_runtime_1.jsx)("span", { className: "font-bold", children: showResources.has(question.id) ? "Hide Resources" : "Show Resources" })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "text-xs bg-gradient-to-r from-indigo-100 to-purple-100 dark:from-indigo-900/40 dark:to-purple-900/40 text-indigo-700 dark:text-indigo-300 px-3 py-1 rounded-full font-bold border border-indigo-200 dark:border-indigo-700", whileHover: { scale: 1.1 }, children: question.links.length })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { children: showResources.has(question.id) && ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "mt-4 bg-gradient-to-br from-indigo-50 via-purple-50 to-pink-50 dark:from-indigo-900/30 dark:via-purple-900/30 dark:to-pink-900/30 rounded-xl p-6 border-2 border-indigo-200/50 dark:border-indigo-700/50 shadow-lg backdrop-blur-sm", initial: { opacity: 0, height: 0, y: -20 }, animate: { opacity: 1, height: "auto", y: 0 }, exit: { opacity: 0, height: 0, y: -20 }, transition: { duration: 0.3 }, children: [(0, jsx_runtime_1.jsxs)("h4", { className: "font-black text-gray-900 dark:text-white mb-4 flex items-center space-x-3", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { animate: { scale: [1, 1.1, 1] }, transition: { duration: 2, repeat: Number.POSITIVE_INFINITY }, children: "\uD83D\uDD17" }), (0, jsx_runtime_1.jsx)("span", { children: "Helpful Resources:" })] }), (0, jsx_runtime_1.jsx)("div", { className: "grid gap-3", children: question.links.map(function (link, i) { - var getLinkTypeIcon = function (type) { - switch (type) { - case "documentation": - return "📚"; - case "tutorial": - return "🎓"; - case "example": - return "💡"; - case "reference": - return "📖"; - case "tool": - return "🛠️"; - default: - return "🔗"; - } - }; - var getLinkTypeColor = function (type) { - switch (type) { - case "documentation": - return "from-blue-100 to-cyan-100 dark:from-blue-900/40 dark:to-cyan-900/40 text-blue-700 dark:text-blue-300 border-blue-200 dark:border-blue-700"; - case "tutorial": - return "from-green-100 to-emerald-100 dark:from-green-900/40 dark:to-emerald-900/40 text-green-700 dark:text-green-300 border-green-200 dark:border-green-700"; - case "example": - return "from-yellow-100 to-amber-100 dark:from-yellow-900/40 dark:to-amber-900/40 text-yellow-700 dark:text-yellow-300 border-yellow-200 dark:border-yellow-700"; - case "reference": - return "from-purple-100 to-violet-100 dark:from-purple-900/40 dark:to-violet-900/40 text-purple-700 dark:text-purple-300 border-purple-200 dark:border-purple-700"; - case "tool": - return "from-orange-100 to-red-100 dark:from-orange-900/40 dark:to-red-900/40 text-orange-700 dark:text-orange-300 border-orange-200 dark:border-orange-700"; - default: - return "from-gray-100 to-slate-100 dark:from-gray-700 dark:to-slate-700 text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-600"; - } - }; - return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.a, { href: link.url, target: "_blank", rel: "noopener noreferrer", className: "flex items-center space-x-4 p-4 bg-gradient-to-r ".concat(getLinkTypeColor(link.type), " rounded-xl border shadow-lg hover:shadow-xl transition-all duration-300 group practice-tab-link"), initial: { opacity: 0, x: -20 }, animate: { opacity: 1, x: 0 }, transition: { delay: i * 0.1 }, whileHover: { scale: 1.02, x: 5 }, whileTap: { scale: 0.98 }, children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "text-2xl flex-shrink-0", whileHover: { scale: 1.2, rotate: 5 }, transition: { duration: 0.2 }, children: getLinkTypeIcon(link.type) }), (0, jsx_runtime_1.jsxs)("div", { className: "flex-1 min-w-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "font-bold text-sm leading-tight group-hover:underline", children: link.title }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs opacity-75 mt-1 capitalize font-medium", children: link.type.replace("-", " ") })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "text-lg opacity-60 group-hover:opacity-100 flex-shrink-0", animate: { x: [0, 3, 0] }, transition: { duration: 1.5, repeat: Number.POSITIVE_INFINITY }, children: "\u2192" })] }, i)); - }) })] })) })] }))] }), (0, jsx_runtime_1.jsx)("div", { className: "px-8 pb-8 mt-auto", children: (0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { mode: "wait", children: (activeSession === null || activeSession === void 0 ? void 0 : activeSession.questionId) === question.id ? ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "space-y-4", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -20 }, children: [(0, jsx_runtime_1.jsx)("div", { className: "bg-gradient-to-r from-blue-50 to-indigo-50 dark:from-blue-900/30 dark:to-indigo-900/30 rounded-xl p-4 border-2 border-blue-200/50 dark:border-blue-700/50 shadow-lg", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center justify-between", children: [(0, jsx_runtime_1.jsxs)("span", { className: "text-sm font-bold text-blue-700 dark:text-blue-300 flex items-center space-x-2", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { animate: { scale: [1, 1.2, 1] }, transition: { duration: 1, repeat: Number.POSITIVE_INFINITY }, children: "\uD83C\uDFAF" }), (0, jsx_runtime_1.jsx)("span", { children: "Session Active" })] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { className: "text-2xl font-black text-blue-600 dark:text-blue-400", animate: { scale: [1, 1.1, 1] }, transition: { duration: 1, repeat: Number.POSITIVE_INFINITY }, children: formatTime(timer) })] }) }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.button, { onClick: completePractice, className: "w-full bg-gradient-to-r from-green-600 via-emerald-600 to-green-700 text-white py-4 rounded-xl hover:from-green-700 hover:via-emerald-700 hover:to-green-800 transition-all font-black flex items-center justify-center space-x-3 shadow-2xl hover:shadow-green-500/25 border-2 border-green-500/20", whileHover: { scale: 1.02, y: -2 }, whileTap: { scale: 0.98 }, children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { animate: { rotate: [0, 360] }, transition: { duration: 2, repeat: Number.POSITIVE_INFINITY }, children: "\u2713" }), (0, jsx_runtime_1.jsx)("span", { children: "Complete Practice" })] })] })) : ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.button, { onClick: function () { return startPractice(question); }, disabled: !!activeSession, className: "w-full py-4 rounded-xl transition-all font-black flex items-center justify-center space-x-3 shadow-2xl border-2 ".concat(completedQuestions.has(question.id) - ? "bg-gradient-to-r from-gray-200 to-slate-200 dark:from-gray-600 dark:to-slate-600 text-gray-600 dark:text-gray-300 cursor-default border-gray-300 dark:border-gray-500" - : activeSession - ? "bg-gradient-to-r from-gray-300 to-slate-300 dark:from-gray-700 dark:to-slate-700 text-gray-500 dark:text-gray-400 cursor-not-allowed border-gray-400 dark:border-gray-600" - : "bg-gradient-to-r from-blue-600 via-indigo-600 to-purple-600 text-white hover:from-blue-700 hover:via-indigo-700 hover:to-purple-700 hover:shadow-blue-500/25 border-blue-500/20"), whileHover: !completedQuestions.has(question.id) && !activeSession ? { scale: 1.02, y: -2 } : {}, whileTap: !completedQuestions.has(question.id) && !activeSession ? { scale: 0.98 } : {}, initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -20 }, children: completedQuestions.has(question.id) ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { animate: { rotate: [0, 360] }, transition: { duration: 2, repeat: Number.POSITIVE_INFINITY }, children: "\u2713" }), (0, jsx_runtime_1.jsx)("span", { children: "Completed" })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.span, { animate: !activeSession ? { scale: [1, 1.2, 1] } : {}, transition: { duration: 2, repeat: Number.POSITIVE_INFINITY }, children: "\uD83D\uDE80" }), (0, jsx_runtime_1.jsx)("span", { children: "Start Practice" })] })) })) }) })] }, question.id)); }) }) }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-gradient-to-br from-gray-50 via-slate-50 to-gray-100 dark:from-gray-800 dark:via-slate-800 dark:to-gray-700 rounded-3xl p-10 border-2 border-gray-200/50 dark:border-gray-600/50 shadow-2xl backdrop-blur-sm", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.h3, { className: "text-3xl font-black mb-10 text-gray-900 dark:text-white text-center", initial: { scale: 0.9 }, animate: { scale: 1 }, transition: { duration: 0.5 }, children: "\uD83C\uDFAF Practice Features & Tools" }), (0, jsx_runtime_1.jsx)("div", { className: "grid md:grid-cols-2 lg:grid-cols-4 gap-8", children: [ - { - icon: "⏱️", - title: "Live Timer", - desc: "Real-time countdown with session tracking to simulate interview pressure", - color: "blue", - }, - { - icon: "📊", - title: "Progress Analytics", - desc: "Track completion rates and performance trends over time", - color: "green", - }, - { - icon: "🎯", - title: "Smart Filtering", - desc: "Filter by type, difficulty, and completion status for focused practice", - color: "purple", - }, - { - icon: "💡", - title: "Guided Hints", - desc: "STAR method templates and solution frameworks for better answers", - color: "orange", - }, - ].map(function (feature, index) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "text-center p-8 bg-white/80 dark:bg-gray-800/80 backdrop-blur-sm rounded-2xl shadow-xl border-2 border-gray-200/50 dark:border-gray-700/50 hover:shadow-2xl transition-all duration-500 group", whileHover: { scale: 1.05, y: -5 }, variants: scaleIn, custom: index, children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "w-20 h-20 bg-gradient-to-br from-".concat(feature.color, "-100 to-").concat(feature.color, "-200 dark:from-").concat(feature.color, "-900/40 dark:to-").concat(feature.color, "-800/50 rounded-2xl flex items-center justify-center mx-auto mb-6 shadow-lg border border-").concat(feature.color, "-200 dark:border-").concat(feature.color, "-700 group-hover:scale-110 transition-transform duration-300"), whileHover: { rotate: [0, -10, 10, 0] }, transition: { duration: 0.5 }, children: (0, jsx_runtime_1.jsx)("span", { className: "text-4xl", children: feature.icon }) }), (0, jsx_runtime_1.jsx)("h4", { className: "font-black text-gray-900 dark:text-white mb-3 text-lg", children: feature.title }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 text-sm leading-relaxed font-medium", children: feature.desc })] }, index)); }) })] })] })); -}; -exports.default = PracticeTab; diff --git a/src/pages/interview-prep/TechnicalTab.js b/src/pages/interview-prep/TechnicalTab.js deleted file mode 100644 index f92919c1..00000000 --- a/src/pages/interview-prep/TechnicalTab.js +++ /dev/null @@ -1,47 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importDefault(require("react")); -var framer_motion_1 = require("framer-motion"); -var Link_1 = __importDefault(require("@docusaurus/Link")); -var fadeIn = { hidden: { opacity: 0, y: 20 }, visible: { opacity: 1, y: 0, transition: { duration: 0.6 } } }; -var staggerContainer = { hidden: {}, visible: { transition: { staggerChildren: 0.2 } } }; -var TechnicalTab = function (_a) { - var _b = _a.technicalResources, technicalResources = _b === void 0 ? [] : _b, _c = _a.practicePlatforms, practicePlatforms = _c === void 0 ? [] : _c, _d = _a.expandedCategories, expandedCategories = _d === void 0 ? [] : _d, toggleCategory = _a.toggleCategory; - return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { initial: "hidden", animate: "visible", variants: staggerContainer, children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "mb-12", variants: fadeIn, children: (0, jsx_runtime_1.jsxs)("div", { className: "bg-gradient-to-br from-blue-50 via-indigo-50 to-purple-50 dark:from-blue-900/20 dark:via-indigo-900/20 dark:to-purple-900/20 rounded-2xl p-8 border border-blue-100 dark:border-blue-800 technical-outer", children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-center mb-8", children: [(0, jsx_runtime_1.jsxs)("div", { className: "inline-flex items-center px-4 py-2 bg-blue-100 dark:bg-blue-900/30 rounded-full text-blue-600 dark:text-blue-400 text-sm font-medium mb-4", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-2 h-2 bg-blue-500 rounded-full mr-2 animate-pulse" }), "Technical Interview Mastery"] }), (0, jsx_runtime_1.jsx)("h2", { className: "text-4xl font-bold mb-6 text-gray-900 dark:text-white", children: "Master Technical Interviews" }), (0, jsx_runtime_1.jsx)("p", { className: "text-lg text-gray-600 dark:text-gray-300", children: "Technical interviews are the cornerstone of software engineering hiring. They evaluate your problem-solving abilities, coding skills, and understanding of computer science fundamentals. Success requires consistent practice, pattern recognition, and the ability to communicate your thought process clearly." })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid md:grid-cols-3 gap-6 mb-8", children: [(0, jsx_runtime_1.jsxs)("div", { className: "bg-white dark:bg-gray-800 rounded-lg p-6 border border-gray-200 dark:border-gray-700 technical-inner", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-12 h-12 bg-blue-100 dark:bg-blue-900/30 rounded-lg flex items-center justify-center mb-4", children: (0, jsx_runtime_1.jsx)("span", { className: "text-2xl", children: "\uD83E\uDDE0" }) }), (0, jsx_runtime_1.jsx)("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white mb-2", children: "Problem Solving" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300", children: "Develop systematic approaches to break down complex problems into manageable components." })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white dark:bg-gray-800 rounded-lg p-6 border border-gray-200 dark:border-gray-700 technical-inner", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-12 h-12 bg-green-100 dark:bg-green-900/30 rounded-lg flex items-center justify-center mb-4", children: (0, jsx_runtime_1.jsx)("span", { className: "text-2xl", children: "\u26A1" }) }), (0, jsx_runtime_1.jsx)("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white mb-2", children: "Pattern Recognition" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300", children: "Learn to identify common patterns and apply proven techniques to solve similar problems efficiently." })] }), (0, jsx_runtime_1.jsxs)("div", { className: "bg-white dark:bg-gray-800 rounded-lg p-6 border border-gray-200 dark:border-gray-700 technical-inner", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-12 h-12 bg-purple-100 dark:bg-purple-900/30 rounded-lg flex items-center justify-center mb-4", children: (0, jsx_runtime_1.jsx)("span", { className: "text-2xl", children: "\uD83D\uDCAC" }) }), (0, jsx_runtime_1.jsx)("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white mb-2", children: "Communication" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300", children: "Master the art of explaining your approach, discussing trade-offs, and collaborating with interviewers." })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "bg-gradient-to-r from-yellow-100 to-orange-100 dark:from-yellow-900/30 dark:to-orange-900/30 rounded-lg p-6 border border-yellow-200 dark:border-yellow-700 technical-inner-success", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-start space-x-3", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-2xl", children: "\uD83D\uDCA1" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "font-semibold text-gray-900 dark:text-white mb-2", children: "Success Strategy" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-700 dark:text-gray-300", children: "Focus on understanding patterns rather than memorizing solutions. Practice explaining your thought process out loud, and always consider time/space complexity. Consistent daily practice for 2-3 months typically yields the best results." })] })] }) })] }) }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "mb-16", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-2xl font-bold mb-8 text-gray-900 dark:text-white text-center", children: "\uD83D\uDCDA Question Bank by Category" }), (0, jsx_runtime_1.jsx)("div", { className: "space-y-8", children: technicalResources.map(function (category, categoryIndex) { - var headerColors = [ - { gradient: "from-purple-500 to-pink-400", border: "border-purple-500 dark:border-purple-400" }, - { gradient: "from-blue-500 to-sky-400", border: "border-blue-500 dark:border-blue-400" }, - { gradient: "from-green-500 to-green-400", border: "border-green-500 dark:border-green-400" }, - { gradient: "from-orange-500 to-red-500", border: "border-orange-500 dark:border-orange-400" }, - { gradient: "from-pink-500 to-yellow-500", border: "border-pink-500 dark:border-pink-400" }, - { gradient: "from-cyan-500 to-blue-500", border: "border-cyan-500 dark:border-cyan-400" }, - ]; - var _a = headerColors[categoryIndex % headerColors.length], gradient = _a.gradient, border = _a.border; - var subtopicBorderClasses = [ - "question-bank-subtopic-purple", - "question-bank-subtopic-blue", - "question-bank-subtopic-green", - "question-bank-subtopic-orange", - "question-bank-subtopic-pink", - "question-bank-subtopic-cyan" - ]; - return ((0, jsx_runtime_1.jsxs)("div", { className: "bg-white dark:bg-gray-800 rounded-2xl shadow-lg overflow-hidden", children: [(0, jsx_runtime_1.jsx)("button", { onClick: function () { return toggleCategory(categoryIndex); }, className: "w-full bg-gradient-to-r ".concat(gradient, " p-6 text-left hover:opacity-90 transition-opacity"), children: (0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-center", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-2xl font-bold mb-2 text-white", children: category.category }), (0, jsx_runtime_1.jsx)("p", { className: "text-blue-100", children: category.description }), (0, jsx_runtime_1.jsx)("span", { className: "inline-block bg-white/20 text-sm font-medium px-3 py-1 rounded-full hover:bg-white/30 transition", children: (0, jsx_runtime_1.jsx)(Link_1.default, { to: '/docs/category/technical', className: "explore-btn", children: "Explore \u2192" }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col items-end text-right", children: [(0, jsx_runtime_1.jsx)("div", { className: "text-3xl font-bold text-white", children: category.totalProblems }), (0, jsx_runtime_1.jsx)("div", { className: "text-sm text-blue-100", children: "Total Problems" }), (0, jsx_runtime_1.jsx)("span", { className: "text-white text-2xl transform transition-transform duration-200 origin-center", style: { - transform: expandedCategories[categoryIndex] - ? "rotate(180deg)" - : "rotate(0deg)", - }, children: "\u25BC" })] })] }) }), expandedCategories[categoryIndex] && ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { className: "p-6", initial: { opacity: 0, height: 0 }, animate: { opacity: 1, height: "auto" }, exit: { opacity: 0, height: 0 }, transition: { duration: 0.3 }, children: (0, jsx_runtime_1.jsx)("div", { className: "grid md:grid-cols-2 lg:grid-cols-3 gap-6 ", children: category.subcategories.map(function (subcategory, subIndex) { return ((0, jsx_runtime_1.jsxs)("div", { className: "border rounded-xl p-5 hover:shadow-md transition-all duration-300 ".concat(border, " ").concat(subtopicBorderClasses[categoryIndex % subtopicBorderClasses.length], " hover:border-opacity-80 technical-inner"), children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between items-start mb-4", children: [(0, jsx_runtime_1.jsx)("h5", { className: "text-lg font-semibold text-gray-900 dark:text-white", children: subcategory.title }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center space-x-2", children: [(0, jsx_runtime_1.jsx)("span", { className: "px-2 py-1 rounded-full text-xs font-medium ".concat(subcategory.difficulty === "Easy" - ? "bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200" - : subcategory.difficulty === "Medium" - ? "bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200" - : "bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200"), children: subcategory.difficulty }), (0, jsx_runtime_1.jsx)("span", { className: "bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 px-2 py-1 rounded-full text-xs", children: subcategory.problems })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "mb-4", children: [(0, jsx_runtime_1.jsx)("h6", { className: "text-sm font-medium text-gray-700 dark:text-gray-300 mb-2", children: "Key Topics:" }), (0, jsx_runtime_1.jsx)("div", { className: "flex flex-wrap gap-1", children: subcategory.subtopics.map(function (topic, topicIndex) { return ((0, jsx_runtime_1.jsx)("span", { className: "bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-300 px-2 py-1 rounded text-xs", children: topic }, topicIndex)); }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "space-y-2", children: [(0, jsx_runtime_1.jsx)("h6", { className: "text-sm font-medium text-gray-700 dark:text-gray-300", children: "Practice Resources:" }), subcategory.resources.map(function (resource, resourceIndex) { return ((0, jsx_runtime_1.jsxs)("a", { href: resource.url, target: "_blank", rel: "noopener noreferrer", className: "block text-sm text-blue-600 dark:text-blue-300 hover:text-blue-800 dark:hover:text-blue-300 hover:underline", children: ["\uD83D\uDD17 ", resource.name] }, resourceIndex)); })] })] }, subIndex)); }) }) }))] }, categoryIndex)); - }) })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "mb-16", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-2xl font-bold mb-8 text-gray-900 dark:text-white text-center", children: "\uD83C\uDFAF Recommended Practice Platforms" }), (0, jsx_runtime_1.jsx)("div", { className: "grid md:grid-cols-3 gap-6 items-stretch", children: practicePlatforms.map(function (platform, index) { return ((0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-white dark:bg-gray-800 rounded-xl shadow-lg p-6 hover:shadow-xl transition-all duration-300 border border-gray-200 dark:border-gray-700 flex flex-col", variants: fadeIn, children: [(0, jsx_runtime_1.jsxs)("div", { className: "text-center mb-4", children: [(0, jsx_runtime_1.jsx)("h4", { className: "text-xl font-bold text-gray-900 dark:text-white mb-2", children: platform.name }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 dark:text-gray-300 text-sm mb-3", children: platform.description }), (0, jsx_runtime_1.jsx)("div", { className: "text-2xl font-bold text-blue-600 dark:text-blue-400", children: platform.problems }), (0, jsx_runtime_1.jsx)("div", { className: "text-xs text-gray-500 dark:text-gray-400", children: "Problems Available" })] }), (0, jsx_runtime_1.jsx)("div", { className: "mb-4", children: (0, jsx_runtime_1.jsx)("div", { className: "flex justify-center space-x-2 mb-3", children: platform.difficulty.map(function (diff, diffIndex) { return ((0, jsx_runtime_1.jsx)("span", { className: "px-2 py-1 rounded-full text-xs font-medium ".concat(diff === "Easy" - ? "bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200" - : diff === "Medium" - ? "bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200" - : "bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200"), children: diff }, diffIndex)); }) }) }), (0, jsx_runtime_1.jsxs)("div", { className: "mb-6", children: [(0, jsx_runtime_1.jsx)("h5", { className: "text-sm font-medium text-gray-700 dark:text-gray-300 mb-2", children: "Key Features:" }), (0, jsx_runtime_1.jsx)("ul", { className: "space-y-1", children: platform.features.map(function (feature, featureIndex) { return ((0, jsx_runtime_1.jsxs)("li", { className: "text-xs text-gray-600 dark:text-gray-400 flex items-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "w-1 h-1 bg-blue-500 rounded-full mr-2" }), feature] }, featureIndex)); }) })] }), (0, jsx_runtime_1.jsx)("div", { className: "mt-auto", children: (0, jsx_runtime_1.jsx)("a", { href: platform.url, target: "_blank", rel: "noopener noreferrer", className: "technical-btn w-full bg-blue-600 text-white py-2 px-4 rounded-lg hover:bg-blue-700 transition-colors text-center block font-medium", children: "Start Practicing" }) })] }, index)); }) })] }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "bg-gradient-to-r from-blue-50 to-purple-50 dark:from-gray-800 dark:to-gray-700 rounded-2xl p-8", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-2xl font-bold mb-6 text-gray-900 dark:text-white text-center", children: "\uD83D\uDCA1 Pro Tips for Technical Interview Success" }), (0, jsx_runtime_1.jsxs)("div", { className: "grid md:grid-cols-2 gap-6", children: [(0, jsx_runtime_1.jsxs)("div", { className: "space-y-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-start space-x-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-6 h-6 bg-blue-500 rounded-full flex items-center justify-center flex-shrink-0 mt-1", children: (0, jsx_runtime_1.jsx)("span", { className: "text-white text-xs font-bold", children: "1" }) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "font-semibold text-gray-900 dark:text-white", children: "Start with Easy Problems" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300", children: "Build confidence and understand patterns before tackling harder challenges." })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-start space-x-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-6 h-6 bg-blue-500 rounded-full flex items-center justify-center flex-shrink-0 mt-1", children: (0, jsx_runtime_1.jsx)("span", { className: "text-white text-xs font-bold", children: "2" }) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "font-semibold text-gray-900 dark:text-white", children: "Practice Consistently" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300", children: "Solve 1-2 problems daily rather than cramming before interviews." })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-start space-x-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-6 h-6 bg-blue-500 rounded-full flex items-center justify-center flex-shrink-0 mt-1", children: (0, jsx_runtime_1.jsx)("span", { className: "text-white text-xs font-bold", children: "3" }) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "font-semibold text-gray-900 dark:text-white", children: "Focus on Patterns" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300", children: "Learn common problem-solving patterns like two pointers, sliding window, etc." })] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "space-y-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-start space-x-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-6 h-6 bg-purple-500 rounded-full flex items-center justify-center flex-shrink-0 mt-1", children: (0, jsx_runtime_1.jsx)("span", { className: "text-white text-xs font-bold", children: "4" }) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "font-semibold text-gray-900 dark:text-white", children: "Time Yourself" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300", children: "Practice under time constraints to simulate real interview conditions." })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-start space-x-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-6 h-6 bg-purple-500 rounded-full flex items-center justify-center flex-shrink-0 mt-1", children: (0, jsx_runtime_1.jsx)("span", { className: "text-white text-xs font-bold", children: "5" }) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "font-semibold text-gray-900 dark:text-white", children: "Explain Your Thinking" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300", children: "Practice verbalizing your approach and reasoning process." })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-start space-x-3", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-6 h-6 bg-purple-500 rounded-full flex items-center justify-center flex-shrink-0 mt-1", children: (0, jsx_runtime_1.jsx)("span", { className: "text-white text-xs font-bold", children: "6" }) }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "font-semibold text-gray-900 dark:text-white", children: "Review Solutions" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-600 dark:text-gray-300", children: "Study optimal solutions and alternative approaches after solving problems." })] })] })] })] })] })] })); -}; -exports.default = TechnicalTab; diff --git a/src/pages/interview-prep/index.js b/src/pages/interview-prep/index.js deleted file mode 100644 index 707cc110..00000000 --- a/src/pages/interview-prep/index.js +++ /dev/null @@ -1,978 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importDefault(require("react")); -var react_2 = require("react"); -var Layout_1 = __importDefault(require("@theme/Layout")); -var Head_1 = __importDefault(require("@docusaurus/Head")); -var framer_motion_1 = require("framer-motion"); -var Link_1 = __importDefault(require("@docusaurus/Link")); -var OverviewTab_1 = __importDefault(require("./OverviewTab")); -var TechnicalTab_1 = __importDefault(require("./TechnicalTab")); -var BehavioralTab_1 = __importDefault(require("./BehavioralTab")); -var CompaniesTab_1 = __importDefault(require("./CompaniesTab")); -var PracticeTab_1 = __importDefault(require("./PracticeTab")); -// Animation variants -var fadeIn = { - hidden: { opacity: 0, y: 20 }, - visible: { opacity: 1, y: 0, transition: { duration: 0.6 } }, -}; -var staggerContainer = { - hidden: {}, - visible: { - transition: { - staggerChildren: 0.2, - }, - }, -}; -var InterviewPrepPage = function () { - var _a = (0, react_2.useState)("overview"), activeTab = _a[0], setActiveTab = _a[1]; - var _b = (0, react_2.useState)({}), expandedCategories = _b[0], setExpandedCategories = _b[1]; - var toggleCategory = function (categoryIndex) { - setExpandedCategories(function (prev) { - var _a; - return (__assign(__assign({}, prev), (_a = {}, _a[categoryIndex] = !prev[categoryIndex], _a))); - }); - }; - var _c = (0, react_2.useState)({}), showTips = _c[0], setShowTips = _c[1]; - var _d = (0, react_2.useState)({}), showQuestions = _d[0], setShowQuestions = _d[1]; - var toggleTips = function (index) { - setShowTips(function (prev) { - var _a; - return (__assign(__assign({}, prev), (_a = {}, _a[index] = !prev[index], _a))); - }); - }; - var toggleQuestions = function (index) { - setShowQuestions(function (prev) { - var _a; - return (__assign(__assign({}, prev), (_a = {}, _a[index] = !prev[index], _a))); - }); - }; - var behavioralQuestions = [ - { - category: "Leadership", - questions: [ - "Tell me about a time you led a team through a difficult project", - "Describe a situation where you had to influence others without authority", - "How do you handle team conflicts?", - ], - }, - { - category: "Problem Solving", - questions: [ - "Describe the most challenging technical problem you've solved", - "Tell me about a time you failed and what you learned", - "How do you approach debugging complex issues?", - ], - }, - { - category: "Communication", - questions: [ - "Explain a complex technical concept to a non-technical person", - "Tell me about a time you had to give difficult feedback", - "How do you handle disagreements with stakeholders?", - ], - }, - { - category: "Growth & Learning", - questions: [ - "How do you stay updated with new technologies?", - "Tell me about a time you had to learn something completely new", - "What's the most important thing you've learned in your career?", - ], - }, - ]; - var companyTips = [ - { - company: "Google", - logo: "/img/google.png", - focus: "Googleyness & Leadership", - industry: "Technology", - roleTypes: ["Software Engineer", "Product Manager", "Data Scientist", "Site Reliability Engineer"], - focusAreas: ["Scalability", "Problem-Solving", "Innovation", "Technical Excellence"], - tips: [ - "Focus on scalability and efficiency in your solutions", - "Demonstrate analytical thinking with data-driven approaches", - "Show passion for technology and continuous learning", - "Prepare for system design questions with real-world examples", - "Practice coding problems on platforms like LeetCode (focus on medium-hard)", - "Understand Google's products and their technical challenges", - "Be ready to discuss trade-offs in your technical decisions", - "Show how you've handled ambiguous problems", - ], - commonQuestions: [ - { - question: "How would you design Google Search?", - answer: "Start with requirements gathering (billions of queries, sub-second response), then discuss web crawling architecture, inverted indexing, ranking algorithms like PageRank, distributed systems with load balancing, caching strategies at multiple levels, and real-time updates handling. Consider data freshness, personalization, and spam detection.", - category: "System Design", - }, - { - question: "Explain how you would handle billions of queries per day", - answer: "Implement horizontal scaling with load balancers, use CDNs for static content, implement multi-level caching (browser, CDN, application, database), database sharding and replication, microservices architecture, auto-scaling based on traffic patterns, and comprehensive monitoring with circuit breakers.", - category: "System Design", - }, - { - question: "What would you do if Gmail was slow?", - answer: "Systematic debugging approach: check monitoring dashboards, identify bottlenecks (database, network, application), analyze query performance, review caching hit rates, examine resource utilization, implement performance profiling, and deploy fixes like query optimization, caching improvements, or infrastructure scaling.", - category: "Problem Solving", - }, - { - question: "Tell me about a time you solved a complex technical problem", - answer: "Use STAR method: Situation (complex distributed system issue), Task (restore service and prevent recurrence), Action (systematic debugging, root cause analysis, implemented monitoring), Result (99.9% uptime improvement, prevented similar issues). Focus on technical depth and problem-solving methodology.", - category: "Behavioral", - }, - { - question: "How do you stay updated with technology trends?", - answer: "Demonstrate continuous learning: follow tech blogs, contribute to open source, attend conferences, experiment with new technologies, participate in tech communities, and apply learnings to solve real problems. Show specific examples.", - category: "Behavioral", - }, - ], - }, - { - company: "Amazon", - logo: "/img/amazon.png", - focus: "Leadership Principles", - industry: "E-commerce/Cloud", - roleTypes: ["Software Engineer", "Solutions Architect", "Product Manager", "DevOps Engineer"], - focusAreas: ["Leadership Principles", "Customer Obsession", "Ownership", "Bias for Action"], - tips: [ - "Master all 16 Leadership Principles with 2-3 specific examples each", - "Use STAR method for all behavioral questions", - "Focus on customer obsession in every answer", - "Demonstrate ownership mindset and long-term thinking", - "Prepare examples showing bias for action and delivering results", - "Show how you've simplified processes or invented solutions", - "Quantify your impact with specific metrics", - "Be ready to discuss failures and learnings", - ], - commonQuestions: [ - { - question: "Tell me about a time you disagreed with your manager", - answer: "Use 'Have Backbone; Disagree and Commit' principle. Situation: disagreement on technical approach. Task: present alternative solution. Action: prepared data-driven analysis, respectfully presented concerns, listened to feedback. Result: adopted hybrid approach that improved performance by 40%. Committed fully once decision was made.", - category: "Behavioral", - }, - { - question: "Describe a time you had to make a decision with incomplete information", - answer: "Demonstrate 'Bias for Action'. Situation: critical system outage with limited debugging info. Task: restore service quickly. Action: gathered available data, made calculated decision based on patterns, implemented fix with rollback plan. Result: restored service in 30 minutes, prevented $100K revenue loss.", - category: "Behavioral", - }, - { - question: "How do you handle tight deadlines?", - answer: "Show 'Deliver Results' and 'Ownership'. Situation: product launch deadline at risk. Task: deliver core features on time. Action: prioritized ruthlessly, communicated trade-offs to stakeholders, worked with team to optimize scope. Result: launched on time with 95% of planned features, customer satisfaction remained high.", - category: "Behavioral", - }, - { - question: "Design a system like Amazon's recommendation engine", - answer: "Requirements: real-time recommendations, handle millions of users, personalized results. Architecture: data ingestion pipeline, feature engineering, ML models (collaborative filtering, content-based, deep learning), real-time serving layer, A/B testing framework, feedback loop for continuous improvement.", - category: "System Design", - }, - { - question: "Tell me about a time you simplified a process", - answer: "Use 'Invent and Simplify'. Situation: complex deployment process taking 4 hours. Task: reduce deployment time and errors. Action: automated manual steps, created CI/CD pipeline, added automated testing. Result: reduced deployment time to 30 minutes, decreased errors by 80%.", - category: "Behavioral", - }, - ], - }, - { - company: "Meta (Facebook)", - logo: "/img/meta.png", - focus: "Move Fast & Impact", - industry: "Social Media/VR", - roleTypes: ["Software Engineer", "Product Manager", "Data Scientist", "Research Scientist"], - focusAreas: ["Scale", "Impact", "Execution", "People Connection"], - tips: [ - "Focus on massive scale and global impact", - "Demonstrate ability to move fast and iterate", - "Show examples of connecting people or communities", - "Prepare for questions about handling billions of users", - "Understand Meta's products and their technical challenges", - "Be ready to discuss privacy and safety considerations", - "Show data-driven decision making", - "Demonstrate growth mindset and learning from failures", - ], - commonQuestions: [ - { - question: "How would you design Facebook's News Feed?", - answer: "Requirements: personalized content, real-time updates, billions of users. Architecture: content ingestion, ranking algorithms (engagement prediction, relevance scoring), edge timeline generation, caching strategies, real-time updates with WebSockets, content moderation pipeline, and A/B testing framework.", - category: "System Design", - }, - { - question: "Tell me about a time you had to make a trade-off between speed and quality", - answer: "Situation: urgent security fix needed. Task: balance quick deployment with thorough testing. Action: implemented fix with comprehensive monitoring, deployed to small percentage first, gradually rolled out. Result: fixed security issue within 24 hours while maintaining system stability.", - category: "Behavioral", - }, - { - question: "How would you handle a feature that's negatively impacting user engagement?", - answer: "Data analysis approach: segment users, analyze metrics, identify root causes, A/B test solutions, gather qualitative feedback. Action: iterate quickly, measure impact, communicate with stakeholders. Focus on user value and long-term engagement over short-term metrics.", - category: "Product Sense", - }, - { - question: "Design a system to detect fake accounts", - answer: "Multi-layered approach: behavioral analysis (login patterns, friend requests), content analysis (spam detection), graph analysis (suspicious connection patterns), machine learning models, real-time scoring system, human review workflow, and continuous model improvement.", - category: "System Design", - }, - { - question: "Tell me about a time you influenced without authority", - answer: "Situation: cross-team project with conflicting priorities. Task: align teams on common goal. Action: built relationships, presented data showing mutual benefits, created shared success metrics. Result: successful project delivery, improved cross-team collaboration for future projects.", - category: "Behavioral", - }, - ], - }, - { - company: "Apple", - logo: "/img/apple.png", - focus: "Innovation & User Experience", - industry: "Consumer Electronics", - roleTypes: ["Software Engineer", "Hardware Engineer", "Product Manager", "Design Engineer"], - focusAreas: ["User Experience", "Innovation", "Quality", "Privacy"], - tips: [ - "Focus on user experience and design thinking", - "Demonstrate attention to detail and quality", - "Show passion for Apple products and ecosystem", - "Prepare examples of innovative solutions", - "Understand Apple's privacy-first approach", - "Be ready to discuss cross-functional collaboration", - "Show how you've delivered polished, user-friendly solutions", - "Demonstrate ability to work under high standards", - ], - commonQuestions: [ - { - question: "How would you improve Siri?", - answer: "Focus on user experience: better natural language understanding, contextual awareness, privacy-preserving personalization, faster response times, expanded capabilities, seamless device integration, and accessibility improvements. Balance innovation with Apple's privacy principles.", - category: "Product Design", - }, - { - question: "Tell me about a time you had to meet very high quality standards", - answer: "Situation: developing user-facing feature with strict quality requirements. Task: deliver bug-free, polished experience. Action: implemented comprehensive testing, code reviews, user testing, performance optimization. Result: zero critical bugs in production, positive user feedback.", - category: "Behavioral", - }, - { - question: "How would you design a privacy-focused messaging system?", - answer: "End-to-end encryption, on-device processing, minimal data collection, secure key exchange, forward secrecy, metadata protection, secure deletion, and transparent privacy controls. Balance security with user experience and performance.", - category: "System Design", - }, - { - question: "Describe a time you had to innovate under constraints", - answer: "Situation: limited resources for new feature. Task: deliver innovative solution within constraints. Action: creative problem-solving, leveraged existing technologies, focused on core user value. Result: delivered feature that exceeded expectations while staying within budget.", - category: "Behavioral", - }, - { - question: "How do you ensure your code is maintainable and scalable?", - answer: "Clean code principles, comprehensive documentation, modular architecture, automated testing, code reviews, performance monitoring, and following established patterns. Focus on long-term maintainability and team collaboration.", - category: "Technical", - }, - ], - }, - { - company: "Netflix", - logo: "/img/netflix.png", - focus: "Freedom & Responsibility", - industry: "Streaming/Entertainment", - roleTypes: ["Software Engineer", "Data Engineer", "Product Manager", "ML Engineer"], - focusAreas: ["Scale", "Personalization", "Reliability", "Data-Driven"], - tips: [ - "Understand Netflix's culture of freedom and responsibility", - "Focus on high-performance culture and results", - "Demonstrate ability to work independently", - "Show examples of data-driven decision making", - "Prepare for questions about streaming at scale", - "Understand personalization and recommendation systems", - "Be ready to discuss A/B testing and experimentation", - "Show how you've handled ambiguous problems", - ], - commonQuestions: [ - { - question: "How would you design Netflix's recommendation system?", - answer: "Multi-algorithm approach: collaborative filtering, content-based filtering, deep learning models, contextual bandits for exploration/exploitation, real-time personalization, A/B testing framework, and feedback loops. Handle cold start problem and diverse content catalog.", - category: "System Design", - }, - { - question: "Tell me about a time you took ownership of a problem", - answer: "Situation: critical service degradation affecting user experience. Task: identify and fix root cause. Action: took full ownership, coordinated with multiple teams, implemented both immediate fix and long-term solution. Result: restored service, prevented future occurrences.", - category: "Behavioral", - }, - { - question: "How would you handle video streaming for millions of concurrent users?", - answer: "CDN strategy, adaptive bitrate streaming, content pre-positioning, load balancing, caching at multiple levels, real-time monitoring, graceful degradation, and global infrastructure optimization. Consider peak traffic patterns and regional differences.", - category: "System Design", - }, - { - question: "Describe a time you had to make a decision with limited data", - answer: "Situation: new feature launch decision with incomplete user research. Task: decide on launch strategy. Action: analyzed available data, made assumptions explicit, designed experiments to validate quickly. Result: successful launch with rapid iteration based on real user feedback.", - category: "Behavioral", - }, - ], - }, - { - company: "Microsoft", - logo: "/img/microsoft.png", - focus: "Growth Mindset & Collaboration", - industry: "Technology", - roleTypes: ["Software Engineer", "Program Manager", "Cloud Architect", "AI Engineer"], - focusAreas: ["Growth Mindset", "Collaboration", "Inclusive Design", "Cloud Computing"], - tips: [ - "Emphasize continuous learning and growth mindset", - "Show collaborative approach and inclusive thinking", - "Demonstrate how you've helped others succeed", - "Focus on impact, results, and customer value", - "Prepare examples of learning from failures", - "Understand Microsoft's mission and recent innovations", - "Show experience with cloud technologies", - "Demonstrate inclusive design thinking", - ], - commonQuestions: [ - { - question: "How do you handle failure?", - answer: "Growth mindset approach: acknowledge failure quickly, analyze root causes, extract learnings, apply improvements, share knowledge with team. Example: failed project taught me better stakeholder communication, leading to 30% improvement in project success rate.", - category: "Behavioral", - }, - { - question: "Tell me about a time you helped a colleague", - answer: "Situation: colleague struggling with complex technical problem. Task: help without taking over. Action: paired programming, knowledge sharing, mentoring approach. Result: colleague solved problem, gained new skills, became go-to person for similar issues.", - category: "Behavioral", - }, - { - question: "How would you design Microsoft Teams?", - answer: "Requirements: real-time communication, enterprise scale, security, integration. Architecture: WebRTC for video/audio, WebSocket for messaging, microservices, Azure cloud infrastructure, Office 365 integration, security/compliance features, cross-platform support.", - category: "System Design", - }, - { - question: "What motivates you to learn new things?", - answer: "Connect to growth mindset: curiosity about solving new problems, staying relevant in rapidly evolving tech landscape, helping customers achieve more, contributing to team success. Provide specific examples of recent learning and application.", - category: "Behavioral", - }, - ], - }, - ]; - var mockInterviewQuestions = [ - // 🔹 Technical - // Arrays & Strings - { - id: "tech-arr-1", - type: "technical", - question: "Find the first non-repeating character in a string", - difficulty: "Easy", - hints: ["Use a hash map to count frequencies", "Return the first character with count 1"], - estimatedTime: 10, - category: "Strings", - links: [ - { title: "LeetCode - First Unique Character", url: "https://leetcode.com/problems/first-unique-character-in-a-string/", type: "example" }, - { title: "MDN - Map Object", url: "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map", type: "documentation" } - ] - }, - { - id: "tech-arr-2", - type: "technical", - question: "Merge two sorted arrays without using extra space", - difficulty: "Medium", - hints: ["Two-pointer technique works well", "Consider edge cases where one array is empty"], - estimatedTime: 15, - category: "Arrays", - links: [ - { title: "LeetCode - Merge Sorted Array", url: "https://leetcode.com/problems/merge-sorted-array/", type: "example" }, - { title: "GeeksforGeeks - Merge Without Extra Space", url: "https://www.geeksforgeeks.org/merge-two-sorted-arrays-o1-extra-space/", type: "tutorial" } - ] - }, - // Linked Lists - { - id: "tech-ll-1", - type: "technical", - question: "Reverse a linked list", - difficulty: "Medium", - hints: ["Think about iterative vs recursive approach", "Consider edge cases like empty list"], - estimatedTime: 20, - category: "Linked List", - links: [ - { title: "LeetCode - Reverse Linked List", url: "https://leetcode.com/problems/reverse-linked-list/", type: "example" }, - { title: "GeeksforGeeks - Reverse Linked List", url: "https://www.geeksforgeeks.org/reverse-a-linked-list/", type: "tutorial" } - ] - }, - { - id: "tech-ll-2", - type: "technical", - question: "Detect if a linked list has a cycle", - difficulty: "Medium", - hints: ["Use fast and slow pointers (Floyd’s cycle detection)", "Watch out for null references"], - estimatedTime: 15, - category: "Linked List", - links: [ - { title: "LeetCode - Linked List Cycle", url: "https://leetcode.com/problems/linked-list-cycle/", type: "example" }, - { title: "GeeksForGeeks- Detect Loop in a Linked List", url: "https://www.geeksforgeeks.org/dsa/detect-loop-in-a-linked-list/", type: "reference" } - ] - }, - // Trees & Graphs - { - id: "tech-tree-1", - type: "technical", - question: "Maximum Depth of Binary Tree", - difficulty: "Easy", - hints: ["Use recursion (DFS)", "Think about base case (null node)"], - estimatedTime: 10, - category: "Trees", - links: [ - { title: "LeetCode - Maximum Depth of Binary Tree", url: "https://leetcode.com/problems/maximum-depth-of-binary-tree/", type: "example" }, - { title: "GeeksForGeeks - DFS", url: "https://www.geeksforgeeks.org/dsa/depth-first-search-or-dfs-for-a-graph/", type: "reference" } - ] - }, - { - id: "tech-graph-1", - type: "technical", - question: "Clone a Graph", - difficulty: "Medium", - hints: ["Use DFS or BFS", "Maintain a hash map of visited nodes"], - estimatedTime: 25, - category: "Graphs", - links: [ - { title: "LeetCode - Clone Graph", url: "https://leetcode.com/problems/clone-graph/", type: "example" }, - { title: "GeeksforGeeks - Clone Graph", url: "https://www.geeksforgeeks.org/clone-an-undirected-graph/", type: "tutorial" } - ] - }, - // Dynamic Programming - { - id: "tech-dp-1", - type: "technical", - question: "Climbing Stairs", - difficulty: "Easy", - hints: ["Think Fibonacci", "DP with memoization or bottom-up"], - estimatedTime: 15, - category: "Dynamic Programming", - links: [ - { title: "LeetCode - Climbing Stairs", url: "https://leetcode.com/problems/climbing-stairs/", type: "example" }, - { title: "DP Introduction", url: "https://www.geeksforgeeks.org/dynamic-programming/", type: "tutorial" } - ] - }, - { - id: "tech-dp-2", - type: "technical", - question: "Longest Increasing Subsequence", - difficulty: "Medium", - hints: ["DP with O(n^2)", "Can be optimized with Binary Search (O(n log n))"], - estimatedTime: 35, - category: "Dynamic Programming", - links: [ - { title: "LeetCode - Longest Increasing Subsequence", url: "https://leetcode.com/problems/longest-increasing-subsequence/", type: "example" }, - { title: "GeeksforGeeks - LIS Explained", url: "https://www.geeksforgeeks.org/longest-increasing-subsequence-dp-3/", type: "tutorial" } - ] - }, - // Greedy Algorithms - { - id: "tech-greedy-1", - type: "technical", - question: "Jump Game", - difficulty: "Medium", - hints: ["Track the maximum reachable index", "Greedy works better than DP"], - estimatedTime: 20, - category: "Greedy", - links: [ - { title: "LeetCode - Jump Game", url: "https://leetcode.com/problems/jump-game/", type: "example" }, - { title: "Greedy Algorithm Basics", url: "https://www.geeksforgeeks.org/greedy-algorithms/", type: "reference" } - ] - }, - { - id: "tech-greedy-2", - type: "technical", - question: "Activity Selection Problem", - difficulty: "Medium", - hints: ["Sort by finish time", "Pick earliest finishing activity"], - estimatedTime: 25, - category: "Greedy", - links: [ - { title: "GeeksforGeeks - Activity Selection", url: "https://www.geeksforgeeks.org/activity-selection-problem-greedy-algo-1/", type: "tutorial" }, - { title: "MIT Greedy Algorithms Notes", url: "https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-006-introduction-to-algorithms-fall-2011/lecture-notes/MIT6_006F11_lec05.pdf", type: "reference" } - ] - }, - // Bit Manipulation - { - id: "tech-bit-1", - type: "technical", - question: "Single Number (Find element appearing once)", - difficulty: "Easy", - hints: ["Use XOR property", "a ^ a = 0"], - estimatedTime: 10, - category: "Bit Manipulation", - links: [ - { title: "LeetCode - Single Number", url: "https://leetcode.com/problems/single-number/", type: "example" }, - { title: "Bitwise Operators in C++", url: "https://cplusplus.com/doc/tutorial/operators/#bitwise", type: "documentation" } - ] - }, - { - id: "tech-bit-2", - type: "technical", - question: "Number of 1 Bits (Hamming Weight)", - difficulty: "Easy", - hints: ["Use n & (n-1) trick", "Loop until n=0"], - estimatedTime: 12, - category: "Bit Manipulation", - links: [ - { title: "LeetCode - Number of 1 Bits", url: "https://leetcode.com/problems/number-of-1-bits/", type: "example" }, - { title: "Hamming Weight Explained", url: "https://www.geeksforgeeks.org/count-set-bits-in-an-integer/", type: "tutorial" } - ] - }, - // Sorting Algorithms - { - id: "tech-sort-1", - type: "technical", - question: "Sort Colors (Dutch National Flag problem)", - difficulty: "Medium", - hints: ["Use three pointers (low, mid, high)", "In-place solution required"], - estimatedTime: 20, - category: "Sorting", - links: [ - { title: "LeetCode - Sort Colors", url: "https://leetcode.com/problems/sort-colors/", type: "example" }, - { title: "Dutch National Flag Problem", url: "https://www.geeksforgeeks.org/sort-an-array-of-0s-1s-and-2s/", type: "tutorial" } - ] - }, - { - id: "tech-sort-2", - type: "technical", - question: "Kth Largest Element in an Array", - difficulty: "Medium", - hints: ["QuickSelect algorithm", "Or use Min-Heap"], - estimatedTime: 25, - category: "Sorting/Heap", - links: [ - { title: "LeetCode - Kth Largest Element", url: "https://leetcode.com/problems/kth-largest-element-in-an-array/", type: "example" }, - { title: "QuickSelect Algorithm", url: "https://www.geeksforgeeks.org/quickselect-algorithm/", type: "tutorial" } - ] - }, - // Binary Search - { - id: "tech-bs-1", - type: "technical", - question: "Binary Search", - difficulty: "Easy", - hints: ["Classic divide and conquer", "Midpoint check"], - estimatedTime: 10, - category: "Binary Search", - links: [ - { title: "LeetCode - Binary Search", url: "https://leetcode.com/problems/binary-search/", type: "example" }, - { title: "Binary Search Explained", url: "https://www.geeksforgeeks.org/binary-search/", type: "tutorial" } - ] - }, - { - id: "tech-bs-2", - type: "technical", - question: "Find Minimum in Rotated Sorted Array", - difficulty: "Medium", - hints: ["Modified binary search", "Check mid vs right"], - estimatedTime: 20, - category: "Binary Search", - links: [ - { title: "LeetCode - Find Minimum in Rotated Array", url: "https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/", type: "example" }, - { title: "Binary Search Variants", url: "https://www.geeksforgeeks.org/binary-search/", type: "reference" } - ] - }, - // 🔹 Behavioral - { - id: "behavioral-2", - type: "behavioral", - question: "Tell me about a time you had to work with a difficult team member", - framework: "STAR Method", - difficulty: "Medium", - hints: ["Situation", "Task", "Action", "Result"], - estimatedTime: 15, - category: "Teamwork", - links: [ - { title: "Behavioral Interview Tips", url: "https://www.youtube.com/watch?v=OqoGEMlNk_g", type: "tutorial" } - ] - }, - { - id: "behavioral-3", - type: "behavioral", - question: "Describe a situation where you had to meet a tight deadline", - framework: "STAR Method", - difficulty: "Medium", - hints: ["Explain how you prioritized tasks", "Mention communication with stakeholders", "Highlight the outcome"], - estimatedTime: 12, - category: "Time Management", - links: [ - { title: "STAR Method Guide", url: "https://mondo.com/insights/how-to-use-star-method-to-answer-performace-based-interview-questions/#:~:text=Talk%20about%20a%20time%20when%20you%20had%20to,timeline%20and%20assigned%20tasks%20to%20each%20team%20member.", type: "tutorial" } - ] - }, - { - id: "behavioral-4", - type: "behavioral", - question: "What’s the most challenging project you have worked on?", - framework: "STAR Method", - difficulty: "Medium", - hints: ["Focus on the problem complexity", "Explain how you collaborated", "Highlight measurable outcomes"], - estimatedTime: 15, - category: "Problem Solving", - links: [ - { title: "Problem Solving in Interviews", url: "https://megainterview.com/what-was-the-most-challenging-project-you-have-worked-on/", type: "reference" } - ] - }, - { - id: "behavioral-5", - type: "behavioral", - question: "Tell me about a time you failed. How did you handle it?", - framework: "STAR Method", - difficulty: "Hard", - hints: ["Be honest but professional", "Emphasize what you learned", "Show resilience and growth"], - estimatedTime: 15, - category: "Resilience", - links: [ - { title: "Answering Failure Questions", url: "https://interviewpenguin.com/tell-me-about-a-time-when-you-failed/", type: "tutorial" } - ] - }, - // 🔹 System Design - { - id: "system-2", - type: "system-design", - question: "Design a URL shortener like bit.ly", - difficulty: "Hard", - hints: ["Consider scale", "Database design", "Caching strategy"], - estimatedTime: 40, - category: "Web Systems", - links: [ - { title: "System Design - URL Shortener", url: "https://www.geeksforgeeks.org/system-design/system-design-url-shortening-service/", type: "example" }, - { title: "High Scalability - URL Shortener", url: "https://www.hellointerview.com/learn/system-design/problem-breakdowns/bitly", type: "reference" } - ] - }, - { - id: "system-3", - type: "system-design", - question: "Design a chat application like WhatsApp", - difficulty: "Hard", - hints: ["Think about message delivery guarantees", "Consider real-time sync across devices", "Handle offline users gracefully"], - estimatedTime: 60, - category: "Messaging Systems", - links: [ - { title: "System Design - WhatsApp", url: "https://blog.algomaster.io/p/design-a-chat-application-like-whatsapp", type: "example" }, - { title: "Scalable Chat App Design", url: "https://www.youtube.com/watch?v=3HXFy_7M12E&t=1s", type: "tutorial" } - ] - }, - { - id: "system-4", - type: "system-design", - question: "Design an online food delivery system like Swiggy/Zomato", - difficulty: "Hard", - hints: ["Users, restaurants, delivery partners → entities", "Real-time location tracking", "Scalability and load balancing"], - estimatedTime: 70, - category: "Distributed Systems", - links: [ - { title: "System Design - Food Delivery", url: "https://upvey.com/technology/interview/system-design/design-architecture-food-delivery-service-like-swiggy-or-ubereats/#google_vignette", type: "example" }, - { title: "Scalable Food Delivery Architecture", url: "https://www.youtube.com/watch?v=rZyAgZuuZiA&t=8s", type: "tutorial" } - ] - }, - { - id: "system-5", - type: "system-design", - question: "Design a recommendation system for an e-commerce website", - difficulty: "Medium", - hints: ["Collaborative filtering", "Content-based recommendations", "Cold start problem"], - estimatedTime: 50, - category: "Machine Learning Systems", - links: [ - { title: "Recommendation Systems Intro", url: "https://www.geeksforgeeks.org/recommendation-system-in-python/", type: "tutorial" }, - { title: "System Design - Recommendation Engine", url: "https://webkul.com/blog/e-commerce-recommendation-system/", type: "reference" } - ] - }, - { - id: "system-6", - type: "system-design", - question: "Design YouTube (video streaming platform)", - difficulty: "Hard", - hints: ["Video upload, transcoding, and storage", "Content delivery networks (CDNs)", "Search and recommendation engine"], - estimatedTime: 90, - category: "Media Systems", - links: [ - { title: "System Design - YouTube", url: "https://www.geeksforgeeks.org/system-design/system-design-of-youtube-a-complete-architecture/", type: "example" }, - { title: "Designing Video Streaming Platforms", url: "https://www.youtube.com/watch?v=jPKTo1iGQiE&t=1s", type: "tutorial" } - ] - } - ]; - var practicePlatforms = [ - { - name: "LeetCode", - description: "Most popular coding interview platform", - problems: "2000+", - difficulty: ["Easy", "Medium", "Hard"], - url: "https://leetcode.com/", - features: ["Mock Interviews", "Company Tags", "Discussion Forums", "Premium Content"], - }, - { - name: "HackerRank", - description: "Comprehensive coding challenges and assessments", - problems: "1000+", - difficulty: ["Easy", "Medium", "Hard"], - url: "https://hackerrank.com/", - features: ["Skill Assessments", "Certification", "Company Challenges", "Interview Prep"], - }, - { - name: "CodeChef", - description: "Competitive programming and contests platform", - problems: "3000+", - difficulty: ["Easy", "Medium", "Hard"], - url: "https://www.codechef.com/", - features: ["Monthly Contests", "Long Challenge", "Cook-Off", "Practice Problems"], - }, - ]; - var technicalResources = [ - { - category: "📊 Data Structures & Algorithms", - description: "Master core algorithms and problem-solving patterns for interviews", - totalProblems: 220, - subcategories: [ - { - title: "Arrays & Strings", - difficulty: "Easy", - problems: 50, - subtopics: [ - "Two Pointers", "Sliding Window", "String Manipulation", "Prefix Sums", "Rotation & Reversal", - "Frequency Counting", "Hashing for Arrays", "Anagram Problems" - ], - resources: [ - { name: "LeetCode Arrays", url: "https://leetcode.com/tag/array/" }, - { name: "HackerRank Strings", url: "https://hackerrank.com/domains/algorithms?filters%5Bsubdomains%5D%5B%5D=strings" }, - { name: "NeetCode Array Playlist", url: "https://www.youtube.com/playlist?list=PLot-Xpze53lfOdF3KwpMSFEyfE77zIwiP" } - ], - }, - { - title: "Linked Lists", - difficulty: "Medium", - problems: 30, - subtopics: [ - "Traversal", "Reversal", "Cycle Detection", "Merge Operations", "Dummy Nodes", - "Doubly Linked List", "Skip Lists" - ], - resources: [ - { name: "LeetCode Linked List", url: "https://leetcode.com/tag/linked-list/" }, - { name: "GeeksforGeeks", url: "https://geeksforgeeks.org/data-structures/linked-list/" }, - { name: "FreeCodeCamp Linked List", url: "https://www.youtube.com/watch?v=Hj_rA0dhr2I" } - ], - }, - { - title: "Trees & Graphs", - difficulty: "Hard", - problems: 50, - subtopics: [ - "Binary Trees", "BST Operations", "Tree Traversals", "Graph Representations", "DFS & BFS", - "Shortest Path", "Topological Sort", "Union-Find", "Minimum Spanning Tree" - ], - resources: [ - { name: "LeetCode Tree", url: "https://leetcode.com/tag/tree/" }, - { name: "LeetCode Graph", url: "https://leetcode.com/tag/graph/" }, - { name: "WilliamFiset Graph Theory", url: "https://www.youtube.com/playlist?list=PLDV1Zeh2NRsB6SWUrDFW2RmDotAfPbeHu" } - ], - }, - { - title: "Dynamic Programming", - difficulty: "Hard", - problems: 50, - subtopics: [ - "1D DP", "2D DP", "Memoization", "Tabulation", "State Optimization", - "Knapsack Variants", "Subsequence Problems", "Game Theory DP" - ], - resources: [ - { name: "LeetCode DP", url: "https://leetcode.com/tag/dynamic-programming/" }, - { name: "DP Patterns", url: "https://leetcode.com/discuss/general-discussion/458695/dynamic-programming-patterns" }, - { name: "NeetCode DP Playlist", url: "https://www.youtube.com/playlist?list=PLot-Xpze53ldVwtstag2TL4HQhAnC8m4D" } - ], - }, - { - title: "Other Important Topics", - difficulty: "Medium", - problems: 40, - subtopics: [ - "Heaps", "Hash Tables", "Bit Manipulation", "Greedy Algorithms", "Backtracking", - "Math & Number Theory", "Sorting Algorithms", "Binary Search Variants" - ], - resources: [ - { name: "Heap Guide", url: "https://www.geeksforgeeks.org/heap-data-structure/" }, - { name: "Backtracking Patterns", url: "https://leetcode.com/tag/backtracking/" }, - { name: "Princeton Algorithms", url: "https://algs4.cs.princeton.edu/home/" } - ], - }, - ], - }, - { - category: "🏗️ System Design", - description: "Learn to design scalable, fault-tolerant systems", - totalProblems: 50, - subcategories: [ - { - title: "Core Concepts", - difficulty: "Medium", - problems: 15, - subtopics: [ - "Scalability", "Load Balancing", "Caching", "Database Sharding", "CAP Theorem", - "Consistency Models", "Fault Tolerance" - ], - resources: [ - { name: "System Design Primer", url: "https://github.com/donnemartin/system-design-primer" }, - { name: "High Scalability", url: "http://highscalability.com/" }, - { name: "ByteByteGo YouTube", url: "https://www.youtube.com/c/ByteByteGo" } - ], - }, - { - title: "Real-world Systems", - difficulty: "Hard", - problems: 20, - subtopics: [ - "URL Shortener", "Chat System", "News Feed", "Search Engine", "Video Streaming", - "Payment Gateway", "Social Media Platform" - ], - resources: [ - { name: "Grokking System Design", url: "https://educative.io/courses/grokking-the-system-design-interview" }, - { name: "System Design Interview", url: "https://bytebytego.com/" } - ], - }, - { - title: "Other Important Topics", - difficulty: "Medium", - problems: 15, - subtopics: [ - "Monitoring & Logging", "Event-driven Architecture", "Message Queues", "Content Delivery Networks", - "Security in System Design" - ], - resources: [ - { name: "Grafana Monitoring", url: "https://grafana.com/oss/grafana/" }, - { name: "Event-driven Design", url: "https://microservices.io/patterns/rel/async-messaging.html" } - ], - }, - ], - }, - { - category: "🗄️ Database Design", - description: "Learn relational & NoSQL databases for real-world applications", - totalProblems: 70, - subcategories: [ - { - title: "SQL Basics", - difficulty: "Easy", - problems: 20, - subtopics: [ - "SELECT Queries", "Joins", "Indexes", "Aggregate Functions", "Stored Procedures", - "Views", "Transactions" - ], - resources: [ - { name: "SQLBolt", url: "https://sqlbolt.com/" }, - { name: "LeetCode Database", url: "https://leetcode.com/problemset/database/" } - ], - }, - { - title: "NoSQL & Scaling", - difficulty: "Medium", - problems: 20, - subtopics: [ - "Document Stores", "Key-Value Stores", "Column Stores", "Graph Databases", - "Sharding", "Replication" - ], - resources: [ - { name: "MongoDB Basics", url: "https://www.mongodb.com/basics" }, - { name: "Cassandra Guide", url: "https://cassandra.apache.org/" } - ], - }, - { - title: "Advanced Design", - difficulty: "Hard", - problems: 15, - subtopics: [ - "Normalization", "Denormalization", "Indexing Strategies", "Partitioning", - "Data Warehousing", "Query Optimization" - ], - resources: [ - { name: "Database Normalization", url: "https://www.guru99.com/database-normalization.html" }, - { name: "AWS Data Warehousing", url: "https://aws.amazon.com/redshift/" } - ], - }, - { - title: "Other Important Topics", - difficulty: "Medium", - problems: 15, - subtopics: [ - "ACID Properties", "Database Security", "Backup & Recovery", "OLAP vs OLTP", - "Temporal Databases" - ], - resources: [ - { name: "Transactions in SQL", url: "https://www.postgresql.org/docs/current/tutorial-transactions.html" } - ], - }, - ], - }, - { - category: "🔌 API Design & Development", - description: "REST, GraphQL, and microservices for backend engineering", - totalProblems: 60, - subcategories: [ - { - title: "REST API Design", - difficulty: "Easy", - problems: 15, - subtopics: [ - "HTTP Methods", "CRUD Operations", "Error Handling", "Versioning", "Rate Limiting", - "Pagination", "CORS" - ], - resources: [ - { name: "RESTful API Tutorial", url: "https://restfulapi.net/" }, - { name: "Postman Learning Center", url: "https://learning.postman.com/" } - ], - }, - { - title: "GraphQL", - difficulty: "Medium", - problems: 15, - subtopics: [ - "Queries", "Mutations", "Subscriptions", "Schemas", "Resolvers", - "Apollo Server", "GraphQL Security" - ], - resources: [ - { name: "GraphQL Official Docs", url: "https://graphql.org/learn/" }, - { name: "Apollo GraphQL", url: "https://www.apollographql.com/docs/" } - ], - }, - { - title: "Microservices & Security", - difficulty: "Hard", - problems: 15, - subtopics: [ - "Service Discovery", "API Gateway", "Authentication", "Authorization", "JWT", - "OAuth2", "gRPC" - ], - resources: [ - { name: "Microservices Guide", url: "https://microservices.io/" }, - { name: "JWT Introduction", url: "https://jwt.io/introduction/" } - ], - }, - { - title: "Other Important Topics", - difficulty: "Medium", - problems: 15, - subtopics: [ - "API Testing", "OpenAPI/Swagger", "Async APIs", "WebSockets", "gRPC Streaming", - "API Performance Tuning" - ], - resources: [ - { name: "OpenAPI Specification", url: "https://swagger.io/specification/" }, - { name: "gRPC Basics", url: "https://grpc.io/docs/what-is-grpc/" } - ], - }, - ], - }, - ]; - return ((0, jsx_runtime_1.jsxs)(Layout_1.default, { title: "Interview Preparation - RecodeHive", description: "Comprehensive interview preparation resources for technical and behavioral interviews at top tech companies", children: [(0, jsx_runtime_1.jsxs)(Head_1.default, { children: [(0, jsx_runtime_1.jsx)("title", { children: "Interview Preparation - RecodeHive" }), (0, jsx_runtime_1.jsx)("meta", { name: "description", content: "Master technical and behavioral interviews with our comprehensive preparation resources, practice questions, and company-specific guides." })] }), (0, jsx_runtime_1.jsxs)("div", { className: "min-h-screen bg-gradient-to-b from-white to-gray-50 dark:from-gray-900 dark:to-gray-800", children: [(0, jsx_runtime_1.jsxs)(framer_motion_1.motion.section, { className: "hero-section py-20 px-4 text-center bg-gradient-to-br from-blue-600 via-purple-600 to-blue-800 text-white relative overflow-hidden", initial: "hidden", animate: "visible", variants: staggerContainer, children: [(0, jsx_runtime_1.jsx)("div", { className: "absolute inset-0 bg-black/20" }), (0, jsx_runtime_1.jsxs)("div", { className: "relative z-10 max-w-4xl mx-auto", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.h1, { className: "text-5xl md:text-6xl font-bold mb-6 bg-clip-text text-transparent bg-gradient-to-r from-white to-blue-100", variants: fadeIn, children: "Ace Your Next Interview" }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.p, { className: "text-xl md:text-2xl mb-8 text-blue-100", variants: fadeIn, children: "Master technical challenges and behavioral questions with our comprehensive interview preparation platform" }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "flex flex-col sm:flex-row gap-4 justify-center", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)("button", { onClick: function () { return setActiveTab("practice"); }, className: "bg-white text-blue-600 px-8 py-4 rounded-lg font-semibold hover:bg-blue-50 transition-all duration-300 transform hover:scale-105 shadow-lg", children: "Start Practice" }), (0, jsx_runtime_1.jsx)("button", { onClick: function () { return setActiveTab("technical"); }, className: "border-2 border-white text-white px-8 py-4 rounded-lg font-semibold hover:bg-white hover:text-blue-600 transition-all duration-300", children: "Browse Resources" })] })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "sticky top-0 z-40 bg-white dark:bg-gray-900 border-b border-gray-200 dark:border-gray-700 shadow-sm", children: (0, jsx_runtime_1.jsx)("div", { className: "max-w-6xl mx-auto px-4", children: (0, jsx_runtime_1.jsx)("nav", { className: "flex space-x-8 overflow-x-auto", children: [ - { id: "overview", label: "Overview", icon: "📋" }, - { id: "technical", label: "Technical", icon: "💻" }, - { id: "behavioral", label: "Behavioral", icon: "🤝" }, - { id: "companies", label: "Companies", icon: "🏢" }, - { id: "practice", label: "Practice", icon: "🎯" }, - ].map(function (tab) { return ((0, jsx_runtime_1.jsxs)("button", { onClick: function () { return setActiveTab(tab.id); }, className: "flex items-center space-x-2 py-4 px-2 border-b-2 font-medium text-sm transition-colors ".concat(activeTab === tab.id - ? "interview-prep-nav-tab-active border-blue-500 text-blue-600 dark:text-blue-400" - : "interview-prep-nav-tab-inactive border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300"), children: [(0, jsx_runtime_1.jsx)("span", { children: tab.icon }), (0, jsx_runtime_1.jsx)("span", { children: tab.label })] }, tab.id)); }) }) }) }), (0, jsx_runtime_1.jsxs)("div", { className: "interview-prep-page max-w-6xl mx-auto px-4 py-12", children: [activeTab === "overview" && ((0, jsx_runtime_1.jsx)(OverviewTab_1.default, { toggleTips: toggleTips, toggleQuestions: toggleQuestions, showTips: showTips, showQuestions: showQuestions, setActiveTab: setActiveTab })), activeTab === "technical" && ((0, jsx_runtime_1.jsx)(TechnicalTab_1.default, { technicalResources: technicalResources, practicePlatforms: practicePlatforms, expandedCategories: expandedCategories, toggleCategory: toggleCategory })), activeTab === "behavioral" && ((0, jsx_runtime_1.jsx)(BehavioralTab_1.default, { behavioralQuestions: behavioralQuestions, expandedCategories: expandedCategories, toggleCategory: toggleCategory })), activeTab === "companies" && ((0, jsx_runtime_1.jsx)(CompaniesTab_1.default, { companyTips: companyTips, toggleTips: toggleTips, toggleQuestions: toggleQuestions, showTips: showTips, showQuestions: showQuestions })), activeTab === "practice" && ((0, jsx_runtime_1.jsx)(PracticeTab_1.default, { mockInterviewQuestions: mockInterviewQuestions }))] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.section, { className: "cta-section py-20 px-4 bg-gradient-to-br from-blue-600 via-purple-600 to-blue-800 text-white text-center", initial: "hidden", whileInView: "visible", viewport: { once: true }, variants: staggerContainer, children: (0, jsx_runtime_1.jsxs)("div", { className: "max-w-4xl mx-auto", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.h2, { className: "text-4xl md:text-5xl font-bold mb-6", variants: fadeIn, children: "Ready to Land Your Dream Job?" }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.p, { className: "text-xl mb-8 text-blue-100", variants: fadeIn, children: "Join thousands of developers who have successfully prepared for interviews with RecodeHive" }), (0, jsx_runtime_1.jsxs)(framer_motion_1.motion.div, { className: "flex flex-col sm:flex-row gap-4 justify-center", variants: fadeIn, children: [(0, jsx_runtime_1.jsx)(Link_1.default, { to: "/get-started", className: "bg-white text-blue-600 px-8 py-4 rounded-lg font-semibold hover:bg-blue-50 transition-all duration-300 transform hover:scale-105 shadow-lg", children: "Start Preparing Now" }), (0, jsx_runtime_1.jsx)(Link_1.default, { to: "/community", className: "border-2 border-white text-white px-8 py-4 rounded-lg font-semibold hover:bg-white hover:text-blue-600 transition-all duration-300", children: "Join Community" })] })] }) })] })] })); -}; -exports.default = InterviewPrepPage; diff --git a/src/pages/our-sponsors/SponsorCard/index.js b/src/pages/our-sponsors/SponsorCard/index.js deleted file mode 100644 index 55128b53..00000000 --- a/src/pages/our-sponsors/SponsorCard/index.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importDefault(require("react")); -var fa_1 = require("react-icons/fa"); -var fa6_1 = require("react-icons/fa6"); -var SponsorCard = function (_a) { - var name = _a.name, image = _a.image, description = _a.description, github = _a.github, linkedin = _a.linkedin, twitter = _a.twitter, instagram = _a.instagram; - return ((0, jsx_runtime_1.jsxs)("div", { className: "sponsor-card", children: [(0, jsx_runtime_1.jsx)("div", { className: "avatar-wrapper", children: (0, jsx_runtime_1.jsx)("img", { src: image, alt: name }) }), (0, jsx_runtime_1.jsx)("h3", { className: "sponsor-name", children: name }), (0, jsx_runtime_1.jsx)("p", { className: "sponsor-desc", children: description }), (0, jsx_runtime_1.jsxs)("div", { className: "social-links", children: [github && (0, jsx_runtime_1.jsx)("a", { href: github, target: "_blank", rel: "noopener noreferrer", className: "github", children: (0, jsx_runtime_1.jsx)(fa_1.FaGithub, {}) }), linkedin && (0, jsx_runtime_1.jsx)("a", { href: linkedin, target: "_blank", rel: "noopener noreferrer", className: "linkedin", children: (0, jsx_runtime_1.jsx)(fa_1.FaLinkedin, {}) }), twitter && (0, jsx_runtime_1.jsx)("a", { href: twitter, target: "_blank", rel: "noopener noreferrer", className: "twitter", children: (0, jsx_runtime_1.jsx)(fa6_1.FaXTwitter, {}) }), instagram && (0, jsx_runtime_1.jsx)("a", { href: instagram, target: "_blank", rel: "noopener noreferrer", className: "instagram", children: (0, jsx_runtime_1.jsx)(fa_1.FaInstagram, {}) })] })] })); -}; -exports.default = SponsorCard; diff --git a/src/pages/our-sponsors/index.js b/src/pages/our-sponsors/index.js deleted file mode 100644 index 969b9b72..00000000 --- a/src/pages/our-sponsors/index.js +++ /dev/null @@ -1,99 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importStar(require("react")); -var SponsorCard_1 = __importDefault(require("./SponsorCard")); -require("./Sponsors.css"); -var Layout_1 = __importDefault(require("@theme/Layout")); -var fa_1 = require("react-icons/fa"); -var Head_1 = __importDefault(require("@docusaurus/Head")); -var sponsors_1 = __importDefault(require("@site/src/database/sponsors")); -var router_1 = require("@docusaurus/router"); -var OurSponsors = function () { - var _a = (0, react_1.useState)(false), showScanner = _a[0], setShowScanner = _a[1]; - var _b = (0, react_1.useState)('current'), activeTab = _b[0], setActiveTab = _b[1]; - var modalRef = (0, react_1.useRef)(null); - var history = (0, router_1.useHistory)(); - // Filter for current sponsors (exclude isWeSponsor) - var currentSponsors = sponsors_1.default.filter(function (s) { return !s.isPastSponsor && !s.isWeSponsor; }); - var pastSponsors = sponsors_1.default.filter(function (s) { return s.isPastSponsor; }); - // Filter for people we sponsor - var weSponsorPeople = sponsors_1.default.filter(function (s) { return s.isWeSponsor; }); - var handleJoinSponsor = function () { return setShowScanner(true); }; - var handlePaymentSuccess = function () { - setShowScanner(false); - alert("Thanks, we will redirect to Github Sponsors page, upon sponsoring you will be added to our sponsors list."); - window.location.href = 'https://github.com/sponsors/sanjay-kv?o=esb'; - }; - var handleCloseModal = function () { return setShowScanner(false); }; - var handleTabChange = function (tab) { - setActiveTab(tab); - }; - (0, react_1.useEffect)(function () { - if (!showScanner) - return; - var controller = new AbortController(); - var signal = controller.signal; - var handleKeyDown = function (e) { - if (e.key === 'Escape') - handleCloseModal(); - }; - var handleClickOutside = function (e) { - if (modalRef.current && !modalRef.current.contains(e.target)) { - handleCloseModal(); - } - }; - document.addEventListener('keydown', handleKeyDown, { signal: signal }); - document.addEventListener('mousedown', handleClickOutside, { signal: signal }); - return function () { return controller.abort(); }; - }, [showScanner]); - return ((0, jsx_runtime_1.jsxs)(Layout_1.default, { children: [(0, jsx_runtime_1.jsx)(Head_1.default, { children: (0, jsx_runtime_1.jsx)("script", { async: true, "custom-element": "amp-auto-ads", src: "https://cdn.ampproject.org/v0/amp-auto-ads-0.1.js" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "sponsor-page", children: [(0, jsx_runtime_1.jsxs)("div", { className: "sponsor-header", children: [(0, jsx_runtime_1.jsx)("h1", { className: "TitleText", children: "Our Valued Sponsors" }), (0, jsx_runtime_1.jsxs)("p", { children: ["Join us in empowering the open-source community through your generous support. Your sponsorship directly fuels innovation by enabling developers to create valuable resources and maintain our growing knowledge base.", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {}), "We deeply appreciate your commitment to advancing open-source technology and education."] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "sponsors-section", children: [(0, jsx_runtime_1.jsxs)("div", { className: "tabs", children: [(0, jsx_runtime_1.jsxs)("button", { className: "tab-button ".concat(activeTab === 'current' ? 'active' : ''), onClick: function () { return handleTabChange('current'); }, children: ["Current Sponsors", (0, jsx_runtime_1.jsx)("span", { className: "tab-badge", children: currentSponsors.length })] }), (0, jsx_runtime_1.jsxs)("button", { className: "tab-button ".concat(activeTab === 'past' ? 'active' : ''), onClick: function () { return handleTabChange('past'); }, children: ["People We Sponsored", weSponsorPeople.length > 0 && ((0, jsx_runtime_1.jsx)("span", { className: "tab-badge", children: weSponsorPeople.length }))] })] }), (0, jsx_runtime_1.jsx)("div", { className: "tab-content ".concat(activeTab === 'current' ? 'active' : ''), children: (0, jsx_runtime_1.jsxs)("div", { className: "sponsors-section", children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-semibold text-gray-800 mb-4 mt-2", children: "Current Sponsors" }), (0, jsx_runtime_1.jsxs)("div", { className: "sponsors-list", children: [currentSponsors.length > 0 ? (currentSponsors.map(function (sponsor) { return ((0, jsx_runtime_1.jsx)(SponsorCard_1.default, __assign({}, sponsor), "".concat(sponsor.name, "-current"))); })) : ((0, jsx_runtime_1.jsx)("div", { className: "no-sponsors", children: (0, jsx_runtime_1.jsx)("p", { children: "We're actively seeking visionary sponsors to partner with us in supporting the open-source community." }) })), (0, jsx_runtime_1.jsx)("div", { className: "sponsor-card empty-card group", onClick: handleJoinSponsor, role: "button", tabIndex: 0, children: (0, jsx_runtime_1.jsxs)("div", { className: "text-center p-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-16 h-16 bg-indigo-50 rounded-full flex items-center justify-center mx-auto mb-4 group-hover:bg-indigo-100 transition-colors duration-200", children: (0, jsx_runtime_1.jsx)(fa_1.FaPlusCircle, { className: "text-3xl text-indigo-500 group-hover:text-indigo-600 transition-colors duration-200" }) }), (0, jsx_runtime_1.jsx)("h3", { className: "text-lg font-semibold text-indigo-700 mb-1 group-hover:text-indigo-800 transition-colors duration-200", children: "Partner With Us" }), (0, jsx_runtime_1.jsx)("p", { className: "text-sm text-gray-500 group-hover:text-gray-600 transition-colors duration-200", children: "Support innovation in open-source development" }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-3 inline-flex items-center text-sm font-medium text-indigo-600 group-hover:text-indigo-700 transition-colors duration-200", children: ["Join us", (0, jsx_runtime_1.jsx)("svg", { className: "ml-1 w-4 h-4 group-hover:translate-x-1 transition-transform duration-200", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M14 5l7 7m0 0l-7 7m7-7H3" }) })] })] }) })] }), pastSponsors.length > 0 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-semibold text-gray-800 mb-4 mt-12", children: "Past Sponsors" }), (0, jsx_runtime_1.jsx)("div", { className: "sponsors-list", children: pastSponsors.map(function (sponsor) { return ((0, jsx_runtime_1.jsx)(SponsorCard_1.default, __assign({}, sponsor), "".concat(sponsor.name, "-past-in-current"))); }) })] }))] }) }), (0, jsx_runtime_1.jsx)("div", { className: "tab-content ".concat(activeTab === 'past' ? 'active' : ''), children: weSponsorPeople.length > 0 ? ((0, jsx_runtime_1.jsx)("div", { className: "sponsors-list", children: weSponsorPeople.map(function (sponsor) { return ((0, jsx_runtime_1.jsx)(SponsorCard_1.default, __assign({}, sponsor), "".concat(sponsor.name, "-wesponsor"))); }) })) : ((0, jsx_runtime_1.jsx)("div", { className: "no-sponsors", children: (0, jsx_runtime_1.jsx)("p", { children: "We look forward to recognizing our future sponsors here." }) })) })] }), showScanner && ((0, jsx_runtime_1.jsx)("div", { className: "scanner-popup", role: "dialog", "aria-modal": "true", children: (0, jsx_runtime_1.jsxs)("div", { className: "scanner-content", ref: modalRef, children: [(0, jsx_runtime_1.jsx)("button", { className: "close-button", "aria-label": "Close", onClick: handleCloseModal, children: (0, jsx_runtime_1.jsx)(fa_1.FaTimes, { size: 20 }) }), (0, jsx_runtime_1.jsx)("h2", { className: "TitleText", children: "Become a Valued Partner" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 mb-6", children: "Join our mission to advance open-source innovation and education through your sponsorship" }), (0, jsx_runtime_1.jsx)("div", { className: "relative inline-flex", children: (0, jsx_runtime_1.jsxs)("button", { className: "scanner-button group", onClick: handlePaymentSuccess, children: [(0, jsx_runtime_1.jsx)("span", { className: "absolute left-4 opacity-0 group-hover:opacity-100 group-hover:left-6 transition-all duration-300", children: (0, jsx_runtime_1.jsx)("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", d: "M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.1-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.919.678 1.852 0 1.336-.012 2.415-.012 2.743 0 .267.18.58.688.48A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z", clipRule: "evenodd" }) }) }), (0, jsx_runtime_1.jsx)("span", { className: "relative transition-all duration-300 group-hover:translate-x-2", children: "Sponsor on GitHub" }), (0, jsx_runtime_1.jsx)("span", { className: "absolute right-4 opacity-0 group-hover:opacity-100 group-hover:right-6 transition-all duration-300", children: (0, jsx_runtime_1.jsx)("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M14 5l7 7m0 0l-7 7m7-7H3" }) }) })] }) })] }) })), (0, jsx_runtime_1.jsx)("div", { className: "support-links mt-6", children: (0, jsx_runtime_1.jsx)("iframe", { src: "https://github.com/sponsors/sanjay-kv/button", title: "Sponsor Sanjay Viswanathan on GitHub", height: "32", width: "114", style: { border: 0, borderRadius: "6px" } }) })] })] })); -}; -exports.default = OurSponsors; diff --git a/src/pages/podcasts/details.js b/src/pages/podcasts/details.js deleted file mode 100644 index eee4fa96..00000000 --- a/src/pages/podcasts/details.js +++ /dev/null @@ -1,160 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = PodcastDetails; -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importDefault(require("react")); -var Layout_1 = __importDefault(require("@theme/Layout")); -var router_1 = require("@docusaurus/router"); -require("./details.css"); -// Enhanced Spotify Title Component -var SpotifyTitle = function (_a) { - var spotifyUrl = _a.spotifyUrl, type = _a.type; - var _b = react_1.default.useState(''), title = _b[0], setTitle = _b[1]; - var _c = react_1.default.useState(''), artist = _c[0], setArtist = _c[1]; - var _d = react_1.default.useState(true), loading = _d[0], setLoading = _d[1]; - react_1.default.useEffect(function () { - var cancelled = false; - setLoading(true); - fetch("https://open.spotify.com/oembed?url=".concat(encodeURIComponent(spotifyUrl))) - .then(function (res) { return res.json(); }) - .then(function (data) { - if (!cancelled) { - setTitle(data.title); - // Extract artist/show info if available - if (data.author_name) { - setArtist(data.author_name); - } - setLoading(false); - } - }) - .catch(function () { - if (!cancelled) { - setTitle(''); - setLoading(false); - } - }); - return function () { cancelled = true; }; - }, [spotifyUrl]); - if (loading) { - return ((0, jsx_runtime_1.jsxs)("div", { className: "title-loading", children: [(0, jsx_runtime_1.jsx)("div", { className: "loading-shimmer large" }), (0, jsx_runtime_1.jsx)("div", { className: "loading-shimmer medium" }), (0, jsx_runtime_1.jsx)("div", { className: "loading-shimmer small" })] })); - } - return ((0, jsx_runtime_1.jsxs)("div", { className: "enhanced-podcast-title", children: [(0, jsx_runtime_1.jsxs)("div", { className: "title-badge", children: [(0, jsx_runtime_1.jsx)("span", { className: "badge-icon", children: type === 'episode' ? '🎙️' : type === 'show' ? '📻' : '🎵' }), (0, jsx_runtime_1.jsx)("span", { className: "badge-text", children: type.charAt(0).toUpperCase() + type.slice(1) })] }), (0, jsx_runtime_1.jsx)("h1", { className: "main-title", children: title || "Featured ".concat(type.charAt(0).toUpperCase() + type.slice(1)) }), artist && ((0, jsx_runtime_1.jsxs)("div", { className: "artist-info", children: [(0, jsx_runtime_1.jsx)("span", { className: "by-text", children: "by" }), (0, jsx_runtime_1.jsx)("span", { className: "artist-name", children: artist })] }))] })); -}; -function PodcastDetails() { - var _this = this; - var _a; - var location = (0, router_1.useLocation)(); - var history = (0, router_1.useHistory)(); - var state = location.state; - var podcast = state === null || state === void 0 ? void 0 : state.podcast; - // Enhanced descriptions with categories - var descriptions = { - episode: [ - "Dive deep into fascinating conversations and thought-provoking content that challenges conventional thinking.", - "Experience expert insights and engaging narratives that expand your understanding of the world.", - "Join compelling discussions that bridge the gap between knowledge and practical wisdom.", - "Explore unique perspectives from industry leaders and innovative thinkers.", - "Uncover hidden stories and behind-the-scenes insights that mainstream media rarely covers." - ], - show: [ - "Discover a treasure trove of episodes covering diverse topics and groundbreaking ideas.", - "Follow an incredible journey of storytelling that spans multiple fascinating episodes.", - "Experience consistent quality content that keeps you coming back for more insights.", - "Join a community of listeners who appreciate depth, authenticity, and expert curation.", - "Explore a comprehensive collection of discussions that shape modern discourse." - ], - playlist: [ - "Enjoy a carefully curated selection of audio content designed for your listening pleasure.", - "Experience the perfect blend of entertainment and education in one convenient collection.", - "Discover diverse voices and perspectives assembled into a cohesive listening experience.", - "Tune into a handpicked selection that showcases the best of podcast storytelling.", - "Explore a thoughtfully arranged collection that takes you on an audio journey." - ] - }; - // Additional podcast features - var features = [ - { icon: "🎯", label: "Expert Insights", description: "Learn from industry professionals" }, - { icon: "🌟", label: "Premium Quality", description: "High-quality audio production" }, - { icon: "📈", label: "Trending Content", description: "Stay ahead with latest topics" }, - { icon: "🎧", label: "Immersive Experience", description: "Engaging storytelling format" } - ]; - var getRandomDescription = function (type) { - var typeDescriptions = descriptions[type]; - return typeDescriptions[Math.floor(Math.random() * typeDescriptions.length)]; - }; - var handleBack = function () { - history.goBack(); - }; - var handleShare = function () { return __awaiter(_this, void 0, void 0, function () { - var err_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!navigator.share) return [3 /*break*/, 5]; - _a.label = 1; - case 1: - _a.trys.push([1, 3, , 4]); - return [4 /*yield*/, navigator.share({ - title: "Check out this ".concat(podcast.type), - url: podcast.spotifyUrl - })]; - case 2: - _a.sent(); - return [3 /*break*/, 4]; - case 3: - err_1 = _a.sent(); - // Fallback to clipboard - navigator.clipboard.writeText(podcast.spotifyUrl); - return [3 /*break*/, 4]; - case 4: return [3 /*break*/, 6]; - case 5: - navigator.clipboard.writeText(podcast.spotifyUrl); - _a.label = 6; - case 6: return [2 /*return*/]; - } - }); - }); }; - if (!podcast) { - return ((0, jsx_runtime_1.jsx)(Layout_1.default, { children: (0, jsx_runtime_1.jsx)("div", { className: "enhanced-details-container", children: (0, jsx_runtime_1.jsxs)("div", { className: "error-state", children: [(0, jsx_runtime_1.jsx)("div", { className: "error-icon", children: "\uD83D\uDD0D" }), (0, jsx_runtime_1.jsx)("h1", { className: "error-title", children: "Podcast Not Found" }), (0, jsx_runtime_1.jsx)("p", { className: "error-description", children: "Sorry, we couldn't find the podcast you're looking for." }), (0, jsx_runtime_1.jsxs)("button", { className: "back-to-podcasts", onClick: function () { return history.push('/podcasts'); }, children: [(0, jsx_runtime_1.jsx)("span", { className: "button-icon", children: "\u2190" }), "Back to Podcasts"] })] }) }) })); - } - return ((0, jsx_runtime_1.jsx)(Layout_1.default, { children: (0, jsx_runtime_1.jsxs)("div", { className: "enhanced-details-container", children: [(0, jsx_runtime_1.jsxs)("div", { className: "details-navigation", children: [(0, jsx_runtime_1.jsxs)("button", { className: "nav-back-button", onClick: handleBack, children: [(0, jsx_runtime_1.jsx)("span", { className: "nav-icon", children: "\u2190" }), (0, jsx_runtime_1.jsx)("span", { className: "nav-text", children: "Back to Podcasts" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "nav-actions", children: [(0, jsx_runtime_1.jsx)("button", { className: "nav-action-button", onClick: handleShare, title: "Share", children: (0, jsx_runtime_1.jsx)("span", { className: "action-icon", children: "\uD83D\uDD17" }) }), (0, jsx_runtime_1.jsx)("button", { className: "nav-action-button", title: "Add to favorites", children: (0, jsx_runtime_1.jsx)("span", { className: "action-icon", children: "\u2764\uFE0F" }) })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "details-content", children: [(0, jsx_runtime_1.jsx)("div", { className: "details-hero", children: (0, jsx_runtime_1.jsxs)("div", { className: "hero-content", children: [(0, jsx_runtime_1.jsx)(SpotifyTitle, { spotifyUrl: podcast.spotifyUrl, type: podcast.type }), (0, jsx_runtime_1.jsx)("p", { className: "hero-description", children: getRandomDescription(podcast.type) }), (0, jsx_runtime_1.jsxs)("div", { className: "quick-stats", children: [(0, jsx_runtime_1.jsxs)("div", { className: "stat-pill", children: [(0, jsx_runtime_1.jsx)("span", { className: "stat-icon", children: "\u23F1\uFE0F" }), (0, jsx_runtime_1.jsx)("span", { className: "stat-text", children: "Premium Content" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "stat-pill", children: [(0, jsx_runtime_1.jsx)("span", { className: "stat-icon", children: "\uD83C\uDFAF" }), (0, jsx_runtime_1.jsx)("span", { className: "stat-text", children: "Expert Curated" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "stat-pill", children: [(0, jsx_runtime_1.jsx)("span", { className: "stat-icon", children: "\uD83D\uDD25" }), (0, jsx_runtime_1.jsx)("span", { className: "stat-text", children: "Trending" })] })] })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "enhanced-embed-section", children: (0, jsx_runtime_1.jsxs)("div", { className: "embed-container", children: [(0, jsx_runtime_1.jsxs)("div", { className: "embed-header", children: [(0, jsx_runtime_1.jsxs)("h2", { className: "embed-title", children: [(0, jsx_runtime_1.jsx)("span", { className: "title-icon", children: "\uD83C\uDFA7" }), "Listen Now"] }), (0, jsx_runtime_1.jsx)("div", { className: "embed-controls", children: (0, jsx_runtime_1.jsx)("button", { className: "control-button", title: "Full screen", children: (0, jsx_runtime_1.jsx)("span", { className: "control-icon", children: "\u26F6" }) }) })] }), (0, jsx_runtime_1.jsx)("div", { className: "spotify-embed-wrapper", children: (0, jsx_runtime_1.jsx)("iframe", { src: "https://open.spotify.com/embed/".concat(podcast.type, "/").concat((_a = podcast.spotifyUrl.split('/').pop()) === null || _a === void 0 ? void 0 : _a.split('?')[0]), width: "100%", height: "400", frameBorder: "0", allowFullScreen: true, allow: "autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture", loading: "lazy", title: "Spotify embed ".concat(podcast.id) }) }), (0, jsx_runtime_1.jsxs)("div", { className: "embed-footer", children: [(0, jsx_runtime_1.jsx)("div", { className: "platform-info", children: (0, jsx_runtime_1.jsxs)("span", { className: "platform-badge", children: [(0, jsx_runtime_1.jsx)("span", { className: "spotify-icon", children: "\uD83C\uDFB5" }), "Powered by Spotify"] }) }), (0, jsx_runtime_1.jsxs)("div", { className: "embed-actions", children: [(0, jsx_runtime_1.jsxs)("button", { className: "embed-action", onClick: handleShare, children: [(0, jsx_runtime_1.jsx)("span", { className: "action-icon", children: "\uD83D\uDCE4" }), "Share"] }), (0, jsx_runtime_1.jsxs)("a", { href: podcast.spotifyUrl, target: "_blank", rel: "noopener noreferrer", className: "embed-action external", children: [(0, jsx_runtime_1.jsx)("span", { className: "action-icon", children: "\uD83D\uDD17" }), "Open in Spotify"] })] })] })] }) }), (0, jsx_runtime_1.jsxs)("div", { className: "features-section", children: [(0, jsx_runtime_1.jsxs)("h2", { className: "section-title", children: [(0, jsx_runtime_1.jsx)("span", { className: "title-icon", children: "\u2728" }), "Why You'll Love This Content"] }), (0, jsx_runtime_1.jsx)("div", { className: "features-grid", children: features.map(function (feature, index) { return ((0, jsx_runtime_1.jsxs)("div", { className: "feature-card", style: { animationDelay: "".concat(index * 0.1, "s") }, children: [(0, jsx_runtime_1.jsx)("div", { className: "feature-icon", children: feature.icon }), (0, jsx_runtime_1.jsxs)("div", { className: "feature-content", children: [(0, jsx_runtime_1.jsx)("h3", { className: "feature-title", children: feature.label }), (0, jsx_runtime_1.jsx)("p", { className: "feature-description", children: feature.description })] })] }, index)); }) })] }), (0, jsx_runtime_1.jsxs)("div", { className: "suggestions-section", children: [(0, jsx_runtime_1.jsxs)("h2", { className: "section-title", children: [(0, jsx_runtime_1.jsx)("span", { className: "title-icon", children: "\uD83D\uDE80" }), "Explore More Content"] }), (0, jsx_runtime_1.jsxs)("div", { className: "suggestions-content", children: [(0, jsx_runtime_1.jsxs)("div", { className: "suggestion-card primary", children: [(0, jsx_runtime_1.jsx)("div", { className: "suggestion-icon", children: "\uD83D\uDCFB" }), (0, jsx_runtime_1.jsxs)("div", { className: "suggestion-text", children: [(0, jsx_runtime_1.jsx)("h3", { children: "Discover More Shows" }), (0, jsx_runtime_1.jsx)("p", { children: "Explore our curated collection of premium podcasts" })] }), (0, jsx_runtime_1.jsx)("button", { className: "suggestion-button", onClick: function () { return history.push('/podcasts'); }, children: "Browse All \u2192" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "suggestion-card secondary", children: [(0, jsx_runtime_1.jsx)("div", { className: "suggestion-icon", children: "\uD83C\uDFAF" }), (0, jsx_runtime_1.jsxs)("div", { className: "suggestion-text", children: [(0, jsx_runtime_1.jsx)("h3", { children: "Similar Content" }), (0, jsx_runtime_1.jsx)("p", { children: "Find podcasts matching your interests" })] }), (0, jsx_runtime_1.jsx)("button", { className: "suggestion-button", onClick: function () { return history.push('/podcasts'); }, children: "Discover \u2192" })] })] })] })] })] }) })); -} diff --git a/src/pages/podcasts/index.js b/src/pages/podcasts/index.js deleted file mode 100644 index 4d130da8..00000000 --- a/src/pages/podcasts/index.js +++ /dev/null @@ -1,203 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = Podcasts; -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importStar(require("react")); -var Layout_1 = __importDefault(require("@theme/Layout")); -var router_1 = require("@docusaurus/router"); -require("./index.css"); -// Function to extract Spotify ID from URL -var getSpotifyEmbedId = function (url) { - var match = url.match(/(?:spotify\.com|open\.spotify\.com)\/(episode|show|playlist)\/([a-zA-Z0-9]+)/); - return match ? match[2] : url; -}; -// Function to determine content type from URL -var getSpotifyContentType = function (url) { - var match = url.match(/(?:spotify\.com|open\.spotify\.com)\/(episode|show|playlist)/); - return (match === null || match === void 0 ? void 0 : match[1]) || 'show'; -}; -// Add your podcasts here -var podcastUrls = [ - "https://open.spotify.com/show/6oPJ7ZBlN7y34yiSMguIda?si=729edf3b64a246d7", - "https://open.spotify.com/episode/1zbmUPmGRjC8o8YIMMx2Z6?si=Q4QAS3IJQVGaQYhYApckdA", - "https://open.spotify.com/episode/2twnTb39n5GH9DEhXzSIvi?si=e2d6e85ee7fe4095", - "https://open.spotify.com/episode/3SyDohHTdX2wwaTLNmPTlY?si=5d70f6f7912049a1", - "https://open.spotify.com/episode/20oNPNibv9YFK89wgYfAdK?si=36DZqf4gREC50jrDYOcGGg", - "https://open.spotify.com/episode/5MY5KieAmUWzyKVBK9eFYi?si=caa85cca96c74233", - "https://open.spotify.com/episode/3KSOxrjalScxHFQF9u8M46?si=KNpkP8b3TAy5MShtoISunw", - "https://open.spotify.com/episode/04G9l6lJCBuQ1OdqsjeZz1?si=YEC9zSFiTiSJlbiMjsJMjg", - "https://open.spotify.com/episode/2y9SeEILUFWI6rzl8okASZ?si=52faf8736f914f79", - "https://open.spotify.com/episode/21yp6PDe1XN8B1goR5qMI3?si=k6JURkMRTQq2Ltbujq9qLw", -]; -var podcastData = podcastUrls.map(function (url, index) { return ({ - id: String(index + 1), - spotifyUrl: url, - type: getSpotifyContentType(url) -}); }); -// Fetches the podcast/show/episode title from Spotify oEmbed API -var SpotifyTitle = function (_a) { - var spotifyUrl = _a.spotifyUrl, type = _a.type; - var _b = react_1.default.useState(''), title = _b[0], setTitle = _b[1]; - var _c = react_1.default.useState(true), loading = _c[0], setLoading = _c[1]; - react_1.default.useEffect(function () { - var cancelled = false; - setLoading(true); - fetch("https://open.spotify.com/oembed?url=".concat(encodeURIComponent(spotifyUrl))) - .then(function (res) { return res.json(); }) - .then(function (data) { - if (!cancelled) { - setTitle(data.title); - setLoading(false); - } - }) - .catch(function () { - if (!cancelled) { - setTitle(''); - setLoading(false); - } - }); - return function () { cancelled = true; }; - }, [spotifyUrl]); - return ((0, jsx_runtime_1.jsx)("div", { className: "podcast-title", children: loading ? ((0, jsx_runtime_1.jsxs)("div", { className: "title-skeleton", children: [(0, jsx_runtime_1.jsx)("div", { className: "skeleton-line" }), (0, jsx_runtime_1.jsx)("div", { className: "skeleton-line short" })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "podcast-type-badge", children: [(0, jsx_runtime_1.jsx)("span", { className: "type-icon", children: type === 'episode' ? '🎙️' : type === 'show' ? '📻' : '🎵' }), type.charAt(0).toUpperCase() + type.slice(1)] }), (0, jsx_runtime_1.jsx)("h3", { className: "podcast-title-text", children: title || "".concat(type.charAt(0).toUpperCase() + type.slice(1), " #").concat(Math.floor(Math.random() * 100) + 1) })] })) })); -}; -function Podcasts() { - var _this = this; - var history = (0, router_1.useHistory)(); - var _a = (0, react_1.useState)(1), currentPage = _a[0], setCurrentPage = _a[1]; - var _b = (0, react_1.useState)(''), searchTerm = _b[0], setSearchTerm = _b[1]; - var _c = (0, react_1.useState)('all'), selectedFilter = _c[0], setSelectedFilter = _c[1]; - var podcastsPerPage = 9; - // Filter podcasts based on search and filter - var filteredPodcasts = podcastData.filter(function (podcast) { - var matchesFilter = selectedFilter === 'all' || podcast.type === selectedFilter; - return matchesFilter; - }); - // Calculate podcasts for current page - var indexOfLastPodcast = currentPage * podcastsPerPage; - var indexOfFirstPodcast = indexOfLastPodcast - podcastsPerPage; - var currentPodcasts = filteredPodcasts.slice(indexOfFirstPodcast, indexOfLastPodcast); - var totalPages = Math.ceil(filteredPodcasts.length / podcastsPerPage); - var handlePageChange = function (pageNumber) { - setCurrentPage(pageNumber); - window.scrollTo({ top: 0, behavior: 'smooth' }); - }; - var handleShare = function (podcast) { return __awaiter(_this, void 0, void 0, function () { - var err_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!navigator.share) return [3 /*break*/, 5]; - _a.label = 1; - case 1: - _a.trys.push([1, 3, , 4]); - return [4 /*yield*/, navigator.share({ - title: "Check out this ".concat(podcast.type), - url: podcast.spotifyUrl, - })]; - case 2: - _a.sent(); - return [3 /*break*/, 4]; - case 3: - err_1 = _a.sent(); - // Fallback to clipboard - navigator.clipboard.writeText(podcast.spotifyUrl); - return [3 /*break*/, 4]; - case 4: return [3 /*break*/, 6]; - case 5: - navigator.clipboard.writeText(podcast.spotifyUrl); - _a.label = 6; - case 6: return [2 /*return*/]; - } - }); - }); }; - var handlePodcastClick = function (podcast, event) { - var target = event.target; - if (target.tagName === 'IFRAME' || target.closest('.podcast-embed')) { - return; - } - history.push('/podcasts/details', { podcast: podcast }); - }; - react_1.default.useEffect(function () { - setCurrentPage(1); - }, [searchTerm, selectedFilter]); - return ((0, jsx_runtime_1.jsx)(Layout_1.default, { children: (0, jsx_runtime_1.jsxs)("div", { className: "enhanced-podcast-container", children: [(0, jsx_runtime_1.jsx)("div", { className: "podcast-hero", children: (0, jsx_runtime_1.jsxs)("div", { className: "podcast-hero-content", children: [(0, jsx_runtime_1.jsxs)("div", { className: "hero-badge", children: [(0, jsx_runtime_1.jsx)("span", { className: "badge-icon", children: "\uD83C\uDF99\uFE0F" }), (0, jsx_runtime_1.jsx)("span", { className: "badge-text", children: "Premium Audio Content" })] }), (0, jsx_runtime_1.jsx)("h1", { className: "podcast-hero-title", children: "Discover Top Podcasts" }), (0, jsx_runtime_1.jsx)("p", { className: "podcast-hero-description", children: "Stream the best podcasts from your favorite stations. Dive into episodes that inspire, educate, and entertain from leading voices in tech, business, and beyond." }), (0, jsx_runtime_1.jsxs)("div", { className: "podcast-stats", children: [(0, jsx_runtime_1.jsxs)("div", { className: "stat-item", children: [(0, jsx_runtime_1.jsxs)("div", { className: "stat-number", children: [podcastData.length, "+"] }), (0, jsx_runtime_1.jsx)("div", { className: "stat-label", children: "Episodes" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "stat-item", children: [(0, jsx_runtime_1.jsx)("div", { className: "stat-number", children: "20+" }), (0, jsx_runtime_1.jsx)("div", { className: "stat-label", children: "Hours" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "stat-item", children: [(0, jsx_runtime_1.jsx)("div", { className: "stat-number", children: "5+" }), (0, jsx_runtime_1.jsx)("div", { className: "stat-label", children: "Shows" })] })] })] }) }), (0, jsx_runtime_1.jsxs)("div", { className: "podcast-filters", children: [(0, jsx_runtime_1.jsxs)("div", { className: "filter-search", children: [(0, jsx_runtime_1.jsx)("div", { className: "search-icon" }), (0, jsx_runtime_1.jsx)("input", { type: "text", placeholder: "Search podcasts...", value: searchTerm, onChange: function (e) { return setSearchTerm(e.target.value); }, className: "search-input" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "filter-tabs", children: [(0, jsx_runtime_1.jsxs)("button", { className: "filter-tab ".concat(selectedFilter === 'all' ? 'active' : ''), onClick: function () { return setSelectedFilter('all'); }, children: [(0, jsx_runtime_1.jsx)("span", { className: "tab-icon", children: "\uD83D\uDCCA" }), "All (", podcastData.length, ")"] }), (0, jsx_runtime_1.jsxs)("button", { className: "filter-tab ".concat(selectedFilter === 'episode' ? 'active' : ''), onClick: function () { return setSelectedFilter('episode'); }, children: [(0, jsx_runtime_1.jsx)("span", { className: "tab-icon", children: "\uD83C\uDF99\uFE0F" }), "Episodes (", podcastData.filter(function (p) { return p.type === 'episode'; }).length, ")"] }), (0, jsx_runtime_1.jsxs)("button", { className: "filter-tab ".concat(selectedFilter === 'show' ? 'active' : ''), onClick: function () { return setSelectedFilter('show'); }, children: [(0, jsx_runtime_1.jsx)("span", { className: "tab-icon", children: "\uD83D\uDCFB" }), "Shows (", podcastData.filter(function (p) { return p.type === 'show'; }).length, ")"] }), (0, jsx_runtime_1.jsxs)("button", { className: "filter-tab ".concat(selectedFilter === 'playlist' ? 'active' : ''), onClick: function () { return setSelectedFilter('playlist'); }, children: [(0, jsx_runtime_1.jsx)("span", { className: "tab-icon", children: "\uD83C\uDFB5" }), "Playlists (", podcastData.filter(function (p) { return p.type === 'playlist'; }).length, ")"] })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "podcast-content-section", children: currentPodcasts.length > 0 ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: "podcast-grid", children: currentPodcasts.map(function (podcast, index) { return ((0, jsx_runtime_1.jsxs)("div", { className: "enhanced-podcast-card", onClick: function (e) { return handlePodcastClick(podcast, e); }, role: "button", tabIndex: 0, onKeyDown: function (e) { - if (e.key === 'Enter' || e.key === ' ') { - handlePodcastClick(podcast, e); - } - }, style: { animationDelay: "".concat(index * 0.1, "s") }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "podcast-card-header", children: [(0, jsx_runtime_1.jsx)(SpotifyTitle, { spotifyUrl: podcast.spotifyUrl, type: podcast.type }), (0, jsx_runtime_1.jsxs)("div", { className: "card-actions", children: [(0, jsx_runtime_1.jsx)("button", { className: "action-btn favorite", title: "Add to favorites", children: "\u2764\uFE0F" }), (0, jsx_runtime_1.jsx)("button", { className: "action-btn share", title: "Share podcast", onClick: function (e) { - e.stopPropagation(); - handleShare(podcast); - }, children: "\uD83D\uDD17" })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "podcast-embed", onClick: function (e) { return e.stopPropagation(); }, children: (0, jsx_runtime_1.jsx)("iframe", { src: "https://open.spotify.com/embed/".concat(podcast.type, "/").concat(getSpotifyEmbedId(podcast.spotifyUrl)), width: "100%", height: "352", frameBorder: "0", allowFullScreen: true, allow: "autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture", loading: "lazy", title: "Spotify embed ".concat(podcast.id) }) }), (0, jsx_runtime_1.jsx)("div", { className: "podcast-card-footer", children: (0, jsx_runtime_1.jsxs)("button", { className: "listen-button", children: [(0, jsx_runtime_1.jsx)("span", { className: "listen-icon", children: "\u25B6\uFE0F" }), "Listen Now"] }) })] }, podcast.id)); }) }), totalPages > 1 && ((0, jsx_runtime_1.jsxs)("div", { className: "enhanced-pagination", children: [(0, jsx_runtime_1.jsx)("button", { className: "pagination-nav", onClick: function () { return handlePageChange(Math.max(1, currentPage - 1)); }, disabled: currentPage === 1, children: "\u2190 Previous" }), (0, jsx_runtime_1.jsx)("div", { className: "pagination-numbers", children: Array.from({ length: totalPages }, function (_, i) { return i + 1; }).map(function (number) { return ((0, jsx_runtime_1.jsx)("button", { className: "pagination-number ".concat(currentPage === number ? 'active' : ''), onClick: function () { return handlePageChange(number); }, children: number }, number)); }) }), (0, jsx_runtime_1.jsx)("button", { className: "pagination-nav", onClick: function () { return handlePageChange(Math.min(totalPages, currentPage + 1)); }, disabled: currentPage === totalPages, children: "Next \u2192" })] }))] })) : ((0, jsx_runtime_1.jsxs)("div", { className: "no-results", children: [(0, jsx_runtime_1.jsx)("div", { className: "no-results-icon", children: "\uD83D\uDD0D" }), (0, jsx_runtime_1.jsx)("h3", { children: "No podcasts found" }), (0, jsx_runtime_1.jsx)("p", { children: "Try adjusting your filters or search terms" })] })) })] }) })); -} diff --git a/src/pages/privacy-policy/index.js b/src/pages/privacy-policy/index.js deleted file mode 100644 index 12d152a6..00000000 --- a/src/pages/privacy-policy/index.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); -var Layout_1 = __importDefault(require("@theme/Layout")); -var react_1 = __importDefault(require("react")); -var PrivacyPolicy = function () { - return ((0, jsx_runtime_1.jsx)(Layout_1.default, { title: "Privacy Policy", description: "Privacy Policy of RecodeHive for Learners, and users", children: (0, jsx_runtime_1.jsxs)("div", { className: "max-w-4xl mx-auto p-5 mt-5 mb-5 rounded-lg shadow-md", children: [(0, jsx_runtime_1.jsx)("h2", { className: "text-3xl font-bold text-center mb-5", children: "Privacy Policy" }), (0, jsx_runtime_1.jsxs)("p", { className: "text-base leading-7", children: [(0, jsx_runtime_1.jsx)("strong", { children: "Last Updated:" }), " 25th May 2025", (0, jsx_runtime_1.jsx)("br", {}), " ", (0, jsx_runtime_1.jsx)("br", {}), "Welcome to", " ", (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/sanjay-kv", target: "_blank", rel: "noopener noreferrer", className: "text-blue-500 underline", children: "RecodeHive" }), ", an educational and technology-focused platform operated by", " ", (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/sanjay-kv", target: "_blank", rel: "noopener noreferrer", className: "text-blue-500 underline", children: "Sanjay Viswanthan" }), "We are committed to protecting your privacy and ensuring the security of your personal information. This Privacy Policy explains how we collect, use, disclose, and safeguard your information when you visit our website.", (0, jsx_runtime_1.jsx)("br", {}), " ", (0, jsx_runtime_1.jsx)("br", {}), "By accessing or using our website, you consent to the terms of this Privacy Policy. If you do not agree with the terms of this Privacy Policy, please do not use our website."] }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-semibold mt-5 mb-3", children: "Information We Collect" }), (0, jsx_runtime_1.jsx)("p", { className: "mb-4", children: "We collect personal information that you voluntarily provide to us when you interact with the website, such as your name, email address, and any other information you choose to share. We may also collect technical information about your device and usage patterns to improve our website's functionality and user experience." }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-semibold mt-5 mb-3", children: "What personal data we collect and why we collect it" }), (0, jsx_runtime_1.jsxs)("ol", { className: "list-decimal list-inside mb-4 space-y-4", children: [(0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Comments & Personalization:" }), " When visitors leave comments on the site we collect the data shown in the comments form, and also the visitors IP address and browser user agent string to help spam detection.To customize your experience on our website and provide content and resources tailored to your interests and preferences."] }), (0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Media & Communication:" }), "If you upload images to the website, you should avoid uploading images with embedded location data (EXIF GPS) included. Visitors to the website can download and extract any location data from images on the website. To respond to your inquiries, provide customer support, and send you updates and notifications about our services, events, and educational materials."] }), (0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Cookies & Analytics:" }), " If you leave a comment on our site you may opt-in to save your name, email address and website in cookies. We use third party app giscuss for this purpose to directly authorise with Github. If you have an account and you log in to this site, we will set a temporary cookie to determine if your browser accepts cookies. This cookie contains no personal data and is discarded when you close your browser.These are for your convenience so that you do not have to fill in your details again when you leave another comment. These cookies will last for oneTo analyze trends, track user interactions, and gather demographic information to improve our website's performance and user experience."] }), (0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Security:" }), " To protect our website from security threats, fraud, or other malicious activities."] }), (0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Legal Compliance:" }), " To comply with applicable laws, regulations, or legal processes."] }), (0, jsx_runtime_1.jsxs)("li", { children: [(0, jsx_runtime_1.jsx)("strong", { children: "Contact forms & Marketing:" }), " If you contact us we will use your name and email address to reply to your query and we won\u2019t share that information with third party. To promote our services, events, and educational materials through targeted advertising and promotional campaigns.If you are subscribing to our blog you will get emails from substack. You will get emails about a new article, freebies, e-book and much more. If you want you can unsubscribe to the emails and it is really easy. You can read About the General Data Protection"] })] }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-semibold mt-5 mb-3", children: "How long we retain your data" }), (0, jsx_runtime_1.jsx)("p", { className: "mb-4", children: "If you leave a comment, the comment and its metadata are retained indefinitely. This is so we can recognize and approve any follow-up comments automatically instead of holding them in a moderation queue." }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-semibold mt-5 mb-3", children: "Data Retention" }), (0, jsx_runtime_1.jsx)("p", { className: "mb-4", children: "We will retain your personal information for as long as necessary to fulfill the purposes outlined in this Privacy Policy, unless a longer retention period is required or permitted by law.For users that register on our website (if any), we also store the personal information they provide in their user profile. All users can see, edit, or delete their personal information at any time (except they cannot change their username). Website administrators can also see and edit that information." }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-semibold mt-5 mb-3", children: "Your Rights" }), (0, jsx_runtime_1.jsx)("p", { className: "mb-4", children: "We are using CloudFlare SSL on our website and everything which you send to us is with us and the data won\u2019t be shared with any third party.You have the right to access, update, correct, or delete your personal information at any time. You can also object to the processing of your personal information or request that we restrict certain processing activities. To exercise these rights, please contact us using the information provided below." }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-semibold mt-5 mb-3", children: "Third-Party Links" }), (0, jsx_runtime_1.jsx)("p", { className: "mb-4", children: "Our website may contain links to third-party websites or resources that are not owned or controlled by us. We are not responsible for the privacy practices or content of these third-party websites. We encourage you to review the privacy policies of these websites before providing any personal information." }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-semibold mt-5 mb-3", children: "Children's Privacy" }), (0, jsx_runtime_1.jsx)("p", { className: "mb-4", children: "If there is data breach we will contact the subscribers that there was a data breach and we will write an email to them whose data is lost. Our website is not directed to children under the age of 13. We do not knowingly collect personal information from children under 13. If you are a parent or guardian and believe that your child has provided us with personal information, please contact us, and we will take appropriate steps to remove such information from our records." }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-semibold mt-5 mb-3", children: "What third parties we receive data from" }), (0, jsx_runtime_1.jsx)("p", { className: "mb-4", children: "We recieve data from Google AdSense and Google Analytics about the user behaviour. We reserve the right to update or modify this Privacy Policy at any time. We will notify you of any changes by posting the new Privacy Policy on this page. Your continued use of our website after any modifications indicates your acceptance of the updated Privacy Policy." }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-semibold mt-5 mb-3", children: "Contact Us" }), (0, jsx_runtime_1.jsxs)("p", { className: "mb-4", children: ["If you have any questions or concerns about this Privacy Policy, please contact us at", " ", (0, jsx_runtime_1.jsx)("a", { href: "mailto:sanjay@recodehive.com", target: "_blank", rel: "noopener noreferrer", className: "text-blue-500 underline", children: "sanjay@recodehive.com" }), ". Thank you for visiting recodehive!"] })] }) })); -}; -exports.default = PrivacyPolicy; diff --git a/src/pages/showcase/_components/ShowcaseCard/index.js b/src/pages/showcase/_components/ShowcaseCard/index.js deleted file mode 100644 index a5ca2cda..00000000 --- a/src/pages/showcase/_components/ShowcaseCard/index.js +++ /dev/null @@ -1,55 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importDefault(require("react")); -var clsx_1 = __importDefault(require("clsx")); -var Link_1 = __importDefault(require("@docusaurus/Link")); -var Translate_1 = __importDefault(require("@docusaurus/Translate")); -var styles_module_css_1 = __importDefault(require("./styles.module.css")); -var FavoriteIcon_1 = __importDefault(require("../../../../components/svgIcons/FavoriteIcon")); -var ShowcaseTooltip_1 = __importDefault(require("../ShowcaseTooltip")); -var users_1 = require("@site/src/data/users"); -var jsUtils_1 = require("@site/src/utils/jsUtils"); -var IdealImage_1 = __importDefault(require("@theme/IdealImage")); -var TagComp = react_1.default.forwardRef(function (_a, ref) { - var label = _a.label, color = _a.color, description = _a.description; - return ((0, jsx_runtime_1.jsxs)("li", { ref: ref, className: styles_module_css_1.default.tag, title: description, children: [(0, jsx_runtime_1.jsx)("span", { className: styles_module_css_1.default.textLabel, children: label.toLowerCase() }), (0, jsx_runtime_1.jsx)("span", { className: styles_module_css_1.default.colorLabel, style: { backgroundColor: color } })] })); -}); -function ShowcaseCardTag(_a) { - var tags = _a.tags; - var tagObjects = tags.map(function (tag) { return (__assign({ tag: tag }, users_1.Tags[tag])); }); - // Keep same order for all tags - var tagObjectsSorted = (0, jsUtils_1.sortBy)(tagObjects, function (tagObject) { - return users_1.TagList.indexOf(tagObject.tag); - }); - return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: tagObjectsSorted.map(function (tagObject, index) { - var id = "showcase_card_tag_".concat(tagObject.tag); - return ((0, jsx_runtime_1.jsx)(ShowcaseTooltip_1.default, { text: tagObject.description, anchorEl: "#__docusaurus", id: id, children: (0, jsx_runtime_1.jsx)(TagComp, __assign({}, tagObject), index) }, index)); - }) })); -} -function ShowcaseCard(_a) { - var user = _a.user; - var handleCardClick = function () { - window.open(user.website, '_blank'); - }; - var handleSourceClick = function (e) { - e.stopPropagation(); - // The link will handle the navigation - }; - return ((0, jsx_runtime_1.jsxs)("li", { className: (0, clsx_1.default)('card shadow--md', styles_module_css_1.default.card), children: [(0, jsx_runtime_1.jsx)("div", { className: styles_module_css_1.default.cardLink, onClick: handleCardClick }), (0, jsx_runtime_1.jsx)("div", { className: (0, clsx_1.default)('card__image', styles_module_css_1.default.showcaseCardImage), children: (0, jsx_runtime_1.jsx)(IdealImage_1.default, { img: user.preview, alt: user.title }) }), (0, jsx_runtime_1.jsxs)("div", { className: "card__body", children: [(0, jsx_runtime_1.jsxs)("div", { className: styles_module_css_1.default.showcaseCardHeader, children: [(0, jsx_runtime_1.jsx)("h4", { className: styles_module_css_1.default.showcaseCardTitle, children: (0, jsx_runtime_1.jsx)(Link_1.default, { href: user.website, className: styles_module_css_1.default.showcaseCardLink, target: "_blank", children: user.title }) }), user.tags.includes('favorite') && ((0, jsx_runtime_1.jsx)(FavoriteIcon_1.default, { svgClass: styles_module_css_1.default.svgIconFavorite, size: "small" })), user.source && ((0, jsx_runtime_1.jsx)(Link_1.default, { href: user.source, className: (0, clsx_1.default)('button button--secondary button--sm', styles_module_css_1.default.showcaseCardSrcBtn), target: "_blank", rel: "noopener noreferrer", onClick: handleSourceClick, children: (0, jsx_runtime_1.jsx)(Translate_1.default, { id: "showcase.card.sourceLink", children: "source" }) }))] }), (0, jsx_runtime_1.jsx)("p", { className: styles_module_css_1.default.showcaseCardBody, children: user.description })] }), (0, jsx_runtime_1.jsx)("ul", { className: (0, clsx_1.default)('card__footer', styles_module_css_1.default.cardFooter), children: (0, jsx_runtime_1.jsx)(ShowcaseCardTag, { tags: user.tags }) })] }, user.title)); -} -exports.default = react_1.default.memo(ShowcaseCard); diff --git a/src/pages/showcase/_components/ShowcaseFilterToggle/index.js b/src/pages/showcase/_components/ShowcaseFilterToggle/index.js deleted file mode 100644 index 87d3a7b1..00000000 --- a/src/pages/showcase/_components/ShowcaseFilterToggle/index.js +++ /dev/null @@ -1,92 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.OperatorQueryKey = void 0; -exports.readOperator = readOperator; -exports.default = ShowcaseFilterToggle; -var jsx_runtime_1 = require("react/jsx-runtime"); -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -var react_1 = __importStar(require("react")); -var router_1 = require("@docusaurus/router"); -var index_1 = require("../../index"); -var clsx_1 = __importDefault(require("clsx")); -var styles_module_css_1 = __importDefault(require("./styles.module.css")); -exports.OperatorQueryKey = 'operator'; -function readOperator(search) { - var _a; - return ((_a = new URLSearchParams(search).get(exports.OperatorQueryKey)) !== null && _a !== void 0 ? _a : 'OR'); -} -function ShowcaseFilterToggle() { - var id = 'showcase_filter_toggle'; - var location = (0, router_1.useLocation)(); - var history = (0, router_1.useHistory)(); - var _a = (0, react_1.useState)(false), operator = _a[0], setOperator = _a[1]; - (0, react_1.useEffect)(function () { - setOperator(readOperator(location.search) === 'AND'); - }, [location]); - var toggleOperator = (0, react_1.useCallback)(function () { - setOperator(function (o) { return !o; }); - var searchParams = new URLSearchParams(location.search); - searchParams.delete(exports.OperatorQueryKey); - if (!operator) { - searchParams.append(exports.OperatorQueryKey, 'AND'); - } - history.push(__assign(__assign({}, location), { search: searchParams.toString(), state: (0, index_1.prepareUserState)() })); - }, [operator, location, history]); - return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("input", { type: "checkbox", id: id, className: "screen-reader-only", "aria-label": "Toggle between or and and for the tags you selected", onChange: toggleOperator, onKeyDown: function (e) { - if (e.key === 'Enter') { - toggleOperator(); - } - }, checked: operator }), (0, jsx_runtime_1.jsxs)("label", { htmlFor: id, className: (0, clsx_1.default)(styles_module_css_1.default.checkboxLabel, 'shadow--md'), children: [(0, jsx_runtime_1.jsx)("span", { className: styles_module_css_1.default.checkboxLabelOr, children: "OR" }), (0, jsx_runtime_1.jsx)("span", { className: styles_module_css_1.default.checkboxLabelAnd, children: "AND" })] })] })); -} diff --git a/src/pages/showcase/_components/ShowcaseTagSelect/index.js b/src/pages/showcase/_components/ShowcaseTagSelect/index.js deleted file mode 100644 index 2da51b46..00000000 --- a/src/pages/showcase/_components/ShowcaseTagSelect/index.js +++ /dev/null @@ -1,113 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __rest = (this && this.__rest) || function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.readSearchTags = readSearchTags; -var jsx_runtime_1 = require("react/jsx-runtime"); -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -var react_1 = __importStar(require("react")); -var router_1 = require("@docusaurus/router"); -var jsUtils_1 = require("../../../../utils/jsUtils"); -var index_1 = require("../../index"); -var styles_module_css_1 = __importDefault(require("./styles.module.css")); -var TagQueryStringKey = 'tags'; -function readSearchTags(search) { - return new URLSearchParams(search).getAll(TagQueryStringKey); -} -function replaceSearchTags(search, newTags) { - var searchParams = new URLSearchParams(search); - searchParams.delete(TagQueryStringKey); - newTags.forEach(function (tag) { return searchParams.append(TagQueryStringKey, tag); }); - return searchParams.toString(); -} -function ShowcaseTagSelect(_a, ref) { - var id = _a.id, icon = _a.icon, label = _a.label, tag = _a.tag, rest = __rest(_a, ["id", "icon", "label", "tag"]); - var location = (0, router_1.useLocation)(); - var history = (0, router_1.useHistory)(); - var _b = (0, react_1.useState)(false), selected = _b[0], setSelected = _b[1]; - (0, react_1.useEffect)(function () { - var tags = readSearchTags(location.search); - setSelected(tags.includes(tag)); - }, [tag, location]); - var toggleTag = (0, react_1.useCallback)(function () { - var tags = readSearchTags(location.search); - var newTags = (0, jsUtils_1.toggleListItem)(tags, tag); - var newSearch = replaceSearchTags(location.search, newTags); - history.push(__assign(__assign({}, location), { search: newSearch, state: (0, index_1.prepareUserState)() })); - }, [tag, location, history]); - return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("input", __assign({ type: "checkbox", id: id, className: "screen-reader-only", onKeyDown: function (e) { - if (e.key === 'Enter') { - toggleTag(); - } - }, onFocus: function (e) { - var _a; - if (e.relatedTarget) { - (_a = e.target.nextElementSibling) === null || _a === void 0 ? void 0 : _a.dispatchEvent(new KeyboardEvent('focus')); - } - }, onBlur: function (e) { - var _a; - (_a = e.target.nextElementSibling) === null || _a === void 0 ? void 0 : _a.dispatchEvent(new KeyboardEvent('blur')); - }, onChange: toggleTag, checked: selected }, rest)), (0, jsx_runtime_1.jsxs)("label", { ref: ref, htmlFor: id, className: styles_module_css_1.default.checkboxLabel, children: [label, icon] })] })); -} -exports.default = react_1.default.forwardRef(ShowcaseTagSelect); diff --git a/src/pages/showcase/_components/ShowcaseTooltip/index.js b/src/pages/showcase/_components/ShowcaseTooltip/index.js deleted file mode 100644 index 5f5f1b72..00000000 --- a/src/pages/showcase/_components/ShowcaseTooltip/index.js +++ /dev/null @@ -1,98 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = Tooltip; -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importStar(require("react")); -var react_dom_1 = __importDefault(require("react-dom")); -var react_2 = require("@floating-ui/react"); -var styles_module_css_1 = __importDefault(require("./styles.module.css")); -function Tooltip(_a) { - var children = _a.children, id = _a.id, anchorEl = _a.anchorEl, text = _a.text, _b = _a.delay, delay = _b === void 0 ? 400 : _b, _c = _a.placement, placement = _c === void 0 ? 'top' : _c; - var _d = (0, react_1.useState)(false), open = _d[0], setOpen = _d[1]; - var _e = (0, react_1.useState)(null), container = _e[0], setContainer = _e[1]; - var arrowRef = (0, react_1.useRef)(null); - var _f = (0, react_2.useFloating)({ - open: open, - onOpenChange: setOpen, - placement: placement, - middleware: [ - (0, react_2.offset)(8), - (0, react_2.arrow)({ - element: arrowRef, - }), - ], - whileElementsMounted: react_2.autoUpdate, - }), refs = _f.refs, floatingStyles = _f.floatingStyles, context = _f.context; - var hover = (0, react_2.useHover)(context, { delay: delay }); - var focus = (0, react_2.useFocus)(context); - var dismiss = (0, react_2.useDismiss)(context); - var role = (0, react_2.useRole)(context, { role: 'tooltip' }); - var _g = (0, react_2.useInteractions)([ - hover, - focus, - dismiss, - role, - ]), getReferenceProps = _g.getReferenceProps, getFloatingProps = _g.getFloatingProps; - var tooltipId = "".concat(id, "_tooltip"); - (0, react_1.useEffect)(function () { - if (!anchorEl) { - setContainer(document.body); - return; - } - var newContainer = typeof anchorEl === 'string' - ? document.querySelector(anchorEl) - : anchorEl; - setContainer(newContainer); - }, [anchorEl]); - var childWithProps = react_1.default.isValidElement(children) - ? react_1.default.cloneElement(children, __assign(__assign({ ref: refs.setReference }, getReferenceProps()), { 'aria-describedby': open ? tooltipId : undefined })) - : children; - return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [childWithProps, container && open && react_dom_1.default.createPortal((0, jsx_runtime_1.jsxs)("div", __assign({ id: tooltipId, ref: refs.setFloating, className: styles_module_css_1.default.tooltip, style: floatingStyles }, getFloatingProps(), { children: [text, (0, jsx_runtime_1.jsx)(react_2.FloatingArrow, { ref: arrowRef, context: context, className: styles_module_css_1.default.tooltipArrow })] })), container)] })); -} diff --git a/src/pages/showcase/index.js b/src/pages/showcase/index.js deleted file mode 100644 index 132a4a5e..00000000 --- a/src/pages/showcase/index.js +++ /dev/null @@ -1,257 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.prepareUserState = prepareUserState; -exports.default = Showcase; -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importStar(require("react")); -var Layout_1 = __importDefault(require("@theme/Layout")); -var clsx_1 = __importDefault(require("clsx")); -var Head_1 = __importDefault(require("@docusaurus/Head")); -var ShowcaseTagSelect_1 = __importStar(require("./_components/ShowcaseTagSelect")); -var ShowcaseFilterToggle_1 = __importStar(require("./_components/ShowcaseFilterToggle")); -var ShowcaseCard_1 = __importDefault(require("./_components/ShowcaseCard")); -var ShowcaseTooltip_1 = __importDefault(require("./_components/ShowcaseTooltip")); -var ExecutionEnvironment_1 = __importDefault(require("@docusaurus/ExecutionEnvironment")); -var Translate_1 = __importStar(require("@docusaurus/Translate")); -var router_1 = require("@docusaurus/router"); -var theme_common_1 = require("@docusaurus/theme-common"); -var framer_motion_1 = require("framer-motion"); -var styles_module_css_1 = __importDefault(require("./styles.module.css")); -var users_1 = require("@site/src/data/users"); -var FavoriteIcon_1 = __importDefault(require("@site/src/components/svgIcons/FavoriteIcon")); -var theme_common_2 = require("@docusaurus/theme-common"); -var TITLE = 'Recode Hive: Framing all the opensource projects built by our community members'; -var DESCRIPTION = 'All the opensource projects listed below are available for you to explore, learn, and contribute.'; -var EDIT_URL = 'https://github.com/recodehive'; -function restoreUserState(userState) { - var _a; - var _b = userState !== null && userState !== void 0 ? userState : { - scrollTopPosition: 0, - focusedElementId: undefined, - }, scrollTopPosition = _b.scrollTopPosition, focusedElementId = _b.focusedElementId; - (_a = document.getElementById(focusedElementId)) === null || _a === void 0 ? void 0 : _a.focus(); - window.scrollTo({ top: scrollTopPosition }); -} -function prepareUserState() { - var _a; - if (ExecutionEnvironment_1.default.canUseDOM) { - return { - scrollTopPosition: window.scrollY, - focusedElementId: (_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.id, - }; - } - return undefined; -} -var SearchNameQueryKey = 'name'; -function readSearchName(search) { - return new URLSearchParams(search).get(SearchNameQueryKey); -} -function filterUsers(users, selectedTags, operator, searchName) { - if (searchName) { - // eslint-disable-next-line no-param-reassign - users = users.filter(function (user) { - return user.title.toLowerCase().includes(searchName.toLowerCase()); - }); - } - if (selectedTags.length === 0) { - return users; - } - return users.filter(function (user) { - if (user.tags.length === 0) { - return false; - } - if (operator === 'AND') { - return selectedTags.every(function (tag) { return user.tags.includes(tag); }); - } - return selectedTags.some(function (tag) { return user.tags.includes(tag); }); - }); -} -function useFilteredUsers() { - var location = (0, router_1.useLocation)(); - var _a = (0, react_1.useState)('OR'), operator = _a[0], setOperator = _a[1]; - // On SSR / first mount (hydration) no tag is selected - var _b = (0, react_1.useState)([]), selectedTags = _b[0], setSelectedTags = _b[1]; - var _c = (0, react_1.useState)(null), searchName = _c[0], setSearchName = _c[1]; - // Sync tags from QS to state (delayed on purpose to avoid SSR/Client - // hydration mismatch) - (0, react_1.useEffect)(function () { - setSelectedTags((0, ShowcaseTagSelect_1.readSearchTags)(location.search)); - setOperator((0, ShowcaseFilterToggle_1.readOperator)(location.search)); - setSearchName(readSearchName(location.search)); - restoreUserState(location.state); - }, [location]); - return (0, react_1.useMemo)(function () { return filterUsers(users_1.sortedUsers, selectedTags, operator, searchName); }, [selectedTags, operator, searchName]); -} -function ShowcaseHeader() { - return ((0, jsx_runtime_1.jsxs)("section", { className: "margin-top--lg margin-bottom--lg text--center", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.h1, { initial: { opacity: 0, x: -15 }, whileInView: { opacity: 1, x: 0 }, viewport: { once: true }, transition: { - duration: 1, - type: "spring", - stiffness: 100, - delay: 0.2, - }, className: styles_module_css_1.default.TitleText, children: TITLE }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.p, { initial: { opacity: 0, y: 15 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { - duration: 1, - type: "spring", - stiffness: 100, - delay: 0.3, - }, children: DESCRIPTION }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: { opacity: 0, y: 15 }, whileInView: { opacity: 1, y: 0 }, viewport: { once: true }, transition: { - duration: 1, - type: "spring", - stiffness: 100, - delay: 0.5, - }, children: (0, jsx_runtime_1.jsx)("a", { className: "button button--primary", href: EDIT_URL, target: "_blank", rel: "noreferrer", children: (0, jsx_runtime_1.jsx)(Translate_1.default, { id: "showcase.header.button", children: "\uD83C\uDF1F Join the Hive Community" }) }) })] })); -} -function useSiteCountPlural() { - var selectMessage = (0, theme_common_1.usePluralForm)().selectMessage; - return function (sitesCount) { - return selectMessage(sitesCount, (0, Translate_1.translate)({ - id: 'showcase.filters.resultCount', - description: 'Pluralized label for the number of sites found on the showcase. Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)', - message: '1 site|{sitesCount} sites', - }, { sitesCount: sitesCount })); - }; -} -function ShowcaseFilters() { - var filteredUsers = useFilteredUsers(); - var siteCountPlural = useSiteCountPlural(); - return ((0, jsx_runtime_1.jsxs)("section", { className: "container margin-top--l margin-bottom--lg", children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, clsx_1.default)('margin-bottom--sm', styles_module_css_1.default.filterCheckbox), children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.h2, { initial: { opacity: 0, x: -15 }, whileInView: { opacity: 1, x: 0 }, viewport: { once: true }, transition: { - duration: 1, - type: "spring", - stiffness: 100, - delay: 0.2, - }, children: (0, jsx_runtime_1.jsx)(Translate_1.default, { id: "showcase.filters.title", children: "Filters" }) }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { initial: { opacity: 0, x: -15 }, whileInView: { opacity: 1, x: 0 }, viewport: { once: true }, transition: { - duration: 1, - type: "spring", - stiffness: 100, - delay: 0.3, - }, children: (0, jsx_runtime_1.jsx)("span", { children: siteCountPlural(filteredUsers.length) }) })] }), (0, jsx_runtime_1.jsx)(ShowcaseFilterToggle_1.default, {})] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.ul, { initial: { opacity: 0 }, whileInView: { opacity: 1 }, viewport: { once: true }, transition: { - duration: 4, - type: "spring", - stiffness: 100, - delay: 0.5, - }, className: (0, clsx_1.default)('clean-list', styles_module_css_1.default.checkboxList), children: users_1.TagList.map(function (tag, i) { - var _a = users_1.Tags[tag], label = _a.label, description = _a.description, color = _a.color; - var id = "showcase_checkbox_id_".concat(tag); - return ((0, jsx_runtime_1.jsx)("li", { className: styles_module_css_1.default.checkboxListItem, children: (0, jsx_runtime_1.jsx)(ShowcaseTooltip_1.default, { id: id, text: description, anchorEl: "#__docusaurus", children: (0, jsx_runtime_1.jsx)(ShowcaseTagSelect_1.default, { tag: tag, id: id, label: label, icon: tag === 'favorite' ? ((0, jsx_runtime_1.jsx)(FavoriteIcon_1.default, { svgClass: styles_module_css_1.default.svgIconFavoriteXs })) : ((0, jsx_runtime_1.jsx)("span", { style: { - backgroundColor: color, - width: 10, - height: 10, - borderRadius: '50%', - marginLeft: 8, - } })) }) }) }, i)); - }) })] })); -} -var favoriteUsers = users_1.sortedUsers.filter(function (user) { - return user.tags.includes('favorite'); -}); -var otherUsers = users_1.sortedUsers.filter(function (user) { return !user.tags.includes('favorite'); }); -function SearchBar() { - var history = (0, router_1.useHistory)(); - var location = (0, router_1.useLocation)(); - var _a = (0, react_1.useState)(null), value = _a[0], setValue = _a[1]; - (0, react_1.useEffect)(function () { - setValue(readSearchName(location.search)); - }, [location]); - return ((0, jsx_runtime_1.jsx)("div", { className: styles_module_css_1.default.searchContainer, children: (0, jsx_runtime_1.jsx)("input", { id: "searchbar", placeholder: (0, Translate_1.translate)({ - message: 'Search for site name...', - id: 'showcase.searchBar.placeholder', - }), value: value !== null && value !== void 0 ? value : undefined, onInput: function (e) { - setValue(e.currentTarget.value); - var newSearch = new URLSearchParams(location.search); - newSearch.delete(SearchNameQueryKey); - if (e.currentTarget.value) { - newSearch.set(SearchNameQueryKey, e.currentTarget.value); - } - history.push(__assign(__assign({}, location), { search: newSearch.toString(), state: prepareUserState() })); - setTimeout(function () { - var _a; - (_a = document.getElementById('searchbar')) === null || _a === void 0 ? void 0 : _a.focus(); - }, 0); - } }) })); -} -function ShowcaseCards() { - var filteredUsers = useFilteredUsers(); - if (filteredUsers.length === 0) { - return ((0, jsx_runtime_1.jsx)("section", { className: "margin-top--lg margin-bottom--xl", children: (0, jsx_runtime_1.jsxs)("div", { className: "container padding-vert--md text--center", children: [(0, jsx_runtime_1.jsx)("h2", { children: (0, jsx_runtime_1.jsx)(Translate_1.default, { id: "showcase.usersList.noResult", children: "No result" }) }), (0, jsx_runtime_1.jsx)(SearchBar, {})] }) })); - } - return ((0, jsx_runtime_1.jsx)("section", { className: "margin-top--lg margin-bottom--xl", children: filteredUsers.length === users_1.sortedUsers.length ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: styles_module_css_1.default.showcaseFavorite, children: (0, jsx_runtime_1.jsxs)("div", { className: "container", children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, clsx_1.default)('margin-bottom--md', styles_module_css_1.default.showcaseFavoriteHeader), children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.h2, { initial: { opacity: 0, x: -15 }, whileInView: { opacity: 1, x: 0 }, viewport: { once: true }, transition: { - duration: 1, - type: "spring", - stiffness: 100, - delay: 0.3, - }, children: (0, jsx_runtime_1.jsx)(Translate_1.default, { id: "showcase.favoritesList.title", children: "Best of the Hive" }) }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.h2, { initial: { opacity: 0, x: -15 }, whileInView: { opacity: 1, x: 0 }, viewport: { once: true }, transition: { - duration: 1, - type: "spring", - stiffness: 100, - delay: 0.3, - }, children: (0, jsx_runtime_1.jsx)(FavoriteIcon_1.default, { svgClass: styles_module_css_1.default.svgIconFavorite }) }), (0, jsx_runtime_1.jsx)(SearchBar, {})] }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.ul, { initial: { opacity: 0 }, whileInView: { opacity: 1 }, viewport: { once: true }, transition: { - duration: 4, - type: "spring", - stiffness: 100, - delay: 0.4, - }, className: (0, clsx_1.default)('container', 'clean-list', styles_module_css_1.default.showcaseList), children: favoriteUsers.map(function (user) { return ((0, jsx_runtime_1.jsx)(ShowcaseCard_1.default, { user: user }, user.title)); }) })] }) }), (0, jsx_runtime_1.jsxs)("div", { className: "container margin-top--lg", children: [(0, jsx_runtime_1.jsx)(framer_motion_1.motion.h2, { initial: { opacity: 0, x: -15 }, whileInView: { opacity: 1, x: 0 }, viewport: { once: true }, transition: { - duration: 1, - type: "spring", - stiffness: 100, - delay: 0.5, - }, className: styles_module_css_1.default.showcaseHeader, children: (0, jsx_runtime_1.jsx)(Translate_1.default, { id: "showcase.usersList.allUsers", children: "All sites" }) }), (0, jsx_runtime_1.jsx)(framer_motion_1.motion.ul, { initial: { opacity: 0 }, whileInView: { opacity: 1 }, viewport: { once: true }, transition: { - duration: 4, - type: "spring", - stiffness: 100, - delay: 0.5, - }, className: (0, clsx_1.default)('clean-list', styles_module_css_1.default.showcaseList), children: otherUsers.map(function (user) { return ((0, jsx_runtime_1.jsx)(ShowcaseCard_1.default, { user: user }, user.title)); }) })] })] })) : ((0, jsx_runtime_1.jsxs)("div", { className: "container", children: [(0, jsx_runtime_1.jsx)("div", { className: (0, clsx_1.default)('margin-bottom--md', styles_module_css_1.default.showcaseFavoriteHeader), children: (0, jsx_runtime_1.jsx)(SearchBar, {}) }), (0, jsx_runtime_1.jsx)("ul", { className: (0, clsx_1.default)('clean-list', styles_module_css_1.default.showcaseList), children: filteredUsers.map(function (user) { return ((0, jsx_runtime_1.jsx)(ShowcaseCard_1.default, { user: user }, user.title)); }) })] })) })); -} -function Showcase() { - return ((0, jsx_runtime_1.jsx)(Layout_1.default, { title: "Showcase of CodeHarborHub", description: "Showcase of CodeHarborHub for CodeHarborHub Learners and users", children: (0, jsx_runtime_1.jsx)(ShowcaseContent, {}) })); -} -function ShowcaseContent() { - var colorMode = (0, theme_common_2.useColorMode)().colorMode; - var isDark = colorMode === "dark"; - return ((0, jsx_runtime_1.jsxs)("main", { className: (0, clsx_1.default)("", isDark ? "bg-[#121212] text-white" : "bg-white text-black"), children: [(0, jsx_runtime_1.jsx)(Head_1.default, { children: (0, jsx_runtime_1.jsx)("script", { async: true, "custom-element": "amp-auto-ads", src: "https://cdn.ampproject.org/v0/amp-auto-ads-0.1.js" }) }), (0, jsx_runtime_1.jsx)(ShowcaseHeader, {}), (0, jsx_runtime_1.jsx)(ShowcaseFilters, {}), (0, jsx_runtime_1.jsx)(ShowcaseCards, {})] })); -} diff --git a/src/pages/terms-service/index.js b/src/pages/terms-service/index.js deleted file mode 100644 index 7e8061c6..00000000 --- a/src/pages/terms-service/index.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importDefault(require("react")); -var Layout_1 = __importDefault(require("@theme/Layout")); -var TermsOfService = function () { - return ((0, jsx_runtime_1.jsx)(Layout_1.default, { title: "Terms and condition of recodehive.com", description: "Terms of Service Page for recodehive Learners, and users", children: (0, jsx_runtime_1.jsxs)("div", { className: "max-w-3xl mx-auto p-6 rounded-lg shadow-lg mt-8 mb-8 text-base leading-relaxed font-sans text-justify", children: [(0, jsx_runtime_1.jsx)("h2", { className: "text-2xl font-bold mb-6 text-center", children: "Terms of Service" }), (0, jsx_runtime_1.jsxs)("p", { className: "mb-6", children: ["These Terms of Service govern your use of", " ", (0, jsx_runtime_1.jsx)("b", { className: "bg-yellow-100 dark:bg-yellow-600 dark:text-gray-900", children: "recodehive" }), ", provided by", " ", (0, jsx_runtime_1.jsx)("strong", { className: "bg-yellow-100 dark:bg-yellow-600 dark:text-gray-900", children: "Sanjay Viswanathan" }), ". Below are the Terms and Conditions for the use of www.recodehive.com. Please read these carefully. If you need to contact us regarding any aspect of the following terms of use of our website, please reach out us at the following email address \u2013 sanjay@recodehive.com."] }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-bold mb-4", children: "Acceptance of Terms" }), (0, jsx_runtime_1.jsx)("p", { className: "mb-6", children: "By accessing or using the Service, you acknowledge that you have read, understood, and agree to be bound by these Terms, as well as any additional terms and conditions, policies, and guidelines provided by us. If you do not agree to these Terms, please refrain from using the Service." }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-bold mb-4", children: "Use of the Service" }), (0, jsx_runtime_1.jsxs)("ol", { className: "list-decimal pl-6 mb-6", children: [(0, jsx_runtime_1.jsxs)("li", { className: "mb-4", children: [(0, jsx_runtime_1.jsx)("strong", { children: "Usage Instructions:" }), " You agree not to use the website in a way that may impair the performance, corrupt or manipulate the content or information available on the website or reduce the overall functionality of the website."] }), (0, jsx_runtime_1.jsxs)("li", { className: "mb-4", children: [(0, jsx_runtime_1.jsx)("strong", { children: "License:" }), " We grant you a limited, non-exclusive, non-transferable, and revocable license to access and use the Service for your personal or internal business purposes. This license does not permit any resale or commercial use of the Service."] }), (0, jsx_runtime_1.jsxs)("li", { className: "mb-4", children: [(0, jsx_runtime_1.jsx)("strong", { children: "User Conduct:" }), " You agree not to compromise the security of the website or attempt to gain access to secured areas of the website or attempt to access any sensitive information you may believe exist on the website or server where it is hosted."] })] }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-bold mb-4", children: "Content" }), (0, jsx_runtime_1.jsxs)("ol", { className: "list-decimal pl-6 mb-6", children: [(0, jsx_runtime_1.jsxs)("li", { className: "mb-4", children: [(0, jsx_runtime_1.jsx)("strong", { children: "User Content:" }), " You retain ownership of any content you submit or upload to the Service (\"User Content\"). By submitting User Content, you grant us a worldwide, royalty-free, and non-exclusive license to use, reproduce, modify, adapt, publish, translate, distribute, and display such User Content."] }), (0, jsx_runtime_1.jsxs)("li", { className: "mb-4", children: [(0, jsx_runtime_1.jsx)("strong", { children: "Intellectual Property:" }), " All content, trademarks, service marks, logos, and other intellectual property displayed on or related to the Service are the property of", " ", (0, jsx_runtime_1.jsx)("strong", { className: "bg-yellow-100 dark:bg-yellow-600 dark:text-gray-900", children: "Sanjay Viswanathan" }), " or its licensors. You may not use or display any of these without our prior written consent."] }), (0, jsx_runtime_1.jsxs)("li", { className: "mb-4", children: [(0, jsx_runtime_1.jsx)("strong", { children: "Compensation:" }), " You agree to be fully responsible for any claim, expense, losses, liability, costs including legal fees incurred by us arising from any infringement of the terms and conditions of this agreement and to which you will have agreed if you continue to use the website."] })] }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-bold mb-4", children: "Privacy" }), (0, jsx_runtime_1.jsxs)("p", { className: "mb-6", children: ["Your privacy is important to us. Please review our", " ", (0, jsx_runtime_1.jsx)("a", { href: "/privacy-policy/", target: "_blank", rel: "noopener noreferrer", className: "text-blue-600 underline", children: "Privacy Policy" }), " ", "to understand how we collect, use, and disclose your personal information."] }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-bold mb-4", children: "Termination" }), (0, jsx_runtime_1.jsx)("p", { className: "mb-6", children: "We reserve the right to suspend or terminate your access to the Service at any time, with or without cause, and without notice or liability." }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-bold mb-4", children: "Governing Law" }), (0, jsx_runtime_1.jsx)("p", { className: "mb-6", children: "These Terms shall be governed by and construed per the laws of India, without regard to its conflict of law principles." }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-bold mb-4", children: "Changes to the Terms" }), (0, jsx_runtime_1.jsx)("p", { className: "mb-6", children: "Though we strive to be entirely accurate in the information that is presented on our site and attempt to keep it as up to date as possible, in some cases, some of the information you find on the website may be slightly outdated. www.recodehive.com reserves the right to make any modifications or corrections to the information you find on the site at any time without notice." }), (0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-bold mb-4", children: "Contact Us" }), (0, jsx_runtime_1.jsxs)("p", { children: ["If you have any questions about these Terms, please contact us at", " ", (0, jsx_runtime_1.jsx)("a", { href: "mailto:sanjay@recodehive.com", className: "text-blue-600 underline", children: "sanjay@recodehive.com" }), "."] })] }) })); -}; -exports.default = TermsOfService; diff --git a/src/plugins/tailwind-plugin.js b/src/plugins/tailwind-plugin.js deleted file mode 100644 index 7b50d5b1..00000000 --- a/src/plugins/tailwind-plugin.js +++ /dev/null @@ -1,13 +0,0 @@ -// src/plugins/tailwind-plugin.js -module.exports = function tailwindPlugin(context, options) { - return { - name: "tailwind-plugin", - configurePostCss: function (postcssOptions) { - postcssOptions.plugins = [ - require("@tailwindcss/postcss"), - // optionally: require("autoprefixer") - ]; - return postcssOptions; - }, - }; -}; diff --git a/src/services/githubService.js b/src/services/githubService.js deleted file mode 100644 index 22d88a32..00000000 --- a/src/services/githubService.js +++ /dev/null @@ -1,544 +0,0 @@ -"use strict"; -// GitHub API service for fetching organization metrics -// Uses localStorage for caching to reduce API calls -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.githubService = void 0; -var GitHubService = /** @class */ (function () { - function GitHubService() { - this.ORG_NAME = 'recodehive'; - this.CACHE_KEY = 'github_org_stats'; - this.CACHE_DURATION = 30 * 60 * 1000; // 30 minutes in milliseconds - this.BASE_URL = 'https://api.github.com'; - } - // Get headers for GitHub API requests - GitHubService.prototype.getHeaders = function () { - var headers = { - 'Accept': 'application/vnd.github.v3+json', - 'Content-Type': 'application/json', - }; - // Add GitHub token if available in environment - // Note: In production, you might want to use a server-side proxy to avoid exposing tokens - if (typeof window !== 'undefined' && window.GITHUB_TOKEN) { - headers['Authorization'] = "token ".concat(window.GITHUB_TOKEN); - } - return headers; - }; - // Fetch with error handling and rate limit consideration - GitHubService.prototype.fetchWithRetry = function (url_1) { - return __awaiter(this, arguments, void 0, function (url, retries) { - var _loop_1, this_1, i, state_1; - if (retries === void 0) { retries = 3; } - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _loop_1 = function (i) { - var response, error_1; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - _b.trys.push([0, 2, , 4]); - return [4 /*yield*/, fetch(url, { - headers: this_1.getHeaders(), - })]; - case 1: - response = _b.sent(); - if (response.status === 403) { - // Rate limited - don't retry, just throw error - console.warn('GitHub API rate limit exceeded'); - throw new Error('GitHub API rate limit exceeded'); - } - if (!response.ok) { - throw new Error("HTTP ".concat(response.status, ": ").concat(response.statusText)); - } - return [2 /*return*/, { value: response }]; - case 2: - error_1 = _b.sent(); - if (i === retries - 1) - throw error_1; - return [4 /*yield*/, new Promise(function (resolve) { return setTimeout(resolve, 1000 * (i + 1)); })]; - case 3: - _b.sent(); - return [3 /*break*/, 4]; - case 4: return [2 /*return*/]; - } - }); - }; - this_1 = this; - i = 0; - _a.label = 1; - case 1: - if (!(i < retries)) return [3 /*break*/, 4]; - return [5 /*yield**/, _loop_1(i)]; - case 2: - state_1 = _a.sent(); - if (typeof state_1 === "object") - return [2 /*return*/, state_1.value]; - _a.label = 3; - case 3: - i++; - return [3 /*break*/, 1]; - case 4: throw new Error('Failed after retries'); - } - }); - }); - }; - // Get cached data if valid - GitHubService.prototype.getCachedData = function () { - if (typeof window === 'undefined') - return null; - try { - var cached = localStorage.getItem(this.CACHE_KEY); - if (!cached) - return null; - var data = JSON.parse(cached); - var now = Date.now(); - if (now - data.lastUpdated < this.CACHE_DURATION) { - return data; - } - } - catch (error) { - console.warn('Error reading GitHub stats cache:', error); - // Clear invalid cache - localStorage.removeItem(this.CACHE_KEY); - } - return null; - }; - // Cache data to localStorage - GitHubService.prototype.setCachedData = function (data) { - if (typeof window === 'undefined') - return; - try { - localStorage.setItem(this.CACHE_KEY, JSON.stringify(__assign(__assign({}, data), { lastUpdated: Date.now() }))); - } - catch (error) { - console.warn('Error caching GitHub stats:', error); - } - }; - // Fetch organization basic info - GitHubService.prototype.fetchOrganizationInfo = function (signal) { - return __awaiter(this, void 0, void 0, function () { - var response; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, fetch("".concat(this.BASE_URL, "/orgs/").concat(this.ORG_NAME), { - headers: this.getHeaders(), - signal: signal, - })]; - case 1: - response = _a.sent(); - if (!response.ok) { - throw new Error("Failed to fetch organization info: ".concat(response.status)); - } - return [2 /*return*/, response.json()]; - } - }); - }); - }; - // Fetch all public repositories for the organization - GitHubService.prototype.fetchAllRepositories = function (signal) { - return __awaiter(this, void 0, void 0, function () { - var repositories, page, perPage, response, repos; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - repositories = []; - page = 1; - perPage = 100; - _a.label = 1; - case 1: - if (!true) return [3 /*break*/, 4]; - return [4 /*yield*/, fetch("".concat(this.BASE_URL, "/orgs/").concat(this.ORG_NAME, "/repos?type=public&per_page=").concat(perPage, "&page=").concat(page, "&sort=updated"), { - headers: this.getHeaders(), - signal: signal, - })]; - case 2: - response = _a.sent(); - if (!response.ok) { - if (response.status === 403) { - console.warn('GitHub API rate limit exceeded while fetching repositories'); - throw new Error('GitHub API rate limit exceeded'); - } - throw new Error("Failed to fetch repositories: ".concat(response.status)); - } - return [4 /*yield*/, response.json()]; - case 3: - repos = _a.sent(); - if (repos.length === 0) - return [3 /*break*/, 4]; - repositories.push.apply(repositories, repos); - if (repos.length < perPage) - return [3 /*break*/, 4]; - page++; - return [3 /*break*/, 1]; - case 4: return [2 /*return*/, repositories]; - } - }); - }); - }; - // Estimate contributors count (GitHub API doesn't provide org-wide contributor count) - GitHubService.prototype.estimateContributors = function (repositories, signal) { - return __awaiter(this, void 0, void 0, function () { - var topRepos, totalContributors, contributorPromises, contributorCounts, sumContributors; - var _this = this; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - topRepos = repositories - .filter(function (repo) { return !repo.archived && repo.stargazers_count > 0; }) - .sort(function (a, b) { return b.stargazers_count - a.stargazers_count; }) - .slice(0, 10); - totalContributors = 0; - contributorPromises = topRepos.map(function (repo) { return __awaiter(_this, void 0, void 0, function () { - var response, linkHeader, match, contributors, error_2; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 4, , 5]); - return [4 /*yield*/, fetch("".concat(this.BASE_URL, "/repos/").concat(repo.full_name, "/contributors?per_page=1"), { - headers: this.getHeaders(), - signal: signal, - })]; - case 1: - response = _a.sent(); - if (!response.ok) return [3 /*break*/, 3]; - linkHeader = response.headers.get('Link'); - if (linkHeader) { - match = linkHeader.match(/page=(\d+)>; rel="last"/); - if (match) { - return [2 /*return*/, parseInt(match[1])]; - } - } - return [4 /*yield*/, response.json()]; - case 2: - contributors = _a.sent(); - return [2 /*return*/, Array.isArray(contributors) ? contributors.length : 0]; - case 3: return [2 /*return*/, 0]; - case 4: - error_2 = _a.sent(); - console.warn("Error fetching contributors for ".concat(repo.name, ":"), error_2); - return [2 /*return*/, 0]; - case 5: return [2 /*return*/]; - } - }); - }); }); - return [4 /*yield*/, Promise.all(contributorPromises)]; - case 1: - contributorCounts = _a.sent(); - sumContributors = contributorCounts.reduce(function (sum, count) { return sum + count; }, 0); - // Apply estimation factor for unique contributors across repos - totalContributors = Math.round(sumContributors * 0.7); // Assume 30% overlap - // Ensure minimum reasonable number - return [2 /*return*/, Math.max(totalContributors, 140)]; - } - }); - }); - }; - // Get discussions count (approximate using search) - GitHubService.prototype.getDiscussionsCount = function (signal) { - return __awaiter(this, void 0, void 0, function () { - var response, data, error_3; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 4, , 5]); - return [4 /*yield*/, fetch("".concat(this.BASE_URL, "/search/issues?q=repo:").concat(this.ORG_NAME, "/Support+type:issue"), { - headers: this.getHeaders(), - signal: signal, - })]; - case 1: - response = _a.sent(); - if (!response.ok) return [3 /*break*/, 3]; - return [4 /*yield*/, response.json()]; - case 2: - data = _a.sent(); - return [2 /*return*/, data.total_count || 0]; - case 3: return [3 /*break*/, 5]; - case 4: - error_3 = _a.sent(); - console.warn('Error fetching discussions count:', error_3); - return [3 /*break*/, 5]; - case 5: return [2 /*return*/, 0]; - } - }); - }); - }; - // Main method to fetch all organization statistics - GitHubService.prototype.fetchOrganizationStats = function (signal) { - return __awaiter(this, void 0, void 0, function () { - var cached, _a, orgInfo, repositories, activeRepos, totalStars, totalForks, _b, totalContributors, discussionsCount, stats, error_4, fallbackStats; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - cached = this.getCachedData(); - if (cached) { - return [2 /*return*/, cached]; - } - _c.label = 1; - case 1: - _c.trys.push([1, 4, , 5]); - return [4 /*yield*/, Promise.all([ - this.fetchOrganizationInfo(signal), - this.fetchAllRepositories(signal), - ])]; - case 2: - _a = _c.sent(), orgInfo = _a[0], repositories = _a[1]; - activeRepos = repositories.filter(function (repo) { return !repo.archived; }); - totalStars = repositories.reduce(function (sum, repo) { return sum + repo.stargazers_count; }, 0); - totalForks = repositories.reduce(function (sum, repo) { return sum + repo.forks_count; }, 0); - return [4 /*yield*/, Promise.all([ - this.estimateContributors(activeRepos, signal), - this.getDiscussionsCount(signal), - ])]; - case 3: - _b = _c.sent(), totalContributors = _b[0], discussionsCount = _b[1]; - stats = { - totalStars: totalStars, - totalForks: totalForks, - totalRepositories: repositories.length, - publicRepositories: activeRepos.length, - totalContributors: totalContributors, - discussionsCount: discussionsCount, - lastUpdated: Date.now(), - }; - // Cache the results - this.setCachedData(stats); - return [2 /*return*/, stats]; - case 4: - error_4 = _c.sent(); - console.error('Error fetching GitHub organization stats:', error_4); - fallbackStats = { - totalStars: 0, - totalForks: 0, - totalRepositories: 0, - publicRepositories: 0, - totalContributors: 140, - discussionsCount: 0, - lastUpdated: Date.now(), - }; - return [2 /*return*/, fallbackStats]; - case 5: return [2 /*return*/]; - } - }); - }); - }; - // Clear cache (useful for manual refresh) - GitHubService.prototype.clearCache = function () { - if (typeof window !== 'undefined') { - localStorage.removeItem(this.CACHE_KEY); - } - }; - // Get cache status - GitHubService.prototype.getCacheStatus = function () { - var cached = this.getCachedData(); - if (!cached) { - return { cached: false, age: 0, expiresIn: 0 }; - } - var age = Date.now() - cached.lastUpdated; - var expiresIn = Math.max(0, this.CACHE_DURATION - age); - return { cached: true, age: age, expiresIn: expiresIn }; - }; - // Fetch GitHub Discussions using GraphQL API - GitHubService.prototype.fetchDiscussions = function () { - return __awaiter(this, arguments, void 0, function (limit, signal) { - var query, variables, response, data, discussions, error_5; - var _a, _b, _c; - if (limit === void 0) { limit = 20; } - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - query = "\n query GetDiscussions($owner: String!, $name: String!, $first: Int!) {\n repository(owner: $owner, name: $name) {\n discussions(first: $first, orderBy: {field: UPDATED_AT, direction: DESC}) {\n nodes {\n id\n title\n body\n createdAt\n updatedAt\n url\n author {\n login\n avatarUrl\n url\n }\n category {\n name\n emoji\n }\n comments {\n totalCount\n }\n reactions {\n totalCount\n }\n labels(first: 10) {\n nodes {\n name\n color\n }\n }\n }\n }\n }\n }\n "; - variables = { - owner: this.ORG_NAME, - name: 'recode-website', // Main repository for discussions - first: limit - }; - _d.label = 1; - case 1: - _d.trys.push([1, 4, , 5]); - return [4 /*yield*/, fetch('https://api.github.com/graphql', { - method: 'POST', - headers: __assign(__assign({}, this.getHeaders()), { 'Content-Type': 'application/json' }), - body: JSON.stringify({ query: query, variables: variables }), - signal: signal, - })]; - case 2: - response = _d.sent(); - if (!response.ok) { - throw new Error("GraphQL request failed: ".concat(response.status)); - } - return [4 /*yield*/, response.json()]; - case 3: - data = _d.sent(); - if (data.errors) { - console.error('GraphQL errors:', data.errors); - throw new Error('GraphQL query failed'); - } - discussions = ((_c = (_b = (_a = data.data) === null || _a === void 0 ? void 0 : _a.repository) === null || _b === void 0 ? void 0 : _b.discussions) === null || _c === void 0 ? void 0 : _c.nodes) || []; - return [2 /*return*/, discussions.map(function (discussion) { - var _a, _b, _c, _d, _e, _f, _g, _h, _j; - return ({ - id: discussion.id, - title: discussion.title, - body: discussion.body || '', - author: { - login: ((_a = discussion.author) === null || _a === void 0 ? void 0 : _a.login) || 'Unknown', - avatar_url: ((_b = discussion.author) === null || _b === void 0 ? void 0 : _b.avatarUrl) || '', - html_url: ((_c = discussion.author) === null || _c === void 0 ? void 0 : _c.url) || '', - }, - category: { - name: ((_d = discussion.category) === null || _d === void 0 ? void 0 : _d.name) || 'General', - emoji: ((_e = discussion.category) === null || _e === void 0 ? void 0 : _e.emoji) || '💬', - }, - created_at: discussion.createdAt, - updated_at: discussion.updatedAt, - comments: ((_f = discussion.comments) === null || _f === void 0 ? void 0 : _f.totalCount) || 0, - reactions: { - total_count: ((_g = discussion.reactions) === null || _g === void 0 ? void 0 : _g.totalCount) || 0, - }, - html_url: discussion.url, - labels: ((_j = (_h = discussion.labels) === null || _h === void 0 ? void 0 : _h.nodes) === null || _j === void 0 ? void 0 : _j.map(function (label) { return ({ - name: label.name, - color: label.color, - }); })) || [], - }); - })]; - case 4: - error_5 = _d.sent(); - console.error('Error fetching discussions:', error_5); - // Return mock data for development/fallback - return [2 /*return*/, this.getMockDiscussions()]; - case 5: return [2 /*return*/]; - } - }); - }); - }; - // Mock discussions for development/fallback - GitHubService.prototype.getMockDiscussions = function () { - return [ - { - id: '1', - title: 'Welcome to RecodeHive Discussions!', - body: 'This is where we discuss ideas, share knowledge, and help each other grow. Feel free to ask questions, share your projects, or just say hello!', - author: { - login: 'recodehive', - avatar_url: 'https://avatars.githubusercontent.com/u/your-org-id?v=4', - html_url: 'https://github.com/recodehive', - }, - category: { - name: 'Announcements', - emoji: '📢', - }, - created_at: new Date(Date.now() - 86400000).toISOString(), - updated_at: new Date(Date.now() - 3600000).toISOString(), - comments: 12, - reactions: { - total_count: 25, - }, - html_url: 'https://github.com/recodehive/recode-website/discussions', - labels: [ - { name: 'welcome', color: '0075ca' }, - { name: 'community', color: '7057ff' }, - ], - }, - { - id: '2', - title: 'How to contribute to open source projects?', - body: 'I\'m new to open source and would love to learn how to make my first contribution. Any tips or resources would be greatly appreciated!', - author: { - login: 'newcontributor', - avatar_url: 'https://avatars.githubusercontent.com/u/example?v=4', - html_url: 'https://github.com/newcontributor', - }, - category: { - name: 'Q&A', - emoji: '❓', - }, - created_at: new Date(Date.now() - 172800000).toISOString(), - updated_at: new Date(Date.now() - 7200000).toISOString(), - comments: 8, - reactions: { - total_count: 15, - }, - html_url: 'https://github.com/recodehive/recode-website/discussions', - labels: [ - { name: 'question', color: 'd876e3' }, - { name: 'beginner', color: '0e8a16' }, - ], - }, - { - id: '3', - title: 'Feature Request: Dark Mode for Documentation', - body: 'It would be great to have a dark mode option for the documentation pages. This would be easier on the eyes during late-night coding sessions.', - author: { - login: 'darkmode-lover', - avatar_url: 'https://avatars.githubusercontent.com/u/example2?v=4', - html_url: 'https://github.com/darkmode-lover', - }, - category: { - name: 'Ideas', - emoji: '💡', - }, - created_at: new Date(Date.now() - 259200000).toISOString(), - updated_at: new Date(Date.now() - 10800000).toISOString(), - comments: 5, - reactions: { - total_count: 22, - }, - html_url: 'https://github.com/recodehive/recode-website/discussions', - labels: [ - { name: 'enhancement', color: 'a2eeef' }, - { name: 'ui/ux', color: 'f9d0c4' }, - ], - }, - ]; - }; - return GitHubService; -}()); -exports.githubService = new GitHubService(); diff --git a/src/theme/ColorModeToggle/index.js b/src/theme/ColorModeToggle/index.js deleted file mode 100644 index 2d30f5fe..00000000 --- a/src/theme/ColorModeToggle/index.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = ColorModeToggle; -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importDefault(require("react")); -var theme_common_1 = require("@docusaurus/theme-common"); -function ColorModeToggle() { - var _a = (0, theme_common_1.useColorMode)(), colorMode = _a.colorMode, setColorMode = _a.setColorMode; - var toggleColorMode = function () { - var newMode = colorMode === 'dark' ? 'light' : 'dark'; - // Only use Docusaurus's setColorMode - it handles everything properly - setColorMode(newMode); - }; - return ((0, jsx_runtime_1.jsx)("button", { onClick: toggleColorMode, "aria-label": "Switch to ".concat(colorMode === 'dark' ? 'light' : 'dark', " mode"), style: { - background: 'none', - border: 'none', - cursor: 'pointer', - padding: '8px', - borderRadius: '6px', - display: 'flex', - alignItems: 'center', - justifyContent: 'center', - transition: 'all 0.3s cubic-bezier(0.4, 0, 0.2, 1)', - transform: 'scale(1)', - }, onMouseEnter: function (e) { - e.currentTarget.style.transform = 'scale(1.1)'; - }, onMouseLeave: function (e) { - e.currentTarget.style.transform = 'scale(1)'; - }, children: (0, jsx_runtime_1.jsx)("div", { style: { - transition: 'all 0.3s cubic-bezier(0.4, 0, 0.2, 1)', - opacity: 1, - transform: 'rotate(0deg)' - }, children: colorMode === 'dark' ? ((0, jsx_runtime_1.jsx)("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "currentColor", style: { - transition: 'all 0.3s cubic-bezier(0.4, 0, 0.2, 1)', - filter: 'drop-shadow(0 0 4px rgba(255, 193, 7, 0.3))' - }, children: (0, jsx_runtime_1.jsx)("path", { d: "M12 2.25a.75.75 0 01.75.75v2.25a.75.75 0 01-1.5 0V3a.75.75 0 01.75-.75zM7.5 12a4.5 4.5 0 119 0 4.5 4.5 0 01-9 0zM18.894 6.166a.75.75 0 00-1.06-1.06l-1.591 1.59a.75.75 0 101.06 1.061l1.591-1.59zM21.75 12a.75.75 0 01-.75.75h-2.25a.75.75 0 010-1.5H21a.75.75 0 01.75.75zM17.834 18.894a.75.75 0 001.06-1.06l-1.59-1.591a.75.75 0 10-1.061 1.06l1.59 1.591zM12 18a.75.75 0 01.75.75V21a.75.75 0 01-1.5 0v-2.25A.75.75 0 0112 18zM7.758 17.303a.75.75 0 00-1.061-1.06l-1.591 1.59a.75.75 0 001.06 1.061l1.591-1.59zM6 12a.75.75 0 01-.75.75H3a.75.75 0 010-1.5h2.25A.75.75 0 016 12zM6.697 7.757a.75.75 0 001.06-1.06l-1.59-1.591a.75.75 0 00-1.061 1.06l1.59 1.591z" }) })) : ((0, jsx_runtime_1.jsx)("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "currentColor", style: { - transition: 'all 0.3s cubic-bezier(0.4, 0, 0.2, 1)', - filter: 'drop-shadow(0 0 4px rgba(99, 102, 241, 0.3))' - }, children: (0, jsx_runtime_1.jsx)("path", { d: "M9.528 1.718a.75.75 0 01.162.819A8.97 8.97 0 009 6a9 9 0 009 9 8.97 8.97 0 003.463-.69.75.75 0 01.981.98 10.503 10.503 0 01-9.694 6.46c-5.799 0-10.5-4.701-10.5-10.5 0-4.368 2.667-8.112 6.46-9.694a.75.75 0 01.818.162z" }) })) }) })); -} diff --git a/src/theme/DocSidebar/Desktop/index.js b/src/theme/DocSidebar/Desktop/index.js deleted file mode 100644 index a04e72e5..00000000 --- a/src/theme/DocSidebar/Desktop/index.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = DocSidebar; -var jsx_runtime_1 = require("react/jsx-runtime"); -/** - * DocSidebar/Desktop - Main sidebar container component - * - * This is the top-level component in the sidebar hierarchy that renders - * the main documentation sidebar container. It's responsible for: - * - Rendering the overall sidebar structure - * - Handling sidebar visibility states - * - Rendering DocSidebarItems component which handles the item list - */ -var react_1 = __importDefault(require("react")); -var clsx_1 = __importDefault(require("clsx")); -var theme_common_1 = require("@docusaurus/theme-common"); -var styles_module_css_1 = __importDefault(require("./styles.module.css")); -var DocSidebarItems_1 = __importDefault(require("@theme/DocSidebarItems")); -// Using a custom layout for desktop navigation -function DocSidebarDesktop(_a) { - var _b; - var path = _a.path, sidebar = _a.sidebar, onCollapse = _a.onCollapse, isHidden = _a.isHidden; - var _c = (0, theme_common_1.useThemeConfig)(), hideOnScroll = _c.navbar.hideOnScroll, hideable = _c.docs.sidebar.hideable; - return ((0, jsx_runtime_1.jsx)("div", { className: (0, clsx_1.default)(styles_module_css_1.default.sidebar, styles_module_css_1.default.sidebarWithHideableNavbar, (_b = {}, - _b[styles_module_css_1.default.sidebarHidden] = isHidden, - _b)), children: (0, jsx_runtime_1.jsx)("div", { className: styles_module_css_1.default.sidebarInner, children: (0, jsx_runtime_1.jsx)("nav", { className: (0, clsx_1.default)("menu", styles_module_css_1.default.menu), children: (0, jsx_runtime_1.jsx)(DocSidebarItems_1.default, { items: sidebar, activePath: path, level: 0 }) }) }) })); -} -function DocSidebar(props) { - return (0, jsx_runtime_1.jsx)(DocSidebarDesktop, __assign({}, props)); -} diff --git a/src/theme/DocSidebarItem/Category/index.js b/src/theme/DocSidebarItem/Category/index.js deleted file mode 100644 index 3d32a55a..00000000 --- a/src/theme/DocSidebarItem/Category/index.js +++ /dev/null @@ -1,227 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __rest = (this && this.__rest) || function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -}; -var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); -/** - * DocSidebarItemCategory - Component for rendering collapsible sidebar categories - * - * This component is responsible for: - * - Rendering collapsible sections/folders in the sidebar - * - Managing expand/collapse state - * - Handling active state for categories - * - Rendering nested DocSidebarItem components for child items - */ -var react_1 = __importStar(require("react")); -var theme_common_1 = require("@docusaurus/theme-common"); -// Create a simple isSamePath utility since we can't import it -function isSamePath(path1, path2) { - // If either path is empty or null, return false (no active items) - if (!path1 || !path2) { - return false; - } - // Simple path comparison function - return path1 === path2; -} -var lucide_react_1 = require("lucide-react"); -var Link_1 = __importDefault(require("@docusaurus/Link")); -var clsx_1 = __importDefault(require("clsx")); -var styles_module_css_1 = __importDefault(require("./styles.module.css")); -// Recursively get all doc ids from sidebar -function getAllDocIds(items) { - var ids = []; - for (var _i = 0, items_1 = items; _i < items_1.length; _i++) { - var item = items_1[_i]; - if (item.type === "category") { - // Include the category's href if it exists - if (item.href) { - ids.push(item.href); - } - ids = __spreadArray(__spreadArray([], ids, true), getAllDocIds(item.items), true); - } - else if (item.type === "doc") { - ids.push(item.id); - } - else if (item.href) { - // Handle link type items - ids.push(item.href); - } - } - return ids; -} -var getIcon = function (label, className) { - // Use the className to determine the appropriate icon and color - if (label.includes("GitHub") || (className === null || className === void 0 ? void 0 : className.includes("github"))) { - return (0, jsx_runtime_1.jsx)(lucide_react_1.Github, { className: "".concat(styles_module_css_1.default.categoryIcon, " ").concat(styles_module_css_1.default.githubIcon) }); - } - else if (label.includes("SQL") || (className === null || className === void 0 ? void 0 : className.includes("sql"))) { - return (0, jsx_runtime_1.jsx)(lucide_react_1.Database, { className: "".concat(styles_module_css_1.default.categoryIcon, " ").concat(styles_module_css_1.default.sqlIcon) }); - } - else if (label.includes("Python") || (className === null || className === void 0 ? void 0 : className.includes("python"))) { - return (0, jsx_runtime_1.jsx)(lucide_react_1.Code2, { className: "".concat(styles_module_css_1.default.categoryIcon, " ").concat(styles_module_css_1.default.pythonIcon) }); - } - else if (label.includes("Next.js") || (className === null || className === void 0 ? void 0 : className.includes("nextjs"))) { - return (0, jsx_runtime_1.jsx)(lucide_react_1.Zap, { className: "".concat(styles_module_css_1.default.categoryIcon, " ").concat(styles_module_css_1.default.nextjsIcon) }); - } - else if (label.includes("Google Student Ambassador") || - (className === null || className === void 0 ? void 0 : className.includes("gsa"))) { - return (0, jsx_runtime_1.jsx)(lucide_react_1.School, { className: "".concat(styles_module_css_1.default.categoryIcon, " ").concat(styles_module_css_1.default.gsaIcon) }); - } - else if (label.includes("Technical") || (className === null || className === void 0 ? void 0 : className.includes("technical"))) { - return ((0, jsx_runtime_1.jsx)(lucide_react_1.PanelRight, { className: "".concat(styles_module_css_1.default.categoryIcon, " ").concat(styles_module_css_1.default.technicalIcon) })); - } - else { - return (0, jsx_runtime_1.jsx)(lucide_react_1.Book, { className: styles_module_css_1.default.categoryIcon }); - } -}; -// Component responsible for the category collapsing behavior -function DocSidebarItemCategory(_a) { - var _b, _c; - var item = _a.item, onItemClick = _a.onItemClick, activePath = _a.activePath, _d = _a.level, level = _d === void 0 ? 0 : _d, index = _a.index, props = __rest(_a, ["item", "onItemClick", "activePath", "level", "index"]); - var items = item.items, label = item.label, collapsible = item.collapsible, className = item.className, href = item.href; - // Check if this is the GitHub category that should not be active by default - var isGitHubCategory = (label === null || label === void 0 ? void 0 : label.includes("GitHub")) || (className === null || className === void 0 ? void 0 : className.includes("github")); - // Use a simpler approach to handle collapsing - var _e = (0, react_1.useState)(item.collapsed), collapsed = _e[0], setCollapsed = _e[1]; - // Only set active if the path matches AND it's not the GitHub category on initial load - var active = href - ? isSamePath(href, activePath) && !(isGitHubCategory && !activePath) - : false; - // Use useEffect to update the collapsed state when the active path changes - (0, react_1.useEffect)(function () { - if (collapsible) { - // If activePath is empty, don't consider any items active - if (!activePath) { - return; - } - // Don't collapse if this category or any of its items are active - var hasActiveItem = items.some(function (item) { - // Check for direct href match - if (item.href && isSamePath(item.href, activePath)) { - return true; - } - // Check for nested items (for categories like SQL Basics) - if (item.type === "category" && item.items) { - return item.items.some(function (subItem) { return subItem.href && isSamePath(subItem.href, activePath); }); - } - return false; - }); - // Only collapse if not active and no active children - if (!active && !hasActiveItem) { - setCollapsed(true); - } - else { - // Keep expanded if active or has active children - setCollapsed(false); - } - } - }, [activePath, active, collapsible, items]); - var isHidden = collapsed && !active; - var handleClick = function (e) { - if (collapsible && !href) { - e.preventDefault(); - e.currentTarget.blur(); - setCollapsed(function (prev) { return !prev; }); - } - if (href) { - onItemClick === null || onItemClick === void 0 ? void 0 : onItemClick(item); - } - }; - var categoryIcon = getIcon(label, className); - // Determine category theme based on label or className - var getCategoryTheme = function () { - if (label.includes("GitHub") || (className === null || className === void 0 ? void 0 : className.includes("github"))) { - return "custom-sidebar-github"; - } - else if (label.includes("Python") || (className === null || className === void 0 ? void 0 : className.includes("python"))) { - return "custom-sidebar-python"; - } - else if (label.includes("SQL") || (className === null || className === void 0 ? void 0 : className.includes("sql"))) { - return "custom-sidebar-sql"; - } - else if (label.includes("Next.js") || (className === null || className === void 0 ? void 0 : className.includes("nextjs"))) { - return "custom-sidebar-nextjs"; - } - else if (label.includes("Google Student Ambassador") || - (className === null || className === void 0 ? void 0 : className.includes("gsa"))) { - return "custom-sidebar-gsa"; - } - else if (label.includes("Technical") || - (className === null || className === void 0 ? void 0 : className.includes("technical"))) { - return "custom-sidebar-technical"; - } - return ""; - }; - var categoryTheme = getCategoryTheme(); - return ((0, jsx_runtime_1.jsxs)("li", { className: (0, clsx_1.default)(theme_common_1.ThemeClassNames.docs.docSidebarItemCategory, { - "menu__list-item--collapsed": collapsed, - }, className, styles_module_css_1.default.categoryItem, categoryTheme, (_b = {}, - _b[styles_module_css_1.default.categoryLevel1] = level === 1, - _b[styles_module_css_1.default.categoryLevel2] = level === 2, - _b)), children: [(0, jsx_runtime_1.jsx)("div", { className: (0, clsx_1.default)(styles_module_css_1.default.categoryHeader, (_c = {}, - _c[styles_module_css_1.default.categoryHeaderActive] = active, - _c)), children: href ? ((0, jsx_runtime_1.jsx)(Link_1.default, { className: (0, clsx_1.default)("menu__link", { - "menu__link--active": active, - }, styles_module_css_1.default.categoryLink), to: href, onClick: handleClick, children: (0, jsx_runtime_1.jsxs)("div", { className: styles_module_css_1.default.categoryLinkContent, children: [categoryIcon, (0, jsx_runtime_1.jsx)("span", { className: styles_module_css_1.default.categoryLabel, children: label.replace(/^[🐙🐍🗄️⚡🎓🔧📚⚙️👨‍💼🔄📊]+ /g, "") })] }) })) : ((0, jsx_runtime_1.jsxs)("a", { className: (0, clsx_1.default)("menu__link", { - "menu__link--active": active, - }, styles_module_css_1.default.categoryLink), href: "#", onClick: handleClick, children: [(0, jsx_runtime_1.jsxs)("div", { className: styles_module_css_1.default.categoryLinkContent, children: [categoryIcon, (0, jsx_runtime_1.jsx)("span", { className: styles_module_css_1.default.categoryLabel, children: label.replace(/^[🐙🐍🗄️⚡🎓🔧📚⚙️👨‍💼🔄📊]+ /g, "") })] }), collapsible && ((0, jsx_runtime_1.jsx)("div", { className: styles_module_css_1.default.categoryCollapseIcon, children: collapsed ? ((0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { size: 16, className: styles_module_css_1.default.chevronIcon })) : ((0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { size: 16, className: styles_module_css_1.default.chevronIcon })) }))] })) }), !isHidden && ((0, jsx_runtime_1.jsx)("ul", { className: (0, clsx_1.default)("menu__list", styles_module_css_1.default.categoryList), children: items.map(function (childItem, i) { - // @ts-ignore - var DocSidebarItem = require("@theme/DocSidebarItem").default; - return ((0, jsx_runtime_1.jsx)(DocSidebarItem, { tabIndex: collapsed ? "-1" : "0", item: childItem, onItemClick: onItemClick, activePath: activePath, level: level + 1, index: i }, i)); - }) }))] })); -} -exports.default = (0, react_1.memo)(DocSidebarItemCategory); diff --git a/src/theme/DocSidebarItem/Html/index.js b/src/theme/DocSidebarItem/Html/index.js deleted file mode 100644 index 3fbceb30..00000000 --- a/src/theme/DocSidebarItem/Html/index.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = DocSidebarItemHtml; -var jsx_runtime_1 = require("react/jsx-runtime"); -/** - * DocSidebarItemHtml - Component for rendering custom HTML in sidebar - * - * This component handles: - * - Rendering custom HTML content in the sidebar - * - Preserving any custom classes - * - Safely injecting HTML using dangerouslySetInnerHTML - * - Managing accessibility through tabIndex - */ -var react_1 = __importDefault(require("react")); -var clsx_1 = __importDefault(require("clsx")); -function DocSidebarItemHtml(_a) { - var item = _a.item, level = _a.level, tabIndex = _a.tabIndex, - // We're receiving these props but not using them in this component - activePath = _a.activePath, index = _a.index; - var value = item.value, className = item.className; - return ((0, jsx_runtime_1.jsx)("li", { className: (0, clsx_1.default)("menu__list-item", className), dangerouslySetInnerHTML: { __html: value }, tabIndex: tabIndex })); -} diff --git a/src/theme/DocSidebarItem/Link/index.js b/src/theme/DocSidebarItem/Link/index.js deleted file mode 100644 index a815b609..00000000 --- a/src/theme/DocSidebarItem/Link/index.js +++ /dev/null @@ -1,62 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __rest = (this && this.__rest) || function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = DocSidebarItemLink; -var jsx_runtime_1 = require("react/jsx-runtime"); -/** - * DocSidebarItemLink - Component for rendering sidebar link items - * - * This component is responsible for: - * - Rendering individual documentation page links - * - Handling active state styling - * - Managing click behavior and navigation - */ -var react_1 = __importDefault(require("react")); -var clsx_1 = __importDefault(require("clsx")); -var theme_common_1 = require("@docusaurus/theme-common"); -var Link_1 = __importDefault(require("@docusaurus/Link")); -var isInternalUrl_1 = __importDefault(require("@docusaurus/isInternalUrl")); -var styles_module_css_1 = __importDefault(require("./styles.module.css")); -// Utility to determine if a sidebar item is active -function isActiveSidebarItem(item, activePath) { - if (!activePath) { - return false; - } - return item.href === activePath; -} -function DocSidebarItemLink(_a) { - var item = _a.item, onItemClick = _a.onItemClick, activePath = _a.activePath, level = _a.level, index = _a.index, props = __rest(_a, ["item", "onItemClick", "activePath", "level", "index"]); - var href = item.href, label = item.label, className = item.className, autoAddBaseUrl = item.autoAddBaseUrl; - // Determine if item is active based on path matching - var isActive = isActiveSidebarItem(item, activePath); - var isInternalLink = (0, isInternalUrl_1.default)(href); - return ((0, jsx_runtime_1.jsx)("li", { className: (0, clsx_1.default)(theme_common_1.ThemeClassNames.docs.docSidebarItemLink, theme_common_1.ThemeClassNames.docs.docSidebarItemLinkLevel(level), "menu__list-item", className, styles_module_css_1.default.linkItem), children: (0, jsx_runtime_1.jsx)(Link_1.default, __assign({ className: (0, clsx_1.default)("menu__link", { - "menu__link--active": isActive, - }, styles_module_css_1.default.menuLink), autoAddBaseUrl: autoAddBaseUrl, "aria-current": isActive ? "page" : undefined, to: href }, (isInternalLink && { - onClick: onItemClick ? function () { return onItemClick(item); } : undefined, - }), props, { children: (0, jsx_runtime_1.jsxs)("div", { className: styles_module_css_1.default.linkContent, children: [(0, jsx_runtime_1.jsx)("span", { className: styles_module_css_1.default.linkDot }), (0, jsx_runtime_1.jsx)("span", { children: label })] }) })) }, label)); -} diff --git a/src/theme/DocSidebarItem/index.js b/src/theme/DocSidebarItem/index.js deleted file mode 100644 index d5741182..00000000 --- a/src/theme/DocSidebarItem/index.js +++ /dev/null @@ -1,50 +0,0 @@ -"use strict"; -var __rest = (this && this.__rest) || function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = DocSidebarItem; -var jsx_runtime_1 = require("react/jsx-runtime"); -/** - * DocSidebarItem - Router component for sidebar items - * - * This component acts as a router that: - * - Determines the type of sidebar item (category, link, or HTML) - * - Renders the appropriate component based on the item type - * - Passes relevant props to child components - * - * It works with three subcomponents: - * - DocSidebarItemCategory: For collapsible sections (folders) - * - DocSidebarItemLink: For individual page links - * - DocSidebarItemHtml: For custom HTML content - */ -var react_1 = __importDefault(require("react")); -var Category_1 = __importDefault(require("@theme/DocSidebarItem/Category")); -var Link_1 = __importDefault(require("@theme/DocSidebarItem/Link")); -var Html_1 = __importDefault(require("@theme/DocSidebarItem/Html")); -function DocSidebarItem(_a) { - var item = _a.item, props = __rest(_a, ["item"]); - var activePath = props.activePath || ""; - var level = props.level || 0; - var index = props.index || 0; - switch (item.type) { - case "category": - return ((0, jsx_runtime_1.jsx)(Category_1.default, { item: item, activePath: activePath, level: level, index: index, tabIndex: props.tabIndex, onItemClick: props.onItemClick })); - case "html": - return ((0, jsx_runtime_1.jsx)(Html_1.default, { item: item, level: level, tabIndex: props.tabIndex, activePath: activePath, index: index })); - case "link": - default: - return ((0, jsx_runtime_1.jsx)(Link_1.default, { item: item, activePath: activePath, level: level, index: index, tabIndex: props.tabIndex, onItemClick: props.onItemClick })); - } -} diff --git a/src/theme/DocSidebarItem/types.js b/src/theme/DocSidebarItem/types.js deleted file mode 100644 index c8ad2e54..00000000 --- a/src/theme/DocSidebarItem/types.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/src/theme/DocSidebarItems/index.js b/src/theme/DocSidebarItems/index.js deleted file mode 100644 index ae1eb983..00000000 --- a/src/theme/DocSidebarItems/index.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = DocSidebarItems; -var jsx_runtime_1 = require("react/jsx-runtime"); -/** - * DocSidebarItems - Container for sidebar item list - * - * This component is responsible for: - * - Rendering the list of sidebar items (categories and links) - * - Passing props to the DocSidebarItem component - * - Managing the overall list structure - * - Setting default active state to none on initial load - * - * It serves as the bridge between DocSidebar/Desktop and individual DocSidebarItem components. - */ -var react_1 = __importDefault(require("react")); -var DocSidebarItem_1 = __importDefault(require("@theme/DocSidebarItem")); -var styles_module_css_1 = __importDefault(require("./styles.module.css")); -function DocSidebarItems(_a) { - // Force empty activePath to disable default selection - // This will prevent any sidebar items from being marked as active by default - var items = _a.items, activePath = _a.activePath, _b = _a.level, level = _b === void 0 ? 0 : _b; - // Get the current URL path - var currentPath = typeof window !== "undefined" ? window.location.pathname : ""; - // Check if we're at the docs root page - var isDocsRootPath = currentPath === "/" || - currentPath === "/docs" || - currentPath === "/docs/" || - currentPath.startsWith("/docs/GitHub/intro-github"); - // If we're at the docs root, force an empty active path - var effectiveActivePath = isDocsRootPath ? "" : activePath; - return ((0, jsx_runtime_1.jsx)("ul", { className: "menu__list", children: items.map(function (item, index) { return ((0, jsx_runtime_1.jsx)("div", { className: index === 0 ? styles_module_css_1.default.firstItem : "", children: (0, jsx_runtime_1.jsx)(DocSidebarItem_1.default, { item: item, index: index, activePath: effectiveActivePath, level: level }) }, index)); }) })); -} diff --git a/src/theme/Footer/Copyright/index.js b/src/theme/Footer/Copyright/index.js deleted file mode 100644 index 96bc9c2f..00000000 --- a/src/theme/Footer/Copyright/index.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = FooterCopyright; -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importDefault(require("react")); -function FooterCopyright(_a) { - var copyright = _a.copyright; - return ((0, jsx_runtime_1.jsx)("div", { className: "footer__copyright", - // Developer provided the HTML, so assume it's safe. - // eslint-disable-next-line react/no-danger - dangerouslySetInnerHTML: { __html: copyright } })); -} diff --git a/src/theme/Footer/Layout/Counter.js b/src/theme/Footer/Layout/Counter.js deleted file mode 100644 index 18785eb1..00000000 --- a/src/theme/Footer/Layout/Counter.js +++ /dev/null @@ -1,71 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importStar(require("react")); -var Counter = function (_a) { - var value = _a.value, _b = _a.duration, duration = _b === void 0 ? 1500 : _b, _c = _a.suffix, suffix = _c === void 0 ? "" : _c; - var _d = (0, react_1.useState)(0), count = _d[0], setCount = _d[1]; - var _e = (0, react_1.useState)(false), hasAnimated = _e[0], setHasAnimated = _e[1]; - var ref = (0, react_1.useRef)(null); - (0, react_1.useEffect)(function () { - if (!ref.current) - return; - var observer = new IntersectionObserver(function (entries) { - var entry = entries[0]; - if (entry.isIntersecting && !hasAnimated) { - animateCount(); - setHasAnimated(true); - } - }, { threshold: 0.5 } // Trigger when 50% of element is visible - ); - observer.observe(ref.current); - return function () { return observer.disconnect(); }; - }, [hasAnimated]); - var animateCount = function () { - var startTime = performance.now(); - var step = function (now) { - var progress = Math.min((now - startTime) / duration, 1); - var current = Math.floor(progress * value); - setCount(current); - if (progress < 1) { - requestAnimationFrame(step); - } - }; - requestAnimationFrame(step); - }; - return ((0, jsx_runtime_1.jsxs)("div", { ref: ref, children: [count.toLocaleString(), suffix] })); -}; -exports.default = Counter; diff --git a/src/theme/Footer/Layout/index.js b/src/theme/Footer/Layout/index.js deleted file mode 100644 index 6a933616..00000000 --- a/src/theme/Footer/Layout/index.js +++ /dev/null @@ -1,152 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); - return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = FooterLayout; -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importStar(require("react")); -var Link_1 = __importDefault(require("@docusaurus/Link")); -require("./enhanced-footer.css"); -var Counter_1 = __importDefault(require("./Counter")); -var react_dom_1 = require("react-dom"); -var emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; -function FooterLayout(_a) { - var _this = this; - var style = _a.style, links = _a.links, logo = _a.logo, copyright = _a.copyright; - var _b = (0, react_1.useState)(new Date().getFullYear()), currentYear = _b[0], setCurrentYear = _b[1]; - var _c = (0, react_1.useState)({ - activeUsers: "50K+", - tutorials: "200+", - successRate: "95%", - supportHours: "24/7", - }), stats = _c[0], setStats = _c[1]; - var _d = (0, react_1.useState)(""), email = _d[0], setEmail = _d[1]; - var _e = (0, react_1.useState)(false), isSubscribed = _e[0], setIsSubscribed = _e[1]; - var _f = (0, react_1.useState)(false), showToast = _f[0], setShowToast = _f[1]; - var _g = (0, react_1.useState)(""), error = _g[0], setError = _g[1]; - (0, react_1.useEffect)(function () { - // Simulate real-time stats updates - var fetchStats = function () { return __awaiter(_this, void 0, void 0, function () { - var baseUsers, baseTutorials, randomGrowth; - return __generator(this, function (_a) { - try { - baseUsers = 52000; - baseTutorials = 215; - randomGrowth = Math.floor(Math.random() * 100); - setStats({ - activeUsers: "".concat(Math.floor((baseUsers + randomGrowth) / 1000), "K+"), - tutorials: "".concat(baseTutorials + Math.floor(randomGrowth / 10), "+"), - successRate: "".concat(95 + Math.floor(Math.random() * 3), "%"), - supportHours: "24/7", - }); - } - catch (error) { - console.log("Using fallback stats"); - } - return [2 /*return*/]; - }); - }); }; - fetchStats(); - var interval = setInterval(fetchStats, 30000); // Update every 30 seconds - return function () { return clearInterval(interval); }; - }, []); - var handleSubscribe = function (e) { - e.preventDefault(); - if (!email) { - setError("Email is required"); - return; - } - if (!emailRegex.test(email)) { - setError("Please enter a valid email address"); - return; - } - setError(""); - setIsSubscribed(true); - setShowToast(true); - // Hide toast after 3 seconds - setTimeout(function () { - setShowToast(false); - }, 3000); - // Reset form after 3 seconds - setTimeout(function () { - setIsSubscribed(false); - setEmail(""); - }, 3000); - }; - return ((0, jsx_runtime_1.jsxs)("footer", { className: "enhanced-footer", children: [showToast && - (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)("div", { className: "newsletter-toast", children: (0, jsx_runtime_1.jsxs)("div", { className: "toast-content", children: [(0, jsx_runtime_1.jsx)("span", { className: "toast-icon", children: "\uD83C\uDF89" }), (0, jsx_runtime_1.jsxs)("div", { className: "toast-message", children: [(0, jsx_runtime_1.jsx)("h4", { children: "Successfully Subscribed!" }), (0, jsx_runtime_1.jsx)("p", { children: "Thank you for joining our newsletter." })] }), (0, jsx_runtime_1.jsx)("button", { className: "toast-close", onClick: function () { return setShowToast(false); }, "aria-label": "Close notification", children: "\u00D7" })] }) }), document.body // 👈 mounts toast directly to , outside footer - ), (0, jsx_runtime_1.jsx)("div", { className: "footer-hero", children: (0, jsx_runtime_1.jsxs)("div", { className: "container", children: [(0, jsx_runtime_1.jsxs)("div", { className: "footer-hero-content", children: [(0, jsx_runtime_1.jsx)("div", { className: "footer-logo-section", children: (0, jsx_runtime_1.jsxs)("div", { className: "footer-logo", children: [(0, jsx_runtime_1.jsx)("div", { className: "logo-container", children: (0, jsx_runtime_1.jsx)("img", { src: "/img/logo.png", alt: "recodehive", className: "footer-logo-img" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "footer-brand-header", children: [(0, jsx_runtime_1.jsx)("h1", { className: "footer-brand-title", children: "recodehive" }), (0, jsx_runtime_1.jsxs)("div", { className: "footer-trust-badge", children: [(0, jsx_runtime_1.jsxs)("div", { className: "trust-stars", children: [(0, jsx_runtime_1.jsx)("span", { className: "star", children: "\u2B50" }), (0, jsx_runtime_1.jsx)("span", { className: "star", children: "\u2B50" }), (0, jsx_runtime_1.jsx)("span", { className: "star", children: "\u2B50" }), (0, jsx_runtime_1.jsx)("span", { className: "star", children: "\u2B50" }), (0, jsx_runtime_1.jsx)("span", { className: "star", children: "\u2B50" })] }), (0, jsx_runtime_1.jsx)("span", { className: "trust-text", children: "Trusted by 50K+ developers" })] })] })] }) }), (0, jsx_runtime_1.jsxs)("div", { className: "footer-hero-text", children: [(0, jsx_runtime_1.jsx)("h1", { children: "Empowering the Next Generation of Developers" }), (0, jsx_runtime_1.jsx)("p", { children: "Master cutting-edge technologies, build innovative projects, and join a thriving community of developers passionate about open-source innovation and continuous learning." })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "footer-stats", children: [(0, jsx_runtime_1.jsxs)("div", { className: "stat-item", title: "Growing community of active learners", children: [(0, jsx_runtime_1.jsx)("div", { className: "stat-icon stat-icon-learners", children: (0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { d: "M16 4c0-1.11.89-2 2-2s2 .89 2 2-.89 2-2 2-2-.89-2-2zM4 18v-6h2.5l6 6H4zm16.5-9.5L19 7l-7.5 7.5L9 12l-2.5 2.5L4 12l7.5-7.5L14 7l6.5 1.5z" }) }) }), (0, jsx_runtime_1.jsxs)("div", { className: "stat-content", children: [(0, jsx_runtime_1.jsx)("div", { className: "stat-number", children: (0, jsx_runtime_1.jsx)(Counter_1.default, { value: parseInt(stats.activeUsers), suffix: "K+" }) }), (0, jsx_runtime_1.jsx)("div", { className: "stat-label", children: "Active Learners" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "stat-item", title: "Comprehensive tutorials and courses", children: [(0, jsx_runtime_1.jsx)("div", { className: "stat-icon stat-icon-tutorials", children: (0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z" }) }) }), (0, jsx_runtime_1.jsxs)("div", { className: "stat-content", children: [(0, jsx_runtime_1.jsx)("div", { className: "stat-number", children: (0, jsx_runtime_1.jsx)(Counter_1.default, { value: parseInt(stats.tutorials), suffix: "+" }) }), (0, jsx_runtime_1.jsx)("div", { className: "stat-label", children: "Tutorials" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "stat-item", title: "High success rate in learning outcomes", children: [(0, jsx_runtime_1.jsx)("div", { className: "stat-icon stat-icon-success", children: (0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" }) }) }), (0, jsx_runtime_1.jsxs)("div", { className: "stat-content", children: [(0, jsx_runtime_1.jsx)("div", { className: "stat-number", children: (0, jsx_runtime_1.jsx)(Counter_1.default, { value: parseInt(stats.successRate), suffix: "%" }) }), (0, jsx_runtime_1.jsx)("div", { className: "stat-label", children: "Success Rate" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "stat-item", title: "Round-the-clock community support", children: [(0, jsx_runtime_1.jsx)("div", { className: "stat-icon stat-icon-support", children: (0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-6h2v6zm0-8h-2V7h2v4z" }) }) }), (0, jsx_runtime_1.jsxs)("div", { className: "stat-content", children: [(0, jsx_runtime_1.jsx)("div", { className: "stat-number", children: stats.supportHours }), (0, jsx_runtime_1.jsx)("div", { className: "stat-label", children: "Support" })] })] })] })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "footer-links-section", children: (0, jsx_runtime_1.jsx)("div", { className: "container", children: (0, jsx_runtime_1.jsxs)("div", { className: "footer-links-grid", children: [(0, jsx_runtime_1.jsxs)("div", { className: "footer-column", children: [(0, jsx_runtime_1.jsxs)("h3", { className: "footer-column-title", children: [(0, jsx_runtime_1.jsx)("div", { className: "column-icon resources-icon", children: "\uD83D\uDCDA" }), "Learning"] }), (0, jsx_runtime_1.jsxs)("ul", { className: "footer-links", children: [(0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsxs)(Link_1.default, { to: "#", className: "footer-link", children: [(0, jsx_runtime_1.jsx)("span", { className: "link-icon", children: "\uD83D\uDCD6" }), "Documentation", (0, jsx_runtime_1.jsx)("span", { className: "link-badge popular", children: "Popular" })] }) }), (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsxs)(Link_1.default, { to: "/courses", className: "footer-link", children: [(0, jsx_runtime_1.jsx)("span", { className: "link-icon", children: "\uD83C\uDFA5" }), "Video Courses", (0, jsx_runtime_1.jsx)("span", { className: "link-badge new", children: "New" })] }) }), (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsxs)(Link_1.default, { to: "/get-started", className: "footer-link", children: [(0, jsx_runtime_1.jsx)("span", { className: "link-icon", children: "\uD83D\uDE80" }), "Get Started"] }) }), (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsxs)(Link_1.default, { to: "/interview-prep", className: "footer-link", children: [(0, jsx_runtime_1.jsx)("span", { className: "link-icon", children: "\uD83E\uDDE9" }), "Interview Prep", (0, jsx_runtime_1.jsx)("span", { className: "link-badge hot", children: "Hot" })] }) }), (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsxs)(Link_1.default, { to: "/badges/github-badges", className: "footer-link", children: [(0, jsx_runtime_1.jsx)("span", { className: "link-icon", children: "\uD83C\uDFC6" }), "GitHub Badges"] }) })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "footer-column", children: [(0, jsx_runtime_1.jsxs)("h3", { className: "footer-column-title", children: [(0, jsx_runtime_1.jsx)("div", { className: "column-icon company-icon", children: "\uD83C\uDFE2" }), "Company"] }), (0, jsx_runtime_1.jsxs)("ul", { className: "footer-links", children: [(0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsxs)(Link_1.default, { to: "/community", className: "footer-link", children: [(0, jsx_runtime_1.jsx)("span", { className: "link-icon", children: "\uD83D\uDC65" }), "Community"] }) }), (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsxs)(Link_1.default, { to: "/blogs", className: "footer-link", children: [(0, jsx_runtime_1.jsx)("span", { className: "link-icon", children: "\uD83D\uDCF0" }), "Our Blog"] }) }), (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsxs)(Link_1.default, { to: "/careers", className: "footer-link", children: [(0, jsx_runtime_1.jsx)("span", { className: "link-icon", children: "\uD83D\uDCBC" }), "Careers", (0, jsx_runtime_1.jsx)("span", { className: "link-badge hiring", children: "We're Hiring!" })] }) }), (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsxs)(Link_1.default, { to: "/our-sponsors", className: "footer-link", children: [(0, jsx_runtime_1.jsx)("span", { className: "link-icon", children: "\uD83E\uDD1D" }), "Our Sponsors"] }) }), (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsxs)(Link_1.default, { to: "/showcase", className: "footer-link", children: [(0, jsx_runtime_1.jsx)("span", { className: "link-icon", children: "\uD83C\uDF1F" }), "Showcase"] }) })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "footer-column", children: [(0, jsx_runtime_1.jsxs)("h3", { className: "footer-column-title", children: [(0, jsx_runtime_1.jsx)("div", { className: "column-icon support-icon", children: "\uD83D\uDEE0\uFE0F" }), "Support"] }), (0, jsx_runtime_1.jsxs)("ul", { className: "footer-links", children: [(0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsxs)(Link_1.default, { to: "/contact-us", className: "footer-link", children: [(0, jsx_runtime_1.jsx)("span", { className: "link-icon", children: "\u2753" }), "Contact Us"] }) }), (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsxs)(Link_1.default, { to: "/broadcasts", className: "footer-link", children: [(0, jsx_runtime_1.jsx)("span", { className: "link-icon", children: "\uD83D\uDCFA" }), "Broadcasts"] }) }), (0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsxs)(Link_1.default, { to: "/podcasts", className: "footer-link", children: [(0, jsx_runtime_1.jsx)("span", { className: "link-icon", children: "\uD83C\uDF99\uFE0F" }), "Podcasts"] }) })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "footer-column newsletter-column", children: [(0, jsx_runtime_1.jsxs)("h3", { className: "footer-column-title", children: [(0, jsx_runtime_1.jsx)("div", { className: "column-icon newsletter-icon", children: "\uD83D\uDCE7" }), "Stay in the Loop"] }), (0, jsx_runtime_1.jsxs)("p", { className: "newsletter-description", children: ["Join ", stats.activeUsers, " developers getting weekly insights, tutorials, and exclusive content."] }), (0, jsx_runtime_1.jsxs)("form", { className: "newsletter-form", onSubmit: handleSubscribe, children: [(0, jsx_runtime_1.jsx)("input", { type: "email", placeholder: "your@email.com", className: "newsletter-input", value: email, onChange: function (e) { - setEmail(e.target.value); - setError(""); - }, required: true }), (0, jsx_runtime_1.jsx)("button", { type: "submit", className: "newsletter-button ".concat(isSubscribed ? "subscribed" : ""), disabled: isSubscribed, children: isSubscribed ? "✓ Subscribed!" : "Subscribe Now →" }), error && (0, jsx_runtime_1.jsx)("p", { className: "error-text", children: error })] }), (0, jsx_runtime_1.jsx)("div", { className: "newsletter-stats", children: (0, jsx_runtime_1.jsx)("span", { className: "newsletter-stat", children: "\uD83D\uDCCA 1.2K+ developers joined this week" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "quick-links-section newsletter-quick-links", children: [(0, jsx_runtime_1.jsxs)("h4", { className: "quick-links-title", children: [(0, jsx_runtime_1.jsx)("span", { className: "links-icon", children: "\uD83D\uDD17" }), "QUICK LINKS"] }), (0, jsx_runtime_1.jsxs)("div", { className: "quick-links-list", children: [(0, jsx_runtime_1.jsxs)(Link_1.default, { to: "/get-started", className: "quick-link", children: [(0, jsx_runtime_1.jsx)("span", { className: "quick-link-icon", children: "\uD83D\uDE80" }), "Get Started"] }), (0, jsx_runtime_1.jsxs)(Link_1.default, { to: "/dashboard", className: "quick-link", children: [(0, jsx_runtime_1.jsx)("span", { className: "quick-link-icon", children: "\uD83D\uDCCA" }), "Dashboard"] })] })] })] })] }) }) }), (0, jsx_runtime_1.jsx)("div", { className: "footer-bottom", children: (0, jsx_runtime_1.jsx)("div", { className: "container", children: (0, jsx_runtime_1.jsxs)("div", { className: "footer-bottom-content", children: [(0, jsx_runtime_1.jsx)("div", { className: "footer-bottom-left", children: (0, jsx_runtime_1.jsxs)("div", { className: "footer-social-links", children: [(0, jsx_runtime_1.jsx)("span", { className: "social-label", children: "Connect & Follow:" }), (0, jsx_runtime_1.jsx)(Link_1.default, { to: "https://github.com/recodehive", className: "social-link github", "aria-label": "GitHub", children: (0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { d: "M12 0C5.37 0 0 5.37 0 12C0 17.31 3.435 21.795 8.205 23.385C8.805 23.49 9.03 23.13 9.03 22.815C9.03 22.53 9.015 21.585 9.015 20.58C6 21.135 5.22 19.845 4.98 19.17C4.845 18.825 4.26 17.76 3.75 17.475C3.33 17.25 2.73 16.695 3.735 16.68C4.68 16.665 5.355 17.55 5.58 17.91C6.66 19.725 8.385 19.215 9.075 18.9C9.18 18.12 9.495 17.595 9.84 17.295C7.17 16.995 4.38 15.96 4.38 11.37C4.38 10.065 4.845 8.985 5.61 8.145C5.49 7.845 5.07 6.615 5.73 4.965C5.73 4.965 6.735 4.65 9.03 6.195C9.99 5.925 11.01 5.79 12.03 5.79C13.05 5.79 14.07 5.925 15.03 6.195C17.325 4.635 18.33 4.965 18.33 4.965C18.99 6.615 18.57 7.845 18.45 8.145C19.215 8.985 19.68 10.05 19.68 11.37C19.68 15.975 16.875 16.995 14.205 17.295C14.64 17.67 15.015 18.39 15.015 19.515C15.015 21.12 15 22.41 15 22.815C15 23.13 15.225 23.505 15.825 23.385C18.2072 22.5807 20.2772 21.0497 21.7437 19.0074C23.2101 16.965 23.9993 14.5143 24 12C24 5.37 18.63 0 12 0Z" }) }) }), (0, jsx_runtime_1.jsx)(Link_1.default, { to: "https://x.com/sanjay_kv_", className: "social-link twitter", "aria-label": "Twitter", children: (0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" }) }) }), (0, jsx_runtime_1.jsx)(Link_1.default, { to: "https://www.instagram.com/nomad_brains/", className: "social-link instagram", "aria-label": "Instagram", children: (0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { d: "M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zm0 5.838c-3.403 0-6.162 2.759-6.162 6.162s2.759 6.163 6.162 6.163 6.162-2.759 6.162-6.163c0-3.403-2.759-6.162-6.162-6.162zm0 10.162c-2.209 0-4-1.79-4-4 0-2.209 1.791-4 4-4s4 1.791 4 4c0 2.21-1.791 4-4 4zm6.406-11.845c-.796 0-1.441.645-1.441 1.44s.645 1.44 1.441 1.44c.795 0 1.439-.645 1.439-1.44s-.644-1.44-1.439-1.44z" }) }) }), (0, jsx_runtime_1.jsx)(Link_1.default, { to: "https://www.linkedin.com/in/sanjay-k-v/", className: "social-link linkedin", "aria-label": "LinkedIn", children: (0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", children: (0, jsx_runtime_1.jsx)("path", { d: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" }) }) })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "footer-bottom-center", children: (0, jsx_runtime_1.jsxs)("div", { className: "footer-legal-links", children: [(0, jsx_runtime_1.jsx)(Link_1.default, { to: "/privacy-policy", className: "legal-link", children: "Privacy Policy" }), (0, jsx_runtime_1.jsx)(Link_1.default, { to: "/terms-service", className: "legal-link", children: "Terms of Service" }), (0, jsx_runtime_1.jsx)(Link_1.default, { to: "/code-of-conduct", className: "legal-link", children: "Code of Conduct" }), (0, jsx_runtime_1.jsx)(Link_1.default, { to: "/License", className: "legal-link", children: "License" })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "footer-bottom-right", children: (0, jsx_runtime_1.jsx)("div", { className: "footer-copyright", children: (0, jsx_runtime_1.jsxs)("span", { children: ["\u00A9 ", currentYear, " recodehive. Made with \u2764\uFE0F by the Community."] }) }) })] }) }) })] })); -} diff --git a/src/theme/Footer/LinkItem/index.js b/src/theme/Footer/LinkItem/index.js deleted file mode 100644 index a269c624..00000000 --- a/src/theme/Footer/LinkItem/index.js +++ /dev/null @@ -1,48 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __rest = (this && this.__rest) || function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = FooterLinkItem; -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importDefault(require("react")); -var clsx_1 = __importDefault(require("clsx")); -var Link_1 = __importDefault(require("@docusaurus/Link")); -var useBaseUrl_1 = __importDefault(require("@docusaurus/useBaseUrl")); -var isInternalUrl_1 = __importDefault(require("@docusaurus/isInternalUrl")); -var ExternalLink_1 = __importDefault(require("@theme/Icon/ExternalLink")); -function FooterLinkItem(_a) { - var item = _a.item; - var to = item.to, href = item.href, label = item.label, prependBaseUrlToHref = item.prependBaseUrlToHref, className = item.className, props = __rest(item, ["to", "href", "label", "prependBaseUrlToHref", "className"]); - var toUrl = (0, useBaseUrl_1.default)(to); - var normalizedHref = (0, useBaseUrl_1.default)(href, { forcePrependBaseUrl: true }); - return ((0, jsx_runtime_1.jsxs)(Link_1.default, __assign({ className: (0, clsx_1.default)('footer__link-item', className) }, (href - ? { - href: prependBaseUrlToHref ? normalizedHref : href, - } - : { - to: toUrl, - }), props, { children: [label, href && !(0, isInternalUrl_1.default)(href) && (0, jsx_runtime_1.jsx)(ExternalLink_1.default, {})] }))); -} diff --git a/src/theme/Footer/Links/MultiColumn/index.js b/src/theme/Footer/Links/MultiColumn/index.js deleted file mode 100644 index 5609440d..00000000 --- a/src/theme/Footer/Links/MultiColumn/index.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = FooterLinksMultiColumn; -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importDefault(require("react")); -var clsx_1 = __importDefault(require("clsx")); -var LinkItem_1 = __importDefault(require("@theme/Footer/LinkItem")); -function ColumnLinkItem(_a) { - var _b; - var item = _a.item; - return item.html ? ((0, jsx_runtime_1.jsx)("li", { className: (0, clsx_1.default)('footer__item', item.className), - // Developer provided the HTML, so assume it's safe. - // eslint-disable-next-line react/no-danger - dangerouslySetInnerHTML: { __html: item.html } })) : ((0, jsx_runtime_1.jsx)("li", { className: "footer__item", children: (0, jsx_runtime_1.jsx)(LinkItem_1.default, { item: item }) }, (_b = item.href) !== null && _b !== void 0 ? _b : item.to)); -} -function Column(_a) { - var column = _a.column; - return ((0, jsx_runtime_1.jsxs)("div", { className: (0, clsx_1.default)('col footer__col', column.className), children: [(0, jsx_runtime_1.jsx)("div", { className: "footer__title", children: column.title }), (0, jsx_runtime_1.jsx)("ul", { className: "footer__items clean-list", children: column.items.map(function (item, i) { return ((0, jsx_runtime_1.jsx)(ColumnLinkItem, { item: item }, i)); }) })] })); -} -function FooterLinksMultiColumn(_a) { - var columns = _a.columns; - return ((0, jsx_runtime_1.jsx)("div", { className: "row footer__links", children: columns.map(function (column, i) { return ((0, jsx_runtime_1.jsx)(Column, { column: column }, i)); }) })); -} diff --git a/src/theme/Footer/Links/Simple/index.js b/src/theme/Footer/Links/Simple/index.js deleted file mode 100644 index 70fe1fdd..00000000 --- a/src/theme/Footer/Links/Simple/index.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = FooterLinksSimple; -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importDefault(require("react")); -var clsx_1 = __importDefault(require("clsx")); -var LinkItem_1 = __importDefault(require("@theme/Footer/LinkItem")); -function Separator() { - return (0, jsx_runtime_1.jsx)("span", { className: "footer__link-separator", children: "\u00B7" }); -} -function SimpleLinkItem(_a) { - var item = _a.item; - return item.html ? ((0, jsx_runtime_1.jsx)("span", { className: (0, clsx_1.default)('footer__link-item', item.className), - // Developer provided the HTML, so assume it's safe. - // eslint-disable-next-line react/no-danger - dangerouslySetInnerHTML: { __html: item.html } })) : ((0, jsx_runtime_1.jsx)(LinkItem_1.default, { item: item })); -} -function FooterLinksSimple(_a) { - var links = _a.links; - return ((0, jsx_runtime_1.jsx)("div", { className: "footer__links text--center", children: (0, jsx_runtime_1.jsx)("div", { className: "footer__links", children: links.map(function (item, i) { return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(SimpleLinkItem, { item: item }), links.length !== i + 1 && (0, jsx_runtime_1.jsx)(Separator, {})] }, i)); }) }) })); -} diff --git a/src/theme/Footer/Links/index.js b/src/theme/Footer/Links/index.js deleted file mode 100644 index e51896cb..00000000 --- a/src/theme/Footer/Links/index.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = FooterLinks; -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importDefault(require("react")); -var theme_common_1 = require("@docusaurus/theme-common"); -var MultiColumn_1 = __importDefault(require("@theme/Footer/Links/MultiColumn")); -var Simple_1 = __importDefault(require("@theme/Footer/Links/Simple")); -function FooterLinks(_a) { - var links = _a.links; - return (0, theme_common_1.isMultiColumnFooterLinks)(links) ? ((0, jsx_runtime_1.jsx)(MultiColumn_1.default, { columns: links })) : ((0, jsx_runtime_1.jsx)(Simple_1.default, { links: links })); -} diff --git a/src/theme/Footer/Logo/index.js b/src/theme/Footer/Logo/index.js deleted file mode 100644 index c8073ae4..00000000 --- a/src/theme/Footer/Logo/index.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = FooterLogo; -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importDefault(require("react")); -var clsx_1 = __importDefault(require("clsx")); -var Link_1 = __importDefault(require("@docusaurus/Link")); -var useBaseUrl_1 = require("@docusaurus/useBaseUrl"); -var ThemedImage_1 = __importDefault(require("@theme/ThemedImage")); -var styles_module_css_1 = __importDefault(require("./styles.module.css")); -function LogoImage(_a) { - var _b; - var logo = _a.logo; - var withBaseUrl = (0, useBaseUrl_1.useBaseUrlUtils)().withBaseUrl; - var sources = { - light: withBaseUrl(logo.src), - dark: withBaseUrl((_b = logo.srcDark) !== null && _b !== void 0 ? _b : logo.src), - }; - return ((0, jsx_runtime_1.jsx)(ThemedImage_1.default, { className: (0, clsx_1.default)('footer__logo', logo.className), alt: logo.alt, sources: sources, width: logo.width, height: logo.height, style: logo.style })); -} -function FooterLogo(_a) { - var logo = _a.logo; - return logo.href ? ((0, jsx_runtime_1.jsx)(Link_1.default, { href: logo.href, className: styles_module_css_1.default.footerLogoLink, target: logo.target, children: (0, jsx_runtime_1.jsx)(LogoImage, { logo: logo }) })) : ((0, jsx_runtime_1.jsx)(LogoImage, { logo: logo })); -} diff --git a/src/theme/Footer/index.js b/src/theme/Footer/index.js deleted file mode 100644 index 82663389..00000000 --- a/src/theme/Footer/index.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importDefault(require("react")); -var theme_common_1 = require("@docusaurus/theme-common"); -var Layout_1 = __importDefault(require("@theme/Footer/Layout")); -var Copyright_1 = __importDefault(require("@theme/Footer/Copyright")); -var Logo_1 = __importDefault(require("@theme/Footer/Logo")); -var Links_1 = __importDefault(require("@theme/Footer/Links")); -function Footer() { - var footer = (0, theme_common_1.useThemeConfig)().footer; - if (!footer) { - return null; - } - var copyright = footer.copyright, links = footer.links, logo = footer.logo, style = footer.style; - return ((0, jsx_runtime_1.jsx)(Layout_1.default, { style: style, links: links && (0, jsx_runtime_1.jsx)(Links_1.default, { links: links }), logo: logo && (0, jsx_runtime_1.jsx)(Logo_1.default, { logo: logo }), copyright: copyright && (0, jsx_runtime_1.jsx)(Copyright_1.default, { copyright: copyright }) })); -} -exports.default = react_1.default.memo(Footer); diff --git a/src/theme/Layout.js b/src/theme/Layout.js deleted file mode 100644 index a8fe6af0..00000000 --- a/src/theme/Layout.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __rest = (this && this.__rest) || function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = CustomLayout; -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importDefault(require("react")); -var Layout_1 = __importDefault(require("@theme-original/Layout")); -var NavbarFirebaseAuthGithub_1 = __importDefault(require("@site/src/components/ui/NavbarFirebaseAuthGithub")); -var NewsLetterPopup_1 = __importDefault(require("../components/NewsLetterPopup")); -function CustomLayout(_a) { - var children = _a.children, props = __rest(_a, ["children"]); - return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(Layout_1.default, __assign({}, props, { children: [(0, jsx_runtime_1.jsx)(NavbarFirebaseAuthGithub_1.default, {}), children] })), (0, jsx_runtime_1.jsx)(NewsLetterPopup_1.default, {})] })); -} diff --git a/src/theme/MDXComponents.js b/src/theme/MDXComponents.js deleted file mode 100644 index 39b1b869..00000000 --- a/src/theme/MDXComponents.js +++ /dev/null @@ -1,17 +0,0 @@ -import BrowserWindow from "@site/src/components/BrowserWindow"; -import MDXComponents from "@theme-original/MDXComponents"; -import TabItem from "@theme/TabItem"; -import Tabs from "@theme/Tabs"; -import Comming from "../components/Comming"; -import Image from "@theme/IdealImage"; -import GiscusComments from "../components/giscus"; - -export default { - ...MDXComponents, - BrowserWindow, - Tabs, - TabItem, - Comming, - Image, - GiscusComments, -}; diff --git a/src/theme/Navbar/Content/index.js b/src/theme/Navbar/Content/index.js deleted file mode 100644 index 9a82cd3c..00000000 --- a/src/theme/Navbar/Content/index.js +++ /dev/null @@ -1,88 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || (function () { - var ownKeys = function(o) { - ownKeys = Object.getOwnPropertyNames || function (o) { - var ar = []; - for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; - return ar; - }; - return ownKeys(o); - }; - return function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); - __setModuleDefault(result, mod); - return result; - }; -})(); -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = NavbarContent; -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importStar(require("react")); -var theme_common_1 = require("@docusaurus/theme-common"); -var internal_1 = require("@docusaurus/theme-common/internal"); -var NavbarItem_1 = __importDefault(require("@theme/NavbarItem")); -var ColorModeToggle_1 = __importDefault(require("@theme/Navbar/ColorModeToggle")); -var SearchBar_1 = __importDefault(require("@theme/SearchBar")); -var Toggle_1 = __importDefault(require("@theme/Navbar/MobileSidebar/Toggle")); -var Logo_1 = __importDefault(require("@theme/Navbar/Logo")); -var Search_1 = __importDefault(require("@theme/Navbar/Search")); -function useNavbarItems() { - return (0, theme_common_1.useThemeConfig)().navbar.items; -} -function NavbarItems(_a) { - var items = _a.items; - return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: items.map(function (item, i) { - var key = "".concat(item.label || item.to || item.href || 'item', "-").concat(i); - return ((0, jsx_runtime_1.jsx)(theme_common_1.ErrorCauseBoundary, { onError: function (error) { - return new Error("A theme navbar item failed to render.\nPlease double-check the following navbar item (themeConfig.navbar.items) of your Docusaurus config:\n".concat(JSON.stringify(item, null, 2)), { cause: error }); - }, children: (0, jsx_runtime_1.jsx)(NavbarItem_1.default, __assign({}, item)) }, key)); - }) })); -} -function NavbarContentLayout(_a) { - var left = _a.left, right = _a.right; - return ((0, jsx_runtime_1.jsxs)("div", { className: "navbar__inner", children: [(0, jsx_runtime_1.jsx)("div", { className: "navbar__items", children: left }), (0, jsx_runtime_1.jsx)("div", { className: "navbar__items navbar__items--right", children: right })] })); -} -function NavbarContent() { - var mobileSidebar = (0, internal_1.useNavbarMobileSidebar)(); - var items = useNavbarItems(); - var _a = (0, react_1.useMemo)(function () { return (0, internal_1.splitNavbarItems)(items); }, [items]), leftItems = _a[0], rightItems = _a[1]; - var searchBarItem = (0, react_1.useMemo)(function () { return items.find(function (item) { return item.type === 'search'; }); }, [items]); - return ((0, jsx_runtime_1.jsx)(NavbarContentLayout, { left: - // TODO stop hardcoding items? - (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [!mobileSidebar.disabled && (0, jsx_runtime_1.jsx)(Toggle_1.default, {}), (0, jsx_runtime_1.jsx)(Logo_1.default, {}), (0, jsx_runtime_1.jsx)(NavbarItems, { items: leftItems })] }), right: - // TODO stop hardcoding items? - // Ask the user to add the respective navbar items => more flexible - (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(NavbarItems, { items: rightItems }), (0, jsx_runtime_1.jsx)(ColorModeToggle_1.default, {}), !searchBarItem && ((0, jsx_runtime_1.jsx)(Search_1.default, { children: (0, jsx_runtime_1.jsx)(SearchBar_1.default, {}) }))] }) })); -} diff --git a/src/theme/Navbar/index.js b/src/theme/Navbar/index.js deleted file mode 100644 index 18451eaf..00000000 --- a/src/theme/Navbar/index.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = NavbarWrapper; -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importDefault(require("react")); -var Navbar_1 = __importDefault(require("@theme-original/Navbar")); -function NavbarWrapper(props) { - return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(Navbar_1.default, __assign({}, props)) })); -} diff --git a/src/theme/NavbarItem.js b/src/theme/NavbarItem.js deleted file mode 100644 index ffb4de4b..00000000 --- a/src/theme/NavbarItem.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = void 0; -// This file can be removed as it's just a pass-through wrapper -// Docusaurus will use the original NavbarItem component directly -var NavbarItem_1 = require("@theme-original/NavbarItem"); -Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(NavbarItem_1).default; } }); diff --git a/src/theme/NavbarItem/index.js b/src/theme/NavbarItem/index.js deleted file mode 100644 index 219c91c2..00000000 --- a/src/theme/NavbarItem/index.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = void 0; -var NavbarItem_1 = require("@theme-original/NavbarItem"); -Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(NavbarItem_1).default; } }); diff --git a/src/theme/Root.js b/src/theme/Root.js deleted file mode 100644 index a1ea87b8..00000000 --- a/src/theme/Root.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = Root; -var jsx_runtime_1 = require("react/jsx-runtime"); -var react_1 = __importDefault(require("react")); -var react_2 = require("@vercel/analytics/react"); -// Default implementation, that you can customize -function Root(_a) { - var children = _a.children; - return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [children, process.env.NODE_ENV === 'production' && (0, jsx_runtime_1.jsx)(react_2.Analytics, {})] })); -} diff --git a/src/utils/authors.js b/src/utils/authors.js deleted file mode 100644 index 7f102c49..00000000 --- a/src/utils/authors.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getAuthorNames = exports.authorsMap = void 0; -exports.authorsMap = { - "ajay-dhangar": "Ajay Dhangar", - "sanjay-kv": "Sanjay Viswanthan", - "hitesh-gahanolia": "Hitesh Gahanolia", - "dharshibalasubramaniyam": "Sowmiya Venketashan", - "abhijith-m-s": "Abhijith M S", - "khushi-kalra": "Khushi Kalra", - "nayanikamukherjee": "Nayanika Mukherjee", - "pujan-sarkar": "Pujan Sarkar", - "mohitmuktikant": "Mohit Muktikant", - "santhosh-siddhardha": "Lingamuneni Santhosh Siddhardha", - "akshitha-chiluka": "Akshitha Chiluka", - "Aditya-Singh-Rathore": "Aditya Singh Rathore", -}; -var getAuthorNames = function (authorIds) { - var firstNames = authorIds.map(function (id) { - var fullName = exports.authorsMap[id] || id; - return fullName.split(' ')[0]; - }).slice(0, 2); - return firstNames.length > 1 ? firstNames.join(" & ") : firstNames[0] || "RecodeHive"; -}; -exports.getAuthorNames = getAuthorNames; diff --git a/src/utils/jsUtils.js b/src/utils/jsUtils.js deleted file mode 100644 index 920c8cbb..00000000 --- a/src/utils/jsUtils.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.sortBy = sortBy; -exports.toggleListItem = toggleListItem; -function sortBy(array, getter) { - var sortedArray = __spreadArray([], array, true); - sortedArray.sort(function (a, b) { - return getter(a) > getter(b) ? 1 : getter(b) > getter(a) ? -1 : 0; - }); - return sortedArray; -} -function toggleListItem(list, item) { - var itemIndex = list.indexOf(item); - if (itemIndex === -1) { - return list.concat(item); - } - var newList = __spreadArray([], list, true); - newList.splice(itemIndex, 1); - return newList; -} diff --git a/src/utils/navbarUtils.js b/src/utils/navbarUtils.js deleted file mode 100644 index 16af01ab..00000000 --- a/src/utils/navbarUtils.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createNavbarItemHTML = createNavbarItemHTML; -exports.createSimpleNavbarItemHTML = createSimpleNavbarItemHTML; -/** - * Generates HTML string for navbar items with icons - * @param iconName - The name of the icon from NAVBAR_CONFIG - * @param label - The text label for the navbar item - * @returns HTML string with icon placeholder and label - */ -function createNavbarItemHTML(iconName, label) { - return " ").concat(label); -} -/** - * Generates HTML string for simple navbar items with icons (no inline styles) - * @param iconName - The name of the icon from NAVBAR_CONFIG - * @param label - The text label for the navbar item - * @returns HTML string with icon placeholder and label - */ -function createSimpleNavbarItemHTML(iconName, label) { - return " ").concat(label); -}