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
9 changes: 7 additions & 2 deletions apps/web/app/sign-in/[[...sign-in]]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
import { SignIn } from "@clerk/nextjs";
import type { Metadata } from "next";
import { headers } from "next/headers";
import { Shell } from "@/components/shell";
import { redirectPath, signInRedirects } from "@/lib/auth-redirect";

export const metadata: Metadata = { title: "Ingresar | hack0", robots: { index: false, follow: false } };

export default function SignInPage() {
type Props = { searchParams: Promise<{ redirect_url?: string | string[] }> };

export default async function SignInPage({ searchParams }: Props) {
const path = redirectPath((await searchParams).redirect_url, (await headers()).get("host"));
return (
<Shell>
<div className="sign-in">
<SignIn />
<SignIn signUpUrl="/sign-up" {...signInRedirects(path)} />
</div>
</Shell>
);
Expand Down
9 changes: 7 additions & 2 deletions apps/web/app/sign-up/[[...sign-up]]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
import { SignUp } from "@clerk/nextjs";
import type { Metadata } from "next";
import { headers } from "next/headers";
import { Shell } from "@/components/shell";
import { redirectPath, signUpRedirects } from "@/lib/auth-redirect";

export const metadata: Metadata = { title: "Crear cuenta | hack0", robots: { index: false, follow: false } };

export default function SignUpPage() {
type Props = { searchParams: Promise<{ redirect_url?: string | string[] }> };

export default async function SignUpPage({ searchParams }: Props) {
const path = redirectPath((await searchParams).redirect_url, (await headers()).get("host"));
return (
<Shell>
<div className="sign-in">
<SignUp />
<SignUp signInUrl="/sign-in" {...signUpRedirects(path)} />
</div>
</Shell>
);
Expand Down
36 changes: 36 additions & 0 deletions apps/web/app/taste-hacking/DESIGN-LOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,39 @@ The gallery said what changed in a piece; it had nowhere to say how. Each piece
6. **Vocabulary.** The word bench at the top on the wide grid, then a term per line under its layer. A term with a station links up to it; a term measured on a piece links to that piece by its short name.

Checks at 1440x900 and 390x844: no horizontal scroll on the index, the vocabulary, the piece pages (signed out and as a buyer) or the material page; signed out, the piece's HTML carries the whole article and no session, and the access route answers 401.

## The gate and the share cards (2026-11-15)

Owner review: the signed-out material page was a title, one sentence and two links in the corner of an empty stage, and the share cards were a crop of the promo cover plus ten quick composites.

### The gate

`material/gate.tsx` is the material page for someone it cannot open for: signed out, or signed in with an email that has no purchase. Both use the same frame.

1. **The pass, before it opens.** The buyer's paper pass sits on a plate, upright and torn along the line between who it is for and what it holds. Its four rows (skill, sessions, recording, gallery) carry the counts the public page already gives, with the squares empty. Pointing at the way in fills them one after the other, 40 ms apart: that is what the button opens.
2. **One way in, one way to buy.** The primary action says which email to use. Luma is a bordered row with the price and the early bird. Signed in without a purchase, the primary action signs out and returns to sign-in, so changing account is one click instead of a paragraph about the avatar.
3. **Help in view.** Which email, and what to do when the key did not arrive, with the recover command on the code plate. It is the only command on the gate.
4. **A way forward.** The five pieces with a session, each linked to its public page. Nothing of a session is on the gate.
5. **Order on a phone.** Title, the two actions, the pass, the help, the pieces. The plate lands in the first screen.

Three layouts were shot side by side at 1440x900 and 390x844 (they share the phone layout):

| | Layout | Pass | Pieces |
|---|---|---|---|
| Conservative | One 680 column | Flat, two columns, no plate | A list of rows |
| Medium | 5/7 split, as in the hero | Upright on its plate | Five small posters in a row |
| Bold | Plate across the top, title at the hero scale under it | Wide, 72px title | Five full posters, cut by the fold |

Medium shipped. Conservative fixes the emptiness but the pass loses its plate, which is the page's language. Bold is the strongest still, but it puts the way in 620px down the page and the help below the fold, and this page has one job. Medium fits 1440x900 exactly: title, both actions, help, pass and the row of pieces end 20px above the fold.

Checks at 1440x900 and 390x844, signed out and signed in without a purchase: no horizontal scroll; the page's HTML carries no session and no install command, and the sessions route answers 401; a buyer still gets the same pass and page as before. Sign-in and sign-up now take the visitor back to the page they came from.

### Share cards

Cards are drawn by code at build time (`_og/`, one `opengraph-image.tsx` per route), 1200x630, in JetBrains Mono on the stage colour with the one accent. The renderer reads neither WOFF2 nor WebP, so the three weights are kept as latin-subset TTF beside the cards and each poster is converted when its card is drawn. It writes PNG only; the cards are re-encoded as JPEG, which is 50 to 180 kB each.

- **Workshop.** Three options: *conservative*, the title across the card with the thesis and the date under a rule; *medium*, the title beside the ticket on its plate; *bold*, the title beside three sheets pulled apart, one per layer, each with its label. Bold shipped: it is the only one where the picture is the thesis, and the three labels still read at feed size. Medium repeats the date and draws a button nobody can press.
- **Pieces.** Chapter and layer (the layer takes the accent), the page's own title at 56 to 72px by length, and the piece's poster filling the right 504px edge to edge.
- **Vocabulary.** It had none of its own. The title and three words per layer.

Each card was read at full size and at 600x315.
29 changes: 29 additions & 0 deletions apps/web/app/taste-hacking/[piece]/opengraph-image.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { notFound } from "next/navigation";
import { PieceCard } from "../_og/cards";
import { OG_SIZE, OG_TYPE, posterData, renderOg } from "../_og/render";
import { chapterNumber } from "../chapters";
import { GALLERY, LAYER_LABEL } from "../gallery";
import { CHAPTER_BY_LAYER, PIECES, pieceByPath } from "../pieces";

export const alt = "Una pieza de Taste hacking: su título, su capa y el resultado";
export const size = OG_SIZE;
export const contentType = OG_TYPE;
export const dynamicParams = false;

export function generateStaticParams() {
return PIECES.map((p) => ({ piece: p.path }));
}

export default async function Image({ params }: { params: Promise<{ piece: string }> }) {
const piece = pieceByPath((await params).piece);
const media = piece ? GALLERY.find((g) => g.slug === piece.slug) : undefined;
if (!piece || !media) notFound();
return renderOg(
<PieceCard
chapter={chapterNumber(CHAPTER_BY_LAYER[piece.layer].chapter)}
layer={LAYER_LABEL[piece.layer]}
title={piece.title}
poster={await posterData(media.poster)}
/>,
);
}
4 changes: 1 addition & 3 deletions apps/web/app/taste-hacking/[piece]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
const piece = pieceByPath((await params).piece);
if (!piece) return {};
const url = pieceHref(piece);
const image = { url: `/taste-hacking/og/${piece.slug}.jpg`, width: 1200, height: 630, alt: piece.title };
return {
title: piece.seoTitle,
description: piece.metaDescription,
Expand All @@ -41,9 +40,8 @@ export async function generateMetadata({ params }: Props): Promise<Metadata> {
type: "article",
publishedTime: PIECES_PUBLISHED,
authors: ["Railly Hugo"],
images: [image],
},
twitter: { card: "summary_large_image", title: piece.seoTitle, description: piece.metaDescription, images: [image.url] },
twitter: { card: "summary_large_image", title: piece.seoTitle, description: piece.metaDescription },
};
}

Expand Down
209 changes: 209 additions & 0 deletions apps/web/app/taste-hacking/_og/cards.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
import type { CSSProperties } from "react";
import { WORKSHOP } from "../workshop";
import { OG_SIZE, POSTER_SIZE } from "./render";

const C = {
stage: "#111110",
well: "#171716",
ink: "#f3f0e8",
mute: "#a8a69d",
hair: "#6a6862",
rule: "#2f2e2b",
acc: "#ff3d00",
cardRule: "#d5d2c9",
};

const PAD = 56;

const page: CSSProperties = {
...OG_SIZE,
display: "flex",
background: C.stage,
color: C.ink,
fontFamily: "JetBrains Mono",
fontWeight: 500,
};

/** The hack0 mark, drawn as on the site. `bg` is the surface behind it. */
function Mark({ size, bg = C.stage, ink = C.ink }: { size: number; bg?: string; ink?: string }) {
return (
<svg width={size} height={size} viewBox="0 0 64 64" aria-hidden="true">
<rect x="17" y="6" width="30" height="52" rx="15" fill="none" stroke={ink} strokeWidth="8" />
<line x1="10" y1="60" x2="54" y2="4" stroke={bg} strokeWidth="15" />
<line x1="10" y1="60" x2="54" y2="4" stroke={C.acc} strokeWidth="8" strokeLinecap="square" />
</svg>
);
}

function Wordmark({ size }: { size: number }) {
return (
<div style={{ display: "flex", alignItems: "center", fontSize: size, fontWeight: 800, letterSpacing: "-0.05em" }}>
hack
<Mark size={size * 0.9} />
</div>
);
}

const LAYERS = ["se ve", "se mueve", "está hecho"];

const SHEET = { size: 220, left: 96, top: 85, step: 120 };

/** What each sheet carries: a card's face, three rows entering one after the other, and the boxes underneath. */
function SheetMarks({ layer }: { layer: number }) {
if (layer === 0) {
return (
<div style={{ display: "flex", flexDirection: "column", padding: 26 }}>
<div style={{ display: "flex", width: 52, height: 8, background: C.acc }} />
<div style={{ display: "flex", width: 132, height: 18, background: C.stage, marginTop: 14 }} />
<div style={{ display: "flex", width: 96, height: 8, background: C.cardRule, marginTop: 14 }} />
</div>
);
}
if (layer === 1) {
return (
<div style={{ display: "flex", flexDirection: "column", padding: 26 }}>
{[0, 1, 2].map((i) => (
<div key={i} style={{ display: "flex", width: 96, height: 8, background: C.hair, marginTop: i ? 14 : 34, marginLeft: i * 28 }} />
))}
</div>
);
}
return null;
}

const THESIS = "Todo lo que ves tiene 3 capas.";

/** The workshop: its title, the thesis and the date, with the thesis drawn as one sheet per layer, pulled apart. */
export function MainCard() {
const sheet = (i: number): CSSProperties => ({
position: "absolute",
display: "flex",
left: SHEET.left,
top: SHEET.top + i * SHEET.step,
width: SHEET.size,
height: SHEET.size,
transform: "rotate(-45deg) skewX(15deg) skewY(15deg)",
border: `2px solid ${i === 0 ? C.ink : C.hair}`,
background: i === 0 ? C.ink : i === 1 ? "#1d1d1b" : C.well,
});
return (
<div style={page}>
<div style={{ display: "flex", flexDirection: "column", justifyContent: "space-between", width: 540, padding: PAD, paddingRight: 0 }}>
<Wordmark size={34} />
<div style={{ display: "flex", flexDirection: "column" }}>
<div
style={{ display: "flex", flexDirection: "column", fontSize: 128, fontWeight: 800, letterSpacing: "-0.07em", lineHeight: 0.9 }}
>
<div style={{ display: "flex" }}>Taste</div>
<div style={{ display: "flex" }}>hacking</div>
</div>
<div style={{ display: "flex", marginTop: 30, fontSize: 28, fontWeight: 700, letterSpacing: "-0.03em" }}>{THESIS}</div>
</div>
<div style={{ display: "flex", alignItems: "center", fontSize: 26 }}>
<div style={{ display: "flex", fontWeight: 800 }}>{WORKSHOP.day}</div>
<div style={{ display: "flex", color: C.mute, marginLeft: 16 }}>· workshop online</div>
</div>
</div>
<div style={{ display: "flex", position: "relative", width: 660, height: OG_SIZE.height }}>
{[2, 1, 0].map((i) => (
<div key={i} style={sheet(i)}>
<SheetMarks layer={i} />
</div>
))}
{LAYERS.map((name, i) => (
<div
key={name}
style={{
position: "absolute",
display: "flex",
alignItems: "center",
left: 418,
top: SHEET.top + SHEET.size / 2 + i * SHEET.step - 17,
fontSize: 24,
}}
>
<div style={{ display: "flex", width: 24, height: 2, background: i === 0 ? C.acc : C.hair }} />
<div style={{ display: "flex", marginLeft: 10, color: C.acc, fontWeight: 800 }}>0{i + 1}</div>
<div style={{ display: "flex", marginLeft: 10, fontWeight: 700 }}>{name}</div>
</div>
))}
</div>
</div>
);
}

/** Short titles are set larger; none goes under 56px, which is 28px in a feed. */
function titleSize(title: string): number {
if (title.length <= 28) return 72;
if (title.length <= 44) return 64;
return 56;
}

/** A piece: its chapter and layer, its title, and its own result filling the right of the card. */
export function PieceCard({ chapter, layer, title, poster }: { chapter: string; layer: string; title: string; poster: string }) {
return (
<div style={page}>
<div style={{ display: "flex", flexDirection: "column", justifyContent: "space-between", flex: 1, padding: PAD, paddingRight: 44 }}>
<div style={{ display: "flex", alignItems: "center", fontSize: 24 }}>
<Mark size={34} />
<div style={{ display: "flex", marginLeft: 14, fontWeight: 700 }}>Taste hacking</div>
</div>
<div style={{ display: "flex", flexDirection: "column" }}>
<div style={{ display: "flex", alignItems: "center", fontSize: 26, fontWeight: 700 }}>
<div style={{ display: "flex", color: C.mute }}>{chapter}</div>
<div style={{ display: "flex", width: 12, height: 12, background: C.acc, margin: "0 14px" }} />
<div style={{ display: "flex", color: C.acc }}>{layer}</div>
</div>
<div
style={{
display: "flex",
marginTop: 18,
fontSize: titleSize(title),
fontWeight: 800,
letterSpacing: "-0.055em",
lineHeight: 1.02,
}}
>
{title}
</div>
</div>
<div style={{ display: "flex", fontSize: 22, color: C.mute }}>hack0.dev/taste-hacking</div>
</div>
<div style={{ display: "flex", position: "relative", ...POSTER_SIZE, borderLeft: `1px solid ${C.rule}` }}>
{/* biome-ignore lint/performance/noImgElement: the card renderer draws plain img elements only */}
<img src={poster} alt="" width={POSTER_SIZE.width} height={POSTER_SIZE.height} />
</div>
</div>
);
}

/** The vocabulary: three columns of words, one per layer. */
export function VocabCard({ columns }: { columns: { name: string; words: string[] }[] }) {
return (
<div style={{ ...page, flexDirection: "column", justifyContent: "space-between", padding: PAD }}>
<div style={{ display: "flex", alignItems: "center", fontSize: 24 }}>
<Mark size={34} />
<div style={{ display: "flex", marginLeft: 14, fontWeight: 700 }}>Taste hacking</div>
</div>
<div style={{ display: "flex", flexDirection: "column" }}>
<div style={{ display: "flex", fontSize: 112, fontWeight: 800, letterSpacing: "-0.065em", lineHeight: 0.95 }}>El vocabulario</div>
<div style={{ display: "flex", marginTop: 18, fontSize: 30, color: C.mute }}>Las palabras para pedir cada capa.</div>
</div>
<div style={{ display: "flex", borderTop: `1px solid ${C.rule}`, paddingTop: 22 }}>
{columns.map((c, i) => (
<div key={c.name} style={{ display: "flex", flexDirection: "column", flex: 1, fontSize: 24 }}>
<div style={{ display: "flex", fontWeight: 800, marginBottom: 6 }}>
<div style={{ display: "flex", color: C.acc, marginRight: 12 }}>0{i + 1}</div>
{c.name}
</div>
{c.words.map((w) => (
<div key={w} style={{ display: "flex", marginTop: 4, color: C.mute }}>
{w}
</div>
))}
</div>
))}
</div>
</div>
);
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Loading