Files
rex-wizards-save-editor/webapp/static/style.css
T
Patryk GenschandCodex edd8ceda9e Add web-based save editor for "Reksio i Czarodzieje"
- Implemented a local web server using http.server to serve the save editor.
- Created a user interface with HTML, CSS, and JavaScript for managing game slots and editing save files.
- Added API endpoints for retrieving slot information, overview, and raw data for editing.
- Implemented functionality for saving changes back to the game files.
- Added tests for ARR and DTA formats to ensure data integrity during round-trip serialization.

Co-authored-by: Codex <noreply@openai.com>
2026-08-03 01:18:08 +02:00

162 lines
4.3 KiB
CSS

:root {
--bg: #16130f;
--panel: #201b16;
--line: #3a3129;
--ink: #ece4d8;
--muted: #a2957f;
--accent: #d8a13a;
--warn: #d4674a;
--ok: #7fa650;
color-scheme: dark;
}
* { box-sizing: border-box; }
body {
margin: 0;
background: var(--bg);
color: var(--ink);
font: 14px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.muted { color: var(--muted); font-weight: 400; }
header {
padding: 14px 20px;
border-bottom: 1px solid var(--line);
display: flex;
align-items: baseline;
gap: 16px;
flex-wrap: wrap;
}
header h1 { margin: 0; font-size: 17px; font-weight: 600; }
nav {
display: flex;
gap: 8px;
padding: 12px 20px;
border-bottom: 1px solid var(--line);
flex-wrap: wrap;
}
nav button {
background: var(--panel);
border: 1px solid var(--line);
color: var(--ink);
border-radius: 6px;
padding: 8px 14px;
cursor: pointer;
font: inherit;
text-align: left;
}
nav button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
nav button .sub { display: block; font-size: 12px; color: var(--muted); }
nav button[disabled] { opacity: .45; cursor: default; }
main {
display: grid;
grid-template-columns: minmax(200px, 280px) 1fr;
gap: 0;
align-items: start;
}
@media (max-width: 720px) { main { grid-template-columns: 1fr; } }
aside {
border-right: 1px solid var(--line);
padding: 12px;
position: sticky;
top: 0;
max-height: 100vh;
overflow-y: auto;
}
aside input {
width: 100%;
padding: 7px 9px;
background: var(--panel);
border: 1px solid var(--line);
border-radius: 6px;
color: var(--ink);
font: inherit;
margin-bottom: 10px;
}
aside ul { list-style: none; margin: 0; padding: 0; }
aside li button {
width: 100%;
text-align: left;
background: none;
border: 0;
color: var(--ink);
padding: 5px 8px;
border-radius: 5px;
cursor: pointer;
font: inherit;
}
aside li button:hover { background: var(--panel); }
aside li button[aria-current="true"] { background: var(--panel); color: var(--accent); }
aside li .file { display: block; font-size: 11px; color: var(--muted); }
section#panel { padding: 18px 20px 60px; min-width: 0; }
h2 { font-size: 15px; margin: 22px 0 10px; }
h2:first-child { margin-top: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.card {
background: var(--panel);
border: 1px solid var(--line);
border-radius: 8px;
padding: 12px 14px;
}
.card .k { font-size: 12px; color: var(--muted); }
.card .v { font-size: 15px; margin-top: 2px; word-break: break-word; }
.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { padding: 5px 9px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: var(--panel); position: sticky; top: 0; font-weight: 600; }
tbody tr:hover { background: #1c1814; }
td input {
background: transparent;
border: 1px solid transparent;
color: inherit;
font: inherit;
padding: 2px 4px;
border-radius: 4px;
/* szerokość sterowana atrybutem size — inaczej długie ścieżki w NAME są ucinane */
min-width: 4ch;
}
td input:hover { border-color: var(--line); }
td input:focus { border-color: var(--accent); outline: none; background: var(--bg); }
td input.changed { color: var(--accent); border-color: var(--accent); }
td.idx { color: var(--muted); }
.actions { display: flex; gap: 8px; margin: 14px 0; flex-wrap: wrap; align-items: center; }
.actions button {
background: var(--accent);
border: 0;
color: #241c0c;
border-radius: 6px;
padding: 8px 16px;
font: inherit;
font-weight: 600;
cursor: pointer;
}
.actions button.ghost { background: none; border: 1px solid var(--line); color: var(--ink); font-weight: 400; }
.actions button[disabled] { opacity: .4; cursor: default; }
.problems { border-left: 3px solid var(--warn); padding: 8px 12px; background: var(--panel); border-radius: 0 6px 6px 0; }
.problems li { margin: 2px 0; }
.ok { color: var(--ok); }
#toast {
position: fixed;
bottom: 18px;
left: 50%;
transform: translateX(-50%);
background: var(--panel);
border: 1px solid var(--accent);
border-radius: 8px;
padding: 10px 18px;
box-shadow: 0 6px 24px #0008;
}
#toast.err { border-color: var(--warn); }