Add tutorial docs and interactive playgrounds

Amp-Thread-ID: https://ampcode.com/threads/T-01a01380-b478-77d0-84a0-102880a5c5ae
Co-authored-by: Heaust Azure <heaust.azure@gmail.com>
This commit is contained in:
Amp
2026-08-19 14:20:59 +00:00
co-authored by heaust
parent 6bbf8039e4
commit d34722d66d
57 changed files with 5063 additions and 767 deletions
+72
View File
@@ -0,0 +1,72 @@
:root {
color-scheme: dark;
font-family: Inter, ui-sans-serif, system-ui, sans-serif;
background: #0a0d12;
color: #eef2f8;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body { display: grid; grid-template-rows: 64px minmax(0, 1fr); }
header {
display: flex;
align-items: center;
gap: 10px;
min-width: 0;
padding: 9px 14px;
border-bottom: 1px solid #29303b;
background: #11151c;
}
.brand { margin-right: 4px; color: #fff; font-size: 17px; font-weight: 850; letter-spacing: .14em; text-decoration: none; }
.brand span { color: #e16f3c; }
.recipe-meta { display: grid; min-width: 190px; margin-right: auto; }
.recipe-meta strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.recipe-meta span, label > span { color: #8792a3; font: 10px ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; }
label { display: grid; gap: 3px; }
button, select, .button {
min-height: 36px;
padding: 0 12px;
border: 1px solid #3a4452;
border-radius: 6px;
color: #e8edf5;
background: #202733;
font-family: inherit;
font-size: 12px;
font-weight: 600;
text-decoration: none;
cursor: pointer;
}
.button { display: inline-flex; align-items: center; }
button:hover, select:hover, .button:hover { border-color: #69778c; }
button.primary { border-color: #ee8251; background: #c65d2f; }
main { display: grid; grid-template-columns: minmax(360px, .9fr) minmax(0, 1.1fr); min-height: 0; }
.code-pane, .preview-pane { position: relative; min-width: 0; min-height: 0; }
.code-pane { display: grid; grid-template-rows: 38px minmax(0, 1fr); border-right: 1px solid #29303b; background: #0d1117; }
.pane-title { display: flex; align-items: center; gap: 5px; padding: 0 14px; border-bottom: 1px solid #252c36; color: #8894a5; font-size: 11px; }
.pane-title span { margin-right: auto; color: #d7dee9; font-weight: 700; }
kbd { padding: 2px 5px; border: 1px solid #39424e; border-radius: 4px; background: #171d25; font: 10px ui-monospace, monospace; }
textarea {
width: 100%;
height: 100%;
resize: none;
padding: 22px;
border: 0;
outline: 0;
color: #dce6f3;
background: transparent;
font: 14px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace;
tab-size: 2;
}
.preview-pane { background: #080b10; }
iframe { width: 100%; height: 100%; border: 0; }
#status { position: absolute; left: 14px; bottom: 14px; max-width: calc(100% - 28px); overflow: hidden; padding: 8px 11px; border: 1px solid #ffffff18; border-radius: 7px; background: #0d121bea; color: #b9c3d2; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
#status[data-error="true"] { color: #ffb8a6; border-color: #ef795d88; }
@media (max-width: 850px) {
body { grid-template-rows: auto minmax(0, 1fr); }
header { flex-wrap: wrap; }
.recipe-meta { min-width: 0; }
header label { order: 2; width: 100%; }
header select { width: 100%; }
main { grid-template-columns: 1fr; grid-template-rows: 48% 52%; }
.code-pane { border-right: 0; border-bottom: 1px solid #29303b; }
#copy { display: none; }
}