Skip to content

Commit c6c5774

Browse files
committed
Add blog post
1 parent 828928e commit c6c5774

File tree

9 files changed

+704
-14
lines changed

9 files changed

+704
-14
lines changed

apps/web/app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const metadata: Metadata = {
2929
title: "Code Hike",
3030
description:
3131
"Use Markdown and React to build rich content websites. Documentation, tutorials, blogs, videos, interactive walkthroughs, and more.",
32-
metadataBase: new URL("https://codehike.org"),
32+
// metadataBase: new URL("https://codehike.org"),
3333
openGraph: {
3434
title: "Code Hike",
3535
images: `https://codehike.org/codehike.png`,

apps/web/components/code.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,13 @@ import { tooltip } from "./annotations/tooltip"
2626

2727
export async function InlineCode({ codeblock }: { codeblock: RawCode }) {
2828
const highlighted = await highlight(codeblock, theme)
29-
return <Inline code={highlighted} style={highlighted.style} />
29+
return (
30+
<Inline
31+
code={highlighted}
32+
style={highlighted.style}
33+
className="selection:bg-editor-selectionBackground"
34+
/>
35+
)
3036
}
3137

3238
export async function Code({

apps/web/components/ui/hover-card.tsx

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
"use client"
2+
3+
import * as React from "react"
4+
import * as HoverCardPrimitive from "@radix-ui/react-hover-card"
5+
6+
import { cn } from "@/lib/utils"
7+
8+
const HoverCard = HoverCardPrimitive.Root
9+
10+
const HoverCardTrigger = HoverCardPrimitive.Trigger
11+
12+
const HoverCardContent = React.forwardRef<
13+
React.ElementRef<typeof HoverCardPrimitive.Content>,
14+
React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content>
15+
>(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
16+
<HoverCardPrimitive.Content
17+
ref={ref}
18+
align={align}
19+
sideOffset={sideOffset}
20+
className={cn(
21+
"z-50 w-64 rounded-md border border-zinc-200 bg-white p-4 text-zinc-950 shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-zinc-800 dark:bg-zinc-950 dark:text-zinc-50",
22+
className
23+
)}
24+
{...props}
25+
/>
26+
))
27+
HoverCardContent.displayName = HoverCardPrimitive.Content.displayName
28+
29+
export { HoverCard, HoverCardTrigger, HoverCardContent }

0 commit comments

Comments
 (0)