]> git.plutz.net Git - serve0/blob - templates/common.css.sh
136f64cf7d6c82c349f968e9a3fb4657729ea0ce
[serve0] / templates / common.css.sh
1 # Copyright 2014 - 2016 Paul Hänsch
2 #
3 # This file is part of Serve0
4
5 # Serve0 is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU Affero General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
9
10 # Serve0 is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU Affero General Public License for more details.
14
15 # You should have received a copy of the GNU Affero General Public License
16 # along with Serve0  If not, see <http://www.gnu.org/licenses/>. 
17
18 cat <<EOF
19
20 * {
21   -moz-box-sizing: border-box;
22   box-sizing: border-box;
23   -moz-transition: all .3s linear;
24   transition: all .3s linear;
25 }
26
27 body {
28   padding: 0;
29   margin: 0;
30   background-color: #000;
31   color: #DDD;
32 }
33 a { color: #EEE; }
34 legend, label, .label { font-weight: bold; }
35
36 input.tabhandle { display: none; }
37 .tabcontent { display: none; }
38 input.tabhandle:checked + label.tabhandle + .tabcontent { display: inline-block; }
39 input.tabhandle:checked + .tabcontent { display: inline-block; }
40
41 textarea {
42   display: block;
43   width: 100%;
44 }
45
46 .info {
47   margin: 0;
48   padding: 0 .25em;
49   background-color: #BBD;
50   color: #000;
51   border: #000 1px solid;
52 }
53 .info.tag {
54   line-height: 1.6em;
55   background-color: #DBB;
56   margin-right: -.75ex;
57 }
58
59 .pagination_nav {
60   display: inline-block;
61   border: none;
62   position: absolute;
63   right: 1em;
64   bottom: .25em;
65   width: 3.5em;
66   padding-top: .125em;
67 }
68
69 /* == Panels == */
70
71 .panel {
72   position: relative;
73   display: block;
74   width: 100%;
75   margin: 0;
76   padding: .25em 1em;
77   padding-right: 4em;
78   background-color: #333;
79   border-width: 1px;
80   border-style: none none solid none;
81 }
82
83 @media(min-width: 620px){
84   .panel {padding-right: 8em;}
85   .pagination_nav { width: auto;}
86 }
87
88 a.panel {
89   font-weight: bold;
90   display: inline-block;
91   border: none;
92   width: auto;
93   padding-right: 1em;
94 }
95
96 .panel .help { display: block;}
97
98 /* == Top Panel == */
99 .panel#advfilter {
100   position: absolute;
101   top: 0;
102 }
103
104 /* == Bottom Panels == */
105 .panel#preferences,
106 .panel#tagger,
107 .panel#foot {
108   position: fixed;
109   bottom: 0px;
110   min-height: 2em;
111   border-style: solid none none none;
112 }
113
114
115 /* == Switchable Panels == */
116
117 .panel#advfilter,
118 .panel#tagger,
119 .panel#preferences {
120   z-index: 1;
121   overflow: hidden;
122   min-height: 0; max-height: 0;
123   padding-top: 0; padding-bottom: 0;
124 }
125 .panel#advfilter:target,
126 .panel#tagger:target,
127 .panel#preferences:target {
128   max-height: 100%;
129   overflow-y: scroll;
130 }
131 .panel#advfilter:target{ padding-bottom: 1em; }
132
133
134 /* == Panel Switches == */
135
136 .panel#advfilter a.panel,
137 .panel#preferences a.panel,
138 .panel#tagger a.panel {
139   display: block;
140   border-style: none none solid none;
141   border-width: 1px;
142 }
143 .panel#preferences a.panel,
144 .panel#tagger a.panel {
145   border-style: solid none none none;
146   margin-top: .5em;
147 }
148
149
150 /* == Panel Elements == */
151
152 .panel#advfilter .quicklinks,
153 .panel#advfilter .filter,
154 .panel#tagger .newtag,
155 .panel#tagger input[type=submit],
156 .panel#preferences > * {
157   display: inline-block;
158   vertical-align: top;
159   margin-top: 1em;
160 }
161
162
163 /* == Advanced Filters == */
164
165 /* == Filter Boxes == */
166 #advfilter .filter {
167   border: solid 1px #FFF;
168   border-radius: .25em;
169   padding: .25em .5em;
170 }
171 #advfilter .filter .tabcontainer {
172   position: relative;
173   width: 16em;
174   font-weight:normal;
175 }
176 #advfilter .filter .tabcontainer input + .category.tabhandle {
177   display: block;
178   width: 50%;
179 }
180 #advfilter .filter .tabcontainer input:checked + .category.tabhandle {
181   background: #FFF;
182   color: #000;
183 }
184 #advfilter .filter .tabcontainer .category.tabcontent {
185   position: absolute;
186   top: 0; right: 0;
187   width: 50%;
188   height: 100%;
189   min-height: 4em;
190   border: 2px #FFF solid;
191   border-radius: 0 .25em .25em 0;
192 }
193
194 #advfilter > label.tabhandle {
195   text-align: right;
196   width: 4em;
197   margin-left: 4em;
198 }
199
200 /* == Dynamic Appearance of Boxes == */
201 .panel#advfilter > .tabhandle + label { display: none; }
202 .panel#advfilter > .tabhandle:checked + label + .tabcontent + .tabhandle + label { display: inline-block; }
203 .panel#advfilter > .tabhandle:checked + label + .tabcontent + .tabhandle:checked + label { display: none; }
204 .panel#advfilter > .tabhandle + label + .tabcontent {
205   display: inline-block;
206   overflow: hidden;
207   max-width: 0;
208   max-height: 0;
209   padding: 0;
210   border: none;
211 }
212 .panel#advfilter > .tabhandle:checked + label + .tabcontent {
213   max-width: 100%;
214   max-height: 100%;
215   padding: .25em .5em;
216   border: solid 1px #FFF;
217 }
218
219 #advfilter .filter.final {
220   width: 16em;
221   margin-left: 1em;
222 }
223
224 #advfilter .quicklinks {max-width: 100%;}
225 #advfilter .quicklinks * {
226   display: block;
227   word-wrap: break-word;
228 }
229
230 /* == Thumblist == */
231
232 #thumblist {
233   width: 100%;
234   padding: .5em 0 3em 0;
235   text-align: center;
236 }
237
238 #thumblist .thumb {
239   display: inline-block;
240   text-align: left;
241   width: 90%;
242   padding: 0 .5em;
243   margin: .5%;
244   margin-bottom: .75em;
245   vertical-align: top;
246   word-wrap: break-word;
247 }
248 @media (min-width: 460px){#thumblist .thumb{width: 48%;}}
249 @media (min-width: 620px){#thumblist .thumb{width: 32%;}}
250 @media (min-width: 1004px){#thumblist .thumb{width: 250px; margin: 2px;}}
251
252 #thumblist .thumb img {
253   width: 100%;
254 }
255 #thumblist .thumb h2 {
256   font-size: 1em;
257   font-weight: normal;
258   margin: 0;
259 }
260 #thumblist .thumb a {
261   display: block;
262 }
263 #thumblist .thumb a.alt {
264   display: inline-block;
265   margin-top: .3em;
266 }
267 #thumblist input {
268   margin: .75em .5em;
269 }
270
271 /* == Filelist == */
272
273 #thumblist .file {
274   color: #000;
275   display: inline-block;
276   text-align: left;
277   width: 90%;
278   padding: .5em .5em;
279   margin: .5%;
280   margin-bottom: .75em;
281   vertical-align: top;
282   word-wrap: break-word;
283 }
284 @media (min-width: 460px){#thumblist .file{width: 48%;}}
285 @media (min-width: 620px){#thumblist .file{width: 32%;}}
286 @media (min-width: 1004px){#thumblist .file{width: 250px; margin: 2px;}}
287
288 #thumblist .file.directory { background-color: #BBD; }
289 #thumblist .file.plain { background-color: #111; color: #777; }
290 #thumblist .file.video { background-color: #DBB; }
291
292 .panel#tagger .newtag select,
293 .panel#tagger .newtag .label{
294   display: block;
295   width: 10em;
296 }
297
298 .panel#preferences > fieldset {
299   border: solid 1px;
300   border-radius: .25em;
301 }
302 .panel#preferences > input { display: block; }
303
304 #videoview h1, 
305 #playctl h1 { font-size: 1.25em;}
306 #videoview h1, #videoview > a,
307 #playctl h1, #playctl > a {
308   display: inline-block;
309   margin-right: 1em;
310   padding: 0; margin: .5em 0;
311 }
312 #videoview video {
313   display: block;
314   margin: 0;
315   width: 100%;
316 }
317
318 #playctl form { text-align: center; }
319 #playctl form button {
320   display: inline-block;
321   height: 100%;
322   min-height: 4em;
323   margin: 0 -.75ex .5em 0;
324   background-color: #EEE;
325   border: 1px solid #333;
326   vertical-align: bottom;
327   padding-top: 1em;
328 }
329 #playctl form button[name="seek"],
330 #playctl form button[name="ctl"] { width: 40%;}
331 #playctl form button[name="amp"] { width: 40%; margin-top: 2em;}
332 #playctl form button[name="vol"] { width: 5%; min-height: 1em;}
333 #playctl form button[name="vol"].selected { background-color: #FA6;}
334 #playctl form button[name="vol"][value="100"],
335 #playctl form button[name="vol"][value="0"] { width: 6%;}
336
337 @media (min-width: 460px){
338   #playctl form button {
339     max-width: 4em;
340     min-height: 2em;
341     padding-top: 0em;
342     margin-bottom: 2em;
343   }
344   #playctl form button[name="seek"],
345   #playctl form button[name="ctl"] { width: 16%;}
346   #playctl form button[name="amp"] { width: 15%;}
347   #playctl form button[name="vol"] { width: 3%;}
348   #playctl form button[name="amp"] + br {display: none;}
349 }
350 EOF
351
352 # vi:set filetype=css: