From a005b424242efe0c53b19ca610b3e1fca963eccb Mon Sep 17 00:00:00 2001 From: Andy Bunce Date: Thu, 25 Sep 2025 18:05:48 +0100 Subject: [PATCH] [mod] accordion --- webapp/static/clients/codemirror/grail.css | 52 ++++++++++++++------- webapp/static/clients/codemirror/grail.html | 14 +++--- webapp/static/clients/codemirror/list.js | 1 + 3 files changed, 44 insertions(+), 23 deletions(-) diff --git a/webapp/static/clients/codemirror/grail.css b/webapp/static/clients/codemirror/grail.css index fff5e37..30d9840 100644 --- a/webapp/static/clients/codemirror/grail.css +++ b/webapp/static/clients/codemirror/grail.css @@ -1,4 +1,5 @@ @import url("../codicon@0.0.40/codicon.css"); + :root { color-scheme: light dark; } @@ -6,12 +7,14 @@ * { box-sizing: border-box; } + body { background: #e4e4e4; padding: 0; height: 100vh; margin: 0; } + .page-wrap { background: white; height: calc(100vh - 10px); @@ -23,28 +26,45 @@ body { gap: 1px; -.navbar * { - box-sizing: content-box; -} + .navbar * { + box-sizing: content-box; + } + + details { + padding:2px; + padding-left: 3px; + } + + details[open] { + flex-grow: 1; + overflow:hidden; + } + + summary { + /* class: bg-info; */ + --bs-bg-opacity: 1; + background-color: rgba(var(--bs-info-rgb), var(--bs-bg-opacity)) !important; + } /* Set editor dimensions */ #editor { max-width: 100%; overflow: hidden; - height:75cqh; -} + height: 75cqh; + } -/* Stretch editor to fit inside its containing div */ -.cm-editor { + /* Stretch editor to fit inside its containing div */ + .cm-editor { height: 100%; width: 100%; - overflow: auto; -} + overflow: auto; + } @media (max-width: 600px) { grid-template-columns: 100%; grid-template-rows: auto; - > * { + + >* { grid-column: 1 / -1 !important; grid-row: auto !important; } @@ -59,21 +79,21 @@ body { .page-sidebar { grid-column: 1 / 2; grid-row: 2 / 4; + display: flex; + flex-direction: column; } + .page-nav { grid-column: 2 / 3; background: red; } + .page-main { grid-column: 2 / 3; } + .page-footer { grid-column: 1 / -1; background: #ffecb3; -} - - - - - +} \ No newline at end of file diff --git a/webapp/static/clients/codemirror/grail.html b/webapp/static/clients/codemirror/grail.html index 9dde8ee..d06e84b 100644 --- a/webapp/static/clients/codemirror/grail.html +++ b/webapp/static/clients/codemirror/grail.html @@ -98,8 +98,8 @@