Mercurial
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 243:823f2a8b16c8 | 244:b8aa08503378 |
|---|---|
| 1 .latex-page { | |
| 2 width: min(1500px, calc(100% - 2rem)); | |
| 3 max-width: none; | |
| 4 margin: 1.5rem auto 3rem; | |
| 5 } | |
| 6 | |
| 7 .latex-heading { | |
| 8 display: flex; | |
| 9 align-items: flex-end; | |
| 10 justify-content: space-between; | |
| 11 gap: 1.5rem; | |
| 12 margin-bottom: 1rem; | |
| 13 } | |
| 14 | |
| 15 .latex-heading h1, | |
| 16 .latex-heading p { | |
| 17 margin-bottom: 0.4rem; | |
| 18 } | |
| 19 | |
| 20 .latex-actions { | |
| 21 display: flex; | |
| 22 align-items: center; | |
| 23 justify-content: flex-end; | |
| 24 flex-wrap: wrap; | |
| 25 gap: 0.65rem; | |
| 26 } | |
| 27 | |
| 28 .latex-actions button, | |
| 29 .button-link { | |
| 30 min-height: 42px; | |
| 31 padding: 0.65rem 1rem; | |
| 32 border: 2px solid rgb(var(--black)); | |
| 33 border-radius: 8px; | |
| 34 background: var(--awesome); | |
| 35 color: rgb(var(--black)); | |
| 36 font: inherit; | |
| 37 font-weight: 700; | |
| 38 text-decoration: none; | |
| 39 cursor: pointer; | |
| 40 } | |
| 41 | |
| 42 .latex-actions button.secondary { | |
| 43 background: transparent; | |
| 44 } | |
| 45 | |
| 46 .latex-actions button:disabled, | |
| 47 .button-link.disabled { | |
| 48 opacity: 0.45; | |
| 49 cursor: not-allowed; | |
| 50 pointer-events: none; | |
| 51 } | |
| 52 | |
| 53 .auto-compile { | |
| 54 display: inline-flex; | |
| 55 align-items: center; | |
| 56 gap: 0.4rem; | |
| 57 white-space: nowrap; | |
| 58 } | |
| 59 | |
| 60 .latex-status { | |
| 61 min-height: 1.5em; | |
| 62 margin: 0.5rem 0 1rem; | |
| 63 font-weight: 700; | |
| 64 } | |
| 65 | |
| 66 .latex-status[data-state="working"] { | |
| 67 color: var(--orange); | |
| 68 } | |
| 69 | |
| 70 .latex-status[data-state="ready"] { | |
| 71 color: var(--blue); | |
| 72 } | |
| 73 | |
| 74 .latex-status[data-state="error"] { | |
| 75 color: var(--red); | |
| 76 } | |
| 77 | |
| 78 .latex-workspace { | |
| 79 display: grid; | |
| 80 grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); | |
| 81 gap: 1rem; | |
| 82 min-height: 72vh; | |
| 83 } | |
| 84 | |
| 85 .latex-panel { | |
| 86 min-width: 0; | |
| 87 overflow: hidden; | |
| 88 border: 2px solid rgb(var(--black)); | |
| 89 border-radius: 12px; | |
| 90 background: var(--white); | |
| 91 box-shadow: 6px 6px 0 rgba(var(--black), 0.12); | |
| 92 } | |
| 93 | |
| 94 .panel-heading { | |
| 95 display: flex; | |
| 96 align-items: center; | |
| 97 justify-content: space-between; | |
| 98 gap: 1rem; | |
| 99 min-height: 48px; | |
| 100 padding: 0.55rem 0.8rem; | |
| 101 border-bottom: 2px solid rgb(var(--black)); | |
| 102 background: var(--gray-gradient); | |
| 103 } | |
| 104 | |
| 105 .panel-heading h2, | |
| 106 .panel-heading span { | |
| 107 margin: 0; | |
| 108 font-size: 0.95rem; | |
| 109 } | |
| 110 | |
| 111 #latexSource { | |
| 112 display: block; | |
| 113 width: 100%; | |
| 114 height: calc(72vh - 50px); | |
| 115 min-height: 540px; | |
| 116 resize: vertical; | |
| 117 box-sizing: border-box; | |
| 118 padding: 1rem; | |
| 119 border: 0; | |
| 120 outline: 0; | |
| 121 background: rgb(var(--black)); | |
| 122 color: var(--white); | |
| 123 font: 15px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; | |
| 124 tab-size: 2; | |
| 125 } | |
| 126 | |
| 127 #pdfPreview { | |
| 128 display: block; | |
| 129 width: 100%; | |
| 130 height: calc(72vh - 50px); | |
| 131 min-height: 540px; | |
| 132 border: 0; | |
| 133 background: #525659; | |
| 134 } | |
| 135 | |
| 136 .latex-diagnostics { | |
| 137 width: 100%; | |
| 138 height: calc(72vh - 50px); | |
| 139 min-height: 540px; | |
| 140 box-sizing: border-box; | |
| 141 overflow: auto; | |
| 142 margin: 0; | |
| 143 padding: 1rem; | |
| 144 white-space: pre-wrap; | |
| 145 background: #1e1e1e; | |
| 146 color: #ffb4ab; | |
| 147 font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; | |
| 148 } | |
| 149 | |
| 150 .latex-notes { | |
| 151 margin-top: 1.5rem; | |
| 152 } | |
| 153 | |
| 154 .latex-notes h2, | |
| 155 .latex-notes p { | |
| 156 margin-bottom: 0.4rem; | |
| 157 } | |
| 158 | |
| 159 @media (max-width: 900px) { | |
| 160 .latex-heading { | |
| 161 align-items: stretch; | |
| 162 flex-direction: column; | |
| 163 } | |
| 164 | |
| 165 .latex-actions { | |
| 166 justify-content: flex-start; | |
| 167 } | |
| 168 | |
| 169 .latex-workspace { | |
| 170 grid-template-columns: 1fr; | |
| 171 } | |
| 172 | |
| 173 #latexSource, | |
| 174 #pdfPreview, | |
| 175 .latex-diagnostics { | |
| 176 height: 65vh; | |
| 177 min-height: 480px; | |
| 178 } | |
| 179 } | |
| 180 | |
| 181 @media (max-width: 520px) { | |
| 182 .latex-page { | |
| 183 width: min(100% - 1rem, 1500px); | |
| 184 } | |
| 185 | |
| 186 .latex-actions { | |
| 187 align-items: stretch; | |
| 188 } | |
| 189 | |
| 190 .latex-actions button, | |
| 191 .button-link { | |
| 192 flex: 1 1 45%; | |
| 193 text-align: center; | |
| 194 } | |
| 195 } |