61 lines
3.7 KiB
HTML
61 lines
3.7 KiB
HTML
<!doctype html>
|
||
<html lang="en">
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'self'; style-src 'unsafe-inline'; img-src data:; base-uri 'none'; form-action 'none'">
|
||
<title>Markdown preview</title>
|
||
<style>
|
||
:root { color-scheme: light dark; font: 16px/1.55 system-ui, sans-serif; }
|
||
:root:not(.rendered) body { visibility: hidden; }
|
||
body { max-width: var(--markdown-width, 960px); margin: auto; padding: 20px 28px; overflow-wrap: anywhere; }
|
||
main { font: var(--markdown-font-size, 12pt)/1.55 var(--markdown-font, system-ui, sans-serif); }
|
||
nav { position: sticky; top: 0; display: flex; flex-wrap: wrap; gap: .4em; padding-block: .25em; background: Canvas; }
|
||
:root.quick-view body { padding: 8px 12px; }
|
||
:root.quick-view nav { display: none; }
|
||
:root.quick-view main > :first-child { margin-block-start: 0; }
|
||
:root.quick-view h1 { font-size: 1.4em; }
|
||
nav button { appearance: none; border: 0; background: transparent; color: LinkText;
|
||
font: 1.35em/1.25 system-ui, sans-serif; min-width: 1.55em; padding: 0; cursor: pointer; }
|
||
nav button:disabled { color: GrayText; opacity: .6; cursor: default; }
|
||
nav button:hover:not(:disabled) { text-decoration: underline; }
|
||
nav button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
|
||
#search { margin-inline-start: auto; display: flex; align-items: center; gap: .35em;
|
||
flex: 0 1 22em; min-width: 0; max-width: 100%; }
|
||
#search[hidden] { display: none; }
|
||
#search-query { box-sizing: border-box; flex: 1; min-width: 0; width: 0; font: inherit; }
|
||
#search-status { white-space: nowrap; font-size: .8em; }
|
||
::highlight(markdown-search-active) { background: #ffab45; color: #171717; }
|
||
:is(h1,h2,h3,h4,h5,h6) { scroll-margin-top: 2.5em; }
|
||
h1, h2 { border-bottom: 1px solid GrayText; padding-bottom: .25em; }
|
||
a[href] { color: LinkText; }
|
||
pre, table, figure { overflow: auto; }
|
||
pre, code { background: color-mix(in srgb, CanvasText 8%, Canvas); border-radius: 4px; }
|
||
pre { padding: .75em; }
|
||
code { padding: .1em .25em; }
|
||
pre code { padding: 0; background: none; }
|
||
blockquote { margin-left: 0; padding-left: 1em; border-left: 3px solid GrayText; }
|
||
table { display: block; border-collapse: collapse; }
|
||
th, td { border: 1px solid GrayText; padding: .3em .65em; }
|
||
img, svg { max-width: 100%; height: auto; }
|
||
figure { margin: 1em 0; }
|
||
figure svg .edgeLabel rect { fill: Canvas !important; opacity: 1 !important; stroke: none !important; }
|
||
.task { list-style: none; }
|
||
.task input { margin-inline: -1.15em .4em; cursor: pointer; }
|
||
</style>
|
||
<nav aria-label="Markdown preview">
|
||
<button id="back" type="button" title="Back (Alt+Left)" aria-label="Back" disabled>←</button>
|
||
<button id="forward" type="button" title="Forward (Alt+Right)" aria-label="Forward" disabled>→</button>
|
||
<button id="search-open" type="button" title="Find (Ctrl+F)" aria-label="Find in document" aria-controls="search" aria-expanded="false">⌕</button>
|
||
<div id="search" role="search" hidden>
|
||
<input id="search-query" type="search" aria-label="Find in document" placeholder="Find in document" autocomplete="off">
|
||
<output id="search-status" for="search-query" aria-live="polite"></output>
|
||
<button id="search-previous" type="button" title="Previous match (Shift+Enter)" aria-label="Previous match" disabled>↑</button>
|
||
<button id="search-next" type="button" title="Next match (Enter)" aria-label="Next match" disabled>↓</button>
|
||
<button id="search-close" type="button" title="Close search (Esc)" aria-label="Close search">×</button>
|
||
</div>
|
||
</nav>
|
||
<main></main>
|
||
<script src="markdown-it.js"></script>
|
||
<script src="markdown.js"></script>
|
||
</html>
|