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