forked from academicpages/academicpages.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgallery.css
101 lines (88 loc) · 1.64 KB
/
gallery.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
.wrapper {
max-width: 800px;
margin: 2rem auto;
}
.gallery {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
/* grid-auto-rows: 15rem; */
gap: 2rem;
/* grid-auto-flow: dense; */
}
.gallery img {
display: block;
width: 100%;
height: auto;
object-fit: cover;
background-color: hsl(0 0% 90%);
cursor: pointer;
border-radius: 8px;
}
.gallery-item {
position: relative;
padding: 12px;
border-radius: 8px;
transition: background-golor 0.3s ease;
overflow: hidden;
}
.gallery-item:hover {
background-color: hsl(29, 74%, 80%);
}
.gallery-landscape {
aspect-ratio: 9 / 6;
grid-column: span 2;
grid-row: span 1;
}
.gallery-portrait {
aspect-ratio: 3 / 4;
grid-column: span 1;
grid-row: span 2;
height: 50%;
}
.gallery-text {
display: none;
position: absolute;
bottom: 10px;
left: 10px;
background-color: rgba(0, 0, 0, 0.7);
color: white;
padding: 5px;
border-radius: 3px;
}
.gallery-item:hover .gallery-text {
display: block;
}
#returntocard {
position: fixed;
right: 10px;
top: 10px;
padding: 0;
width: 40px;
height: 40px;
max-width: 18vw;
font-size: large;
}
h2 {
width: fit-content;
max-width: 80vw;
font-weight: 500;
font-variant: small-caps;
padding-right: 0.5em;
margin: 0;
margin-bottom: 0.5em;
display: inline-block;
}
#header a {
margin-right: 0.2em;
font-size: large;
color: #666;
}
body {
-webkit-text-size-adjust: 100%;
background-color: #fcf8f1;
font-family: "Saira";
color: #000000;
font-size: 11pt;
font-weight: 300;
font-feature-settings: "onum" 1;
}