File size: 7,246 Bytes
76fc93a eab9566 76fc93a eab9566 76fc93a eab9566 76fc93a eab9566 76fc93a eab9566 76fc93a eab9566 76fc93a eab9566 76fc93a eab9566 76fc93a eb6b368 76fc93a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 | /* ============================================================================ */
/* Editor layout */
/* */
/* The article area uses the template page grid (template-layout/_grid.css). */
/* The published page makes <main> the grid of the article blocks; here the */
/* blocks are children of the ProseMirror root, so that root repeats the grid */
/* and the template's main-level placements are restated for it below. */
/* ============================================================================ */
.editor-app {
height: 100dvh; /* dvh = dynamic viewport (iOS Safari URL bar) */
display: flex;
flex-direction: column;
/* Use the page background so the editor shell matches the article content
(no greyish frame around the white canvas in light mode). */
background: var(--page-bg);
overflow: hidden;
position: relative;
}
/* ---- Article grid ---- */
.editor-app .content-grid {
padding-bottom: 32px;
}
.editor-app .content-grid > .content-grid__main {
grid-column: screen;
grid-row: 1;
min-width: 0;
}
.editor-app .content-grid__main .tiptap {
display: grid;
grid-template-columns: var(--layout-cols);
align-content: start;
max-width: none;
margin: 0;
padding: 0;
}
.editor-app .content-grid__main .tiptap > * {
grid-column: body;
min-width: 0;
}
.editor-app .content-grid__main .tiptap > :is(p, ul, ol, h2, h3, h4, blockquote) {
max-width: var(--layout-prose);
}
.editor-app .content-grid__main .tiptap :is(p, li) {
font-size: var(--layout-prose-font-size);
}
.editor-app .content-grid__main .tiptap > .node-wide {
grid-column: body-start / margin-end;
}
.editor-app .content-grid__main .tiptap > .node-fullWidth {
grid-column: screen;
}
@media (max-width: 1100px) {
.editor-app .content-grid__main .tiptap > :is(.node-wide, .node-fullWidth) {
grid-column: screen;
padding-inline: var(--layout-outer);
}
}
/* Sidenotes: inline under their block, in the margin column from 1280px on the
row of the block before them (zero height, so the text never moves). */
.editor-app .content-grid__main .tiptap > .node-sidenote {
margin: -6px 0 18px;
font-size: .85rem;
line-height: 1.5;
color: var(--muted-color);
}
.editor-app .content-grid__main .tiptap > .node-sidenote :is(p, li) {
font-size: inherit;
}
.editor-app .tiptap .node-sidenote .sidenote-wrapper-node {
border-radius: 6px;
transition: background 0.15s;
}
.editor-app .tiptap .node-sidenote .sidenote-wrapper-node:hover {
background: var(--bg-hover);
}
.editor-app .tiptap .node-sidenote .sidenote-badge {
position: absolute;
top: 2px;
right: 4px;
font-size: 10px;
color: var(--text-faint);
opacity: 0;
transition: opacity 0.15s;
pointer-events: none;
user-select: none;
}
.editor-app .tiptap .node-sidenote:hover .sidenote-badge {
opacity: 1;
}
@media (min-width: 1280px) {
.editor-app .content-grid__main .tiptap > .node-sidenote {
grid-column: margin;
height: 0;
margin: 0;
overflow: visible;
position: relative;
z-index: 4;
}
}
/* ============================================================================ */
/* Responsive */
/* */
/* <= 1100px : the TOC rail is hidden; the top bar opens the TOC drawer. */
/* <= 768px : Compact top-bar, narrower floating panels, stacked embed studio. */
/* ============================================================================ */
/* Hamburger toggle: hidden on desktop, shown below the collapse breakpoint */
.top-bar__toc-toggle { display: none; }
/* ---- TOC drawer (narrow viewports) ---- */
.toc-mobile-backdrop {
display: none;
position: fixed;
inset: 0;
z-index: calc(var(--z-overlay) + 1);
background: rgba(0,0,0,.4);
opacity: 0;
pointer-events: none;
transition: opacity 250ms ease;
}
.toc-mobile-backdrop.open {
opacity: 1;
pointer-events: auto;
}
.toc-mobile-sidebar {
display: none;
position: fixed;
top: 0;
left: 0;
bottom: 0;
z-index: calc(var(--z-overlay) + 2);
width: min(320px, 85vw);
background: var(--page-bg);
border-right: 1px solid var(--border-color);
transform: translateX(-100%);
transition: transform 300ms cubic-bezier(.4,0,.2,1);
flex-direction: column;
}
.toc-mobile-sidebar.open {
transform: translateX(0);
}
.toc-mobile-sidebar__header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px;
border-bottom: 1px solid var(--border-color);
flex-shrink: 0;
}
.toc-mobile-sidebar__title {
font-weight: 700;
font-size: 15px;
color: var(--text-color);
}
.toc-mobile-sidebar__actions {
display: flex;
align-items: center;
gap: 4px;
}
.toc-mobile-sidebar__close,
.toc-mobile-sidebar__theme {
background: none;
border: none;
color: var(--muted-color);
cursor: pointer;
padding: 4px;
border-radius: 6px;
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
transition: color 150ms ease, background 150ms ease;
}
.toc-mobile-sidebar__close:hover,
.toc-mobile-sidebar__theme:hover {
color: var(--text-color);
background: var(--surface-bg);
}
.toc-mobile-sidebar__body {
flex: 1;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
padding: 16px;
}
/* The drawer reuses the rail's TOC, which the template hides at this width */
.toc-mobile-sidebar .table-of-contents {
display: block;
position: static;
width: auto;
margin: 0;
}
.toc-mobile-sidebar .toc-head {
display: none;
}
.toc-mobile-sidebar .toc-scroll {
max-height: none;
}
.toc-empty {
font-size: 12px;
color: var(--muted-color);
}
@media (max-width: 1100px) {
.top-bar__toc-toggle {
display: inline-flex;
margin-right: auto;
}
.editor-app .top-bar__brand { margin-right: 4px; }
.editor-app .toc-mobile-backdrop { display: block; }
.editor-app .toc-mobile-sidebar { display: flex; }
}
@media (max-width: 768px) {
/* Top bar: compact, wrap-safe */
.editor-app .top-bar {
padding: 6px 8px;
gap: 2px;
flex-wrap: wrap;
}
.editor-app .top-bar .divider-v { display: none; }
.editor-app .top-bar .sync-indicator .sync-indicator__label { display: none; }
/* Chat floating: fill width on mobile */
.editor-app .chat-floating {
width: calc(100vw - 24px);
max-width: 360px;
left: 12px;
bottom: 12px;
height: calc(100dvh - 80px);
max-height: calc(100dvh - 80px);
}
.editor-app .chat-fab {
bottom: 12px;
left: 12px;
}
/* Settings drawer: full-width on mobile */
.editor-app .drawer-panel { width: 100vw; }
/* Embed Studio: stack body vertically */
.editor-app .es-body { flex-direction: column; }
.editor-app .es-chat {
width: 100%;
min-width: 0;
max-width: none;
max-height: 45vh;
border-right: none;
border-bottom: 1px solid var(--border-color);
}
/* Citation panel: narrower on mobile */
.editor-app .citation-panel {
width: calc(100vw - 32px);
max-width: 480px;
}
}
|