]> git.plutz.net Git - shellwiki/blob - themes/default.css
define search function as macro
[shellwiki] / themes / default.css
1 /*
2 # Copyright 2022 - 2024 Paul Hänsch
3
4 # Permission to use, copy, modify, and/or distribute this software for any
5 # purpose with or without fee is hereby granted, provided that the above
6 # copyright notice and this permission notice appear in all copies.
7
8 # THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
11 # SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
14 # IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16
17 html { min-height: 100%; }
18
19 body {
20   position: absolute;
21   width: 100%;
22   min-height: 100%;
23   padding-bottom: 6em;
24   background-color: #EEE;
25   font-size: 12pt;
26 }
27
28 header, footer {
29   background-color: #FFF;
30   box-shadow: 0 0 .75em;
31   width: 100%;
32   z-index: 1;
33 }
34
35 footer {
36   padding-top: .5em;
37   position: absolute;
38   bottom: 0;
39 }
40
41 header > :last-child,
42 main > :last-child {
43   margin-bottom: 0;
44 }
45
46 header h1,
47 header h2,
48 header .menu,
49 footer .menu {
50   display: inline-block;
51 }
52
53 header .menu,
54 footer .menu { list-style: none; }
55
56 header .menu > ul > li,
57 header .menu > ol > li,
58 footer .menu > ul > li,
59 footer .menu > ol > li {
60   display: inline-block;
61   margin-right: .5em;
62   vertical-align: top;
63 }
64
65 header .menu.dropdown li > ul,
66 header .menu.dropdown li > ol {
67   display: none;
68   position: absolute;
69   background-color: #FFF;
70   margin: 0;
71   padding: .25em .5em;
72   padding-left: 1.5em;
73   box-shadow: 0 0 .75em;
74 }
75 header .menu.dropdown li:hover > ul,
76 header .menu.dropdown li:hover > ol {
77   display: table;
78 }
79
80 main .pagemenu {
81   list-style: none;
82   background-color: #666;
83   margin: 0;
84   box-shadow: 0 0 .5em;
85   padding: .25em 2em;
86 }
87 main .pagemenu li {
88   display: inline-block;
89   margin-right: 1em;
90 }
91 main .pagemenu li a { color: #FFF; }
92
93 main article,
94 main > form#renamepage, main > form#movepage,
95 main > form#deletepage, 
96 [id$="/[attachment]"] main > form {
97   margin: 1em;
98   padding: .125em 1em 1em 1em;
99   box-shadow: .25em .25em .75em;
100   background-color: #FFF;
101 }
102
103 main > form#deletepage label[for=delsub] {
104   text-decoration: underline;
105 }
106 main > form#deletepage input#delsub:checked + label + ul li.delsub {
107   text-decoration: line-through;
108 }
109
110 main > form#movepage input,
111 main > form#renamepage input {
112   min-width: 30em;
113   max-width: 100%;
114 }
115
116 [id$="/[revision]"] main .revisions,
117 [id$="/[attachment]"] main > .attachment.list {
118   margin: 1em;
119   padding: 1em 2em;
120 }
121 [id$="/[revision]"] main .revisions:before,
122 [id$="/[attachment]"] main > .attachment.list:before {
123   content: '';
124   position: absolute;
125   top: 0; bottom: 0; left: 0; right: 0;
126   background-color: #FFF;
127   box-shadow: .25em .25em .75em;
128 }
129
130 main code {
131   padding: .125em .25em;
132   background-color: #EEE;
133 }
134 main pre {
135   padding: .5em .5em;
136   background-color: #EEE;
137   max-width: 100%;
138   overflow-x: auto;
139 }
140 main pre > code {
141   padding: 0;
142 }
143
144 li.task > input[type=checkbox][disabled],
145 li.task > p > input[type=checkbox][disabled] {
146   display: none;
147 }
148 li.task > p:first-child { display: inline-block;}
149
150 -li.task:before { font-size: 1.125em; }
151 li.task.pending:before  { content: '\274f  '; color: #222; }
152 li.task.partial:before  { content: '\25d4  '; color: #880; }
153 li.task.negative:before { content: '\2718  '; color: #800; }
154 li.task.done:before     { content: '\2714  '; color: #080; }
155 li.task.unsure:before   { content: '?  '    ; color: #880; font-weight: bold; padding-left: 2pt; }
156
157 /* Alternative Check Symbols, all from "geometric shapes" block */ /*
158 -li.task.pending:before  { content: '\25a1  '; color: #222; }
159 -li.task.partial:before  { content: '\25d4  '; color: #880; }
160 -li.task.negative:before { content: '\25a8  '; color: #800; }
161 -li.task.done:before     { content: '\25a3  '; color: #080; }
162 */
163
164 h1 { text-align: center; }
165 .center { text-align: center; }
166
167 form.newpage, form.search {
168   margin-bottom: 1em;
169 }
170 form.search { text-align: center; }
171 input.search, input[type="search"] {
172   min-width: 50%;
173   max-width: 80%;
174   max-width: calc(100%  - 2.5em);
175 }
176 ul.search.hits, ol.search.hits {
177   margin-left: auto; margin-right: auto;
178   width: 100%; max-width: 540pt;
179   text-align: center;
180   list-style: none;
181 }
182 .search.hits li a {
183   display: block;
184 }
185 .search.hits li p {
186   display: inline-block;
187   margin: 0 auto .5em auto;
188   white-space: pre-line;
189 }
190
191 table {
192   min-width: 50%;
193   margin-left: auto;
194   margin-right: auto;
195 }
196
197 @media(min-width: 540pt) {
198   .half {
199     display: inline-block;
200     width: 50%;
201     padding-right: 1em;
202     vertical-align: top;
203   }
204   h1.half, h2.half, h3.half, h4.half, h5.half, h6.half {
205     width: 100%;
206   }
207   .right {
208     float: right;
209     clear: both;
210     width: 33%;
211     margin: .25em 0 .5em 1em;
212   }
213   .left {
214     float: left;
215     clear: both;
216     width: 33%;
217     margin: .25em 1em .5em 0;
218   }
219   .left .left, .left .right,
220   .right .left, .right .right,
221   .half .left, .half .right {
222     float: none;
223     width: 100%;
224     margin: .25em 0 .5em 0;
225   }
226   section.left  > :first-child,
227   section.right > :first-child {
228     float: none;
229     margin: 0 0 .5em 0;
230   }
231   .left  > section:first-child > :first-child,
232   .right > section:first-child > :first-child {
233     margin-top: 0;
234   }
235   .left table, .right table, .half table {
236     width: 100%;
237   }
238
239   .left  input.search, .left  input[type="search"],
240   .right input.search, .right input[type="search"] {
241     width: 80%;
242     width: calc(100% - 2.5em);
243   }
244   ul.search.hits, ol.search.hits {
245     min-width: 50%;
246   }
247 }
248
249
250 /* === Editor === */
251
252 [id$="/[edit]"] main .pagemenu {
253   margin-bottom: 1em;
254 }
255
256 .tab[name=edithelp] ~ .tab.editor textarea,
257 .tab[name=edithelp] ~ .tab.syntax,
258 .tab[name=edithelp] ~ .tab.attach,
259 .tab[name=edithelp] ~ .tab.transl {
260   background-color: #FFF;
261   min-height: 20em; min-height: 50vh;
262 }
263
264 .tab[name=edithelp] ~ .tab.editor textarea {
265   width: 100%;
266   font-family: monospace;
267   font-size: inherit;
268 }
269
270 .tab[name=edithelp] ~ .tab.attach {
271   padding-top: 1em;
272   padding-left: 7em;
273 }
274 .tab[name=edithelp] ~ .tab.attach .aimg img {
275   float: left;
276   max-height: 4em;
277   margin-left: -6em;
278 }
279
280 .tab[name=edithelp] ~ .tab.transl {
281   font-family: monospace;
282   white-space: pre;
283 }
284
285 .tab[name=edithelp]#editor:checked ~ .tab.editor,
286 .tab[name=edithelp]#syntax:checked ~ .tab.syntax,
287 .tab[name=edithelp]#attach:checked ~ .tab.attach,
288 .tab[name=edithelp]#transl:checked ~ .tab.transl {
289   display: block;
290 }
291
292
293 /* === Attachments === */
294
295 .attachment.list button[name=delete] {
296   font-size: .75em;
297   line-height: 1.25em;
298   margin-right: 1.25em;
299 }
300 .attachment.list .size,
301 .attachment.list .date {
302   font-size: .875em;
303   top: -.25em;
304 }
305
306 .attachment.list .name:after {
307   white-space: pre-line;
308   content: "\0a";
309 }
310 .attachment.list .size {
311   margin-right: 1em;
312 }
313
314 .revisions li { margin: 1em 0; }
315 .revisions li span.hash,
316 .revisions li span.date {
317   margin-right: 1em;
318 }
319
320 .revisions .diff span {
321   font-family: monospace;
322   display: block;
323   white-space: pre;
324   line-height: 1.375em;
325 }
326 .revisions .diff span.linenum { color: #D60; }
327 .revisions .diff span.linedel { color: #A00; }
328 .revisions .diff span.lineadd { color: #0A0; }
329 .revisions .diff span.linenote { color: #AAA; }
330
331
332 [id$="/[attachment]"] input[type=radio].tab ~ div.tab {
333   display: block;
334   padding-top: 1em;
335 }
336 [id$="/[attachment]"] input[type=radio].tab ~ div.tab ul.attachment.list {
337   list-style: none;
338   margin-left: 0;
339 }
340
341 .tab ul li input[name=select],
342 .tab ul li label.name,
343 .tab ul li a.name,
344 .tab ul li input.name {
345   display: none;
346 }
347
348 [id$="/[attachment]"] input[type=radio].tab#tview:checked ~ div.tab ul li a.name,
349 [id$="/[attachment]"] input[type=radio].tab#tdel:checked  ~ div.tab ul li input[name=select],
350 [id$="/[attachment]"] input[type=radio].tab#tdel:checked  ~ div.tab ul li label.name,
351 [id$="/[attachment]"] input[type=radio].tab#tmove:checked ~ div.tab ul li input[name=select],
352 [id$="/[attachment]"] input[type=radio].tab#tmove:checked ~ div.tab ul li label.name {
353   display: inline;
354 }
355 [id$="/[attachment]"] input[type=radio].tab#tren:checked ~ .tab ul li input.name {
356   display: block;
357 }
358
359 [id$="/[attachment]"] label[for=moveto], [id$="/[attachment]"] input#moveto,
360 [id$="/[attachment]"] button[name=action] { display: none; }
361
362 [id$="/[attachment]"] .upload button[name=action] { display: inline-block; }
363 [id$="/[attachment]"] input[type=radio].tab#tdel:checked  ~ div.tab button[name=action][value=delete],
364 [id$="/[attachment]"] input[type=radio].tab#tmove:checked ~ div.tab label[for=moveto],
365 [id$="/[attachment]"] input[type=radio].tab#tmove:checked ~ div.tab input#moveto,
366 [id$="/[attachment]"] input[type=radio].tab#tmove:checked ~ div.tab button[name=action][value=move],
367 [id$="/[attachment]"] input[type=radio].tab#tren:checked  ~ div.tab button[name=action][value=rename] {
368   display: inline;
369 }
370
371
372 /* === Macros === */
373
374 .macro.toc {
375   display: inline-block;
376   list-style-position: inside;
377   margin-left: 0;
378   background-color: #DDD;
379   background-color: rgba(0, 0, 0, .125);
380   padding: .75em 1em;
381   border: 1pt solid;
382   border-radius: 2pt;
383 }
384 .macro.toc li.h2 { margin-left: 1.25em; }
385 .macro.toc li.h3 { margin-left: 2.5em; }
386 .macro.toc li.h4 { margin-left: 3.75em; }
387 .macro.toc li.h5 { margin-left: 5em; }
388 .macro.toc li.h6 { margin-left: 6.25em; }
389
390
391 .macro.gallery {
392   text-align: center;
393   margin: 2em 0;
394   padding: .5em .125em;
395   background-color: #444;
396   clear: both;
397 }
398 .macro.gallery img {
399   max-height: 9em;
400   margin: 0 .25em;
401 }
402
403
404 ul.macro.tag { padding: 0; }
405 .macro.tag li.tag {
406   display: inline-block;
407   color: #FFF;
408   background-color: #333;
409   font-size: .875em;
410   padding: 0 .5em;
411   margin: .25em .25em 0 0;
412   border-radius: .375em;
413 }
414
415
416 .macro.taglist li {
417   display: inline-block;
418   margin-right: .75em;
419 }
420 .macro.taglist.cloud li[rel="0"] { font-size: 6pt; }
421 .macro.taglist.cloud li[rel="1"] { font-size: 7.5pt; }
422 .macro.taglist.cloud li[rel="2"] { font-size: 9pt; }
423 .macro.taglist.cloud li[rel="3"] { font-size: 11.5pt; }
424 .macro.taglist.cloud li[rel="4"] { font-size: 13pt; }
425 .macro.taglist.cloud li[rel="5"] { font-size: 14.5pt; }
426 .macro.taglist.cloud li[rel="6"] { font-size: 16pt; }
427 .macro.taglist.cloud li[rel="7"] { font-size: 17.5pt; }
428 .macro.taglist.cloud li[rel="8"] { font-size: 19pt; }
429 .macro.taglist.cloud li[rel="9"] { font-size: 21.5pt; }
430
431
432 .macro.changes td .date {
433   display: block;
434   font-size: .75em;
435 }
436 .macro.changes td.outdated,
437 .macro.changes td.current,
438 .macro.changes td.missing {
439   text-align: center;
440 }
441 .macro.changes th { background-color: #EEF; }
442 .macro.changes td { background-color: #DFF; }
443 .macro.changes td.outdated { background-color: #FFD; }
444 .macro.changes td.current  { background-color: #DFD; }
445 .macro.changes td.missing  { background-color: #FDD; }
446
447
448 .macro.calendar.cal_month {
449   border: 1pt solid #AAA;
450   -box-shadow: .25em .25em .75em #AAA;
451 }
452 .macro.calendar.cal_month td {
453   padding: 0 .25em;
454   vertical-align: top;
455 }
456 .macro.calendar.cal_month td > label {
457   display: block;
458   background-color: #F4F4F4;
459   text-align: center;
460   margin-right: 0;
461 }
462 .macro.calendar.cal_month td > ul {
463   padding: .25em 1em;
464   margin-bottom: .125em;
465 }
466 .macro.calendar.cal_month td > ul > li {
467   display: block;
468 }