]> git.plutz.net Git - confetti/blob - static/cards.css
unification of card editing functions
[confetti] / static / cards.css
1 /*
2 # Copyright 2014 - 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
20 .filter {
21   display: block;
22   border: solid 1px;
23   border-radius: 4px 4px 0 0;
24   margin: .5em 2em .25em 2em;
25   padding: 0 2ex .5em 2ex;
26   background: #EFF;
27 }
28
29 .filter h1 {
30   display: block;
31   font-weight: bold;
32   font-size: 1.25em;
33   border-style: none none solid none;
34   border-radius: 4px 4px 0 0;
35   border-width: 1px;
36   margin: 0 -1.625ex .5em -1.625ex;
37   padding: .125em 1ex;
38   background: #EEF;
39 }
40 .filter input[type="text"] {
41   width: 100%;
42   margin-bottom: .5em;
43 }
44 .filter fieldset {
45   position: relative;
46   display: block;
47   border: none;
48   padding: 0 0 0 12ex;
49   margin: 0 0 .5em 0;
50 }
51 .filter fieldset legend {
52   position: absolute;
53   font-size: 1em;
54   font-weight: bold;
55   margin-left: -12ex;
56 }
57 .filter label {
58   display: inline-block;
59   vertical-align: top;
60   margin: .125em 2ex 0 0;
61   white-space: nowrap;
62 }
63 .filter button {
64   margin-top: .5em;
65 }
66
67 .filter fieldset.item { padding-left: 0; }
68 .filter fieldset.item legend { display: none; }
69 .filter fieldset.item input[type=text] {
70   background-color: #FFF;
71   border: 1px solid #000;
72   margin-top: -1px;
73   padding: .25em .5em;
74 }
75 .filter fieldset.item input[type=radio] { display: none; }
76 .filter fieldset.item input[type=radio] + label {
77   position: relative; z-index: 1;
78   margin: 0; padding: .25em 1em;
79   
80 }
81 .filter fieldset.item input[type=radio]:checked + label {
82   background-color: #FFF;
83   border: 1px solid #000;
84   border-bottom-color: #FFF;
85 }
86
87 .newcard {
88   display: block;
89   border: solid 1px;
90   border-radius: 0 0 4px 4px;
91   margin: .25em 2em 1em 2em;
92   padding: .25em 2ex .25em 2ex;
93   background: #EFF;
94 }
95
96 .card {
97   display: block;
98   position: relative;
99   border: solid 1px;
100   margin: .25em 2em;
101   padding: 0 20ex 0 0;
102   overflow: auto;
103   background: #FFF;
104   min-height: 8em;
105 }
106 .card .control {
107   display: inline-block;
108   position: absolute;
109   top: 0; right: 0;
110   text-align: right;
111   background: #EEF;
112   margin: 0;
113   height: 100%;
114   width: 20ex;
115   max-width: 33%;
116   padding: .25em 1ex;
117 }
118 .card .control .item {
119   display: inline-block;
120   width: 100%;
121   min-height: 2.5em;
122   color: #008;
123   margin: .25em 0 .5em 0;
124   border: 1px solid black;
125   background: #FFF;
126   padding: .25em .75ex 0 .75ex;
127   text-decoration: none;
128   font-size: .75em;
129 }
130 .card .control .item:hover{ border-color: #888; }
131 .card .control input.item { font-size: normal; }
132 .card .control button.item { text-align: right;}
133 .card .control button.item:hover{ border-color: #888;}
134 .card .control .item[name=newfield] { width: 85%;}
135 .card .control .item[value=addfield] { width: 15%;}
136
137 .card .control #delete + label + button,
138 .card .control #delete { display: none; }
139 .card .control #delete + label { background-color: #FEE; }
140 .card .control #delete:checked + label + button {
141   position: fixed; display: block;
142   left: 40%; top: 30%; width: 20%;
143   font-size: 1.5em;
144   text-align: center;
145   background-color: #FAA;
146   color: #333;
147   border-radius: .25em 0 0 .25em;
148 }
149 .card .control #delete:checked + label:after {
150   position: fixed; display: block;
151   left: 60%; top: 30%; width: 5%;
152   margin: .25em 0; padding: .5em .75ex 0 .75ex;
153   height: 1.5em;
154   font-size: 2em;
155   content: 'X';
156   text-align: center;
157   color: #AAA; background-color: #000;
158   border-radius: 0 .25em .25em 0;
159 }
160
161 .card .section {
162   display: inline-block;
163   vertical-align: top;
164   float: left;
165   width: 20ex;
166   min-width: 16.5%;
167   min-height: 6em;
168   margin: .125em 0 .5ex 0;
169   padding: 0 1ex .25em 1ex;
170 }
171 .card .section:nth-of-type(2n){ background: #EEE;}
172
173 .card .section h2, .card .section h3 {
174   font-size: 1em;
175   display: block;
176   font-weight: bold;
177   margin: .25em -.5ex .25em -.5ex;
178   border-style: none none solid none;
179   border-width: 1px;
180 }
181 .card .section .FN {  /* will override h2 */
182   font-size: 1.2em;
183   margin-top: 0;
184 }
185
186 .card .section .item {
187   display: block;
188   max-width: 100%;
189   word-wrap: break-word;
190 }
191 .card .section .item label {
192   font-weight: bold;
193 }
194
195 .card .section textarea.NOTE {
196   min-height: 6em;
197 }
198 .card .section textarea.ADR {
199   min-height: 4em;
200 }
201
202 .card .section .PHOTO {
203   width: 100%;
204   max-height: 10em;
205 }
206 .card .section .GENDER { display: inline-block; padding-right: .5ex;}
207 .card .section .BDAY { display: inline-block;}
208
209 .card .section select {
210   display: block;
211   background-color: #FFF;
212   border: 1px solid black;
213 }
214
215 .card .section.attendance ul { margin: 0; padding: 0; }
216 .card .section.attendance ul li {
217   display: block;
218   word-wrap: break-word;
219 }
220
221 .card .section.prescriptions ul { margin: 0; padding: 0; }
222 .card .section.prescriptions ul li {
223   display: block;
224   word-wrap: break-word;
225   margin: 0 .25ex;
226 }
227
228 .card .section.prescriptions { width: 40ex;}
229
230 form.card .section input[type=text],
231 form.card .section input:not([type]),
232 form.card .section textarea,
233 form.card .section select {width: 100%;}
234
235 form.card .attendance {
236   min-width: 66%;
237 }
238 form.card .attendance label {
239   position: relative;
240   display: inline-block;
241   width: 25ex;
242   padding-left: 3ex;
243 }
244 form.card .attendance label input[type=checkbox] {
245   position: absolute;
246   margin-left: -3ex;
247 }
248
249 form.card .insurance input[type=radio] {display: none;}
250 form.card .insurance input[type=radio] + label {
251   display: inline-block;
252   width: 50%;
253   padding: .25ex 0;
254   text-align: center;
255   border: 1px solid black;
256   
257 }
258 form.card .insurance input[type=radio]:checked + label {
259   font-weight: bold;
260   background-color: #FFF;
261   border-width: 1px 1px 0 1px;
262 }
263 form.card .insurance input[type=radio] + label + input + label + select,
264 form.card .insurance input[type=radio] + label + select + input {display: none;}
265 form.card .insurance input[type=radio]:checked + label + input + label + select,
266 form.card .insurance input[type=radio]:checked + label + select + input {
267   display: block;
268   border: 1px solid black;
269   background-color: #FFF;
270   border-width: 0 1px 1px 1px;
271   padding: .25ex 0;
272   margin-top: -1px;
273 }