]> git.plutz.net Git - confetti/blob - templates/prescriptions.css.sh
allow additional remedies to be prescribed
[confetti] / templates / prescriptions.css.sh
1 # /*
2 # Copyright 2016 Paul Hänsch
3 #
4 # This file is part of Confetti.
5
6 # Confetti is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU Affero General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
10
11 # Confetti is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU Affero General Public License for more details.
15
16 # You should have received a copy of the GNU Affero General Public License
17 # along with Confetti.  If not, see <http://www.gnu.org/licenses/>. 
18
19 . ${0%/*}/cards.css.sh
20
21 cat <<EOF
22 /**/
23 body {padding-bottom: 3em; }
24
25 .prescription {
26   display: inline-block;
27   width: 96%; max-width: 460px;
28   color: #800;
29   background-color: #DDD;
30   margin: 1em -1% 0 2%; padding: 0;
31   border: 1px solid #888;
32   overflow: hidden;
33   vertical-align: top;
34 }
35 form.prescription { padding-top: 1ex;}
36
37 .newprescription {
38   display: block;
39   margin: 0 2em; padding: .5ex 2ex;
40   background-color: #CFF;
41   border: 1px solid #888;
42   border-radius: 0 0 1ex 1ex;
43 }
44
45 .prescription * {
46   display: inline-block;
47   font-size: 1em;
48   line-height: 1em;
49   margin: 0; padding: 0;
50 }
51 .prescription label {
52   padding-left: .5ex;
53   font-size: .75em;
54 }
55
56 .prescription fieldset {
57   display: inline-block;
58   margin: 0; padding: 1ex;
59   margin-right: -.625ex;
60   border: none;
61   vertical-align: top;
62 }
63 .prescription fieldset br { display: none;}
64
65 .prescription span,
66 .prescription input,
67 .prescription textarea {
68   height: 1.5em;
69   border: 1px solid #800;
70   padding: .25ex;
71   background-color: #FFF;
72 }
73 .prescription span {
74   background-color: #EEE;
75   padding: .5ex .25ex;
76   white-space: pre-wrap;
77   font-size: .75em;
78   overflow: hidden;
79 }
80
81 .prescription input[type=checkbox],
82 .prescription input[type=radio] { display: none;}
83
84 .prescription label.checkbox,
85 .prescription label.radio,
86 .prescription input[type=checkbox] + label,
87 .prescription input[type=radio] + label { padding-left: 1.25em; font-size: 1em;}
88
89 .prescription label.checkbox:before,
90 .prescription label.radio:before,
91 .prescription input[type=checkbox] + label:before,
92 .prescription input[type=radio] + label:before {
93   display: inline-block;
94   position: absolute;
95   margin-left: -1.25em;
96   width: .75em; height: .75em;
97   background-color: #FFF;
98   border: 1px solid #800;
99   content: ' ';
100 }
101 .prescription label.radio:before,
102 .prescription input[type=radio] + label:before { border-radius: .5em;}
103 .prescription label.checkbox.checked:before,
104 .prescription label.radio.checked:before,
105 .prescription input[type=checkbox]:checked + label:before,
106 .prescription input[type=radio]:checked + label:before { content: "\2713";}
107
108 .prescription a.button,
109 .prescription input[type=submit],
110 .prescription button {
111   height: 1.5em;
112   color: #FFF;
113   background-color: #800;
114   text-align: center;
115   text-decoration: none;
116   margin: 0; padding: .125em 0 0 0;
117   border: none;
118 }
119 .prescription a.button {padding: .5ex;}
120
121 /* ======== Specific ========== */
122
123 .prescription label.presctype,
124 .prescription input[name=presctype] + label {
125   font-size: medium;
126   width: 22%;
127   margin: 0; margin-right: -.75ex;
128   vertical-align: bottom;
129   padding: .125em .5ex .25em 3ex;
130 }
131 .prescription label.presctype {
132   text-align: right;
133   font-weight: bold;
134   padding-right: 1ex;
135   padding-left: 0;
136 }
137
138 input[name=presctype][value\$=private]:checked  ~ fieldset,
139   input[name=presctype][value\$=private] + label,
140   .prescription.private { background-color: #CFC;}
141 input[name=presctype][value\$=selfpaid]:checked  ~ fieldset,
142   input[name=presctype][value\$=selfpaid]         + label,
143   .prescription.selfpaid { background-color: #FFC;}
144 input[name=presctype][value=doctor_compulsory]:checked  ~ fieldset,
145   input[name=presctype][value=doctor_compulsory]  + label,
146   .prescription.doctor.compulsory { background-color: #CFF;}
147 input[name=presctype][value=dentist_compulsory]:checked  ~ fieldset,
148   input[name=presctype][value=dentist_compulsory] + label,
149   .prescription.dentist.compulsory { background-color: #FCC;}
150 input[name=presctype][value^=altpractition]:checked  ~ fieldset,
151   input[name=presctype][value^=altpractition]     + label,
152   .prescription.altpractition { background-color: #FCF;}
153
154 .prescription .baseinfo { width: 60%;}
155
156   .baseinfo label[for=insurance],
157   .baseinfo #insurance { width: 100%; }
158  
159   .baseinfo label[for=name],
160   .baseinfo #name { width: 65%; margin-right: -.875ex;}
161   .baseinfo #name { height: 4em; }
162  
163   .baseinfo label[for=bday],
164   .baseinfo #bday { width: 35%;}
165   .baseinfo #bday { height: 4em; text-align: center; vertical-align: top;}
166  
167   .baseinfo label[for=date],
168   .baseinfo #date { width: 34%; margin-left: 65%;}
169   .baseinfo #date { text-align: right;}
170
171 .prescription .misc { width: 40%; }
172
173   .misc h1 {
174     font-size: 1.25em;
175     font-weight: bold;
176     width: 100%;
177   }
178   .misc label[for=addcontrib],
179   .misc label[for=contribconfirm] {width: 100%;}
180   .misc #addcontrib,
181   .misc #contribconfirm {width: 100%; text-align: right;}
182
183 .prescription label[for=prescreviewed] {
184   margin-left: 1ex;
185   font-weight: bold;
186   text-decoration: underline;
187   background-color: #FCC;
188 }
189 .prescription label[for=prescreviewed].checked,
190 .prescription :checked + label[for=prescreviewed] {
191   font-weight: normal;
192   text-decoration: none;
193   background-color: transparent;
194 }
195
196 .prescription .catalogue { width: 100%; }
197
198   .catalogue h2:nth-of-type(1) {
199     font-weight: bold;
200     width: 100%;
201     margin-bottom: .25em;
202   }
203   .catalogue label {
204     display: inline-block;
205     width: 33%;
206     margin-right: -.625ex;
207     margin-top: .25em;
208     vertical-align: top;
209   }
210   .catalogue label[for=presccontinual] { margin-right: 33%;}
211
212 .prescription .description { width: 100%; position: relative;}
213   .description * { margin-right: -.625ex; vertical-align: top; }
214   .description label {vertical-align: bottom;}
215
216   .description label[for=quantity] { width: 20%;}
217   .description label[for=remidy] { width: 60%; }
218   .description label[for=quantity_weekly] { width: 20%;}
219   .description #quantity,
220   .description .quantity { width: 20%;  height: 3em; text-align: center;}
221   .description #remidy,
222   .description .remidy { width: 60%; height: 3em;}
223   .description #quantity_weekly,
224   .description .quantity_weekly { width: 20%; height: 3em; text-align: center;}
225
226   .description input[type=checkbox] { display: none; }
227   .description input[type=checkbox] + p { display: none; }
228   .description input:checked + p { display: inline-block; }
229   .description input:checked + p + input { display: block;}
230   .description input:checked + p + input:after {
231      display: block; width: 3ex;
232      background-color: #FFF;
233      border: 1px solid black;
234      margin-top: .25em;
235      text-align: center;
236      content: '+';
237   }
238   .description input:checked + p + input:checked,
239   .description input:checked { display: none; }
240
241   .description .indicator_codes {display: inline-block; width: 20%; padding: 0; padding-top: 1.5ex;}
242   .description label[for=indicator],
243   .description label[for=icd10] { display: block; width: 100%;}
244   .description #icd10,
245   .description #indicator {width: 100%; text-align: right;}
246
247   .description .indicator_reading { display: inline-block; width: 78%; padding: 0; padding-top: 1.5ex;  margin-left: 2%;}
248   .description label[for=indicator_reading],
249   .description #indicator_reading { width: 100%; display: block;}
250   .description #indicator_reading { height: 4em;}
251
252 .prescription .controls { width: 100%; }
253   .controls a.button,
254   .controls button[value=save],
255   .controls button[value=cancel],
256   .controls button[value=delete] { width: 25%;}
257
258 EOF
259
260 # vi:set filetype=css: