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