21 bite-sized beginner tutorials (Web Basics, APIs & Data), the 8-backend blog engine series, 4 blog frontends, 2 React starters, 3 NixOS desktops and 4 Rust API/pipeline boilerplates. Every folder is a complete, self-contained project with its own README. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VGNxPf9PrSG2kzrxSvn45Y
35 lines
1.2 KiB
HTML
35 lines
1.2 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>Modal Dialog</title>
|
|
<link rel="stylesheet" href="styles.css" />
|
|
</head>
|
|
<body>
|
|
<main class="card">
|
|
<h1>Modal Dialog</h1>
|
|
<p class="sub">An accessible pop-up, using the browser's own tools.</p>
|
|
|
|
<button id="open" class="btn">Open dialog</button>
|
|
<p id="status" class="status" role="status">The dialog is closed.</p>
|
|
</main>
|
|
|
|
<dialog id="dialog" class="dialog" aria-labelledby="dialogTitle">
|
|
<div class="dialog-body">
|
|
<button id="close" class="close" type="button" aria-label="Close dialog">
|
|
✕
|
|
</button>
|
|
<h2 id="dialogTitle">Welcome aboard 🎉</h2>
|
|
<p>
|
|
This little box is a native <code><dialog></code>. The page behind it
|
|
is frozen, your keyboard focus is trapped inside, and pressing
|
|
<kbd>Esc</kbd> closes it — none of which we had to code by hand.
|
|
</p>
|
|
<button id="ok" class="btn">OK, got it</button>
|
|
</div>
|
|
</dialog>
|
|
|
|
<script src="app.js"></script>
|
|
</body>
|
|
</html>
|