Skip to content

Commit a584c5b

Browse files
committed
Fixed few bugs and added some UI's Compo...
1 parent 4ab25be commit a584c5b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+4464
-180
lines changed

docusaurus.config.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,13 @@ const config = {
109109
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
110110
({
111111
image: "img/codeharborhub-social-card.jpg",
112-
// announcementBar: {
113-
// id: "announcementBar",
114-
// content:
115-
// '📢 Join our <a target="_blank" href="https://www.whatsapp.com/channel/0029Vah6hro8F2pGUhuAcR0B">WhatsApp Channel</a> for the latest updates and collaboration on exciting projects!',
116-
// isCloseable: true,
117-
// backgroundColor: "#4d5061",
118-
// },
112+
announcementBar: {
113+
id: "announcementBar",
114+
content:
115+
'🤖 <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! 🚀',
116+
isCloseable: true,
117+
backgroundColor: "#1e293b",
118+
},
119119

120120
metadata: [
121121
{

package-lock.json

Lines changed: 150 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939
"@fortawesome/react-fontawesome": "^0.2.2",
4040
"@giscus/react": "^3.0.0",
4141
"@mdx-js/react": "^3.0.0",
42+
"@radix-ui/react-accordion": "^1.2.12",
43+
"@radix-ui/react-alert-dialog": "^1.1.15",
44+
"@radix-ui/react-aspect-ratio": "^1.1.8",
4245
"@radix-ui/react-avatar": "^1.1.10",
4346
"@radix-ui/react-dialog": "^1.1.15",
4447
"@radix-ui/react-icons": "^1.3.2",
@@ -91,7 +94,6 @@
9194
"@types/color": "^4.2.0",
9295
"@types/node": "^22.6.1",
9396
"autoprefixer": "^10.4.20",
94-
"dotenv": "^16.4.5",
9597
"gh-pages": "^6.1.1",
9698
"lighthouse": "^12.2.2",
9799
"postcss": "^8.4.47",

src/components/HomePage/header.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,19 @@
2323
margin-right: 2rem;
2424
}
2525

26+
/* Ensure the button container is above the particles */
27+
.chh__header-content__input {
28+
position: relative;
29+
z-index: 10;
30+
}
31+
32+
/* Ensure the particles stay in the background */
33+
#tsparticles {
34+
position: absolute;
35+
z-index: 1;
36+
pointer-events: none; /* This allows clicks to pass through the particles */
37+
}
38+
2639
.chh__header-content h1 {
2740
font-weight: 700;
2841
font-size: 62px;

src/components/ui/accordion.tsx

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import * as React from 'react';
2+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
3+
import { ChevronDown } from 'lucide-react';
4+
5+
import { cn } from '../../lib/utils';
6+
7+
const Accordion = AccordionPrimitive.Root;
8+
9+
const AccordionItem = React.forwardRef<
10+
React.ElementRef<typeof AccordionPrimitive.Item>,
11+
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
12+
>(({ className, ...props }, ref) => (
13+
<AccordionPrimitive.Item
14+
ref={ref}
15+
className={cn('border-b', className)}
16+
{...props}
17+
/>
18+
));
19+
AccordionItem.displayName = 'AccordionItem';
20+
21+
const AccordionTrigger = React.forwardRef<
22+
React.ElementRef<typeof AccordionPrimitive.Trigger>,
23+
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>
24+
>(({ className, children, ...props }, ref) => (
25+
<AccordionPrimitive.Header className="flex">
26+
<AccordionPrimitive.Trigger
27+
ref={ref}
28+
className={cn(
29+
'flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180',
30+
className
31+
)}
32+
{...props}
33+
>
34+
{children}
35+
<ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200" />
36+
</AccordionPrimitive.Trigger>
37+
</AccordionPrimitive.Header>
38+
));
39+
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
40+
41+
const AccordionContent = React.forwardRef<
42+
React.ElementRef<typeof AccordionPrimitive.Content>,
43+
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>
44+
>(({ className, children, ...props }, ref) => (
45+
<AccordionPrimitive.Content
46+
ref={ref}
47+
className="overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
48+
{...props}
49+
>
50+
<div className={cn('pb-4 pt-0', className)}>{children}</div>
51+
</AccordionPrimitive.Content>
52+
));
53+
54+
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
55+
56+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };

0 commit comments

Comments
 (0)