-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
390 lines (342 loc) · 7.15 KB
/
style.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
@import url('https://fonts.googleapis.com/css?family=Poppins:200,300,400,500,600,700,800,900&display=swap');
/* color pallet so theme of site can easily be changed globally */
:root {
--primary-color: #f60f20;
--secondary-color: #1b206e;
}
/* base styles */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html, body {
font-family: 'Poppins', sans-serif;
color: #111;
}
h1 {
font-size: 30px;
font-weight: 500;
}
p {
margin: 20px 0 10px 0;
font-size: 1.1rem;
}
/* home page section flex is default horizontal */
section {
display: flex;
flex-direction: column;
height: 100vh;
align-items: center;
padding: 100px;
margin-top: 60px;
}
/* section home */
section.home {
flex-direction: row;
margin-top: 0;
}
/* home page button */
.btn {
cursor: pointer;
display: inline-block;
background: var(--primary-color);
color: #fff;
text-decoration: none;
padding: 10px 30px;
margin: 20px 0;
border: 0;
}
.btn:hover {
transform: scale(0.98);
}
.logo {
position: absolute;
top: 30px;
left: 100px;
font-size: 2rem;
font-weight: 700;
z-index: 20;
}
/* toggle fa-fa-bars */
.toggle {
position: fixed;
top: 0;
right: 0;
width: 60px;
height: 60px;
padding-top: 4px;
padding-left: 8px;
color: #fff;
background-color: var(--primary-color);
z-index: 20;
cursor: pointer;
}
.toggle:active {
background-color: purple;
box-shadow: 0 5px #666;
transform: translateY(2px);
}
/* navigation */
.navigation {
position: fixed;
top: 0;
left: 100%; /*pushing off screen 100%*/
width: 100%;
height: 100%;
background-color: #fff;
z-index: 15;
display: flex;
justify-content: center;
align-items: center;
}
.navigation.active {
left: 0;
}
.navigation ul {
position: relative;
}
.navigation ul li {
position: relative;
list-style: none;
text-align: center;
}
.navigation ul li a {
font-size: 2.2rem;
color: #111;
text-decoration: none;
font-weight: 300;
}
.navigation ul li a:hover {
color: var(--primary-color);
}
.navigation .social-bar {
position: absolute;
top: 0;
left: 30px;
width: 60px;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.navigation .social-bar a {
display: inline-block;
font-size: 1.6rem;
}
.navigation .email-icon {
position: absolute;
bottom: 20px;
color: #111;
}
/* home page */
.home-content {
position: relative;
z-index: 10;
max-width: 600px;
}
.home-img {
position: absolute;
bottom: 0;
right: 0;
height: 110%;
}
/* services page - fr(fraction) is 3equal columns on the grid
if you need say 2 columns can use 50% 50% alternative*/
.services {
margin-top: 40px;
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 40px;
text-align: center;
}
.services .service {
padding: 30px;
}
.services .service:hover {
box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.services .service h2 {
font-size: 24px;
font-weight: 500;
margin-top: 20px;
color: var(--primary-color);
}
.services .service .icon {
color: var(--secondary-color);
}
/* Work page - flex wrap so img's expand/contract depending on media size */
.portfolio {
display: flex;
flex-wrap: wrap;
justify-content: center; /* no matter what size media img's display in center */
margin-top: 20px;
}
/* resize images the same-make smaller 300x300 */
.portfolio .item {
position: relative;
width: 300px;
height: 300px;
margin: 5px;
}
.portfolio .item img {
width: 100%;
height: 100%;
}
.portfolio .item .action {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.8);
/* move launch to center of img but not display it until hover so opacity-0 */
display: flex;
justify-content: center;
align-items: center;
opacity: 0;
transition: 0.5s; /* transition so hover is smooth */
}
/* on hover image overlay background black with 1 opacity & launch-btn shows */
.portfolio .item:hover .action {
opacity: 1;
}
/* style for launch button */
.portfolio .item .action a {
display: inline-block;
color: #fff;
text-decoration: none;
border: 1px solid #fff;
padding: 5px 15px;
}
/* Contact */
.contact {
position: relative;
width: 100%;
margin-top: 50px;
display: flex;
justify-content: space-between;
align-items: flex-start;
}
.contact-form {
position: relative;
background: #f9f9f9;
width: calc(100% - 400px);
padding: 60px 40px, 20px;
}
.contact-form form {
width: 100%;
}
.contact-form .row {
width: 100%;
display: flex;
}
.contact-form .input50 {
width: 50%;
margin: 0 10px;
}
.contact-form .input100 {
width: 100%;
margin: 0 10px;
}
.contact-form .row input,
.contact-form .row textarea {
position: relative;
border: 1px solid rgba(0, 0, 0, 0.2);
color: #111;
background: transparent;
width: 100%;
padding: 10px;
outline: none;
font-size: 16px;
font-weight: 300;
margin: 10px 0;
resize: none;
}
.contact-form .row textarea {
height: 150px;
}
.contact-form .row input[type="submit"] {
background-color: var(--secondary-color);
color: #fff;
margin: 0;
text-transform: uppercase;
letter-spacing: 2px;
font-weight: 400;
border: 0;
cursor: pointer;
}
.contact-info {
width: 350px;
background: #f9f9f9;
padding: 60px 40px 20px;
}
.contact-info .info-box {
display: flex;
align-items: flex-start;
margin-bottom: 40px;
}
.contact-info .info-box .details h4 {
color: var(--secondary-color);
}
.contact-info .info-box .details p,
.contact-info .info-box .details a {
color: #111;
}
/* media query dislay no image if device width less than 540px so no image on phones smaller tablets
but image works well on tablets above 540px. Also adjust logo a tad moving it left+reduce font size */
@media(max-width: 540px) {
.home-img {
display: none;
}
.logo {
top: 10px;
left: 40px;
font-size: 1.5rem;
}
/* on Section page 2columns work well on devides up to 540px*/
section {
padding: 100px 40px;
}
.services {
grid-template-columns: repeat(2, 1fr);
}
.contact {
flex-direction: column;
}
.contact-form {
width: 100%;
padding: 30px 30px 20px;
}
.contact-form .row {
flex-direction: column;
}
.contact-form .input50,
.contact-form .input100 {
width: 100%;
margin: 0;
}
}
/* on Section page2 reduce size to 1column on phones */
@media(max-width: 415px) {
.services {
grid-template-columns: 1fr;
}
}
/* on Contact page ipad is 768 so need to adjust it here */
@media(max-width: 768px) {
.contact {
flex-direction: column;
}
.contact-form {
width: 100%;
padding: 30px 30px 20px;
}
.contact-form .row {
flex-direction: column;
} .contact-form .input50,
.contact-form .input100 {
width: 100%;
margin: 0;
}
}