diff --git a/apps/web/app/blog/[slug]/page.tsx b/apps/web/app/blog/[slug]/page.tsx
index 15c481ca..e68ac5c6 100644
--- a/apps/web/app/blog/[slug]/page.tsx
+++ b/apps/web/app/blog/[slug]/page.tsx
@@ -20,7 +20,7 @@ export default async function Page({ params }: { params: { slug: string } }) {
page.data.className,
)}
>
-
+
{page.data.date.toLocaleDateString("en-US", {
year: "numeric",
month: "long",
diff --git a/apps/web/app/blog/og/page.tsx b/apps/web/app/blog/og/page.tsx
index 06d04b27..e0f32687 100644
--- a/apps/web/app/blog/og/page.tsx
+++ b/apps/web/app/blog/og/page.tsx
@@ -1,7 +1,11 @@
+import Image from "next/image"
import { CodeHikeLogo } from "../../../ui/nav"
-const title = "Fine-grained Markdown"
-const description = "Flexible content, richer presentation"
+const title = "The Curse of Markdown"
+const description = "And the content website wasteland"
+const date = "November 21, 2024"
+
+import pomber from "../[slug]/pomber.jpg"
export default function Page() {
return (
@@ -10,16 +14,32 @@ export default function Page() {
className="flex justify-between flex-col p-16"
style={{ width: 1200, height: 628 }}
>
-
+
Code Hike's blog
-
+
+ {date}
+
{title}
{description}
+
+
+
+
Rodrigo Pombo
+
@pomber
+
+
)
diff --git a/apps/web/content/blog/the-curse-of-markdown.steps.tsx b/apps/web/content/blog/the-curse-of-markdown.steps.tsx
index 313c3e0b..e6b5fa03 100644
--- a/apps/web/content/blog/the-curse-of-markdown.steps.tsx
+++ b/apps/web/content/blog/the-curse-of-markdown.steps.tsx
@@ -1,5 +1,5 @@
const lean = {
- richAxis: "text-yellow-500",
+ richAxis: "opacity-90",
costAxis: "opacity-0",
richScreenshot: "",
leanScreenshot: "opacity-100",
@@ -18,13 +18,13 @@ const lean = {
rich: 65,
cost: 33.6,
pop: circle(65, 40.1, 60, 2.5),
- className: "bg-teal-600 !opacity-0",
+ className: "bg-purple-500 !opacity-0",
},
{
rich: 75,
cost: 47.6,
pop: circle(75, 56.3, 60, 2.5),
- className: "bg-teal-600 !opacity-0",
+ className: "bg-purple-500 !opacity-0",
},
],
}
@@ -57,7 +57,8 @@ const richness = {
const effort = {
leanScreenshot: "opacity-0",
richScreenshot: "opacity-0",
- costAxis: "text-yellow-500",
+ richAxis: "opacity-30",
+ costAxis: "opacity-90",
points: [
{ rich: 10, cost: 10 },
{ rich: 20, cost: 20 },
@@ -72,7 +73,6 @@ const effort = {
}
const markdown = {
- costAxis: "",
points: [
{ rich: 10, cost: 10, pop: line(10, 9.9, 10.3, 24) },
{ rich: 20, cost: 10.8, pop: line(20, 10.3, 11.6, 24) },
@@ -87,12 +87,12 @@ const markdown = {
}
const wall = {
+ costAxis: "opacity-30",
wall: "opacity-50 top-0 bottom-0 bg-pink-500/10 border-x-2 border-pink-500/80",
}
const distribution = {
extra: "opacity-100",
- costAxis: "",
points: [
{ rich: 10, pop: line(10, 9.9, 10.3, 16) },
{ rich: 20, pop: line(20, 10.3, 11.6, 24) },
@@ -173,9 +173,9 @@ const why = {
{ rich: 30, className: "bg-sky-500" },
{ rich: 40, className: "bg-blue-500" },
{ rich: 50, className: "bg-indigo-500" },
- { rich: 60, className: "bg-violet-500" },
- { rich: 70, className: "bg-purple-500" },
- { rich: 80, className: "bg-fuchsia-500" },
+ { rich: 60 },
+ { rich: 70 },
+ { rich: 80 },
{ rich: 90, className: "bg-pink-500" },
],
}
@@ -211,23 +211,6 @@ function merge(rawSteps: any) {
})
}
-function extra(
- rich: number,
- cost: number,
- n: number,
- noise: number,
- angle: number = 0,
-) {
- return Array.from({ length: n * 2 }, (_, i) => {
- const dx = (Math.random() * 2 - 1) * noise
- const dy = (Math.random() * 2 - 1) * 0
- return {
- rich: rich + dx,
- cost: cost + Math.sin(angle) * dx + Math.cos(angle) * dy,
- }
- })
-}
-
function line(richc: number, costl: number, costr: number, n: number, rd = 5) {
return Array.from({ length: n * 2 }, (_, i) => {
const costc = (costr + costl) / 2
diff --git a/apps/web/content/blog/the-curse-of-markdown.tsx b/apps/web/content/blog/the-curse-of-markdown.tsx
index 8984342c..cb505b53 100644
--- a/apps/web/content/blog/the-curse-of-markdown.tsx
+++ b/apps/web/content/blog/the-curse-of-markdown.tsx
@@ -106,31 +106,33 @@ function Screenshots({ lean, rich }: { lean?: string; rich?: string }) {
function Axis({ cost, rich }: { cost?: string; rich?: string }) {
return (
<>
-
-
-
- Richness
+
>
)
@@ -216,42 +218,85 @@ export function Layout(props: unknown) {
const { steps } = parseProps(props, Block.extend({ steps: z.array(Block) }))
return (
<>
-
TODO: small screen
-
-
+
+
+
+
+
+
+ >
+ )
+}
+
+function SmallLayout({
+ steps,
+}: {
+ steps: {
+ children?: React.ReactNode
+ }[]
+}) {
+ return (
+
+ {steps.map((step, i) => (
+
- (
-
- ))}
- />
+
+ {step.children}
-
- {steps.map((step, i) => (
-
-
- {step.children}
-
-
- ))}
+ ))}
+
+ )
+}
+
+function ScrollyLayout({
+ steps,
+}: {
+ steps: {
+ children?: React.ReactNode
+ }[]
+}) {
+ return (
+
+
+
+ (
+
+ ))}
+ />
-
- >
+
+
+ {steps.map((step, i) => (
+
+
+ {step.children}
+
+
+ ))}
+
+
)
}
diff --git a/apps/web/public/blog/the-curse-of-markdown.png b/apps/web/public/blog/the-curse-of-markdown.png
new file mode 100644
index 00000000..73a56185
Binary files /dev/null and b/apps/web/public/blog/the-curse-of-markdown.png differ