]> git.plutz.net Git - confetti/blob - templates/prescriptions.css.sh
improved styling for prescription sheets
[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%/*}/attendees.css.sh
20
21 cat <<EOF
22 /**/
23
24 .prescription {
25   display: inline-block;
26   width: 96%; max-width: 460px;
27   color: #800;
28   background-color: #CFF;
29   margin: 1em -1% 0 2%; padding: 0;
30   border: 1px solid #888;
31   overflow: hidden;
32 }
33
34 .newprescription {
35   display: block;
36   margin: 0 2em; padding: .5ex 2ex;
37   background-color: #CFF;
38   border: 1px solid #888;
39   border-radius: 0 0 1ex 1ex;
40 }
41
42 .prescription * {
43   display: inline-block;
44   font-size: 1em;
45   line-height: 1em;
46   margin: 0; padding: 0;
47 }
48 .prescription label {
49   padding-left: .5ex;
50   font-size: .75em;
51 }
52
53 .prescription fieldset {
54   display: inline-block;
55   margin: 0; padding: 1ex;
56   margin-right: -.625ex;
57   border: none;
58   vertical-align: top;
59 }
60 .prescription fieldset br { display: none;}
61
62 .prescription span,
63 .prescription input,
64 .prescription textarea {
65   height: 1.5em;
66   border: 1px solid #800;
67   padding: .25ex;
68   background-color: #FFF;
69 }
70 .prescription span {
71   background-color: #EEE;
72   padding: .5ex .25ex;
73   white-space: pre-wrap;
74 }
75
76 .prescription input[type=checkbox],
77 .prescription input[type=radio] { display: none;}
78
79 .prescription label.checkbox,
80 .prescription label.radio,
81 .prescription input[type=checkbox] + label,
82 .prescription input[type=radio] + label { padding-left: 1.25em; font-size: 1em;}
83
84 .prescription label.checkbox:before,
85 .prescription label.radio:before,
86 .prescription input[type=checkbox] + label:before,
87 .prescription input[type=radio] + label:before {
88   display: inline-block;
89   position: absolute;
90   margin-left: -1.25em;
91   width: .75em; height: .75em;
92   background-color: #FFF;
93   border: 1px solid #800;
94   content: ' ';
95 }
96 .prescription label.radio:before,
97 .prescription input[type=radio] + label:before { border-radius: .5em;}
98 .prescription label.checkbox.checked:before,
99 .prescription label.radio.checked:before,
100 .prescription input[type=checkbox]:checked + label:before,
101 .prescription input[type=radio]:checked + label:before { content: "\2713";}
102
103 .prescription a.button,
104 .prescription input[type=submit],
105 .prescription button {
106   height: 1.5em;
107   color: #FFF;
108   background-color: #800;
109   text-align: center;
110   text-decoration: none;
111   margin: 0; padding: .125em 0 0 0;
112   border: none;
113 }
114 .prescription a.button {padding: .5ex;}
115
116 /* ======== Specific ========== */
117
118 .prescription .baseinfo { width: 60%;}
119
120   .baseinfo label[for=insurance],
121   .baseinfo #insurance { width: 100%; }
122  
123   .baseinfo label[for=name],
124   .baseinfo #name { width: 65%; margin-right: -.875ex;}
125   .baseinfo #name { height: 4em; }
126  
127   .baseinfo label[for=bday],
128   .baseinfo #bday { width: 35%;}
129   .baseinfo #bday { height: 4em; text-align: center; vertical-align: top;}
130  
131   .baseinfo label[for=date],
132   .baseinfo #date { width: 34%; margin-left: 65%;}
133   .baseinfo #date { text-align: right;}
134
135 .prescription .misc { width: 40%; }
136
137   .misc h1 {
138     font-size: 1.25em;
139     font-weight: bold;
140     width: 100%;
141   }
142   .misc label[for=addcontrib],
143   .misc #addcontrib {width: 100%;}
144   .misc #addcontrib {text-align: right;}
145
146 .prescription .catalogue { width: 60%; }
147
148   .catalogue h2:nth-of-type(1) {
149     font-weight: bold;
150     width: 100%;
151     margin-bottom: .25em;
152   }
153   .catalogue label {
154     display: inline-block;
155     width: 50%;
156     margin-right: -.625ex;
157     margin-top: .25em;
158     vertical-align: top;
159   }
160
161 .prescription .description { width: 100%; }
162   .description * { margin-right: -.625ex; vertical-align: top;}
163   .description label {vertical-align: bottom;}
164   .description label[for=quantity1],
165   .description label[for=remidy1],
166   .description label[for=quantity_weekly1] {display: none;}
167
168   .description label[for=quantity] { width: 20%;}
169   .description #quantity,
170   .description #quantity1 { width: 20%;  height: 3em; text-align: center;}
171   .description label[for=remidy] { width: 60%; }
172   .description #remidy,
173   .description #remidy1 { width: 60%; height: 3em;}
174   .description label[for=quantity_weekly] { width: 20%;}
175   .description #quantity_weekly,
176   .description #quantity_weekly1 { width: 20%; height: 3em; text-align: center;}
177
178   .description label[for=indicator],
179   .description label[for=icd10] { display: block; width: 20%;}
180   .description #icd10,
181   .description #indicator {width: 20%; text-align: right;}
182
183 .prescription label[for=prescreviewed] { margin-left: 1ex; }
184
185 .prescription .controls { width: 100%; }
186   .controls a.button,
187   .controls button[value=save],
188   .controls button[value=cancel],
189   .controls button[value=delete] { width: 25%;}
190
191 EOF
192
193 # vi:set filetype=css: