]> git.plutz.net Git - confetti/blob - style.css
Merge commit 'fcfbf01dba9c932dbb66abffa8f65bf1c7a15081'
[confetti] / style.css
1 h1:first-child, h2:first-child, h3:first-child,
2 p + h1, p + h2, p + h3 {
3   margin-top: 3pt;
4 }
5
6 /* ====== COMMON ELEMENTS ======*/
7
8 body > ul.menu {
9   display: block;
10   height: 1.75em;
11   margin: 0; -padding: 0 .5em;
12   list-style: none;
13   color: #CCC;
14   background-color: #444;
15   box-shadow: inset 0 -.25em .25em #000;
16   overflow: hidden;
17   z-index: 3;
18 }
19
20 body > .menu li {
21   display: inline-block;
22 }
23 body > .menu a {
24   color: inherit;
25   padding: .5em 3em;
26   box-shadow: inset 0 0 .5em #000;
27 }
28 body.cards > .menu a[href$="/cards/"],
29 body.courses > .menu a[href$="/courses/"] {
30   color: #000;
31   background-color: #FFF;
32   box-shadow: none;
33 }
34
35 /* =========== FILTER AND SEARCH Headers ========= */
36
37 form.categories,
38 form.search, form.sort, form.filter, form.newcard, form.newcourses {
39   margin-top: 1em; padding: 0 1em;
40   z-index: 1;
41 }
42 form.filter > h1 { display: none; }
43
44 form.filter fieldset { margin-top: .5em; }
45 form.filter fieldset.item + fieldset.item legend { display: none; }
46
47 form.filter fieldset.item input[value=course] ~ input[type=text],
48 form.filter fieldset.item input[value=CATEGORIES] ~ input[type=text] { display: block; }
49 form.filter fieldset.item input[value=course]:checked ~ input[type=text],
50 form.filter fieldset.item input[value=CATEGORIES]:checked ~ input[type=text] { display: none; }
51 form.filter fieldset.item input[value=course]:checked ~ fieldset.courses,
52 form.filter fieldset.item input[value=CATEGORIES]:checked ~ fieldset.categories { display: block; }
53
54 form.filter fieldset.order legend {
55   float: left; margin-right: 1em;
56 }
57
58 form.filter fieldset label,
59 form.filter fieldset a { white-space: pre;}
60 form.filter button[type=submit] {
61   margin-top: .5em; margin-bottom: .5em;
62 }
63
64 form.filter button[value=export_csv] { margin-left: 1em; }
65
66 body.courses form .order { display: inline-block; margin-right: 2em;}
67
68 body.cards form.newcard { display: flex; }
69 body.cards form.newcard input[name=seed] { flex: 1; }
70
71
72 /* ============ LIST ITEMS, Generic ============= */
73
74 body > form,
75 div.card,
76 div.course {
77   position: relative;
78   width: 98%; width: calc(100% - 2em);
79   margin-left: auto; margin-right: auto;
80   margin-bottom: 1em;
81   box-shadow: .125em .125em .25em;
82   z-index: 1;
83 }
84
85 /* HACK: put anchor point 10em above card and highlight target element */
86     div:target { box-shadow: none; z-index: 0; }
87     div:target:before {
88       content: '';
89       display: block;
90       margin-top: -10em;
91       height: 10em;
92       visibility: hidden;
93     }
94     div:target:after {
95       content: '';
96       display: block;
97       position: absolute;
98       left: 0; right: 0;
99       top: 10em; bottom: 0;
100       box-shadow: .125em .125em .25em;
101       animation: highlight 4s;
102       z-index: -1;
103     }
104     @keyframes highlight { from { background-color: #FF0; } to { background-color: transparent; } }
105 /**/
106
107 div .section, form .section {
108   display: block;
109   vertical-align: top;
110   padding: 0 1em;
111   overflow: hidden;
112   word-break: break-word;
113 }
114
115 div .section :last-child, form .section :last-child {
116   margin-bottom: 1em;
117 }
118
119 div .section h2, form .section h2,
120 div .section h3, form .section h3 { 
121   border-bottom: 1pt solid #EEE;
122 }
123 div .control, form .control {
124   background-color: #EEE;
125   padding: .25em;
126   text-align: right;
127 }
128
129 @media(min-width: 60em) {
130   div .section, form .section {
131     display: table-cell;
132     width: calc(100% / 10);
133   }
134   div .section :last-child { margin-bottom: 0; }
135   div .control, form .control {
136     background-color: transparent;
137   }
138   div .section:nth-of-type(2n) {
139     background-color: #EEE;
140   }
141 }
142 @media(min-width: 80em) {
143   div .control, form .control {
144     display: table-cell;
145     width: calc(100% / 10);
146   }
147   div .control .item, form .control .item {
148     display: block;
149     margin-bottom: .25em;
150   }
151 }
152
153 div .section .item, form .section .item,
154 form .section.attendance > label {
155   display: block;
156   width: 100%;
157 }
158
159 div .section .item.NOTE {
160   white-space: pre-wrap;
161 }
162
163 form .section .item {
164   margin-bottom: .25em;
165 }
166
167 form .section button[value^=addfield] {
168   font-size: .75em;
169   margin-top: .5em; padding: 0 .375em;
170 }
171
172 /* HACK: "responsive" Delete Button above each field */
173     form input.delete { display: none; }
174     form input.delete + label {
175       float: right;
176       font-size: .75em;
177       line-height: 1;
178       max-width: 1.75em; height: 1.125em; overflow: hidden;
179       color: #FBB; background-color: #444;
180       margin: 0; padding: .125em .5em 0 .5em;
181       border-radius: 4pt 4pt 0 0;
182       transition: max-width .3s;
183     }
184     form input.delete + label:before  { content: '\274c '; margin-right: .5em; }
185     form input.delete + label:hover   { max-width: 10em; }
186     -form input.delete + label:hover:before { content: ''; }
187     -form input.delete + label:hover:after  { content: ' \274c'; }
188     form input.delete:checked + label,
189     form input.delete:checked + label + *,
190     form input.delete:checked + label + .teltype + .TEL {
191       display: none;
192     }
193 /**/
194
195
196 /* ====== right hand Control Buttons on list items ====== */
197
198 form .control {
199   position: relative;
200   padding-left: 11em;
201   padding-top: 1.5em;
202 }
203 form .control .item {
204   display: inline-block;
205   margin-bottom: .25em;
206   vertical-align: text-bottom;
207 }
208
209 /* Combined Select/Submit Box */
210     form .control .item.newfield { box-shadow: .125em .125em .25em; }
211     form .control .item.newfield select { margin-right: -1pt; }
212     form .control .item.newfield button { box-shadow: none; }
213 /**/
214
215 /* HACK: Delete Checkbox before delete Button */
216     form .control .item.delete {
217       position: absolute;
218       bottom: .375em; left: .25em; width: auto;
219       padding-bottom: calc(2.25em + 2pt);
220     }
221     
222     form .control .item.delete input + label + button {
223       display: none;
224       position: absolute;
225       bottom: 0; width: 100%;
226       color: #800;
227       background-color: #FEE;
228       z-index: 1;
229     }
230     form .control .item.delete:after {
231       content: attr(label);
232       display: block;
233       position: absolute;
234       bottom: 0; width: 100%;
235       text-align: center;
236       color: #BAA;
237       padding: .25em 0;
238       border: 1pt solid;
239       box-shadow: .125em .125em .25em;
240     }
241     form .control .item.delete input:checked + label + button { display: block; }
242 /**/
243
244 @media(min-width: 80em) {
245   form .control { padding: .25em; min-height: 16em; }
246   form .control .item { width: 100%; }
247   form .control .item.newfield select { width: calc(100% - 2.5em); }
248   form .control .item.delete { bottom: .125em; right: .25em; }
249 }
250
251
252 /* ======= LIST ITEMS, Cards ======= */
253
254 form.card .attendance div.attendance,
255 form.card .attendance div.categories {
256   max-height: 10em;
257   overflow-y: auto;
258 }
259 form.card .attendance label {
260   display: inline-block;
261   width: calc(100% - 2em);
262   vertical-align: top;
263   margin-bottom: 0;
264 }
265 form.card .attendance input { margin-top: .375em; }
266
267
268 /* ======= LIST ITEMS, Courses ======= */
269
270 form.course .dtstart input[name=DTS_YEAR],
271 form.course .dtstart select[name=DTS_MONTH] { width: calc(50% - 1.25em); }
272 form.course .dtstart input[name=DTS_YEAR] { margin-right: -.375em; }
273 form.course .dtstart table { width: 100%; margin: 1em 0; }
274 form.course .dtstart table td { text-align: right; -border: .5pt solid; }
275 form.course .dtstart table input[type=radio] { display: none; }
276 form.course .dtstart table input[type=radio] + label {
277   display: block;
278   width: 100%;
279   margin: 0; padding: 0 3pt;
280 }
281 form.course .dtstart table input[type=radio]:checked + label {
282   font-weight: bold;
283   padding: 0 2pt;
284   box-shadow: .125em .125em .25em;
285 }
286
287 form.course .dtstart label.DTSTIME {
288   display: inline-block;
289   font-weight: bold;
290   margin: 0;
291   width: calc(100% - 7.875em);
292 }
293 form.course .dtstart input[name=DTS_HOUR],
294 form.course .dtstart input[name=DTS_MINUTE] {
295   vertical-align: baseline;
296   width: 3.5em;
297   margin-bottom: 0;
298 }
299
300 form.course .recur .item { white-space: nowrap; }
301 form.course .recur .item > * { margin-bottom: 0; vertical-align: baseline; }
302 form.course .recur input[name=RRULE_INTERVAL],
303 form.course .recur input[name=RRULE_COUNT],
304 form.course .recur input[name=RRULE_UMONTH],
305 form.course .recur input[name=RRULE_UDAY] { width: 3.5em; }
306 form.course .recur input[name=RRULE_UYEAR] { width: 4.5em; }
307 form.course .recur input[name=RRULE_UYEAR],
308 form.course .recur input[name=RRULE_UMONTH],
309 form.course .recur input[name=RRULE_UDAY] {
310   margin-right: -.375em;
311 }
312
313 form.course .attendance div.attendance {
314   max-height: 16em;
315   overflow-y: scroll;
316 }
317 form.course .attendance label {
318   display: inline-block;
319   max-width: calc(100% - 2em);
320   vertical-align: top;
321   margin-bottom: 0;
322 }
323 form.course .attendance input { margin-top: .375em; }
324
325 /* ======== Categories Page ======== */
326
327 body.categories form ul { list-style: none; margin: 0; }
328
329 form.categories li {
330   display: inline-block;
331   background-color: #EEE;
332   margin-right: .5em; margin-bottom: .5em;
333   padding-left: .5em;
334   box-shadow: .125em .125em .25em;
335 }
336 form.categories li button[name=remove] {
337   font-size: .75em;
338   width: 2.5em;
339   background-color: #FBB;
340   overflow: hidden;
341   white-space: pre;
342 }
343 form.categories li button[name=remove]:before {
344   content: '\274C ';
345   margin-right: 3em;
346 }
347
348 form.categories li:last-child { padding-left: 0 }
349
350 body.categories form.namelist ul.namelist > li:nth-of-type(2n + 1) { background-color: #EEE; }
351 body.categories form.namelist ul.namelist > li h2,
352 body.categories form.namelist ul.namelist > li ul {
353   display: inline-block;
354 }
355 body.categories form.namelist ul.namelist > li h2 {
356   width: 20%;
357   min-width: 10em;
358 }
359 body.categories form.namelist ul.namelist > li ul li {
360   display: inline-block;
361 }