-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcopy-cat.scss
455 lines (394 loc) · 9.53 KB
/
copy-cat.scss
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
//file linked to "copy-cat.html"
/*
referenced https://www.cdnfonts.com/barlow.font
referenced https://www.w3schools.com/css/css3_fonts.asp
websites referenced for guidance on how to import a font that is not typically recognised by CSS to the webpage
NOTE:
styling caters for display of form in Google Chrome and is most accurate at fullscreen size
the form may appear differently in other browsers (such as Safari)
*/
//variables for fonts used
$content-font: sans-serif;
$main-font: 'Barlow', sans-serif;
//import font file
@font-face {
font-family: 'Barlow', sans-serif;
src: url(https://fonts.cdnfonts.com/css/barlow);
font-weight: 400;
}
//variables for colour scheme
$main-blue: rgb(16, 18, 78);
$secondary-blue: rgb(19, 4, 219);
$accent-colour: rgb(236, 148, 84);
//highlight colours
$main-highlight-colour: rgb(29, 68, 228);
$secondary-highlight-colour: rgb(209, 214, 251);
$tertiary-highlight-colour: rgb(15, 18, 82);
//writing colours
$main-writing-colour: rgb(252, 247, 244);
$secondary-writing-colour: rgb(45, 47, 99);
$tertiary-writing-colour: rgb(22, 22, 22);
//variable for font size
$default-font-size: 16px;
//import module/partial to main file to access its functions and elements
@import "align-format";
//entire webpage
body {
//defaults
margin: 0;
padding: 0;
//do not leave edges as open borders
box-sizing: border-box;
background-color: $main-blue;
font-family: $main-font;
color: $main-writing-colour;
}
header {
background-color: $main-blue;
//keep header fixed
position: fixed;
width: 100%;
height: 15%;
top: 0;
//keep header above other content
z-index: 1000;
//format header
@extend formatContent;
//logo
img {
float: inline-start;
}
}
//format index
#index {
color: $main-writing-colour;
font-family: $main-font;
cursor: pointer;
//centralise
text-align: center;
//nesting
a {
//remove underline
text-decoration: none;
//remove common link colour
color: $main-writing-colour;
}
}
//customise main content appearance
main {
color: $main-writing-colour;
font-family: $main-font;
}
//referenced https://www.w3schools.com/cssref/pr_pos_z-index.php
//website referenced for guidance on the usage of the z-index property
//position large background
//referenced website's page source (view-source:https://techagainsttrafficking.org/) for sizing specifications
#background img {
position: relative;
display: inline-block;
left: 0;
top: 0;
z-index: -10;
image-rendering: optimizeQuality;
//allow for expansion of image to fill contraining block
width: auto;
height: auto;
}
//mixin for positioning to reduce clutter
@mixin position($top, $left) {
position: absolute;
transform: translate(-50%, -50%);
//arguments
top: $top;
left: $left;
}
//format large description text
#description {
font-size: $default-font-size + 35px;
//position text
@include position(40%, 69%);
//align to left margin
text-align: left;
//ensure writing runs until end of designated line
text-wrap: nowrap;
z-index: 1;
//stretch image to cover container
object-fit: cover;
}
//customise text underline
@mixin customiseUnderline($colour, $thickness, $offset) {
text-decoration: underline;
//text-decoration: line-through; - line stays in front of text and does not go behind it like intended
text-decoration-style: solid;
text-decoration-skip-ink: none;
//arguments
text-decoration-color: $colour;
text-decoration-thickness: $thickness;
text-underline-offset: $offset;
}
.underlineMain {
//position on top of image
position: relative;
//call mixin
@include customiseUnderline($main-highlight-colour, 30px, -70%);
}
//customise join 'button'
.joinButton {
//button colour
background-color: $accent-colour;
color: $main-writing-colour;
//button size
width: 190px;
height: 60px;
//font specifications
font-family: $main-font;
font-size: $default-font-size + 20px;
font-weight: light;
//button position
@include position(78%, 52%);
//button appearance
text-align: center;
text-decoration: none;
padding-top: 10px;
}
//change 'button' colour when hovered over
.joinButton:hover {
background-color: $main-writing-colour;
color: $accent-colour;
//cursor change when button is hovered over
cursor: pointer;
}
//position transparent background block
.transparentBackground {
position: absolute;
top: 120%;
transform: translate(7%, -55%);
width: 85%;
background-color: rgba(0, 0, 0, 0.7);
padding: 20px;
text-align: center;
}
//format announcement text
#announcement {
font-size: xxx-large;
}
//underline announcement text
.underlineAnnouncement {
position: relative;
//call mixin
@include customiseUnderline($tertiary-highlight-colour, 22px, -33%);
}
//set font size to default for the announcement information
#announcementExplanation {
font-size: $default-font-size;
}
//customise font appearance
@mixin letterSpace($size, $colour) {
font-size: $size;
color: $colour;
letter-spacing: 1px;
}
//mission content
#mission {
//customise font appearance
@include letterSpace(large, $tertiary-writing-colour);
}
//initial paragraph content
#nextToNumber {
//paragraph placement
margin-bottom: 0px;
//customise font appearance
@include letterSpace($default-font-size, $tertiary-writing-colour);
//change bold text colour
b {
color: $secondary-writing-colour;
}
}
//make number large
#count {
font-size: $default-font-size + 150px;
margin-top: 2px;
margin-bottom: 2px;
}
//customise number explanation
#numberExplanation {
margin-top: 2px;
font-size: $default-font-size;
//underline text - call mixin
@include customiseUnderline($secondary-highlight-colour, 5px, -10%);
}
//last paragraph runs from left to right margins
#lastParagraph {
text-align: left;
margin: 0;
margin-top: 0px;
//customise font appearance
@include letterSpace($default-font-size, $tertiary-writing-colour);
}
//link customisation
a {
color: $accent-colour;
cursor: pointer;
}
//make byline font lightweight
.byline-date {
font-weight: light;
}
//format columns
.columnFormat {
background-color: #fff;
font-family: $main-font;
color: $secondary-writing-colour;
margin: 0px;
//layout
@extend formatItems;
justify-content: space-between;
flex-wrap: wrap;
}
//format paragraph specifications
.columnParagraph1 {
//paragraph column designation
width: 45%;
margin-bottom: 10px;
padding: 0px;
@extend formatItems;
flex-direction: column;
}
//format number next to content
.columnParagraph2 {
margin-bottom: 0px;
//inheritance
@extend .columnParagraph1;
}
//articles side-by-side
.column {
width: 45%;
margin-bottom: 20px;
}
//article content must be next to margin
.articleContent {
padding: 0px;
}
//customise article heading font
.articleHeading {
color: #444444;
font-size: x-large;
}
//customise article text font
.articleText {
//customise font appearance
@include letterSpace(large, $tertiary-writing-colour);
}
//format article images
@mixin inlineImages($height) {
//receive height as argument
height: $height;
width: 550px;
shape-rendering: crispEdges;
}
#inlineImage1 {
@include inlineImages(350px);
}
#inlineImage2 {
@include inlineImages(300px);
}
//image container
//customise large headings
.secondaryHeading h3 {
font-size: xxx-large;
margin-bottom: 20px;
//underline text - call mixin
@include customiseUnderline($secondary-highlight-colour, 25px, -37%);
}
//customise read more link
.readMore {
width: 50%;
color: $secondary-blue;
background-color: #fff;
//operator
font-size: $default-font-size + 10px;
font-weight: bolder;
text-decoration-color: #fff;
}
//change colour when link hovered over
.readMore:hover {
color: black;
background-color: lightgray;
}
//position quote image as background
.quoteImage {
width: 100%;
}
//quote background
#quote {
background-color: #101AFF;
color: #fff;
padding: 60px;
//customise heading font
i {
color: $accent-colour;
font-weight: light;
}
}
//change text displayed when arrow is clicked (checked)
//remove previous text
.hide {
display: none;
}
//hide checkbox
#arrow {
display: none;
}
//show quote1 when checkbox is checked
#arrow:checked~#quotations #quote1 {
display: block;
}
//show quote2 when checkbox is unchecked
#arrow:not(:checked)~#quotations #quote2 {
display: block;
}
//position arrow image
.arrowClick {
width: 50px;
float: inline-end;
}
//change cursor when arrow image is hovered over
.arrowClick {
cursor: pointer;
}
//footer customisation
footer {
padding-left: 160px;
}
//centralise items
#closing {
@extend formatContent;
justify-content: space-between;
width: 80%;
//logo
img {
margin-right: auto;
}
}
//customise copy
#copy {
font-weight: normal;
margin-left: auto;
}
//customise central text
#contactPrompt a {
//centralise text
text-align: center;
//customise font appearance
@include letterSpace(35px, $main-writing-colour);
font-weight: lighter;
//remove general link customised appearance
text-decoration: none;
}
//remove automatic style from address
address {
font-weight: normal;
font-style: normal;
font-size: $default-font-size - 2px;
font-family: $main-font;
}