Add Svelte docs site and WASM playground

This commit is contained in:
2026-06-17 00:07:11 +09:00
parent 58d2c9b423
commit 4020b7c2d5
23 changed files with 2359 additions and 1 deletions
+232
View File
@@ -0,0 +1,232 @@
:root {
color-scheme: light dark;
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
background: #f7f7f8;
color: #1f2328;
}
body {
margin: 0;
}
a {
color: #2563eb;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
.topbar {
align-items: center;
background: #111827;
color: white;
display: flex;
height: 56px;
justify-content: space-between;
padding: 0 24px;
}
.brand {
color: white;
font-size: 20px;
font-weight: 700;
}
.topnav {
display: flex;
gap: 18px;
}
.topnav a {
color: #dbeafe;
}
.layout {
display: grid;
grid-template-columns: 300px minmax(0, 1fr);
min-height: calc(100vh - 56px);
}
.sidebar {
background: #ffffff;
border-right: 1px solid #e5e7eb;
overflow: auto;
padding: 22px 18px;
}
.sidebar-title {
color: #111827;
display: block;
font-weight: 700;
margin-bottom: 12px;
}
.nav-tree {
list-style: none;
margin: 0;
padding-left: 0;
}
.nav-tree .nav-tree {
margin: 4px 0 6px 12px;
}
.nav-tree a {
border-radius: 6px;
color: #374151;
display: block;
font-size: 14px;
line-height: 1.35;
padding: 4px 8px;
}
.nav-tree a.active {
background: #dbeafe;
color: #1d4ed8;
font-weight: 600;
}
main {
min-width: 0;
padding: 36px;
}
main.playground {
padding: 24px;
}
.markdown {
background: white;
border: 1px solid #e5e7eb;
border-radius: 12px;
box-shadow: 0 8px 24px rgb(15 23 42 / 0.05);
margin: 0 auto;
max-width: 920px;
padding: 24px 36px 42px;
}
.markdown h1,
.markdown h2,
.markdown h3 {
color: #111827;
}
.markdown pre,
.pane pre {
background: #0f172a;
border-radius: 10px;
color: #e5e7eb;
overflow: auto;
padding: 14px;
}
.markdown code {
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}
.markdown :not(pre) > code {
background: #eef2ff;
border-radius: 4px;
color: #3730a3;
padding: 1px 4px;
}
.playground-page {
height: calc(100vh - 104px);
}
.playground-header {
align-items: center;
display: flex;
justify-content: space-between;
margin-bottom: 18px;
}
.playground-header h1 {
margin: 0 0 4px;
}
.playground-header p {
color: #4b5563;
margin: 0;
}
button {
background: #2563eb;
border: 0;
border-radius: 8px;
color: white;
cursor: pointer;
font-weight: 700;
padding: 10px 18px;
}
button:disabled {
cursor: not-allowed;
opacity: 0.5;
}
.playground-grid {
display: grid;
gap: 16px;
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
height: calc(100% - 82px);
}
.pane {
background: white;
border: 1px solid #e5e7eb;
border-radius: 12px;
display: flex;
flex-direction: column;
min-height: 0;
overflow: hidden;
}
.pane > span {
border-bottom: 1px solid #e5e7eb;
color: #374151;
font-size: 13px;
font-weight: 700;
padding: 10px 12px;
text-transform: uppercase;
}
textarea {
border: 0;
flex: 1;
font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
outline: none;
padding: 14px;
resize: none;
}
.output-pane pre {
border-radius: 0;
flex: 1;
margin: 0;
}
.output-pane pre.error {
color: #fecaca;
}
.status {
color: #4b5563;
}
@media (max-width: 900px) {
.layout {
grid-template-columns: 1fr;
}
.sidebar {
border-bottom: 1px solid #e5e7eb;
border-right: 0;
max-height: 260px;
}
.playground-grid {
grid-template-columns: 1fr;
}
}