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