Mercurial
comparison infinite_canvas/assets/image-view.html @ 276:b55c22cff335
Add interactive infinite canvas prototype
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Mon, 17 Aug 2026 16:57:56 -0700 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 274:c9be578316a6 | 276:b55c22cff335 |
|---|---|
| 1 <!doctype html> | |
| 2 <meta charset="utf-8"> | |
| 3 <style> | |
| 4 html, body { | |
| 5 width: 100%; | |
| 6 height: 100%; | |
| 7 margin: 0; | |
| 8 overflow: hidden; | |
| 9 background: #fff; | |
| 10 } | |
| 11 | |
| 12 img { | |
| 13 display: block; | |
| 14 width: 100%; | |
| 15 height: 100%; | |
| 16 object-fit: contain; | |
| 17 } | |
| 18 </style> | |
| 19 <img id="image" alt=""> | |
| 20 <script> | |
| 21 const source = new URLSearchParams(location.search).get("src"); | |
| 22 if (source) document.getElementById("image").src = source; | |
| 23 </script> |