you-dont-need-react

you-dont-need-react
git clone git://brookjeynes.dev/bjeynes/you-dont-need-react.git
Log | Files | Refs | README

form-submit-diagram.html (2110B)


      1 <!doctype html>
      2 <html lang="en">
      3 <head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>Submitting a form without htmx</title><style>body{margin:0;background:#15181c;color:#f2f4f7;font-family:Arial,sans-serif}.diagram{overflow-x:auto}svg{display:block;min-width:1200px;width:100%;height:auto}text{fill:#f2f4f7;font-family:Arial,sans-serif}.code{font-family:'Courier New',monospace;fill:#c9b98f}.value{fill:#87afaf}</style></head>
      4 <body><div class="diagram"><svg viewBox="0 0 1200 520" role="img" aria-labelledby="form-submit-title form-submit-desc" xmlns="http://www.w3.org/2000/svg">
      5 <title id="form-submit-title">Submitting a form without htmx</title><desc id="form-submit-desc">The browser sends a POST request with the form value to the server, receives an HTML document, and navigates to the returned page.</desc>
      6 <defs><marker id="arrow" viewBox="0 0 8 8" refX="7" refY="4" markerWidth="8" markerHeight="8" orient="auto"><path d="M0 0 L8 4 L0 8 Z" fill="#f2f4f7"/></marker></defs>
      7 <g fill="none" stroke="#f2f4f7" stroke-width="2"><path d="M280 100 V420 M920 100 V420" stroke-dasharray="6 8" opacity=".5"/><path d="M280 200 H920" marker-end="url(#arrow)"/><path d="M920 310 H280" stroke-dasharray="8 6" marker-end="url(#arrow)"/></g>
      8 <rect x="160" y="36" width="240" height="64" fill="#15181c" stroke="#f2f4f7" stroke-width="2"/><text x="280" y="77" text-anchor="middle" font-size="30" font-weight="bold">Browser</text>
      9 <rect x="800" y="36" width="240" height="64" fill="#15181c" stroke="#f2f4f7" stroke-width="2"/><text x="920" y="77" text-anchor="middle" font-size="30" font-weight="bold">Server</text>
     10 <text class="code" x="600" y="180" text-anchor="middle" font-size="26">POST /task/new</text>
     11 <text class="value" x="600" y="290" text-anchor="middle" font-size="26" font-family="Courier New, monospace">&lt;html&gt;…&lt;/html&gt;</text>
     12 <rect x="88" y="424" width="384" height="64" fill="#15181c" stroke="#f2f4f7" stroke-width="2"/><text x="280" y="465" text-anchor="middle" font-size="25">Browser loads the new page</text>
     13 </svg></div></body></html>