-
Notifications
You must be signed in to change notification settings - Fork 0
/
workstyles.css
291 lines (274 loc) · 8.14 KB
/
workstyles.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
/*Formatting for all work.html*/
* {
font-size: 16px;
}
body {
font-family: raleway, sans-serif;
background-color: rgb(245, 245, 245);
}
.home-icon-sign{ /*workaround to overwrite the placement of this icon as it disappears in the header when used on the "work" page, i guess the z-index is a mess*/
top:-100px;
left:-40px;
transform: scale(0.4); /* Shrinks the element */
}
/* INDIVIDUAL PIC DISPLAY START*/
/* Partially referenced from https://codepen.io/ongtiffany/pen/BoOeQV */
/* Styles the lightbox, removes it from sight and adds the fade-in transition */
.darkback {
position: fixed;
top: -100%; /*hiding it up above the screen before it gets triggered*/
background: rgba(0,0,0,0);
width: 100%;
height: 100%;
opacity: 0.1;
z-index: 1002;
transition: opacity 0.8s ease-in-out;
overflow: hidden;
}
.lightbox-target {
display: flex; /*so that the left text + image + closing icon can be flexibly displayed next to each other*/
position: fixed;
top: -100%; /*hiding it up above the screen before it gets triggered*/
width: 100%;
height: 100%;
gap: 1rem;
background: rgba(0,0,0,.9);
opacity: 0.8;
transition: opacity 0.8s ease-in-out;
overflow: hidden;
z-index: 3000;
align-items: center;
}
/* Styles the lightbox image, centers it vertically and horizontally, adds the zoom-in transition and makes it responsive using a combination of margin and absolute positioning */
.lightbox-target .lefttext {
z-index: 1003;
width: 25%;
margin-left: 1em;
margin-top: 1em;
font-size:0.9em;
text-align: start;
color:white;
transition: 0.18s ease-in-out;
}
.lightbox-target .lefttext h3 {
color:white;
font-weight: 400;
text-transform: uppercase;
padding-bottom: 2em;
}
.lightbox-target .lefttext p {
font-weight: 300;
}
.lightbox-target .lefttext .copyright {
font-size: 0.8em;
padding-top: 2em;
}
.lightbox-target .pic {
z-index: 1003;
max-height:95%; /*to have some background above and below the pic*/
height: auto; /*but make it be only as high as the photo is, so a landscape will naturally be shorter*/
margin-right: 3em; /*to keep distance from the closing icon*/
margin-top:1em;
}
.lightbox-target .pic img {
max-height: 90vh; /*maximum 90% of the viewport height, otherwise some img runs out at the bottom*/
max-width: 100%;
object-fit: cover;
border: 5px solid white; /*finally adding the border directly to the img, so it flexibly adjusts around it*/
box-sizing: border-box;
}
/* Styles for the arrows */
.picnav {
display: flex;
position: absolute;
align-items: center;
top: 25px;
right: 1em;
}
.picnav p {
width: 15px;
display: inline-block;
}
#gap-to-x {
width:35px;
}
.arrow {
z-index: 1003;
border: solid white;
height: 8px;
width: 8px;
border-width: 0 1px 1px 0;
display: inline-block;
padding: 3px;
}
.right {
transform: rotate(-45deg);
/*padding-right: 3px;*/
}
.left {
transform: rotate(135deg);
/*padding-right: 7px;*/
}
/* Styles the close link, adds the slide down transition */
a.lightbox-close {
z-index: 1003;
display: inline-block;
padding-right:1em;
width:2em;
height:2em;
box-sizing: border-box;
background: white;
background-color: rgba(0,0,0,0);
text-decoration: none;
transition: 0.5s ease-in-out;
}
/* Drawing an "X" by rotating 2 divs that overlap each other*/
/* Provides part of the "X" to eliminate an image from the close link */
a.lightbox-close:before {
content: "";
display: block;
height: 30px;
width: 1px;
background: white;
position: absolute;
transform:rotate(45deg);
}
/* Provides part of the "X" to eliminate an image from the close link */
a.lightbox-close:after {
content: "";
display: block;
height: 30px;
width: 1px;
background: white;
position: absolute;
transform:rotate(-45deg);
}
/* Uses the :target pseudo-class to perform the animations upon clicking the .lightbox-target anchor */
.lightbox-target:target { /*pulls the container into the viewport*/
opacity: 1;
top: 0;
bottom: 0;
overflow:scroll;
}
.lightbox-target:target img { /*if this is not defined, the image gets distorted and overflows*/
width: 100%;
}
.lightbox-target:target a.lightbox-close { /*pulls the container into the viewport*/
top: 0;
}
/* INDIVIDUAL PIC DISPLAY END*/
/* GALLERY FOR ALL PICs START*/
h1 {
margin-top: 7em;
margin-bottom: 2em;
padding-left:2em;
font-size: 1.1em;
font-weight: 300;
color:rgba(0, 0, 0, 60%);
text-transform: uppercase;
display: block;
}
.gallery {
display:grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 2em;
object-fit: cover;
margin-bottom: 2em;
margin-left: 3em;
margin-right: 3em;
}
.lightbox { /*centers its content (needed for images with different shape than its container*/
display: block;
margin:auto;
}
img {
max-width: 100%;
margin-bottom:1em;
}
h3 {
font-size:0.9em;
text-align: start;
text-justify: center;
font-size: 0.9em;
font-weight: 300;
color:rgba(0, 0, 0, 70%);
text-transform: uppercase;
text-decoration: none;
margin-bottom: 1em;
}
a {
text-decoration: none;
}
/* GALLERY FOR ALL PICs END*/
/*Responsive layout for middle-small screens*/
@media screen and (max-width: 900px) {
.w-menu.responsive .dropdown { /*this part of the header menu is set for every page to highlight which menu-point is displayed on current page*/
font-weight: 550;
color: white;
}
h1 {
padding-top:0em;
}
.gallery {
display:grid;
grid-template-columns: 1fr 1fr; /*changes the gallery to display 2 pics in a row*/
}
.lightbox-target { /*change the individual pic layout to img above - text below*/
display: grid;
grid-template-columns: 1fr;
gap: 1em;
}
.lightbox-target .lefttext {
width: 100%;
}
.lightbox-target .pic { /*priorizes the pic box as first with the minus order*/
order: -1;
margin-top: 80px; /*the pic nav takes up 55px on the top, so this only allows the pic 25px under them*/
margin-left: 1em;
margin-right: 1em;
}
.lightbox-target .pic img {
max-height: 100%;
max-width: 100%;
object-fit: cover;
}
.lightbox-target .picnav {
order: -2;
width: 90vw;
justify-content: space-between;
margin-left: 1em;
}
.picnav p {
display: none;
}
.right {
order: +1;
padding-left: 20px;
}
.left {
padding-right: 20px;
}
.lightbox-close {
padding-right: 12px;
padding-left: 12px;
}
a.lightbox-close:before {
height: 40px;
}
a.lightbox-close:after {
height: 40px;
}
}
/*Responsive layout for small screens*/
@media screen and (max-width: 600px) {
.gallery {
display:grid;
grid-template-columns: 1fr; /*changes the gallery to display 1 pic in a row*/
}
h1 {
margin-bottom:1.5em; /*reducing some white space*/
}
header {
padding-bottom:1em;
}
}