xref: /plugin/struct/style.less (revision af0ce8d2fb493ed201ed374daddbc04d257baa9c)
1/**
2 * The input entry form
3 */
4.dokuwiki .struct_entry_form {
5    margin-bottom: 1em;
6
7    fieldset {
8        width: 100%;
9        padding: 0.5em 0;
10        text-align: left;
11
12        legend {
13            text-align: left;
14            padding-left: 17px;
15            cursor: pointer;
16            background: transparent url(../../images/open.png) 5px center no-repeat;
17            font-weight: bold;
18        }
19    }
20
21    fieldset.closed {
22        padding: 0;
23
24        div.field {
25            display: none;
26        }
27
28        legend {
29            display: block;
30            background: transparent url(../../images/closed.png) 5px center no-repeat;
31        }
32    }
33
34    div.field {
35        display: flex;
36        padding: 0.5em;
37
38        &:hover {
39            background-color: @ini_background_alt;
40        }
41
42        > label {
43            text-align: left;
44            font-weight: normal;
45            width: 12em;
46            flex-shrink: 0;
47
48            span.label {
49                padding-right: 16px;
50                display: block;
51
52                // fixes for bootstrap3 template
53                color: @ini_text;
54                font-size: 100%;
55                text-align: left;
56
57
58                &.hashint {
59                    background: url(../../images/info.png) no-repeat right 5px top;
60                }
61            }
62        }
63
64        > span.input {
65            text-align: left;
66            flex-grow: 1;
67
68            // general input fields
69            input:not([type='checkbox']):not([type='color']),
70            textarea,
71            select {
72                width: 100%;
73
74                // smaller input types
75                &.struct_media,
76                &.struct_date {
77                    width: 30%;
78                }
79            }
80
81            // checkboxes
82            label {
83                margin-right: 1em;
84                white-space: nowrap;
85            }
86
87            // wrap multi-value fields
88            .multiwrap, .newtemplate {
89                display: inline;
90                width: fit-content;
91            }
92
93            // space multi-value fields
94            .multiwrap {
95                margin: 0 0.25em 0.25em 0;
96            }
97
98            // overlay media button on top of input field
99            button.struct_media {
100                width: 2.5em;
101                margin-left: -2.5em;
102            }
103
104            // input hints
105            small {
106                display: block;
107                color: @ini_text_alt;
108            }
109        }
110    }
111}
112
113/**
114 * Bureaucracy form adjustments
115 */
116
117.dokuwiki form.bureaucracy__plugin div.field {
118    display: flex;
119    justify-content: flex-end;
120
121    label {
122        clear: both; // this is somehow missing in the bootstrap template
123        flex-grow: 1;
124    }
125
126    span {
127        line-height: 2em;
128        float: left;
129        text-align: right;
130    }
131
132    span.label {
133        vertical-align: top;
134        width: 100%;
135
136        // fixes for bootstrap3 template
137        color: @ini_text;
138        font-size: 100%;
139    }
140
141    span.input {
142        width: 50%;
143        display: inline-block;
144        text-align: left;
145        padding-left: 0.25em;
146        color: @ini_text;
147
148        input, select, textarea {
149            width: 100%;
150        }
151
152        input[type='checkbox'] {
153            width: auto;
154            margin-right: 0;
155        }
156
157        label {
158            text-align: left;
159            line-height: 1.5em;
160        }
161    }
162}
163
164/*responsive - small screen*/
165@media (max-width: 480px) {
166    .dokuwiki form.bureaucracy__plugin div.field {
167        flex-wrap: wrap;
168
169        label {
170            > span {
171                text-align: left;
172                width: 100%;
173            }
174        }
175
176        span.input {
177            width: 100%;
178        }
179    }
180}
181
182/**
183 * Tabs in the Schema Editor
184 */
185
186#plugin__struct_delete,
187#plugin__struct_json {
188    border: 1px solid @ini_border;
189    border-top: none;
190    display: block;
191    padding: 2em;
192
193    fieldset {
194        margin-bottom: 1em;
195        width: 500px;
196
197        label.block {
198            font-weight: normal;
199        }
200    }
201}
202
203form.struct_newschema {
204    label {
205        display: block;
206        text-align: left;
207
208        span {
209            display: inline-block;
210            width: 45%;
211            text-align: right;
212            padding-right: 1em;
213        }
214    }
215}
216
217/**
218 * The Schema Editor
219 */
220
221#plugin__struct_editor {
222    table.inline {
223        width: 100%;
224        border-top: none;
225
226        tr:first-child {
227            border-top: none;
228
229            th {
230                border-top: none;
231            }
232        }
233    }
234
235    tr.disabled {
236        td {
237            opacity: 0.5;
238        }
239
240        // collapse config block
241        td.config > div {
242            overflow: auto;
243            height: 2em;
244
245            div.jsoneditor-outer {
246                margin: 0;
247                padding: 0;
248            }
249        }
250
251        td.isenabled {
252            opacity: 1;
253        }
254    }
255
256    fieldset {
257        width: 100%;
258        padding-left: 0;
259        padding-right: 0;
260        margin-bottom: 1em;
261
262        div.jsoneditor {
263            margin: auto;
264        }
265    }
266}
267
268/**
269 * In page output
270 */
271
272#plugin__struct_output {
273    margin-right: 16em; // space for the TOC
274    border: 1px solid @ini_border;
275    margin-bottom: 1.2em;
276
277    div.table {
278        margin: 0;
279
280        table {
281            font-size: 90%;
282            width: 100%;
283            border: none;
284            margin: 0;
285
286            td, th {
287                background-color: transparent;
288                vertical-align: top;
289                border: none;
290            }
291
292            tbody th {
293                width: 20%;
294                text-align: right;
295
296                &::after {
297                    content: ':';
298                }
299            }
300
301            thead th {
302                background-color: @ini_background_alt;
303                text-align: center;
304                font-size: 110%;
305                font-weight: normal;
306            }
307        }
308    }
309}
310
311/**
312 * Aggregation
313 */
314
315.dokuwiki .structaggregation {
316
317    &.structaggregationlist > ul li div {
318        display: inline;
319
320        p {
321            display: inline;
322            margin: 0;
323        }
324    }
325
326    table th {
327        a {
328            color: @ini_link;
329            font-weight: bold;
330
331            &.sort-up::before {
332                content: '↑';
333            }
334
335            &.sort-down::before {
336                content: '↓';
337            }
338
339            &.next {
340                float: right;
341            }
342        }
343
344        input {
345            width: 20px;
346            background-image: url(../../tpl/dokuwiki/images/search.png);
347            background-repeat: no-repeat;
348            background-position: 2px center;
349            padding-left: 20px;
350        }
351
352        input:not([value]) {
353            opacity: 0.5;
354        }
355
356        input:focus {
357            width: auto;
358            opacity: 1;
359        }
360    }
361
362    img.media {
363        box-shadow: 1px 1px 5px 1px rgba(0, 0, 0, 0.5);
364    }
365
366    div.table {
367        margin-bottom: 2.4em;
368    }
369
370    a.export {
371        float: left;
372        margin-top: -2.4em;
373        margin-left: 1em;
374        border: 1px solid @ini_border;
375        border-top: none;
376        border-bottom-right-radius: 4px;
377        border-bottom-left-radius: 4px;
378        padding: 2px 5px 2px 22px;
379        background-position-x: 2px;
380    }
381}
382
383.dokuwiki .structaggregationcloud {
384    ul {
385        text-align: center;
386
387        li {
388            list-style: none;
389            margin: 0 1em 0 0;
390            padding: 0;
391            display: inline-block;
392
393            .struct_color, .struct_media {
394                a {
395                    display: block;
396                    height: 100%;
397                }
398            }
399
400            .struct_media a {
401                background-size: cover;
402                background-position: center;
403                box-shadow: 1px 1px 5px 1px rgba(0, 0, 0, 0.5)
404            }
405        }
406    }
407}
408
409/**
410 * Lookup Aggregation Editor
411 */
412
413.dokuwiki .structaggregationeditor {
414    table.inline {
415        min-width: 100%;
416
417        th.action {
418            width: 30px; //16px icon + margins
419        }
420    }
421}
422
423/**
424 * General Output styles
425 */
426
427.dokuwiki div.struct_color {
428    width: 1.2em;
429    height: 1.2em;
430    display: inline-block;
431    margin-right: 0.5em;
432}
433
434/**
435 * Inline Editor Overlay
436 */
437
438.dokuwiki .struct_inlineditor {
439    position: absolute;
440    top: 0;
441    left: 0;
442    width: 300px;
443
444    background-color: @ini_background;
445    color: @ini_text;
446    border: 1px solid @ini_border;
447    padding: 5px;
448
449    box-shadow: 5px 5px 10px 0 rgba(0, 0, 0, 0.5);
450
451    .ctl {
452        margin-top: 5px;
453    }
454
455}
456
457/**
458 * Errors on AJAX
459 */
460
461.dokuwiki .structaggregationeditor form,
462.dokuwiki .struct_inlineditor {
463    .err {
464        font-size: 90%;
465        margin-top: 5px;
466        padding: 5px;
467        background-color: @ini_highlight;
468        color: @ini_text;
469        text-align: left;
470    }
471}
472