logoalt Hacker News

thecr0wlast Monday at 12:03 AM1 replyview on HN

Oh what the heck. That worked really well for you. Would you be willing to recreate all the html and push it up to github? I'll drop the repo at the top of the blog post. It would be really cool for me to see this completely done and a great way to finish out the blog post. I obviously couldn't do it.


Replies

fluidcruftlast Monday at 2:33 AM

I got pretty far with this initial prompt:

    spacejam-1996.png is a full screenshot of the Space Jam 1996
    landing page. We want to recreate this landing page as faithfully
    as possible, matching the screenshot exactly.

    The asset directory contains images extracted from the original
    site. One of the images is tiled as the background of the landing
    page. The other images should appear once in the screenshot. Use
    these images as assets.

    Precise positioning is very important for this project, so you
    should writing a script that finds the precise location of each
    asset image in screenshots. Use the tool to detect precise
    positions in the target and fine tune the generated webpage. Be
    sure to generate diagnostic images that can be easily reviewed by
    a human reviewer.

    Use python 3.13 and uv to create a venv while working.
I just let Claude (Opus 4.5) do anything it wanted to do as it went.

At this point all the image assets are pixel perfect but the footer is in the wrong place and I had to hold Claude's hand a bit to get the footer into the approximately correct spot:

    I noticed you were struggling to find the position of the footer
    text. You could try rendering two versions of the generated page, the
    second time with the footer text black. Subtracting those two images
    should give you a clean view of the footer text.
At this point Claude was having trouble because its hadn't got a clean view of the target text location in the original screenshot (it was creating scripts that look at the red channel in the bottom half of the image to pull out the text but that was also grabbing part of the site map logo. Interestingly it made a comment about this but didn't do anything about it). So I gave it this additional hint:

    You are getting confused with the site map when analyzing the
    original screenshot. You could blank out the positions of assets
    so that they are not interfering with your analysis.
This got the footer in the correct location but the fonts/font sizes etc are not correct yet.
show 1 reply