]> git.plutz.net Git - serve0/blob - templates/common.css.sh
display improvements for text browsers and mobile browsers
[serve0] / templates / common.css.sh
1 # Copyright 2014, 2015 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   box-sizing: border-box;
22   -moz-box-sizing: border-box;
23 }
24
25 body {
26   padding: 0;
27   margin: 0;
28   background-color: #000;
29   color: #DDD;
30 }
31 a { color: #EEE; }
32 label, .label { font-weight: bold; }
33
34 input.tabhandle { display: none; }
35 .tabcontent { display: none; }
36 input.tabhandle:checked + label.tabhandle + .tabcontent { display: inline-block; }
37 input.tabhandle:checked + .tabcontent { display: inline-block; }
38
39 textarea {
40   display: block;
41   width: 100%;
42 }
43
44 .info {
45   margin: 0;
46   padding: 0 .25em;
47   background-color: #BBD;
48   color: #000;
49   border: #000 1px solid;
50 }
51 .info.tag {
52   line-height: 1.6em;
53   background-color: #DBB;
54 }
55
56 .panel {
57   display: block;
58   width: 100%;
59   margin: 0;
60   padding: .25em 1em;
61   background-color: #333;
62   border-width: 1px;
63   border-style: none none solid none;
64 }
65 .panel.footer {
66   position: fixed;
67   min-height: 2em;
68   bottom: 0px;
69   border-style: solid none none none;
70 }
71
72 .panel .help { display: block;}
73 a.panel { font-weight: bold; }
74 a.clearsearch, a.show, .pagination_nav {
75   display: inline;
76   border: none;
77 }
78 .pagination_nav {
79   position: absolute;
80   right: 1em;
81   padding-top: .125em;
82 }
83
84 .footer a.panel {
85   border-style: solid none none none;
86   border-width: 1px;
87   margin-top: .5em;
88 }
89
90 #advfilter { display: none; }
91 #advfilter:target {
92   display: block;
93   position: absolute;
94   top: 0;
95 }
96
97 #advfilter .quicklinks,
98 #advfilter .filter,
99 #tagger .newtag,
100 #tagger input[type=submit] {
101   display: inline-block;
102   vertical-align: top;
103   margin-top: 1em;
104 }
105
106 #advfilter .filter {
107   border: solid 1px #FFF;
108   border-radius: .25em;
109   padding: .25em .5em;
110 }
111 #advfilter > label.tabhandle {
112   text-align: right;
113   width: 4em;
114   margin-left: 4em;
115 }
116 #advfilter > .tabhandle + label { display: none; }
117 #advfilter > .tabhandle + label + .tabcontent { display: none; }
118 #advfilter > .tabhandle:checked + label + .tabcontent { display: inline-block; }
119 #advfilter > .tabhandle:checked + label + .tabcontent + .tabhandle + label{ display: inline-block; }
120 #advfilter > .tabhandle:checked + label + .tabcontent + .tabhandle:checked + label{ display: none; }
121
122 #advfilter .filter .tabcontainer {
123   position: relative;
124   width: 16em;
125 }
126 #advfilter .filter .category.tabhandle { display: block; }
127 #advfilter .filter input:checked + .category.tabhandle {
128   background: #FFF;
129   color: #000;
130 }
131 #advfilter .filter .category.tabcontent {
132   position: absolute;
133   top: 0; right: 0;
134   width: 10em;
135   height: 100%;
136   min-height: 4em;
137 }
138
139 #advfilter .filter.final {
140   width: 16em;
141   margin-left: 1em;
142 }
143
144 #advfilter .quicklinks {max-width: 100%;}
145 #advfilter .quicklinks * {
146   display: block;
147   word-wrap: break-word;
148 }
149
150 #thumblist {
151   width: 100%;
152   padding: .5em 0 3em 0;
153   text-align: center;
154 }
155
156 #thumblist .thumb {
157   display: inline-block;
158   text-align: left;
159   width: 90%;
160   padding: 0 .5em;
161   margin: auto;
162   margin-bottom: .75em;
163   vertical-align: top;
164   word-wrap: break-word;
165 }
166 @media (min-width: 480px){#thumblist .thumb{width: 50%;}}
167 @media (min-width: 640px){#thumblist .thumb{width: 33%;}}
168 @media (min-width: 1024px){#thumblist .thumb{width: 256px;}}
169
170 #thumblist .thumb img {
171   width: 100%;
172 }
173 #thumblist .thumb h2 {
174   font-size: 1em;
175   font-weight: normal;
176   margin: 0;
177 }
178 #thumblist .thumb a {
179   display: block;
180 }
181 #thumblist .thumb a.alt {
182   display: inline-block;
183   margin-top: .3em;
184 }
185 #thumblist input {
186   margin: .75em .5em;
187 }
188
189 #preferences { display: none; }
190 #preferences:target { display: block; z-index: 1; }
191
192 #tagger { display: none; }
193 #tagger:target {
194   display: block;
195   z-index: 1;
196 }
197
198 #tagger .newtag select,
199 #tagger .newtag .label{
200   display: block;
201   width: 10em;
202 }
203
204 #videoview a.panel {
205   position: absolute;
206   right: 1em;
207   width: auto;
208   border: none;
209 }
210 #videoview .video {
211   display: inline-block;
212   width: 60%;
213   vertical-align: top;
214 }
215 #videoview .video * {
216   display: block;
217 }
218 #videoview .videoinfo {
219   width: 39%;
220   margin-top: 2em;
221 }
222 #videoview .videoinfo h2 {
223   display: inline;
224
225 #videoview .videoinfo .meta:after {
226   content: "\A";
227   white-space: pre;
228 }
229 #videoview .videoinfo .label {
230   display: block;
231   margin-top: 1em;
232 }
233 #videoview .videoinfo .info.description {
234   display: block;
235   background-color: #DDF;
236 }
237 #videoview .videoinfo .edit {
238   width: 100%
239 }
240 EOF
241
242 # vi:set filetype=css: