Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const remarkMath = require("remark-math");
const rehypeKatex = require("rehype-katex");

const path = require("path");
require("dotenv").config();

/** @type {import('@docusaurus/types').Config} */
const config = {
Expand Down Expand Up @@ -109,13 +108,13 @@ const config = {
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
image: "img/codeharborhub-social-card.jpg",
// announcementBar: {
// id: "announcementBar",
// content:
// '📢 Join our <a target="_blank" href="https://www.whatsapp.com/channel/0029Vah6hro8F2pGUhuAcR0B">WhatsApp Channel</a> for the latest updates and collaboration on exciting projects!',
// isCloseable: true,
// backgroundColor: "#4d5061",
// },
announcementBar: {
id: "announcementBar",
content:
'🤖 <b>New:</b> Master the basics of AI! Explore our <a href="https://codeharborhub.github.io/tutorial/machine-learning" target="_blank">Machine Learning Tutorials</a> today! 🚀',
isCloseable: true,
backgroundColor: "#1e293b",
},

metadata: [
{
Expand Down
164 changes: 150 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
"@fortawesome/react-fontawesome": "^0.2.2",
"@giscus/react": "^3.0.0",
"@mdx-js/react": "^3.0.0",
"@radix-ui/react-accordion": "^1.2.12",
"@radix-ui/react-alert-dialog": "^1.1.15",
"@radix-ui/react-aspect-ratio": "^1.1.8",
"@radix-ui/react-avatar": "^1.1.10",
"@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-icons": "^1.3.2",
Expand Down Expand Up @@ -91,7 +94,6 @@
"@types/color": "^4.2.0",
"@types/node": "^22.6.1",
"autoprefixer": "^10.4.20",
"dotenv": "^16.4.5",
"gh-pages": "^6.1.1",
"lighthouse": "^12.2.2",
"postcss": "^8.4.47",
Expand Down
13 changes: 13 additions & 0 deletions src/components/HomePage/header.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@
margin-right: 2rem;
}

/* Ensure the button container is above the particles */
.chh__header-content__input {
position: relative;
z-index: 10;
}

/* Ensure the particles stay in the background */
#tsparticles {
position: absolute;
z-index: 1;
pointer-events: none; /* This allows clicks to pass through the particles */
}

.chh__header-content h1 {
font-weight: 700;
font-size: 62px;
Expand Down
56 changes: 56 additions & 0 deletions src/components/ui/accordion.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import * as React from 'react';
import * as AccordionPrimitive from '@radix-ui/react-accordion';
import { ChevronDown } from 'lucide-react';

import { cn } from '../../lib/utils';

const Accordion = AccordionPrimitive.Root;

const AccordionItem = React.forwardRef<
React.ElementRef<typeof AccordionPrimitive.Item>,
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
>(({ className, ...props }, ref) => (
<AccordionPrimitive.Item
ref={ref}
className={cn('border-b', className)}
{...props}
/>
));
AccordionItem.displayName = 'AccordionItem';

const AccordionTrigger = React.forwardRef<
React.ElementRef<typeof AccordionPrimitive.Trigger>,
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>
>(({ className, children, ...props }, ref) => (
<AccordionPrimitive.Header className="flex">
<AccordionPrimitive.Trigger
ref={ref}
className={cn(
'flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180',
className
)}
{...props}
>
{children}
<ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200" />
</AccordionPrimitive.Trigger>
</AccordionPrimitive.Header>
));
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;

const AccordionContent = React.forwardRef<
React.ElementRef<typeof AccordionPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>
>(({ className, children, ...props }, ref) => (
<AccordionPrimitive.Content
ref={ref}
className="overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
{...props}
>
<div className={cn('pb-4 pt-0', className)}>{children}</div>
</AccordionPrimitive.Content>
));

AccordionContent.displayName = AccordionPrimitive.Content.displayName;

export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
Loading
Loading