From df0cfcfc5d52756617d8e3e65c8f24a5ad6d41f8 Mon Sep 17 00:00:00 2001 From: AVGVSTVS96 <122117267+AVGVSTVS96@users.noreply.github.com> Date: Sat, 18 May 2024 11:02:46 +0530 Subject: [PATCH] Delete unused components, move to `ComponentArchive` repo --- src/components/BlogIndex.astro | 35 ------------ src/components/DropdownMenu.astro | 74 ------------------------- src/components/NavBar.astro | 45 --------------- src/components/ThemeSwitcher.astro | 88 ------------------------------ src/components/ThemeToggle.astro | 84 ---------------------------- 5 files changed, 326 deletions(-) delete mode 100644 src/components/BlogIndex.astro delete mode 100644 src/components/DropdownMenu.astro delete mode 100644 src/components/NavBar.astro delete mode 100644 src/components/ThemeSwitcher.astro delete mode 100644 src/components/ThemeToggle.astro diff --git a/src/components/BlogIndex.astro b/src/components/BlogIndex.astro deleted file mode 100644 index f60fc928..00000000 --- a/src/components/BlogIndex.astro +++ /dev/null @@ -1,35 +0,0 @@ ---- -import { formatDate } from '@utils/formatDate'; -import { sortedBlogPosts } from '@utils/getSortedPosts'; - -const { class: className } = Astro.props; - -let latestPosts = Astro.props.postCount - ? sortedBlogPosts.slice(0, Astro.props.postCount) - : sortedBlogPosts; - -interface Props { - postCount?: number; - class?: string; -} ---- - - diff --git a/src/components/DropdownMenu.astro b/src/components/DropdownMenu.astro deleted file mode 100644 index 0c548cfe..00000000 --- a/src/components/DropdownMenu.astro +++ /dev/null @@ -1,74 +0,0 @@ ---- -import type { HTMLAttributes } from 'astro/types'; -import Button from './Button.astro'; - -interface Link { - name: string; - href: string; -} - -interface Props extends HTMLAttributes<'div'> { - name: string; - links: Link[]; - showCaret: boolean; - icon: boolean; -} - -const { - name = 'Dropdown', - links = [], - showCaret = false, - icon = false, - ...attrs -} = Astro.props; ---- - - - - diff --git a/src/components/NavBar.astro b/src/components/NavBar.astro deleted file mode 100644 index 420acd66..00000000 --- a/src/components/NavBar.astro +++ /dev/null @@ -1,45 +0,0 @@ ---- -import Button from './Button.astro'; -import DropdownMenu from './DropdownMenu.astro'; -import ThemeToggle from './ThemeToggle.astro'; -import ThemeSwitcher from './ThemeSwitcher.astro'; -import { CommandMenu } from '@components/CommandMenu'; -import { SideMenu } from '@components/SideMenu'; -import Logo from './Logo.astro'; -import { projectLinks } from './navLinks'; -import { sortedBlogPosts } from '@utils/getSortedPosts'; ---- - - diff --git a/src/components/ThemeSwitcher.astro b/src/components/ThemeSwitcher.astro deleted file mode 100644 index c84ad458..00000000 --- a/src/components/ThemeSwitcher.astro +++ /dev/null @@ -1,88 +0,0 @@ ---- -import DropdownMenu from './DropdownMenu.astro'; -import type { HTMLAttributes } from 'astro/types'; - -type Props = HTMLAttributes<'div'>; - -const themeOptions = [ - { name: 'Slate', href: '#slate' }, - { name: 'Sky', href: '#sky' }, - { name: 'Cyan', href: '#cyan' }, - { name: 'Teal', href: '#teal' }, - { name: 'Emerald', href: '#emerald' }, - { name: 'Violet', href: '#violet' }, - { name: 'Fuchsia', href: '#fuchsia' }, - { name: 'Amber', href: '#amber' }, -]; ---- - -
- - -
-
-
-
-
- - - diff --git a/src/components/ThemeToggle.astro b/src/components/ThemeToggle.astro deleted file mode 100644 index 1b159845..00000000 --- a/src/components/ThemeToggle.astro +++ /dev/null @@ -1,84 +0,0 @@ ---- -import type { HTMLAttributes } from 'astro/types'; - -type Props = HTMLAttributes<'button'>; - -const { ...attrs } = Astro.props; ---- - - - - - -