]> git.plutz.net Git - serve0/blob - templates/common.css.sh
improved player on small screens
[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;
61   border: none;
62   position: absolute;
63   right: 1em;
64   padding-top: .125em;
65 }
66
67 /* == Panels == */
68
69 .panel {
70   display: block;
71   width: 100%;
72   margin: 0;
73   padding: .25em 1em;
74   background-color: #333;
75   border-width: 1px;
76   border-style: none none solid none;
77 }
78
79 a.panel {
80   font-weight: bold;
81   display: inline;
82   border: none;
83 }
84
85 .panel .help { display: block;}
86
87 /* == Top Panel == */
88 .panel#advfilter {
89   position: absolute;
90   top: 0;
91 }
92
93 /* == Bottom Panels == */
94 .panel#preferences,
95 .panel#tagger,
96 .panel#foot {
97   position: fixed;
98   bottom: 0px;
99   min-height: 2em;
100   border-style: solid none none none;
101 }
102
103
104 /* == Switchable Panels == */
105
106 .panel#advfilter,
107 .panel#tagger,
108 .panel#preferences {
109   z-index: 1;
110   overflow: hidden;
111   min-height: 0; max-height: 0;
112   padding-top: 0; padding-bottom: 0;
113 }
114 .panel#advfilter:target,
115 .panel#tagger:target,
116 .panel#preferences:target {
117   max-height: 100%;
118   overflow-y: scroll;
119 }
120 .panel#advfilter:target{ padding-bottom: 1em; }
121
122
123 /* == Panel Switches == */
124
125 .panel#advfilter a.panel,
126 .panel#preferences a.panel,
127 .panel#tagger a.panel {
128   display: block;
129   border-style: none none solid none;
130   border-width: 1px;
131 }
132 .panel#preferences a.panel,
133 .panel#tagger a.panel {
134   border-style: solid none none none;
135   margin-top: .5em;
136 }
137
138
139 /* == Panel Elements == */
140
141 .panel#advfilter .quicklinks,
142 .panel#advfilter .filter,
143 .panel#tagger .newtag,
144 .panel#tagger input[type=submit],
145 .panel#preferences > * {
146   display: inline-block;
147   vertical-align: top;
148   margin-top: 1em;
149 }
150
151
152 /* == Advanced Filters == */
153
154 /* == Filter Boxes == */
155 #advfilter .filter {
156   border: solid 1px #FFF;
157   border-radius: .25em;
158   padding: .25em .5em;
159 }
160 #advfilter .filter .tabcontainer {
161   position: relative;
162   width: 16em;
163   font-weight:normal;
164 }
165 #advfilter .filter .tabcontainer input + .category.tabhandle {
166   display: block;
167   width: 50%;
168 }
169 #advfilter .filter .tabcontainer input:checked + .category.tabhandle {
170   background: #FFF;
171   color: #000;
172 }
173 #advfilter .filter .tabcontainer .category.tabcontent {
174   position: absolute;
175   top: 0; right: 0;
176   width: 50%;
177   height: 100%;
178   min-height: 4em;
179   border: 2px #FFF solid;
180   border-radius: 0 .25em .25em 0;
181 }
182
183 #advfilter > label.tabhandle {
184   text-align: right;
185   width: 4em;
186   margin-left: 4em;
187 }
188
189 /* == Dynamic Appearance of Boxes == */
190 .panel#advfilter > .tabhandle + label { display: none; }
191 .panel#advfilter > .tabhandle:checked + label + .tabcontent + .tabhandle + label { display: inline-block; }
192 .panel#advfilter > .tabhandle:checked + label + .tabcontent + .tabhandle:checked + label { display: none; }
193 .panel#advfilter > .tabhandle + label + .tabcontent {
194   display: inline-block;
195   overflow: hidden;
196   max-width: 0;
197   max-height: 0;
198   padding: 0;
199   border: none;
200 }
201 .panel#advfilter > .tabhandle:checked + label + .tabcontent {
202   max-width: 100%;
203   max-height: 100%;
204   padding: .25em .5em;
205   border: solid 1px #FFF;
206 }
207
208 #advfilter .filter.final {
209   width: 16em;
210   margin-left: 1em;
211 }
212
213 #advfilter .quicklinks {max-width: 100%;}
214 #advfilter .quicklinks * {
215   display: block;
216   word-wrap: break-word;
217 }
218
219 /* == Thumblist == */
220
221 #thumblist {
222   width: 100%;
223   padding: .5em 0 3em 0;
224   text-align: center;
225 }
226
227 #thumblist .thumb {
228   display: inline-block;
229   text-align: left;
230   width: 90%;
231   padding: 0 .5em;
232   margin: .5%;
233   margin-bottom: .75em;
234   vertical-align: top;
235   word-wrap: break-word;
236 }
237 @media (min-width: 460px){#thumblist .thumb{width: 48%;}}
238 @media (min-width: 620px){#thumblist .thumb{width: 32%;}}
239 @media (min-width: 1004px){#thumblist .thumb{width: 250px; margin: 2px;}}
240
241 #thumblist .thumb img {
242   width: 100%;
243 }
244 #thumblist .thumb h2 {
245   font-size: 1em;
246   font-weight: normal;
247   margin: 0;
248 }
249 #thumblist .thumb a {
250   display: block;
251 }
252 #thumblist .thumb a.alt {
253   display: inline-block;
254   margin-top: .3em;
255 }
256 #thumblist input {
257   margin: .75em .5em;
258 }
259
260 /* == Filelist == */
261
262 #thumblist .file {
263   color: #000;
264   display: inline-block;
265   text-align: left;
266   width: 90%;
267   padding: .5em .5em;
268   margin: .5%;
269   margin-bottom: .75em;
270   vertical-align: top;
271   word-wrap: break-word;
272 }
273 @media (min-width: 460px){#thumblist .file{width: 48%;}}
274 @media (min-width: 620px){#thumblist .file{width: 32%;}}
275 @media (min-width: 1004px){#thumblist .file{width: 250px; margin: 2px;}}
276
277 #thumblist .file.directory { background-color: #BBD; }
278 #thumblist .file.plain { background-color: #111; color: #777; }
279 #thumblist .file.video { background-color: #DBB; }
280
281 .panel#tagger .newtag select,
282 .panel#tagger .newtag .label{
283   display: block;
284   width: 10em;
285 }
286
287 .panel#preferences > fieldset {
288   border: solid 1px;
289   border-radius: .25em;
290 }
291 .panel#preferences > input { display: block; }
292
293 #videoview h1, #videoview > a,
294 #playctl h1, #playctl > a {
295   display: inline-block;
296   margin-right: 1em;
297 }
298 #videoview video {
299   display: block;
300   margin: 0;
301   width: 100%;
302 }
303
304 #playctl form { text-align: center; }
305 #playctl form button {
306   display: inline-block;
307   height: 100%;
308   min-height: 4em;
309   margin: 0 -.75ex .5em 0;
310   background-color: #EEE;
311   border: 1px solid #333;
312   vertical-align: bottom;
313   padding-top: 1em;
314 }
315 #playctl form button[name="seek"],
316 #playctl form button[name="ctl"] { width: 40%;}
317 #playctl form button[name="amp"] { width: 40%; margin-top: 2em;}
318 #playctl form button[name="vol"] { width: 5%; min-height: 1em;}
319 #playctl form button[name="vol"].selected { background-color: #FA6;}
320 #playctl form button[name="vol"][value="100"],
321 #playctl form button[name="vol"][value="0"] { width: 6%;}
322
323 @media (min-width: 460px){
324   #playctl form button {
325     max-width: 4em;
326     min-height: 2em;
327     padding-top: 0em;
328     margin-bottom: 2em;
329   }
330   #playctl form button[name="seek"],
331   #playctl form button[name="ctl"] { width: 16%;}
332   #playctl form button[name="amp"] { width: 15%;}
333   #playctl form button[name="vol"] { width: 3%;}
334   #playctl form button[name="amp"] + br {display: none;}
335 }
336 EOF
337
338 # vi:set filetype=css: