]> BookStack Code Mirror - bookstack/blob - resources/sass/_pages.scss
Altered ldap_connect usage, cleaned up LDAP classes
[bookstack] / resources / sass / _pages.scss
1 .page-editor {
2   display: flex;
3   flex-direction: column;
4   align-items: stretch;
5   overflow: hidden;
6
7   .edit-area {
8     flex: 1;
9     flex-direction: column;
10     z-index: 10;
11   }
12
13   .mce-tinymce {
14         box-shadow: none;
15   }
16
17   .mce-top-part::before {
18     box-shadow: none;
19   }
20 }
21
22 body.tox-fullscreen .page-editor .edit-area,
23 body.markdown-fullscreen .page-editor .edit-area {
24   z-index: 12;
25 }
26
27 body.tox-fullscreen, body.markdown-fullscreen {
28   .page-editor, .flex-fill {
29     overflow: visible;
30   }
31 }
32
33 @include smaller-than($s) {
34   .page-edit-toolbar {
35     overflow-x: scroll;
36     overflow-y: visible;
37   }
38   .page-edit-toolbar .grid.third {
39     display: block;
40     white-space: nowrap;
41     > div {
42       display: inline-block;
43     }
44   }
45 }
46
47 .page-save-mobile-button {
48   position: fixed;
49   z-index: 30;
50   border-radius: 50%;
51   width: 56px;
52   height: 56px;
53   font-size: 24px;
54   right: $-m;
55   bottom: $-s;
56   box-shadow: $bs-hover;
57   background-color: currentColor;
58   text-align: center;
59   svg {
60     fill: #FFF;
61     margin-inline-end: 0;
62   }
63 }
64
65 .draft-notification {
66   pointer-events: none;
67   transform: scale(0);
68   transition: transform ease-in-out 120ms;
69   transform-origin: 50% 50%;
70   &.visible {
71     transform: scale(1);
72   }
73 }
74
75 .page-style.editor {
76   padding: 0 !important;
77 }
78
79 .page-content {
80   width: 100%;
81   max-width: 840px;
82   margin: 0 auto;
83   overflow-wrap: break-word;
84   .align-left {
85     text-align: left;
86   }
87   img.align-left, table.align-left {
88     float: left !important;
89     margin: $-xs $-m $-m 0;
90   }
91   .align-right {
92     text-align: right !important;
93   }
94   img.align-right, table.align-right {
95     float: right !important;
96     margin: $-xs 0 $-xs $-s;
97   }
98   .align-center {
99     text-align: center;
100   }
101   img.align-center {
102     display: block;
103   }
104   img.align-center, table.align-center {
105     margin-left: auto;
106     margin-right: auto;
107   }
108   img {
109     max-width: 100%;
110     height:auto;
111   }
112   h1, h2, h3, h4, h5, h6, pre {
113     clear: left;
114   }
115   hr {
116     clear: both;
117     margin: $-m 0;
118   }
119   table {
120     hyphens: auto;
121     table-layout: fixed;
122     max-width: 100%;
123     height: auto !important;
124   }
125
126   // diffs
127   ins,
128   del {
129     text-decoration: none;
130   }
131   ins {
132     background: #dbffdb;
133   }
134   del {
135     background: #FFECEC;
136   }
137
138   details {
139     border: 1px solid;
140     @include lightDark(border-color, #DDD, #555);
141     margin-bottom: 1em;
142     padding: $-s;
143   }
144   details > summary {
145     margin-top: -$-s;
146     margin-left: -$-s;
147     margin-right: -$-s;
148     margin-bottom: -$-s;
149     font-weight: bold;
150     @include lightDark(background-color, #EEE, #333);
151     padding: $-xs $-s;
152   }
153   details[open] > summary {
154     margin-bottom: $-s;
155     border-bottom: 1px solid;
156     @include lightDark(border-color, #DDD, #555);
157   }
158   details > summary + * {
159     margin-top: .2em;
160   }
161   details:after {
162     content: '';
163     display: block;
164     clear: both;
165   }
166
167   li > input[type="checkbox"] {
168     vertical-align: top;
169     margin-top: 0.3em;
170   }
171
172   p:empty {
173     min-height: 1.6em;
174   }
175
176   &.page-revision {
177     pre code {
178       white-space: pre-wrap;
179     }
180   }
181
182   .cm-editor {
183     margin-bottom: 1.375em;
184   }
185
186   video {
187     max-width: 100%;
188   }
189 }
190
191 // Page content pointers
192 .pointer-container {
193   position: fixed;
194   display: none;
195   left: 0;
196   z-index: 10;
197 }
198 .pointer {
199   border: 1px solid #CCC;
200   @include lightDark(border-color, #ccc, #000);
201   display: flex;
202   align-items: center;
203   justify-items: center;
204   padding: $-s $-s;
205   border-radius: 4px;
206   box-shadow: 0 0 12px 1px rgba(0, 0, 0, 0.1);
207   @include lightDark(background-color, #fff, #333);
208   width: 275px;
209
210   &.is-page-editable {
211     width: 328px;
212   }
213
214   &:before {
215     position: absolute;
216     left: 50%;
217     bottom: -9px;
218     width: 16px;
219     height: 16px;
220     margin-inline-start: -8px;
221     content: '';
222     display: block;
223     transform: rotate(45deg);
224     transform-origin: 50% 50%;
225     border-block-end: 1px solid #CCC;
226     border-inline-end: 1px solid #CCC;
227     z-index: 56;
228     @include lightDark(background-color, #fff, #333);
229     @include lightDark(border-color, #ccc, #000);
230   }
231   input, button, a {
232     position: relative;
233     border-radius: 0;
234     height: 28px;
235     font-size: 12px;
236     vertical-align: top;
237     padding: 5px 16px;
238   }
239   input {
240     background-color: #FFF;
241     border: 1px solid #DDD;
242     @include lightDark(border-color, #ddd, #000);
243     color: #666;
244     width: 172px;
245     z-index: 40;
246     padding: 5px 10px;
247   }
248   span.icon {
249     fill: #444;
250     cursor: pointer;
251     user-select: none;
252     display: inline-block;
253     line-height: 1;
254   }
255   .input-group .button {
256     line-height: 1;
257     margin: 0 0 0 -4px;
258     box-shadow: none;
259   }
260   a.button {
261     margin: 0;
262   }
263   .svg-icon {
264     width: 1.2em;
265     height: 1.2em;
266   }
267   .button {
268     @include lightDark(border-color, #ddd, #000);
269   }
270 }
271
272 // Attribute form
273 .floating-toolbox {
274   border: 1px solid #DDD;
275   @include lightDark(background-color, #fff, #222);
276   @include lightDark(border-color, #DDD, #000);
277   right: $-xl*2;
278   width: 48px;
279   overflow: hidden;
280   align-items: stretch;
281   flex-direction: row;
282   display: flex;
283   transition: width ease-in-out 180ms;
284   margin-top: -1px;
285   min-height: 0;
286   &.open {
287     width: 480px;
288   }
289   .toolbox-toggle svg {
290     transition: transform ease-in-out 180ms;
291   }
292   .toolbox-toggle {
293     transition: background-color ease-in-out 180ms;
294   }
295   &.open .toolbox-toggle {
296     background-color: rgba(255, 0, 0, 0.29);
297   }
298   &.open .toolbox-toggle svg {
299     transform: rotate(180deg);
300   }
301   > div {
302     flex: 1;
303     position: relative;
304   }
305   .tabs {
306     display: block;
307     border-inline-end: 1px solid #DDD;
308     @include lightDark(border-color, #ddd, #000);
309     width: 48px;
310     flex: 0 1 auto;
311   }
312   .tabs svg {
313     padding: 0;
314     margin: 0;
315   }
316   .tabs > button {
317     @include lightDark(color, rgba(0, 0, 0, 0.5), rgba(255, 255, 255, 0.5));
318     display: block;
319     cursor: pointer;
320     padding: $-s $-m;
321     font-size: 16px;
322     line-height: 1.6;
323     border-bottom: 1px solid rgba(255, 255, 255, 0.3);
324   }
325   &.open .tabs > button.active {
326     @include lightDark(color, #444, #EEE);
327     background-color: rgba(0, 0, 0, 0.1);
328   }
329   h4 {
330     font-size: 24px;
331     margin: $-m 0 0 0;
332     padding: 0 $-l $-s $-l;
333   }
334   .tags input {
335     max-width: 100%;
336     width: 100%;
337     min-width: 50px;
338   }
339   .tags td, .inline-start-table > div > div > div {
340     padding-inline-end: $-s;
341     padding-top: $-s;
342     position: relative;
343   }
344   .handle {
345     user-select: none;
346     cursor: move;
347     fill: #999;
348   }
349   form {
350     display: flex;
351     flex: 1;
352     flex-direction: column;
353     overflow-y: scroll;
354   }
355   table td, table th {
356     overflow: visible;
357   }
358 }
359
360 .toolbox-tab-content {
361   display: none;
362   overflow-y: auto;
363   padding-bottom: 45px;
364 }
365
366 .suggestion-box {
367   top: auto;
368   margin: -4px 0 0;
369   right: auto;
370   left: 0;
371   padding: 0;
372   li {
373     display: block;
374     border-bottom: 1px solid #DDD;
375     &:last-child {
376       border-bottom: 0;
377     }
378   }
379 }
380
381 .comments-container h5 {
382   color: #888;
383   font-weight: normal;
384   margin-top: 0.5em;
385 }
386
387 .comment-editor .CodeMirror, .comment-editor .CodeMirror-scroll {
388   min-height: 175px;
389 }
390
391 /* FIXME - Ugly hack to modify the media plugin for TinyMCE */
392 .mce-floatpanel[aria-label="Insert/edit media"] {
393   .mce-open {
394     display: none;
395   }
396 }
397
398 .entity-list-item > span:first-child,
399 .icon-list-item > span:first-child,
400 .split-icon-list-item > a > .icon,
401 .chapter-expansion > .icon {
402   font-size: 0.8rem;
403   width: 1.88em;
404   height: 1.88em;
405   flex-shrink: 0;
406   display: flex;
407   align-items: center;
408   justify-content: center;
409   text-align: center;
410   border-radius: 1em;
411   position: relative;
412   overflow: hidden;
413   svg {
414     margin: 0;
415     bottom: 0;
416   }
417   &:after {
418     content: '';
419     position: absolute;
420     background-color: currentColor;
421     opacity: 0.2;
422     left: 0;
423     top: 0;
424     width: 100%;
425     height: 100%;
426   }
427 }
428
429 .entity-chip {
430   display: inline-block;
431   align-items: center;
432   justify-content: center;
433   text-align: center;
434   font-size: 0.9em;
435   border-radius: 3px;
436   position: relative;
437   overflow: hidden;
438   padding: $-xs $-s;
439   fill: currentColor;
440   opacity: 0.85;
441   transition: opacity ease-in-out 120ms;
442   &:after {
443     content: '';
444     position: absolute;
445     background-color: currentColor;
446     opacity: 0.15;
447     left: 0;
448     top: 0;
449     width: 100%;
450     height: 100%;
451   }
452   &:hover {
453     text-decoration: none;
454     opacity: 1;
455   }
456   @media (prefers-contrast: more) {
457     opacity: 1;
458   }
459 }