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
Binary file modified app/favicon.ico
Binary file not shown.
7 changes: 4 additions & 3 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Footer from "@/components/footer";
import { CommandMenu } from "@/components/cmdk";
import { CommandMenuProvider } from "@/components/command-menu-context";
import { TooltipProvider } from "@/components/ui/tooltip";
import { LINKS } from "@/constants";

const geistSans = Geist({
variable: "--font-geist-sans",
Expand All @@ -19,16 +20,16 @@ const geistMono = Geist_Mono({
});

export const metadata: Metadata = {
metadataBase: new URL("https://itshover.com"),
metadataBase: new URL(LINKS.SITE_URL),
title: {
default: "Its Hover",
template: "%s | Its Hover",
template: "%s",
},
description: "Animated icons that move with intent.",
openGraph: {
title: "Its Hover",
description: "Animated icons that move with intent.",
url: "https://itshover.com",
url: LINKS.SITE_URL,
siteName: "Its Hover",
type: "website",
images: ["/og.png"],
Expand Down
3 changes: 2 additions & 1 deletion app/robots.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { type MetadataRoute } from "next";
import { LINKS } from "@/constants";

export default function robots(): MetadataRoute.Robots {
return {
rules: {
userAgent: "*",
allow: "/",
},
sitemap: "https://itshover.com/sitemap.xml",
sitemap: `${LINKS.SITE_URL}/sitemap.xml`,
};
}
3 changes: 2 additions & 1 deletion app/sitemap.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { MetadataRoute } from "next";
import { ICON_NAMES } from "@/lib/icon-names";
import { LINKS } from "@/constants";

export default function sitemap(): MetadataRoute.Sitemap {
const baseUrl = "https://itshover.com";
const baseUrl = LINKS.SITE_URL;

// Static pages
const staticPages: MetadataRoute.Sitemap = [
Expand Down
21 changes: 15 additions & 6 deletions components/cmdk.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { ICONS } from "@/lib/icons";
import { useRouter } from "next/navigation";
import { MoveRight } from "lucide-react";
import { useCommandMenu } from "./command-menu-context";
import { LINKS } from "@/constants";

export const CommandMenu = () => {
const { isOpen, setIsOpen } = useCommandMenu();
Expand Down Expand Up @@ -68,17 +69,25 @@ export const CommandMenu = () => {
<CommandEmpty>No results found.</CommandEmpty>

<CommandGroup heading="Socials">
<CommandItem className="gap-4">
<CommandItem
className="gap-4"
onSelect={() => {
window.open(LINKS.GITHUB, "_blank");
setIsOpen(false);
}}
>
<MoveRight className="h-4 w-4" />
GitHub
</CommandItem>
<CommandItem className="gap-4">
<CommandItem
className="gap-4"
onSelect={() => {
window.open(LINKS.TWITTER, "_blank");
setIsOpen(false);
}}
>
<MoveRight className="h-4 w-4" />X formerly Twitter
</CommandItem>
<CommandItem className="gap-4">
<MoveRight className="h-4 w-4" />
LinkedIn
</CommandItem>
</CommandGroup>

<CommandGroup heading="Icons">
Expand Down
5 changes: 3 additions & 2 deletions components/footer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"use client";
import Link from "next/link";
import { motion } from "motion/react";
import { LINKS } from "@/constants";

const Footer = () => {
return (
Expand All @@ -16,7 +17,7 @@ const Footer = () => {
<p className="text-muted-foreground text-center text-sm leading-loose md:text-left">
Built by{" "}
<Link
href=""
href={LINKS.CREATOR}
target="_blank"
rel="noreferrer"
className="font-medium underline underline-offset-4"
Expand All @@ -25,7 +26,7 @@ const Footer = () => {
</Link>
. The source code is available on{" "}
<Link
href=""
href={LINKS.GITHUB}
target="_blank"
rel="noreferrer"
className="font-medium underline underline-offset-4"
Expand Down
18 changes: 8 additions & 10 deletions components/navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import GithubIcon from "@/icons/github-icon";
import TwitterXIcon from "@/icons/twitter-x-icon";
import MagnifierIcon from "@/icons/magnifier-icon";
import { useCommandMenu } from "./command-menu-context";
import { LINKS } from "@/constants";
import LayersIcon from "@/icons/layers-icon";

const Navbar = () => {
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
Expand All @@ -26,12 +28,8 @@ const Navbar = () => {
className="mr-10 flex items-center justify-center space-x-2 py-6 text-center text-2xl font-bold text-neutral-600 selection:bg-emerald-500 dark:text-gray-100"
href="/"
>
<div className="relative flex h-8 w-8 items-center justify-center rounded-md border border-slate-800 bg-black text-sm text-white antialiased md:h-6 md:w-6">
<div className="absolute inset-x-0 -top-10 h-10 w-full rounded-full bg-white/20 blur-xl"></div>
<div className="text-primary relative z-20 text-sm">
<div className="bg-primary h-4 w-4 rounded-full" />
</div>
</div>
{/* <Image src="/logo.png" alt="Logo" width={24} height={24} className=""/> */}
<LayersIcon className="text-primary" />
<div className="flex flex-col">
<h1 className="text-foreground font-sans">
<span className="text-primary">its</span>hover
Expand Down Expand Up @@ -60,14 +58,14 @@ const Navbar = () => {
<Link
target="__blank"
className="hover:text-foreground/80 text-foreground/60 mr-3 flex items-center justify-center text-sm font-medium transition-colors"
href=""
href={LINKS.TWITTER}
>
<TwitterXIcon className="h-4 w-4" />
</Link>
<Link
target="__blank"
className="hover:text-foreground/80 text-foreground/60 flex items-center justify-center text-sm font-medium transition-colors"
href=""
href={LINKS.GITHUB}
>
<GithubIcon size={18} />
</Link>
Expand Down Expand Up @@ -149,15 +147,15 @@ const Navbar = () => {
<Link
target="_blank"
className="hover:text-foreground/80 text-foreground/60 text-sm font-medium transition-colors"
href=""
href={LINKS.GITHUB}
onClick={() => setIsMobileMenuOpen(false)}
>
<GithubIcon size={20} />
</Link>
<Link
target="_blank"
className="hover:text-foreground/80 text-foreground/60 text-sm font-medium transition-colors"
href=""
href={LINKS.TWITTER}
onClick={() => setIsMobileMenuOpen(false)}
>
<TwitterXIcon size={20} />
Expand Down
6 changes: 6 additions & 0 deletions constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export const LINKS = {
TWITTER: "https://x.com/itshoverr",
GITHUB: "https://github.com/itshover/itshover",
SITE_URL: "https://itshover.com",
CREATOR: "https://x.com/abhijitwt",
} as const;
6 changes: 6 additions & 0 deletions icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ import WashingMachineIcon from "./washing-machine-icon";
import GlobeIcon from "./globe-icon";
import HashtagIcon from "./hashtag-icon";
import KeyframesIcon from "./keyframes-icon";
import LayersIcon from "./layers-icon";
import LayoutBottombarCollapseIcon from "./layout-bottombar-collapse-icon";
import LayoutSidebarRightIcon from "./layout-sidebar-right-icon";
import PaintIcon from "./paint-icon";
Expand Down Expand Up @@ -709,6 +710,11 @@ const ICON_LIST: IconType[] = [
"trending",
],
},
{
name: "layers-icon",
icon: LayersIcon,
keywords: ["layers", "stack", "blocks", "overlap", "organize", "group"],
},
{
name: "layout-bottombar-collapse-icon",
icon: LayoutBottombarCollapseIcon,
Expand Down
57 changes: 57 additions & 0 deletions icons/layers-icon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import { AnimatedIconProps } from "./types";
import { motion, useAnimate } from "motion/react";

const LayersIcon = ({
size = 24,
color = "currentColor",
strokeWidth = 2,
className = "",
}: AnimatedIconProps) => {
const [scope, animate] = useAnimate();

const hoverAnimation = async () => {
await animate(
".top-block",
{ x: -20 },
{ duration: 0.4, ease: [0.4, 0, 0.2, 1] },
);
};

const hoverEndAnimation = async () => {
await animate(
".top-block",
{ x: 0 },
{ duration: 0.4, ease: [0.4, 0, 0.2, 1] },
);
};

return (
<motion.svg
ref={scope}
onHoverStart={hoverAnimation}
onHoverEnd={hoverEndAnimation}
width={size}
height={size}
viewBox="0 0 120 120"
fill="none"
strokeWidth={strokeWidth}
xmlns="http://www.w3.org/2000/svg"
className={className}
>
<motion.rect
className="top-block"
x="44"
y="22"
width="56"
height="36"
rx="10"
fill={color}
/>

{/* Bottom block */}
<rect x="20" y="62" width="64" height="40" rx="12" fill={color} />
</motion.svg>
);
};

export default LayersIcon;
Binary file added public/logo-inverted.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -955,6 +955,23 @@
}
]
},
{
"name": "layers-icon",
"type": "registry:ui",
"registryDependencies": [],
"dependencies": ["motion"],
"devDependencies": [],
"files": [
{
"path": "icons/layers-icon.tsx",
"type": "registry:ui"
},
{
"path": "icons/types.ts",
"type": "registry:ui"
}
]
},
{
"name": "moon-icon",
"type": "registry:ui",
Expand Down