Spaces:
Running
Running
Cüneyt Öztürk commited on
Commit ·
f7698c3
1
Parent(s): de16b8d
Fix mojibake: ellipsis/arrow/section/check via HTML entities + JS unicode escapes
Browse files- index.html +9 -9
index.html
CHANGED
|
@@ -128,7 +128,7 @@ footer{padding:32px 0 48px;border-top:1px solid var(--border);max-width:84rem;ma
|
|
| 128 |
<main>
|
| 129 |
<span class="tag">Playground · In-browser · No server roundtrip</span>
|
| 130 |
<h1>Edit a manifest. <span class="sig">Watch the hash update in real time.</span></h1>
|
| 131 |
-
<p class="lede">Edit the YAML on the left. The right panel shows the canonical bytes (per PRML v0.1
|
| 132 |
|
| 133 |
<div class="controls">
|
| 134 |
<span class="examples">
|
|
@@ -158,7 +158,7 @@ footer{padding:32px 0 48px;border-top:1px solid var(--border);max-width:84rem;ma
|
|
| 158 |
<span class="panel-title">canonical bytes · SHA-256</span>
|
| 159 |
<button class="panel-action" id="copy-canon">copy</button>
|
| 160 |
</div>
|
| 161 |
-
<pre id="canonical">(loading
|
| 162 |
<div class="status">
|
| 163 |
<span class="small">UTF-8 · LF endings · sorted keys · one trailing newline</span>
|
| 164 |
<span id="byte-count" class="small">0 bytes</span>
|
|
@@ -167,13 +167,13 @@ footer{padding:32px 0 48px;border-top:1px solid var(--border);max-width:84rem;ma
|
|
| 167 |
<span class="panel-title">sha-256</span>
|
| 168 |
<button class="panel-action" id="copy-hash">copy</button>
|
| 169 |
</div>
|
| 170 |
-
<pre id="hash" class="hash">(computing
|
| 171 |
</div>
|
| 172 |
|
| 173 |
</div>
|
| 174 |
|
| 175 |
<div class="controls" style="margin-top:24px">
|
| 176 |
-
<button class="btn" id="anchor">Anchor publicly
|
| 177 |
<button class="btn btn-ghost" id="download">Download manifest.yaml</button>
|
| 178 |
<button class="btn btn-ghost" id="badge">Generate badge</button>
|
| 179 |
</div>
|
|
@@ -199,7 +199,7 @@ footer{padding:32px 0 48px;border-top:1px solid var(--border);max-width:84rem;ma
|
|
| 199 |
</main>
|
| 200 |
|
| 201 |
<footer>
|
| 202 |
-
<p style="font-family:var(--mono);font-size:10px;letter-spacing:.1em;color:var(--muted);text-transform:uppercase">
|
| 203 |
<nav class="fnav">
|
| 204 |
<a href="/">Home</a>
|
| 205 |
<a href="https://spec.falsify.dev/v0.1">Spec</a>
|
|
@@ -412,7 +412,7 @@ $('download').addEventListener('click', () => {
|
|
| 412 |
$('anchor').addEventListener('click', async () => {
|
| 413 |
const yaml = src.value;
|
| 414 |
const btn = $('anchor');
|
| 415 |
-
btn.disabled = true; btn.textContent = 'anchoring
|
| 416 |
try {
|
| 417 |
const res = await fetch('https://registry.falsify.dev/commit', {
|
| 418 |
method: 'POST',
|
|
@@ -426,11 +426,11 @@ $('anchor').addEventListener('click', async () => {
|
|
| 426 |
showResults(data);
|
| 427 |
} catch (e) {
|
| 428 |
btn.textContent = 'anchor failed: ' + e.message;
|
| 429 |
-
setTimeout(() => { btn.textContent = 'Anchor publicly
|
| 430 |
return;
|
| 431 |
}
|
| 432 |
-
btn.textContent = '
|
| 433 |
-
setTimeout(() => { btn.textContent = 'Anchor publicly
|
| 434 |
});
|
| 435 |
|
| 436 |
function showResults(data) {
|
|
|
|
| 128 |
<main>
|
| 129 |
<span class="tag">Playground · In-browser · No server roundtrip</span>
|
| 130 |
<h1>Edit a manifest. <span class="sig">Watch the hash update in real time.</span></h1>
|
| 131 |
+
<p class="lede">Edit the YAML on the left. The right panel shows the canonical bytes (per PRML v0.1 §4) and the SHA-256 in-browser. When you're ready, copy the manifest to a file or anchor the hash publicly at registry.falsify.dev. Examples below load common patterns.</p>
|
| 132 |
|
| 133 |
<div class="controls">
|
| 134 |
<span class="examples">
|
|
|
|
| 158 |
<span class="panel-title">canonical bytes · SHA-256</span>
|
| 159 |
<button class="panel-action" id="copy-canon">copy</button>
|
| 160 |
</div>
|
| 161 |
+
<pre id="canonical">(loading…)</pre>
|
| 162 |
<div class="status">
|
| 163 |
<span class="small">UTF-8 · LF endings · sorted keys · one trailing newline</span>
|
| 164 |
<span id="byte-count" class="small">0 bytes</span>
|
|
|
|
| 167 |
<span class="panel-title">sha-256</span>
|
| 168 |
<button class="panel-action" id="copy-hash">copy</button>
|
| 169 |
</div>
|
| 170 |
+
<pre id="hash" class="hash">(computing…)</pre>
|
| 171 |
</div>
|
| 172 |
|
| 173 |
</div>
|
| 174 |
|
| 175 |
<div class="controls" style="margin-top:24px">
|
| 176 |
+
<button class="btn" id="anchor">Anchor publicly →</button>
|
| 177 |
<button class="btn btn-ghost" id="download">Download manifest.yaml</button>
|
| 178 |
<button class="btn btn-ghost" id="badge">Generate badge</button>
|
| 179 |
</div>
|
|
|
|
| 199 |
</main>
|
| 200 |
|
| 201 |
<footer>
|
| 202 |
+
<p style="font-family:var(--mono);font-size:10px;letter-spacing:.1em;color:var(--muted);text-transform:uppercase">Cüneyt Öztürk · CC BY 4.0 · In-browser SHA-256 via <code>crypto.subtle</code></p>
|
| 203 |
<nav class="fnav">
|
| 204 |
<a href="/">Home</a>
|
| 205 |
<a href="https://spec.falsify.dev/v0.1">Spec</a>
|
|
|
|
| 412 |
$('anchor').addEventListener('click', async () => {
|
| 413 |
const yaml = src.value;
|
| 414 |
const btn = $('anchor');
|
| 415 |
+
btn.disabled = true; btn.textContent = 'anchoring\u2026';
|
| 416 |
try {
|
| 417 |
const res = await fetch('https://registry.falsify.dev/commit', {
|
| 418 |
method: 'POST',
|
|
|
|
| 426 |
showResults(data);
|
| 427 |
} catch (e) {
|
| 428 |
btn.textContent = 'anchor failed: ' + e.message;
|
| 429 |
+
setTimeout(() => { btn.textContent = 'Anchor publicly \u2192'; btn.disabled = false; }, 4000);
|
| 430 |
return;
|
| 431 |
}
|
| 432 |
+
btn.textContent = '\u2713 anchored';
|
| 433 |
+
setTimeout(() => { btn.textContent = 'Anchor publicly \u2192'; btn.disabled = false; }, 4000);
|
| 434 |
});
|
| 435 |
|
| 436 |
function showResults(data) {
|