-
Notifications
You must be signed in to change notification settings - Fork 4
/
ivoa.css
598 lines (461 loc) · 11.6 KB
/
ivoa.css
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
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
/* =============================================================================
GENERAL STYLES
*/
@font-face {
font-family: 'Inter';
src: URL('../webfonts/Inter/Inter-VariableFont_slnt\,wght.ttf') format('truetype');
}
/* Size of all elements always includes the border. */
* { box-sizing: border-box }
/* Reset the margin and padding of the document body. */
html,
body {
margin : 0;
padding: 0;
font-family: "Inter", sans-serif;
}
h1, h2, h3, hr {
color: #012647;
clear: both;
}
body > main > article > header > h1 {
text-align: center;
font-size: 2em;
}
p { text-align: justify }
a {
color: #004d91;
text-decoration: none;
}
a:hover { text-decoration: underline }
img { max-width: 100% }
article {
max-width: 80em;
margin: 2em auto;
}
/* =============================================================================
TABLE
*/
table {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
}
table td,
table th {
border: 1px solid #ddd;
padding: 8px;
}
table tr:nth-child(even){background-color: #f2f2f2;}
table tr:hover {background-color: #ddd;}
table th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
background-color: #004d91;
color: white;
}
/* Make the table's header cells disappear if empty
* (i.e. no height, no border, no background): */
table th:empty {
padding : 0;
margin : 0;
max-height: 0;
border : none;
background-color: transparent;
}
/* =============================================================================
FIGURE with caption
The figure is dynamic. The caption (if any) should not be longer than the
width of the responsive image.
(source: https://stackoverflow.com/questions/10264463/can-a-figcaption-be-restricted-to-the-width-of-a-responsively-sized-image#answer-13363408)
*/
figure { display: table }
figure img {
display : block;
max-width: 100%;
}
figure > figcaption {
display : table-caption;
caption-side: bottom;
padding : 1em;
font-size : .8em;
text-align: justify;
color : #555;
background-color: #eee;
}
/* =============================================================================
LAYOUTS SPECIFICITIES
Special styles of common elements depending on the layouts
(e.g. layouts/newsletter/single.html).
*/
/* Center the sections title in the Newsletters: */
body > main > article.newsletter > h1 {
text-align: center;
text-transform: uppercase;
}
/* =============================================================================
MAIN PAGE LAYOUT
Footer at bottom of the page even if empty content.
*/
body {
display : flex;
flex-direction: column;
height : 100vh; /* needed to push the footer at the bottom of the page */
}
/* Let the main content takes as much vertical space as possible: */
body > main {
flex-grow: 1;
padding: 1em;
}
/* In case their height is dynamic (i.e. use of min-/max-height), prevent
them to shrink when the page is smaller: */
body > header,
body > footer {
flex-shrink: 0;
}
body > header,
body > .sitemap,
body > footer {
background-color: #012647;
}
/* =============================================================================
HEADER
*/
body > header {
display : flex;
flex-direction : row;
justify-content: space-between;
position: relative;
padding : 0 1em;
height : 5em;
line-height: 5em;
}
body > header > .header-logo {
position: relative;
display: flex;
color : white;
font-size : 1.5em;
text-decoration: none;
}
body > header > .header-logo > img {
height : calc( 100% - 1rem);
margin : .5rem 0;
margin-right: 1rem;
}
body > header > .header-logo > span {
position: relative;
top: .75rem;
line-height: 1.8rem;
text-wrap: nowrap;
}
body > header > nav {
display : flex;
flex-direction: row;
}
body > header > nav > a {
font-size : 1.3em;
color : white;
text-decoration: none;
}
body > header > nav > a:hover { text-decoration: underline }
body > header > nav > a + a { margin-left: 1em }
/* Top bar's search menu item with a search magnifier on the left: */
header > nav > a.search {
background-image : url('../images/search.png');
background-repeat : no-repeat;
background-position: left 1.5em;
background-size : .8em;
padding-left: 1.1em;
}
/* =============================================================================
FOOTER
*/
body > .sitemap,
body > footer {
padding: .5em;
color : white;
font-size : 1.1em;
}
body > .sitemap a,
body > footer a {
color: #92d5ff;
text-decoration: none;
}
body > .sitemap a:hover,
body > footer a:hover {
text-decoration: underline;
}
body > footer { text-align: right }
/* =============================================================================
SECTION WITH HEADER, MAIN, LEFT-/RIGHT ASIDE AND FOOTER
*/
section {
display : grid;
grid-template-columns: 1fr auto 1fr;
grid-template-rows : auto;
grid-template-areas :
"header header header"
"left-aside main right-aside"
"footer footer footer";
/* Use all the section container width: */
justify-content: stretch;
/* Place this section at the top of the section container: */
align-content: start;
/* Use all the section inner width for its content: */
justify-items: stretch;
/* Use all the section inner height for its content: */
align-items : stretch;
}
section.with-only-right-aside {
grid-template-columns: auto 1fr;
grid-template-areas:
"header header"
"main right-aside"
"footer footer";
}
section.with-only-left-aside {
grid-template-columns: 1fr auto;
grid-template-areas:
"header header"
"left-aside main"
"footer footer";
}
section > header { grid-area: header }
section > main { grid-area: main }
section > aside.left { grid-area: left-aside }
section > aside.right { grid-area: right-aside }
section > footer { grid-area: footer }
section > header + main { margin-bottom: 1em }
section > main + footer { margin-top: 1em }
section > aside + main { margin-right: 1em }
section > main + aside { margin-left: 1em }
/* =============================================================================
PAGE CREATION AND UPDATED DATES
*/
.pageDates {
text-align: right;
font-size : .9em;
color : #777;
font-style: italic;
}
/* =============================================================================
SECTION WITH A SIDE IMAGE
*/
.with-image + .with-image {
margin-top: 2em;
}
/* LAYOUT-1: 2 COLUMNS */
.with-image:not(.is-floating) {
display : grid;
column-gap: 1em;
}
.with-image:not(.is-floating).left,
.with-image:not(.is-floating):not(.right) {
grid-template-columns: 1fr 3fr;
grid-template-areas : "image content";
}
.with-image:not(.is-floating).right {
grid-template-columns: 3fr 1fr;
grid-template-areas : "content image";
}
.with-image:not(.is-floating) > figure {
grid-area : image;
margin-top: 1em;
/* center the image horizontally and vertically: */
align-self: center;
place-self: center;
}
/* Image not larger than the image area: */
.with-image:not(.is-floating) > figure img { max-width: 100% }
.with-image:not(.is-floating) > main { grid-area: content }
/* LAYOUT-2: FLOATING IMAGE */
.with-image.is-floating { display: block }
.with-image.is-floating > h1,
.with-image.is-floating > h2,
.with-image.is-floating > h3 {
margin-top: 0;
clear : none;
}
/* =============================================================================
FLOATING CONTENT
*/
.floating {
margin : 1em;
margin-top: 0;
}
.floating.left { float: left ; margin-left: 0; }
.floating.right { float: right; margin-right: 0; }
img.floating,
figure.floating,
.floating > img {
max-width: 30vw;
}
/* =============================================================================
CARROUSEL
*/
.carrousel {
position: relative;
width: 100%;
margin: 1rem auto;
max-width: 1600px;
height: 33vh;
min-height: 300px;
max-height: 600px;
overflow: hidden;
padding: 0 0.25rem;
}
.carrousel-item { display: none }
.carrousel-item.active { display: block }
.carrousel-item > .carrousel-img {
width: 100%;
height: auto;
filter: contrast(.4);
animation-name: fadein;
animation-duration: 1s;
}
.carrousel-item > .carrousel-title {
position: absolute;
top: 1rem;
left: 7rem;
right: 7rem;
background: rgba(0, 0, 0, 0.66);
font-size: 2.3rem;
padding: 0.5rem 1rem;
color: #FFF;
}
.carrousel-item > .carrousel-author {
position: absolute;
top: 5rem;
left: 7rem;
background: rgba(0, 0, 0, 0.66);
font-size: 1rem;
padding: 0.5rem 1rem;
color: #FFF;
}
.carrousel-item > .carrousel-author::before {
content: "by "
}
.carrousel-item > .carrousel-action {
position: absolute;
bottom: 1rem;
right: 7rem;
background: rgba(0, 0, 0, 0.66);
font-size: 1.4rem;
padding: 0.5rem 1rem;
color: #FFF;
cursor: pointer;
}
.carrousel-item > .carrousel-action:hover {
background: rgba(0, 100, 255, 0.8);
color: rgba(255, 255, 255, 1);
cursor: pointer;
}
.carrousel-btn {
position: absolute;
top : 50%;
padding : 0.5rem 1rem;
border-radius: 4px;
transform: translateY(-50%);
font-size: 2rem;
color : rgba(255, 255, 255, 0.8);
background: rgba(0, 0, 0, 0.66);
}
.carrousel-btn:hover {
color : rgba(255, 255, 255, 1);
cursor: pointer;
}
.carrousel-btn-left {
left: 2rem;
}
.carrousel-btn-right {
right: 2rem;
}
section > main.carrousel {
width: 80vw;
}
/* =============================================================================
CARDS
*/
.cards {
margin: 1rem 0;
padding: 0;
width: 100%;
display: flex;
flex-wrap: wrap;
justify-content: space-evenly;
font-size: 1em;
}
.card {
display: flex;
flex-direction: column;
flex: 1;
margin: 0 0.5rem;
padding: 1em;
border: 1px solid #BBB;
border-radius: 1em;
}
.card-title {
margin-bottom: 1em;
font-size: 1.2em;
font-weight: bold;
padding-bottom: 1em;
border-bottom: 8px solid #BBB;
}
.card-list {
flex-grow: 1;
}
.card-list ul {
padding-left: 0;
margin : 0;
padding: 0;
}
.card-list li {
list-style: none;
}
.card-list li + li {
margin-top: 1em;
}
.sitemap .card { border: none }
.sitemap .card:nth-child(1) > .card-title { border-bottom-color: #5dbbf5 }
.sitemap .card:nth-child(2) > .card-title { border-bottom-color: #399110 }
.sitemap .card:nth-child(3) > .card-title { border-bottom-color: #aa3f3f }
/* =============================================================================
SOCIAL LINKS
*/
#share-buttons {
position: relative;
width: 28em;
margin: 0 auto;
margin-top: 3em;
}
#share-buttons > a { text-decoration: none }
#share-buttons > a > img {
display: inline;
width : 4em;
padding: 0 .5em;
border : 0;
box-shadow: 0;
}
#QRcode {
position : absolute;
top : -200px;
left : calc( 23em - 62px );
display : none;
padding : 5px;
width : 125px;
overflow : hidden;
text-align: center;
border: 1px solid #333;
background-color:#FFF;
}
#QRcode.is-visible { display: block }
#QRcode > p {
text-align: center;
margin: .5em 0;
font-size: .9em;
}
#QRcode > img {
height: 125px;
width : 125px;
}