Files
evan 78f181e924 feat(web): improve SD file browser
Add directory navigation, folder creation, inline deletion, clear controls, and a focused editor view. Include the opt-in FAT16 vvfat experiment and fail-fast browser diagnostics; raw FAT32 remains the default.
2026-07-21 15:37:00 -04:00

115 lines
6.3 KiB
CSS

:root {
color-scheme: light;
font-family: Inter, ui-sans-serif, system-ui, sans-serif;
color: #20211f;
background: #e9e5dc;
}
* { box-sizing: border-box; }
body { margin: 0; }
main {
width: min(100% - 2rem, 70rem);
margin: 0 auto;
padding: 2.5rem 0 4rem;
}
header { margin-bottom: 1.5rem; }
header p { max-width: 42rem; }
h1 { margin: 0; font-size: clamp(2rem, 6vw, 4rem); line-height: 1; }
.eyebrow { margin-bottom: .5rem; font-size: .75rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.boot-panel {
display: flex;
flex-wrap: wrap;
gap: 1rem;
align-items: end;
padding: 1rem;
border: 1px solid #c8c2b6;
border-radius: .75rem;
background: #f7f4ed;
}
label { display: grid; gap: .4rem; font-size: .85rem; font-weight: 700; }
input, select, button { font: inherit; }
input, select { min-height: 2.6rem; padding: .5rem; border: 1px solid #aaa398; border-radius: .4rem; background: white; }
button { min-height: 2.75rem; padding: .55rem 1rem; border: 1px solid #55534e; border-radius: .5rem; color: #fff; background: #343532; font-weight: 750; cursor: pointer; touch-action: none; }
button:hover:not(:disabled) { background: #11120f; }
button:focus-visible { outline: 3px solid #d2752b; outline-offset: 2px; }
button:disabled { cursor: not-allowed; opacity: .4; }
button.active { transform: translateY(2px); background: #d2752b; }
.status { min-height: 1.5rem; margin: 1rem 0; }
.status.error { color: #a52d20; font-weight: 700; }
.workspace { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.device { display: flex; justify-content: center; }
.device-frame {
display: grid;
grid-template-columns: auto minmax(14rem, 30rem) auto;
grid-template-rows: auto auto auto;
gap: .6rem;
align-items: stretch;
justify-items: stretch;
}
.screen-shell { grid-column: 2; grid-row: 2; padding: 1.1rem; border-radius: 1.2rem; background: #30312e; box-shadow: 0 1rem 2.5rem #5d584c40; }
canvas { display: block; width: 100%; height: auto; background: #fff; image-rendering: pixelated; }
.device-frame button { min-height: 0; border-radius: .6rem; }
.btn-power { grid-column: 2; grid-row: 1; height: 1.6rem; }
.btn-side { grid-row: 2; width: 1.6rem; }
.btn-up { grid-column: 1; }
.btn-down { grid-column: 3; }
.btn-bottom { grid-column: 2; grid-row: 3; display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; }
.btn-bottom button { height: 1.6rem; }
@media (max-width: 48rem) {
main { padding-top: 1.5rem; }
.workspace { grid-template-columns: 1fr; }
}
.inspector { min-width: 0; overflow: hidden; border: 1px solid #c8c2b6; border-radius: .75rem; background: #f7f4ed; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid #c8c2b6; }
.tabs button { border: 0; border-right: 1px solid #c8c2b6; border-radius: 0; color: #56534d; background: transparent; }
.tabs button:last-child { border-right: 0; }
.tabs button[aria-selected="true"] { color: #fff; background: #343532; }
.tab-panel { padding: 1rem; }
.log-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; font-size: .85rem; color: #625e55; }
.log-header button { min-height: auto; padding: .25rem .75rem; font-size: .8rem; }
.log { margin: 0; max-height: 38rem; overflow: auto; padding: .75rem 1rem; border-radius: .6rem; background: #1c1d1a; color: #d6d0c2; font: .78rem/1.4 ui-monospace, monospace; white-space: pre-wrap; word-break: break-word; }
.file-toolbar { display: flex; gap: .4rem; align-items: center; margin: 0; flex-wrap: wrap; }
.file-actions { display: flex; justify-content: flex-end; gap: .4rem; margin-top: .6rem; }
.file-button { display: inline-flex; min-height: 1.9rem; align-items: center; padding: .3rem .6rem; border: 1px solid #55534e; border-radius: .4rem; color: #fff; background: #343532; font-size: .8rem; font-weight: 650; cursor: pointer; }
.file-button:hover:not(:disabled) { background: #11120f; }
.file-clear { border-color: #b94a3b; color: #a52d20; background: transparent; }
.file-clear:hover:not(:disabled) { color: #fff; background: #a52d20; }
.file-reboot { margin-left: auto; background: #d2752b; border-color: #b66020; }
.file-reboot:hover:not(:disabled) { background: #b66020; }
.file-location { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; color: #625e55; }
.file-location button { min-height: 1.9rem; padding: .2rem .55rem; font-size: .8rem; }
.file-location code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list { width: 100%; border-collapse: collapse; margin-bottom: .75rem; border: 1px solid #c8c2b6; border-radius: .6rem; background: #fff; font-size: .82rem; }
.file-list td { padding: .28rem .5rem; border-bottom: 1px solid #eee9df; }
.file-list tr:last-child td { border-bottom: 0; }
.file-list tbody tr:hover { background: #f1ede4; }
.file-list tr.file, .file-list tr.directory { cursor: pointer; }
.file-list td:first-child { width: 1.4rem; text-align: center; }
.file-list tr.directory td:nth-child(2) { font-weight: 700; }
.file-list td:nth-child(3) { text-align: right; color: #8a8479; white-space: nowrap; }
.file-list td:last-child { width: 2rem; padding: 0; text-align: center; }
.file-empty { text-align: center; color: #777269; padding: 1.25rem !important; }
.file-del { min-height: 0; padding: .1rem .35rem; border: 0; border-radius: .3rem; color: #a52d20; background: transparent; font-size: .85rem; line-height: 1; }
.file-del:hover { color: #fff; background: #a52d20; }
.file-preview { width: 100%; min-height: 14rem; max-height: 28rem; overflow: auto; margin: 0; padding: .85rem 1rem; border: 1px solid #c8c2b6; border-radius: .6rem; color: #343532; background: #fff; line-height: 1.45; white-space: pre-wrap; }
textarea.file-preview { box-sizing: border-box; resize: vertical; font-family: ui-monospace, monospace; }
textarea.file-preview:focus { outline: 3px solid #d2752b; outline-offset: 1px; }
textarea.file-preview:read-only { color: #777269; background: #f1ede4; }
.debug-stats { display: grid; gap: .65rem; margin: 0; }
.debug-stats div { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .65rem; border-bottom: 1px solid #d8d2c7; }
.debug-stats dt { font-weight: 700; }
.debug-stats dd { margin: 0; text-align: right; }
.debug-note { margin: 1rem 0 0; color: #625e55; font-size: .8rem; }