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