Mercurial
diff mrjunejune/src/tools/latex_editor/index.css @ 244:b8aa08503378
[tools] Add sandboxed online LaTeX editor
Co-authored-by: Copilot <[email protected]>
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Mon, 03 Aug 2026 16:56:25 -0700 |
| parents | |
| children | 4f2b50bc78e7 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mrjunejune/src/tools/latex_editor/index.css Mon Aug 03 16:56:25 2026 -0700 @@ -0,0 +1,195 @@ +.latex-page { + width: min(1500px, calc(100% - 2rem)); + max-width: none; + margin: 1.5rem auto 3rem; +} + +.latex-heading { + display: flex; + align-items: flex-end; + justify-content: space-between; + gap: 1.5rem; + margin-bottom: 1rem; +} + +.latex-heading h1, +.latex-heading p { + margin-bottom: 0.4rem; +} + +.latex-actions { + display: flex; + align-items: center; + justify-content: flex-end; + flex-wrap: wrap; + gap: 0.65rem; +} + +.latex-actions button, +.button-link { + min-height: 42px; + padding: 0.65rem 1rem; + border: 2px solid rgb(var(--black)); + border-radius: 8px; + background: var(--awesome); + color: rgb(var(--black)); + font: inherit; + font-weight: 700; + text-decoration: none; + cursor: pointer; +} + +.latex-actions button.secondary { + background: transparent; +} + +.latex-actions button:disabled, +.button-link.disabled { + opacity: 0.45; + cursor: not-allowed; + pointer-events: none; +} + +.auto-compile { + display: inline-flex; + align-items: center; + gap: 0.4rem; + white-space: nowrap; +} + +.latex-status { + min-height: 1.5em; + margin: 0.5rem 0 1rem; + font-weight: 700; +} + +.latex-status[data-state="working"] { + color: var(--orange); +} + +.latex-status[data-state="ready"] { + color: var(--blue); +} + +.latex-status[data-state="error"] { + color: var(--red); +} + +.latex-workspace { + display: grid; + grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); + gap: 1rem; + min-height: 72vh; +} + +.latex-panel { + min-width: 0; + overflow: hidden; + border: 2px solid rgb(var(--black)); + border-radius: 12px; + background: var(--white); + box-shadow: 6px 6px 0 rgba(var(--black), 0.12); +} + +.panel-heading { + display: flex; + align-items: center; + justify-content: space-between; + gap: 1rem; + min-height: 48px; + padding: 0.55rem 0.8rem; + border-bottom: 2px solid rgb(var(--black)); + background: var(--gray-gradient); +} + +.panel-heading h2, +.panel-heading span { + margin: 0; + font-size: 0.95rem; +} + +#latexSource { + display: block; + width: 100%; + height: calc(72vh - 50px); + min-height: 540px; + resize: vertical; + box-sizing: border-box; + padding: 1rem; + border: 0; + outline: 0; + background: rgb(var(--black)); + color: var(--white); + font: 15px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; + tab-size: 2; +} + +#pdfPreview { + display: block; + width: 100%; + height: calc(72vh - 50px); + min-height: 540px; + border: 0; + background: #525659; +} + +.latex-diagnostics { + width: 100%; + height: calc(72vh - 50px); + min-height: 540px; + box-sizing: border-box; + overflow: auto; + margin: 0; + padding: 1rem; + white-space: pre-wrap; + background: #1e1e1e; + color: #ffb4ab; + font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; +} + +.latex-notes { + margin-top: 1.5rem; +} + +.latex-notes h2, +.latex-notes p { + margin-bottom: 0.4rem; +} + +@media (max-width: 900px) { + .latex-heading { + align-items: stretch; + flex-direction: column; + } + + .latex-actions { + justify-content: flex-start; + } + + .latex-workspace { + grid-template-columns: 1fr; + } + + #latexSource, + #pdfPreview, + .latex-diagnostics { + height: 65vh; + min-height: 480px; + } +} + +@media (max-width: 520px) { + .latex-page { + width: min(100% - 1rem, 1500px); + } + + .latex-actions { + align-items: stretch; + } + + .latex-actions button, + .button-link { + flex: 1 1 45%; + text-align: center; + } +}