{
    "id": "bhaskar/magic-link-sign-in-with-a-pixel-tile",
    "kind": "plan",
    "title": "Magic link sign-in with a pixel tile",
    "summary": "A passwordless sign-in page where a mint app tile drops in and pops its pixels, three providers sit on top and an email link confirms with open-inbox buttons.",
    "author": "Admin",
    "stars": 0,
    "url": "https://ownlyplans.com/bhaskar/magic-link-sign-in-with-a-pixel-tile/",
    "stack": [
        "CSS",
        "HTML",
        "JavaScript"
    ],
    "tools": [
        "claude-code",
        "cursor",
        "lovable"
    ],
    "difficulty": "intermediate",
    "license": "all-rights",
    "version": "1.0",
    "overview": "A single-file passwordless sign-in page in plain HTML, CSS and JavaScript. A mint app tile drops in on a spring and its eight pixels pop in around the ring, with the white centre dot last and a bigger bounce. Underneath: the title, Google, GitHub and Apple buttons sharing one row, an \"or\" rule and a single email field. The button rolls from \"Email me a sign-in link\" to Sending link and then a mint Check your inbox. A confirmation panel then opens with the address, Open Gmail and Open Outlook buttons, a \"Use a different email\" link and a 30-second resend countdown. The page sits on a faint grid that fades out from the centre. The demo brand is Gridnote; put your calls in onSubmit and onProvider at the top of the script.",
    "steps": [
        {
            "title": "Lay out the tile, providers and email field",
            "body": "Build the clean white page with the faded grid, the mint tile, the title, three provider buttons, the \"or\" rule and the email form.",
            "prompt": "Create a single-file HTML sign-in page for a notes app called \"Gridnote\", plain HTML, CSS and JavaScript, passwordless. White page with a 44px light grid that fades out from the centre through a radial mask, plus a soft mint glow behind the top. Centre a 352px column: a 66px mint tile (gradient #b3f7d5 to #4fd99a, 20px corners, inner highlight and a green drop shadow, role=\"img\" named Gridnote) holding a 3 x 3 mark of eight dark green rounded squares around a white centre dot; the title \"Sign in to Gridnote\" in Bricolage Grotesque 600 27px; a muted line \"One account for every board. New here? We'll set you up as you go.\"; a row of three equal 42px buttons with the Google, GitHub and Apple marks and names; a thin \"or\" rule hidden from screen readers; a 46px email field with a visually hidden label and the placeholder you@work.com; a 46px near-black \"Email me a sign-in link\" button; and a small terms line with Terms and Privacy Policy links.",
            "done": "The tile, title, three providers, the or rule, the email field, the button and the terms line sit in one centred column.",
            "files": []
        },
        {
            "title": "Animate the tile and the rows",
            "body": "From one animation loop, drop the tile in on a spring, pop its pixels in turn and bring each row in on a stagger.",
            "prompt": "Start one requestAnimationFrame loop when fonts are ready. Use a damped spring 1 - e^(-kx)·cos(wx). The tile falls 46px and untilts from 10 degrees over 1 s. Each of the eight squares scales from 0 around the ring, 60ms apart from 0.35 s (transform-box: fill-box so each scales about its own centre), and the white centre dot pops last with a looser, bouncier spring. Each row (title, line, providers, rule, form, terms) rises 10px and un-blurs from 5px, 70ms apart from 0.55 s. With prefers-reduced-motion, show the tile and rows with a fade only. On windows shorter than 640px, shrink the tile to 54px and tighten the gaps.",
            "done": "The tile bounces in, its pixels pop around the ring with the centre dot last, and the rows rise in one by one.",
            "files": []
        },
        {
            "title": "Send the link and confirm",
            "body": "Validate the email, roll the button through its states and open a confirmation panel with inbox shortcuts and a resend timer.",
            "prompt": "On submit, check the email with the browser and show a friendly custom message if it is empty or incomplete. Otherwise stack three labels in the button (Email me a sign-in link; spinner + Sending link…; envelope + Check your inbox) and ease between them with translateY; turn the button mint with dark green text when sent, disable it and make the field read-only. Keep a visually hidden polite copy of the label and announce \"Sign-in link sent to …\" in a status region. Then open a panel to its natural height under the form (mint tint, 14px corners): \"We sent a sign-in link to <b>address</b>. It works once and expires in 10 minutes.\", two buttons Open Gmail and Open Outlook, a \"Use a different email\" link that resets the form and focuses the field, and a \"Resend in 0:30\" button that counts down and becomes \"Resend link\". Put the real calls in onSubmit(email) and onProvider(name).",
            "done": "Typing an address and pressing the button rolls to Sending link… then Check your inbox, and the panel opens with the inbox buttons and a counting resend timer.",
            "files": [
                "gridnote-sign-in.html"
            ]
        }
    ],
    "files": [
        {
            "type": "markdown",
            "name": "gridnote-sign-in.html",
            "note": "The finished file. Open it in a browser. Put your calls in onSubmit and onProvider at the top of the script.",
            "file": "gridnote-sign-in",
            "url": "https://ownlyplans.com/bhaskar/magic-link-sign-in-with-a-pixel-tile/gridnote-sign-in/"
        }
    ],
    "install": "",
    "how_to_use": "Call get_step with step 1, do it, check \"done when\", then continue.",
    "live_preview": true
}