]> git.plutz.net Git - confetti/blob - templates/therapy.css.sh
unify css, increase responsiveness by reducing server communication
[confetti] / templates / therapy.css.sh
1 #!/bin/sh
2
3 cat <<EOF
4
5 .trailbtn:checked + fieldset.trailbox { display: block;}
6
7 * { box-sizing: border-box; }
8 body {
9   overflow: scroll;
10   position: relative;
11   width: 100%;
12   margin: 0; padding: 0;
13   padding-top: 2em;
14 }
15
16 form > button[type=submit] {
17   position: fixed; display: block;
18   top: 0; left: 15em;
19   height: 2.25em; padding: 0 3ex;
20   font-size: 1em; font-weight: bold;
21   color: #000; background-color: #FDD;
22   border-width: 1px; border-color: #000;
23   border-style: none solid solid solid;
24   border-radius: 0 0 4px 4px;
25 }
26 form > button[type=submit]:hover {
27   background-color: #FEE;
28 }
29
30 input.tab { display: none; }
31 input.tab + label.tab { display: block; }
32 input.tab + label.tab::before { content: '\25b8 \00a0'; float: left;}
33 input.tab:checked + label.tab::before { content: '\25be \00a0'; }
34 input.tab + label.tab + div.tab { display: none; }
35 input.tab:checked + label.tab + div.tab { display: block; }
36
37 input.color { display: none }
38 input.color + label{
39   display: inline-block;
40   width: 1em; height: 1em;
41   border: 1px solid black;
42 }
43 input.color:checked + label{ border-width: 3px;}
44 input.color[value="#000"] + label,
45 input.color[value="#888"] + label { background-color: #888;}
46 input.color[value="#00A"] + label { background-color: #00F;}
47 input.color[value="#0A0"] + label { background-color: #0F0;}
48 input.color[value="#0AA"] + label { background-color: #0FF;}
49 input.color[value="#A00"] + label { background-color: #F00;}
50 input.color[value="#A0A"] + label { background-color: #F0F;}
51 input.color[value="#AA0"] + label { background-color: #FF0;}
52 input.color[value="#FFF"] + label { background-color: #FFF;}
53
54 h1, label.tab, div.tab, fieldset.tab,
55 div.patient, div.prescription {
56   display: block;
57   width: 96%;
58   margin: 0 2%;
59 }
60
61 div.prescription span {
62   display: inline-block;
63   width: 50%;
64   margin-right: -.75ex;
65   vertical-align: top;
66 }
67 div.prescription span label { font-weight: bold; margin-right: 1ex;}
68 div.prescription span.prescno,
69 div.prescription span.catalogue {
70   width: 33%;
71   font-weight: bold;
72   margin-bottom: .5em;
73   padding: .5ex 1ex;
74 }
75
76 div.prescription label.checkbox,
77 div.prescription label.radio {
78   display: block;
79   padding-left: 1.25em;
80   font-size: 1em;
81   margin: .5em 0;
82 }
83
84 div.prescription label.checkbox:before,
85 div.prescription label.radio:before {
86   display: inline-block;
87   color: #000;
88   background-color: #FFF;
89   height: 1.375em; width: 1.125em;
90   padding: .125em 0 0 .375em;
91   margin: 0 .5em .25em -1.25em;
92   border: 1px solid #000;
93   vertical-align: middle;
94   content: ' ';
95 }
96 div.prescription label.radio:before { border-radius: .5em;}
97 div.prescription label.checkbox.checked:before,
98 div.prescription label.radio.checked:before { content: "\2713";}
99
100 div.prescription label[for=prescreviewed] {
101   margin-left: 1ex;
102   font-weight: bold;
103   text-decoration: underline;
104   background-color: #FCC;
105 }
106 div.prescription label[for=prescreviewed].checked {
107   font-weight: normal;
108   text-decoration: none;
109   background-color: transparent;
110 }
111
112 input.stickynote { display:none; }
113 input.stickynote + .stickynote {
114   position: fixed;
115   background-color: #FF8;
116   top: 4em; bottom: 4em;
117   left: -4.5em; width: 5em;
118   padding: 1ex;
119   max-height: 90%;
120   z-index: 2;
121 }
122 input.stickynote + .stickynote > * { display: none; }
123 input.stickynote + .stickynote > label {
124   position: absolute;
125   top: 0; bottom: 0;
126   display: block;
127   text-align: right;
128   font-weight: bold;
129 }
130 input.stickynote + .stickynote:hover {
131   left: -1ex;
132 }
133 input.stickynote:checked + .stickynote {
134   width: auto;
135   left: 1em;
136   right: 1em;
137 }
138 input.stickynote:checked + .stickynote > textarea {
139   display: block;
140   position: absolute;
141   left; 0; right: 0; bottom: 0; top: 0;
142   width: 100%; height: 100%;
143   background-color: #FF8;
144   padding: 2em 1em;
145 }
146 input.stickynote:checked + .stickynote > button {
147   display: block;
148   position: absolute;
149   right: .5ex; bottom: .5ex;
150   z-index: 2;
151 }
152 input.stickynote:checked + .stickynote > label {
153   display: block;
154   position: static;
155   font-size: 0;
156 }
157 input.stickynote:checked + .stickynote > label:before {
158   position: absolute;
159   font-size: initial;
160   content: "x";
161   top: .5ex; right: .5ex;
162   padding: .125ex .75ex;
163   background-color: #000;
164   color: #FFF;
165   border-radius: 1ex;
166   z-index: 2;
167 }
168
169
170 fieldset.color {
171   position: absolute;
172   bottom: 0; right: 0; width: 2em;
173   margin: .5em .5em .125em 2%;
174   border: none;
175   padding: 0;
176 }
177 fieldset.color > input.color + label {
178   width: 2em; height: 2em;
179 }
180 .dotmark {
181   max-width: 90%;
182   margin: .5em 1em .125em 2%; padding: 0;
183   text-align: left;
184   border: 1px solid black;
185 }
186 .dotmark.ov {
187   position: absolute;
188   left: 0; bottom: .25em;
189   z-index: 1;
190 }
191
192 @media(min-width: 800px){
193   h1, label.tab, div.tab, fieldset.tab,
194   div.patient, div.prescription {
195     width: 38%;
196     margin-right: 0;
197   }
198   input.stickynote:checked + .stickynote { right: 50%; }
199   fieldset.color { position: fixed; }
200   .dotmark {
201     position: fixed;
202     max-width: 52%;
203     max-height: 98%;
204     right: 2em; bottom: .25em;
205   }
206   .dotmark.ov {
207     position: fixed;
208     right: 2em; left: auto;
209   }
210 }
211
212 h1 {display: none;}
213
214 div.patient, div.prescription { margin-top: 1em; }
215 div.prescription {
216   border: 1px solid black;
217   background-color: #EEE;
218   padding: .125em 1.25ex .5em 1.25ex;
219 }
220 div > h2 { margin: 0; border-bottom: 1px solid black; }
221 div:nth-child(n+2) > a:first-of-type {
222   display: block;
223   margin: .125em 0 .5em 0;
224   text-decoration: none;
225 }
226
227 fieldset.tab,
228 label.tab {
229   font-size: 1.25em;
230   font-weight: bold;
231   padding: .125em 1ex .25em 1ex;
232   color: #FFF;
233   background-color: #333;
234   margin-top: .125em;
235   text-align: right;
236   border: none;
237 }
238 label.heading {
239   background-color: #FFF;
240   margin-top: 1em;
241   border: 2px solid black;
242   border-bottom-width: 1px;
243   color: black;
244 }
245 label.heading > span {
246   text-decoration: underline;
247 }
248
249 fieldset.tab > *,
250 label > input,
251 label > span {
252   display: inline-block;
253   text-align: right;
254 }
255 .tab > .no {
256   width:  10%; float: left;
257   border: solid 1px #FFF;
258   background-color: #555;
259   border-radius: 2ex;
260   padding: 0;
261   text-align: center;
262 }
263 label.heading > span.no {
264   background-color: inherit;
265   border: none;
266 }
267 .tab > .date      { width: 30%; }
268 .tab > .therapist { width: 30%; }
269 .tab > .signature { width: 20%; }
270 label.tab > .signature { font-size: .75em; }
271
272 .signature > input[type=checkbox] {
273   display: inline;
274   font-weight: bold;
275   font-size: 1.25em;
276 }
277 .signature > input[type=checkbox]:before {
278   display: block; width: 1.25em;
279   margin: -.125em 0 0 -.5ex;
280   background-color: #FFF;
281   text-align: center;
282   content: "\00a0 \00a0 \00a0";
283 }
284 .signature > input[type=checkbox]:checked::before {
285   content: "\2713";
286 }
287
288 input.tab + label.tab > input.date,
289 input.tab + label.tab > input.therapist {
290   display: none;
291 }
292 input.tab:checked + label.tab > input.date,
293 input.tab:checked + label.tab > input.therapist {
294   display: inline;
295 }
296 input.tab:checked + label.tab > span.date,
297 input.tab:checked + label.tab > span.therapist {
298   display: none;
299 }
300
301 div.tab {
302   border: 2px solid #333;
303   border-top-width: 1px;
304   margin-top: -1px;
305   padding: .25em .5ex 1em .5ex;
306 }
307 div.tab > fieldset.note {
308   border: none;
309   margin: 0; padding: 0;
310 }
311 div.tab > fieldset.note > textarea {
312   display: block;
313   width: 93%; height: 8em;
314   margin: -8em 0 .5em 2em;
315   font: normal 1em sans-serif;
316 }
317 div.tab > fieldset.note > input.color + label { margin: 0; display: block; }
318 div.tab > fieldset.note > input.color[value="#888"]:checked ~ textarea { background-color: #AAA; }
319 div.tab > fieldset.note > input.color[value="#00A"]:checked ~ textarea { background-color: #88F; }
320 div.tab > fieldset.note > input.color[value="#0A0"]:checked ~ textarea { background-color: #8F8; }
321 div.tab > fieldset.note > input.color[value="#0AA"]:checked ~ textarea { background-color: #8FF; }
322 div.tab > fieldset.note > input.color[value="#A00"]:checked ~ textarea { background-color: #F88; }
323 div.tab > fieldset.note > input.color[value="#A0A"]:checked ~ textarea { background-color: #F8F; }
324 div.tab > fieldset.note > input.color[value="#AA0"]:checked ~ textarea { background-color: #FF8; }
325 div.tab > fieldset.note > input.color[value="#FFF"]:checked ~ textarea { background-color: #FFF; }
326
327 div.tab > button.delete {float: right; display: inline-block; margin-top: -1em;}
328 EOF
329
330 # vi:set filetype=css: