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