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