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