Skip to content

Commit

Permalink
rabbits changes
Browse files Browse the repository at this point in the history
Signed-off-by: NishantSinghhhhh <[email protected]>
  • Loading branch information
NishantSinghhhhh committed Jan 14, 2025
1 parent 07a3412 commit 5ad9c15
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 94 deletions.
70 changes: 2 additions & 68 deletions docs/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const config: Config = {
title: 'Switchmap-NG Poller Documentation',
tagline: 'Start your open source journey here',
favicon: 'img/favicon_palisadoes.ico',

url: 'https://docs-poller.switchmap-ng.io',
baseUrl: '/',
deploymentBranch: 'gh-pages',
Expand Down Expand Up @@ -48,79 +48,13 @@ const config: Config = {
themeConfig: {
// Replace with your project's social card
image: 'img/docusaurus-social-card.jpg',
// navbar: {
// title: 'My Site',
// logo: {
// alt: 'My Site Logo',
// src: 'img/logo.svg',
// },
// items: [
// {
// type: 'docSidebar',
// sidebarId: 'tutorialSidebar',
// position: 'left',
// label: 'Tutorial',
// },
// {
// href: 'https://github.com/facebook/docusaurus',
// label: 'GitHub',
// position: 'right',
// },
// ],
// },
// footer: {
// style: 'dark',
// links: [
// {
// title: 'Docs',
// items: [
// {
// label: 'Tutorial',
// to: '/docs/intro',
// },
// ],
// },
// {
// title: 'Community',
// items: [
// {
// label: 'Stack Overflow',
// href: 'https://stackoverflow.com/questions/tagged/docusaurus',
// },
// {
// label: 'Discord',
// href: 'https://discordapp.com/invite/docusaurus',
// },
// {
// label: 'X',
// href: 'https://x.com/docusaurus',
// },
// ],
// },
// {
// title: 'More',
// items: [
// {
// label: 'GitHub',
// href: 'https://github.com/facebook/docusaurus',
// },
// ],
// },
// ],
// copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
// },

prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
} satisfies Preset.ThemeConfig,

stylesheets: [
{
href: './src/css/custom.css', // Path to the custom stylesheet
type: 'text/css', // MIME type
},
],
};

export default config;
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"@docusaurus/module-type-aliases": "3.6.3",
"@docusaurus/tsconfig": "3.6.3",
"@docusaurus/types": "3.6.3",
"@types/react": "^19.0.6",
"@types/react-dom": "^19.0.3",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"typescript": "~5.6.2"
},
"browserslist": {
Expand Down
3 changes: 2 additions & 1 deletion docs/src/components/Buttons/ButtonPrimary/ButtonPrimary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import styles from './PrimaryButton.module.css';

type PrimaryButtonProps = {
label: string;
onClick: () => void;
onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
disabled?: boolean;
};

Expand All @@ -13,6 +13,7 @@ const PrimaryButton: React.FC<PrimaryButtonProps> = ({ label, onClick, disabled
className={`${styles.primaryButton} ${disabled ? styles.disabled : ''}`}
onClick={onClick}
disabled={disabled}
role="button"
>
{label}
</button>
Expand Down
4 changes: 0 additions & 4 deletions docs/src/components/Cards/Herocard/HeroCard.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@
.cardDescription {
font-size: 0.9rem;
}

.card{
flex-direction: row;
}
}

@media (max-width: 768px) {
Expand Down
13 changes: 7 additions & 6 deletions docs/src/components/Cards/Herocard/HeroCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@ import styles from './HeroCard.module.css';
type HeroCardProps = {
title: string;
description: string;
imageUrl?: string; // Optional: URL for a card image
children?: React.ReactNode; // Optional: For adding custom content inside the card
children?: React.ReactNode;
isLoading?: boolean;

};

const HeroCard: React.FC<HeroCardProps> = ({ title, description, imageUrl, children }) => {
const HeroCard: React.FC<HeroCardProps> = ({ title, description, children }) => {
return (
<div className={styles.card}>
<div className={styles.cardContent}>
<article className={styles.card} role="article">
<div className={styles.cardContent} aria-label={title}>
<h2 className={styles.cardTitle}>{title}</h2>
<p className={styles.cardDescription}>{description}</p>
{children && <div className={styles.cardChildren}>{children}</div>}
</div>
</div>
</article>
);
};

Expand Down
14 changes: 11 additions & 3 deletions docs/src/components/MobileMenu/MobileMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,26 @@ const MobileMenu: React.FC<MobileMenuProps> = ({ isOpen, onClose }) => {
<img src={Logo} alt="Switchmap-NG" className={styles.logoImage} />
<span className={styles.logoText}>Switchmap-NG</span>
</div>
<button className={styles.closeButton} onClick={onClose} aria-label="Close Menu">
<button
className={styles.closeButton}
onClick={(e: React.MouseEvent<HTMLButtonElement>) => onClose()}
aria-label="Close Menu"
aria-expanded={isOpen}
>
×
</button>
</div>

<div className={styles.NavContent}>
<nav className={styles.navigation}>
<nav className={styles.navigation} role="navigation" aria-label="Main">
{navLinks.map((link) => (
<Link
key={link.path}
to={link.path}
className={styles.navLink}
onClick={onClose}
role="menuitem"
tabIndex={isOpen ? 0 : -1}
>
{link.label}
</Link>
Expand All @@ -82,8 +89,9 @@ const MobileMenu: React.FC<MobileMenuProps> = ({ isOpen, onClose }) => {
target="_blank"
rel="noopener noreferrer"
className={styles.socialLink}
aria-label={href.includes('github') ? 'Visit our GitHub' : 'Visit our YouTube'}
>
<Icon size={24} />
<Icon size={24} aria-hidden="true" />
</a>
))}
</div>
Expand Down
16 changes: 8 additions & 8 deletions docs/src/components/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ type IconLink = {
};

const navLinks: NavLink[] = [
{ path: "/", label: "General" },
{ path: "", label: "Web Guide" },
{ path: "", label: "Poller Guide" },
{ path: "", label: "API Guide" },
{ path: "https://docs.switchmap-ng.io/", label: "General" },
{ path: "https://docs-web.switchmap-ng.io/", label: "Web Guide" },
{ path: "https://docs-poller.switchmap-ng.io/", label: "Poller Guide" },
{ path: "https://docs-api.switchmap-ng.io/", label: "API Guide" },
];

const iconLinks: IconLink[] = [
{ href: "https://https://github.com/PalisadoesFoundation.com", src: github, alt: "GitHub" },
{ href: "https://github.com/PalisadoesFoundation", src: github, alt: "GitHub" },
{ href: "https://www.youtube.com/@PalisadoesOrganization", src: youtube, alt: "YouTube" },
];

Expand Down Expand Up @@ -64,9 +64,9 @@ const Navbar: React.FC = () => {
<img src={icon.src} alt={icon.alt} />
</a>
))}
<a href="#" onClick={() => console.log('Toggle theme')}>
<img src={sun} alt="Toggle Theme" />
</a>
{/* <a href="#" onClick={() => console.log('Toggle theme')}>
<img src={sun} alt="Tog" />
</a> */}
</div>
</nav>

Expand Down
3 changes: 1 addition & 2 deletions docs/src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
--ifm-secondary-button-hover-color : #d4d4d9;
--ifm-text-color: #ffffff;
--ifm-text-color-black: #000000;
-docusaurus-progress-bar-color: var(--ifm-color-primary);
--docusaurus-progress-bar-color: var(--ifm-color-primary);
--secondary-blue-900: #001c63;
--sidebar-bg-color: #f3f4f6;
--secondary-blue-500: #3970fd;
Expand Down Expand Up @@ -81,7 +81,6 @@
--ifm-contrast-foreground-value: 70%;
--ifm-contrast-background-dark-value: 70%;
--ifm-contrast-foreground-dark-value: 90%;
--ifm-color-primary: #3578e5;
--ifm-color-secondary: #ebedf0;
--ifm-color-success: #00a400;
--ifm-color-info: #54c7ec;
Expand Down

0 comments on commit 5ad9c15

Please sign in to comment.