summaryrefslogtreecommitdiff
path: root/styles/opticks.css
blob: 4d55d7569a1ecc2e0c16426eb8337e3aa418a862 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
/* This file is loaded indirectly[1] by DokuWiki (as specified in styles.ini)
   and is parsed as LESS. This means it's possible to use LESS directives and
   that all comments are removed and the file minified.

   NOTE: LESS will fail completely if the syntax isn't right and you'll end up
         with an unstyled page. Check DokuWiki docs for where to find the
         errors.

   [1] Automagically included with tpl_metaheaders();
*/

/* Make sure the page is at least as big as the screen so the background
   works as expected and doesn't wrap too soon */
html {
	height: 100%;
}

/* The page */
body {
	width: 80%;
	max-width: 65em;
	margin-left: auto;
	margin-right: auto;
	margin-top: 2em;

	border: 0.1em solid rgb(50, 50, 50);
	box-shadow: 0 0 1em black;

	/* This, along with the html block, sets the background of
	   the entire window, not just the contents. Use #page to style
	   the contents. */
	background-color: #272727;
	background-image: url("/lib/tpl/opticks/images/opticks.jpg");
	background-size: cover;
	background-position: center;
}

/* Compact layout for small screens */
@media (max-width: 45em) {
	body {
		margin: 0;
		width: 100%;
		background: none;
	}
}

/* Hide the search bar on mobile */
@media (max-width: 30em) {
	#header-search {
		display: none;
	}
}

/*
  GENERAL STYLES
  paragraphs, lists, tables, etc.
*/

/* Reset stupid margins and paddings, set the font */
* {
	margin: 0;
	padding: 0;
	font-family: 'Vollkorn', serif;
}

/* The area between the header and the footer */
#content {
	padding-bottom: 0.6em;
	overflow: auto;
	padding: 2em;
	min-height: 10em;

	background-color: white;
}

/* Considerably less shit typography in regular text */
p, ul, ol {
	-webkit-hyphens: auto;
	-ms-hyphens: auto;
	hyphens: auto;
	text-align: justify;
	text-justify: auto;
}

/* Spacing between paragraphs */
p {
	margin-bottom: 1em;
}

/* Headers */
h1, h2, h3, h4, h5, h6 {
	margin-top: 0.5em;
	margin-bottom: 0.5em;

	border-bottom: 0.05em solid rgb(128, 128, 128);
	font-variant: small-caps;
}

/* #content already has a large padding */
h1 {
	margin-top: 0;
}

/* Lists */
ul, ol {
	margin: 1em;
	margin-left: 1.5em;

	list-style-position: outside;
}

/* Links */
a:link {
	color: #812222;
	text-decoration: underline;
}

a:visited {
	color: #541414;
	text-decoration: underline;
}

a:hover {
	color: #a83939;
	text-decoration: underline;
}

a:active {
	color: #c64949;
	text-decoration: underline;
}

/* Inline code and code blocks */
pre, code, pre.code {
	font-family: monospace;
	white-space: pre;
}

/* Uniform links (reset all the stupid variants to a single color) */
/* FIXME: don't export this to the final CSS, it's only used in preprocessing */
.uniform-links(@color) {
	color: @color;
	text-decoration: none;

	&:link {
		color: @color;
		text-decoration: none;
	}

	&:visited {
		color: @color;
		text-decoration: none;
	}

	&:hover {
		color: @color;
		text-decoration: none;
	}

	&:active {
		color: @color;
		text-decoration: none;
	}
}

/* Tables */
table {
	border-collapse: collapse;
}

td, th {
	padding: 0.2em;

	border: 0.1em solid #b2b2b2;
}

th {
	background-color: #f0f0f0;
	font-weight: bold;
}

dl {
	margin: 1em;
}

dt {
	font-weight: bold;
}

dd {
	margin-left: 1em;
}

/* Text fields */
input[type="text"], input[type="password"], input[type="email"] {
	padding: 0.15em;
	padding-left: 0.25em;
	padding-right: 0.25em;
	width: 12em; /* default width */

	border: 0.1em solid rgb(220, 220, 220);
	border-radius: 0.15em;
	background: rgb(237,237,237); /* Old browsers */
	background: -moz-linear-gradient(top, rgba(237,237,237,1) 0%, rgba(255,255,255,1) 100%); /* FF3.6-15 */
	background: -webkit-linear-gradient(top, rgba(237,237,237,1) 0%,rgba(255,255,255,1) 100%); /* Chrome10-25,Safari5.1-6 */
	background: linear-gradient(to bottom, rgba(237,237,237,1) 0%,rgba(255,255,255,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ededed', endColorstr='#ffffff',GradientType=0 ); /* IE6-9 */
	box-shadow: 0 0 0.2em black;
}

input::placeholder {
	font-variant: small-caps;
	color: rgb(128, 128, 128);
}

input[type="text"]:hover, input[type="text"]:active,
input[type="password"]:hover, input[type="password"]:active {
	background: white;
}

/* Buttons */
.opticks-button {
	padding: 0.1em;
	padding-left: 0.7em;
	padding-right: 0.7em;
	color: white;
	font-variant: small-caps;
	text-align: center;
	text-shadow: 0 0 0.1em black;
	border: 0.1em solid rgb(95, 95, 95);
	border-radius: 0.15em;
	background: rgb(71,71,71); /* Old browsers */
	background: -moz-linear-gradient(top, rgba(71,71,71,1) 0%, rgba(14,14,14,1) 100%); /* FF3.6-15 */
	background: -webkit-linear-gradient(top, rgba(71,71,71,1) 0%,rgba(14,14,14,1) 100%); /* Chrome10-25,Safari5.1-6 */
	background: linear-gradient(to bottom, rgba(71,71,71,1) 0%,rgba(14,14,14,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#474747', endColorstr='#0e0e0e',GradientType=0 ); /* IE6-9 */
	box-shadow: 0 0 0.2em black;

	&:hover {
		background: rgb(114,114,114); /* Old browsers */
		background: -moz-linear-gradient(top, rgba(114,114,114,1) 1%, rgba(79,79,79,1) 100%); /* FF3.6-15 */
		background: -webkit-linear-gradient(top, rgba(114,114,114,1) 1%,rgba(79,79,79,1) 100%); /* Chrome10-25,Safari5.1-6 */
		background: linear-gradient(to bottom, rgba(114,114,114,1) 1%,rgba(79,79,79,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
		filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#727272', endColorstr='#4f4f4f',GradientType=0 ); /* IE6-9 */
	}

	&:active {
		background: rgb(79,79,79); /* Old browsers */
		background: -moz-linear-gradient(top, rgba(79,79,79,1) 0%, rgba(114,114,114,1) 100%); /* FF3.6-15 */
		background: -webkit-linear-gradient(top, rgba(79,79,79,1) 0%,rgba(114,114,114,1) 100%); /* Chrome10-25,Safari5.1-6 */
		background: linear-gradient(to bottom, rgba(79,79,79,1) 0%,rgba(114,114,114,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
		filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4f4f4f', endColorstr='#727272',GradientType=0 ); /* IE6-9 */
	}
}

button {
	.opticks-button();
}

/* Used for metadata in image details and some other shit */
fieldset {
	padding: 1em;
}

/*
  THE HEADER
*/

/* The header box */
#header {
	background-image: url('/lib/tpl/opticks/images/header.jpg');
	background-size: 100% auto;
	background-repeat: repeat-y;
	background-position: left;
	background-color: #1b1b1a;
}

/* The box containing the logo image */
#header-logo {
	float: left;
	display: inline-block;

	height: 2em;
}

/* Fix the image's height to the box's */
#header-logo > a > img {
	height: 2em;
}

/* Search box */
#dw__search {
	float: right;
}

/* Search text field */
#dw__search > div > input {
	margin-top: 0.25em;
	font-size: initial;
	width: 9em;
	height: 1.5em;

	color: initial; /* Reset the dark font. */
}

/* Search button */
#dw__search > div > button {
	font-size: initial;
	height: 1.5em;
	padding-top: 0;
	padding-bottom: 0;
	margin-left: 0.2em;
}

/* Dropdown menu */
#header-dropdown {
	float: right;
	position: relative;
	width: 2em;
	height: 2em;
	margin-left: 1em;

	/* The icon goes here so it can be changed with CSS for :hover */
	background-image: url("/lib/tpl/opticks/images/menu.png");
	background-size: cover;

	&:hover {
		background-image: url("/lib/tpl/opticks/images/menu-hover.png");

		& > #header-dropdown-content {
			display: block;
		}
	}
}

/* Dropdown menu's contents, with a dark theme */
#header-dropdown-content {
	display: none;
	position: absolute;
	top: 1em;
	right: 0;
	padding: 0.3em;

	color: white;
	font-variant: small-caps;
	border: 0.1em solid #b2b2b2;
	box-shadow: 0 0 1em rgba(0, 0, 0, 0.1);
	background: rgb(0,0,0); /* Old browsers */
	background: -moz-linear-gradient(-45deg, rgba(0,0,0,1) 0%, rgba(84,84,84,1) 57%, rgba(0,0,0,1) 58%); /* FF3.6-15 */
	background: -webkit-linear-gradient(-45deg, rgba(0,0,0,1) 0%,rgba(84,84,84,1) 57%,rgba(0,0,0,1) 58%); /* Chrome10-25,Safari5.1-6 */
	background: linear-gradient(135deg, rgba(0,0,0,1) 0%,rgba(84,84,84,1) 57%,rgba(0,0,0,1) 58%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#000000', endColorstr='#000000',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
}

/* Show the contents when the button is hovered. */
#header-dropdown:hover > #header-dropdown-content {
	display: block;
}

/* The name and username in "Logged in as..." */
#header-dropdown-content > bdi {
	font-weight: bold;
}

/* Links in the dropdown menu */
li.action {
	margin: 0.5em;
	list-style: none; /* Fuck the bullet point */

	/* The actual link */
	& > a {
		display: block;
		.opticks-button();
		.uniform-links(#ffffff);
	}
}

/* Hide the stupid icons (FIXME: don't put them there in the first place) */
.action > a > svg {
	display: none;
}

/* Force the dropdown to be big enough to fit the search button to the right
   (rather than below) the text field */
#header-dropdown-search {
	white-space: nowrap;
}

/*
  THE FOOTER
*/
#footer {
	padding-top: 0.4em;
	padding-bottom: 0.6em;
	text-align: center;

	background-color: white;
	border-top: 0.1em solid rgb(128, 128, 128);
}

/* Links in the footer (back to top, recent changes, etc.) */
#footer-buttons > span {
	padding: 0.2em;

	font-variant: small-caps;
	font-size: 80%;
}

/* Text below the links */
#footer-text {
	margin-top: 0.5em;

	color: rgb(60, 60, 60);
	font-size: 70%;
}

/* Wrap the license in a div and make it smaller so it looks better*/
#footer-text > div {
	margin: auto;
	width: 66%;
}

/* The license's name */
.license > bdi {
	font-weight: bold;
}

/*
  DOKUWIKI ELEMENTS in pages
*/

/* Some list items are wrapped in this shit */
div.li {
	display: inline-block;
}

/* Icons in lists, make sure they're actually fucking aligned with the text */
.icon {
	vertical-align: middle;
}

/* Table of contents */
#dw__toc {
	display: inline-block; /* Fit the width to contents */
	margin: 0.5em;
	padding: 0.5em;

	border: 0.1em solid rgb(150, 150, 150);
	border-radius: 0.3em;
	background: rgb(255,255,255); /* Old browsers */
	background: -moz-linear-gradient(-45deg, rgba(255,255,255,1) 0%, rgba(239,239,239,1) 100%); /* FF3.6-15 */
	background: -webkit-linear-gradient(-45deg, rgba(255,255,255,1) 0%,rgba(239,239,239,1) 100%); /* Chrome10-25,Safari5.1-6 */
	background: linear-gradient(135deg, rgba(255,255,255,1) 0%,rgba(239,239,239,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#efefef',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
	box-shadow: 0 0 0.2em rgb(0, 0, 0, 0.2);

	& > h3 {
		margin: 0;
		margin-bottom: 0.5em;
		text-align: center;

		/* The stupid dash before "Table of contents" */
		& > strong {
			display: none;
		}
	}
}

/* Lists inside tables of contents */
ul.toc {
	margin-top: 0;
	margin-bottom: 0;

	font-variant: small-caps;
}

/* The box around "Create this page," "edit this page," or "show page," defined
   in this template */
#content-edit {
	float: right;
	margin: 0.5em;
	margin-right: 0;
	padding: 0.2em;

	/* Make the link inside look like a button */
	& > .action {
		.opticks-button();
		.uniform-links(#ffffff);
	}
}

/* Section edit buttons (or rather their containers) */
div.secedit {
	display: inline-block;
	float: right;
}

/* Containers for floating images in articles */
.thumb2 {
	margin: 1em;
}

/* Alerts */
.alert {
	display: block;
	clear: both;
	margin: 0.5em;
	padding: 0.5em;

	border: 0.1em solid rgb(200, 200, 200);
	border-radius: 0.2em;
}

.alert-warning {
	background-color: rgb(255, 240, 210);
}

/*
  THE IMAGE DETAILS PAGE
*/

/* The image itself */
.img_detail {
	width: 100%;
	height: auto;
}

/*
  MISC. DOKUWIKI ELEMENTS
*/

/* Override Doku's ugly ass random backgrounds in the admin panel */
fieldset, div.input, div.selection, div.other {
	background: white !important;
}

/* Quick fix for unreadable buttons in the page editor */
.toolbutton {
	background: white;
}

/*
 FRONT PAGE LINK GALLERIES
*/

div.link-gallery {
	text-align: center;
}

div.link-gallery > div {
	display: inline-block;  
	margin-left: 1em;
	margin-right: 1em;
}

div.link-gallery > div > span {
	display: block;

	font-size: 130%;
	font-variant: small-caps;
}