diff --git a/src/components/Icons.tsx b/src/components/Icons.tsx index b5ee010..bc0116a 100644 --- a/src/components/Icons.tsx +++ b/src/components/Icons.tsx @@ -5,6 +5,36 @@ interface IIconProps { className?: string | ClassNames; } +export const HamburgerIcon: React.FC = ({ className = "size-6" }) => ( + + + +); + +export const CloseIcon: React.FC = ({ className = "size-6" }) => ( + + + +); + export const TwitterIcon: React.FC = ({ className = "" }) => ( = ({ className = "" }) => ( ); +export const LinkIcon: React.FC = ({ className = "size-6" }) => ( + + + +); + +export const HomeIcon: React.FC = ({ className = "size-6" }) => ( + + + + +); + +export const BlogIcon: React.FC = ({ className = "size-6" }) => ( + + + + +); + +export const UsesIcon: React.FC = ({ className = "size-6" }) => ( + + + + + +); + +export const CodeIcon: React.FC = ({ className = "size-6" }) => ( + + + +); + const icons = { blueSky: BlueSkyIcon, twitter: TwitterIcon, github: GithubIcon, fork: ForkIcon, - linkedin: LinkedInIcon + linkedin: LinkedInIcon, + link: LinkIcon, + home: HomeIcon, + blog: BlogIcon, + uses: UsesIcon, + code: CodeIcon } as const; export type IconName = keyof typeof icons; export const Icon: React.FC<{ name: IconName } & IIconProps> = ({ name, className = "" }) => { diff --git a/src/components/ThemeToggle.astro b/src/components/ThemeToggle.astro index a203e96..4c289ae 100644 --- a/src/components/ThemeToggle.astro +++ b/src/components/ThemeToggle.astro @@ -55,7 +55,7 @@ const rgb = (hex: string) => { + diff --git a/src/styles/global.css b/src/styles/global.css index 5123f60..696eff6 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -71,4 +71,32 @@ @apply absolute -left-36 top-4 size-32; } } + + #flyout-menu { + #backdrop { + @apply fixed inset-0 z-0 bg-slate-500/0 backdrop-blur-none duration-300 ease-in-out; + label { + @apply absolute left-4 top-0 -translate-y-full transform cursor-pointer duration-500 ease-in-out; + } + } + nav { + @apply z-[1001] translate-x-full transform duration-500 ease-in-out; + } + + #menu-toggle:checked ~ & { + #backdrop { + @apply fixed inset-0 z-[1000] bg-slate-500/30 backdrop-blur-sm; + label { + @apply sm:translate-y-4; + } + } + nav { + @apply translate-x-0; + } + } + } + + #menu-toggle { + @apply hidden; + } }