Auto-mount via bridge mount/data-mq and client_embed; expand DOM/form effects; drop hello loader JS; add web-client-site. Document that C+D cover mid-size interactivity but not most JS apps—route E covers routing, storage, lists, WebSocket, and richer DOM/timers. Co-authored-by: Cursor <cursoragent@cursor.com>
77 lines
2.3 KiB
HTML
77 lines
2.3 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="zh-Hans">
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||
<title>Marqdo · 表单 (D3)</title>
|
||
<style>
|
||
:root {
|
||
--ink: #1a1f1c;
|
||
--paper: #e8efe6;
|
||
--accent: #2f6f4e;
|
||
--muted: #5a6b60;
|
||
}
|
||
* { box-sizing: border-box; }
|
||
body {
|
||
margin: 0;
|
||
min-height: 100vh;
|
||
font-family: "IBM Plex Sans", "Noto Sans SC", sans-serif;
|
||
color: var(--ink);
|
||
background:
|
||
radial-gradient(700px 400px at 100% 20%, #d0e0d4 0%, transparent 50%),
|
||
linear-gradient(165deg, #f3f7f2, var(--paper));
|
||
padding: 2rem clamp(1rem, 4vw, 3rem);
|
||
}
|
||
h1 {
|
||
font-family: "IBM Plex Serif", "Noto Serif SC", serif;
|
||
font-weight: 600;
|
||
font-size: clamp(1.6rem, 3vw, 2.2rem);
|
||
margin: 0 0 0.35rem;
|
||
}
|
||
.lead { color: var(--muted); margin: 0 0 1.25rem; max-width: 38rem; }
|
||
label { display: block; font-size: 0.85rem; color: var(--muted); margin: 0.75rem 0 0.35rem; }
|
||
input[type="text"] {
|
||
width: min(24rem, 100%);
|
||
padding: 0.5rem 0.75rem;
|
||
border: 1px solid #b7c7bb;
|
||
background: rgba(255,255,255,0.75);
|
||
font: inherit;
|
||
}
|
||
#echo {
|
||
margin-top: 1rem;
|
||
font-size: 1.25rem;
|
||
min-height: 1.5em;
|
||
}
|
||
#echo.hi { color: var(--accent); font-weight: 600; }
|
||
pre {
|
||
margin-top: 1.5rem;
|
||
width: min(42rem, 100%);
|
||
padding: 0.9rem 1rem;
|
||
background: #122018;
|
||
color: #d7eadc;
|
||
overflow: auto;
|
||
font-size: 0.8rem;
|
||
line-height: 1.4;
|
||
}
|
||
.err { color: #ffb4a8; }
|
||
a { color: var(--accent); }
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<h1>Marqdo</h1>
|
||
<p class="lead">D3:<code>input</code> 事件把 <code>value</code> 传入 Marqdo;<code>set_value</code> / <code>set_class</code> / <code>set_attr</code> 回写 DOM。业务只在 <code>form.mq.md</code>。<a href="./interact.html">计数器</a> · <a href="./">打印</a></p>
|
||
<label for="name">名字</label>
|
||
<input id="name" type="text" placeholder="输入…" disabled />
|
||
<div id="echo">(等待输入)</div>
|
||
<pre id="log">loading…</pre>
|
||
<script
|
||
type="module"
|
||
src="./marqdo-bridge.js"
|
||
data-mq-wasm="./marqdo_wasm.wasm"
|
||
data-mq-source-url="./form.mq.md"
|
||
data-mq-ready="#log"
|
||
data-mq-enable="#name"
|
||
></script>
|
||
</body>
|
||
</html>
|