-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy path_header.scss
103 lines (88 loc) · 2.05 KB
/
_header.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
// Header
.header {
// Mimics Bootstrap v4 .jumbotron
// background-image: set in page front matter
background-position: center;
background-repeat: no-repeat;
background-size: cover;
border-radius: 0; // Should always be square, independent from $enable-rounded
color: $white;
margin-bottom: 2rem;
padding: 2rem 1rem;
position: relative; // To contain overlay
text-align: center;
@include media-breakpoint-up(md) {
padding: 4rem 2rem;
}
&.bg-no-image {
background-color: $secondary;
}
// Overlay
&.bg-image:before {
background-image: linear-gradient(rgba($dark, 0.1), rgba($dark, 0.9));
content: "";
left: 0;
height: 100%;
position: absolute;
top: 0;
width: 100%;
}
a {
&:not([class]) { // Excludes <a> with class, e.g. .btn .badge
color: $white;
text-decoration: underline;
&:hover {
color: darken($white, 10);
}
}
}
h1 {
$header-h1: 3.5rem;
font-size: $header-h1;
font-weight: 800;
// Reduce font-size on smaller screens, except on homepage
@include media-breakpoint-down(md) {
font-size: $header-h1 - 1;
&.home {
font-size: $header-h1;
}
}
}
.lead {
font-size: ($lead-font-size * 1.2);
}
.meta {
font-size: 1.25rem;
}
.badge {
border: 2px solid $white;
color: $white;
margin-top: 0.25rem;
padding-left: $badge-padding-x * 2;
padding-right: $badge-padding-x * 2;
text-decoration: none;
text-transform: uppercase;
.btn-close {
// color: defined in svg, inverted with .btn-close-white
font-size: inherit;
margin-left: 0.5rem;
margin-right: -0.25rem;
}
}
// Use light colored badge border when header has no background-image
&.bg-no-image .badge {
border: 2px solid lighten($secondary, 25);
}
.caption {
bottom: 0;
color: darken($white, 25);
font-size: 80%;
padding: 0 0.5rem;
position: absolute;
right: 0;
a {
color: darken($white, 25);
text-decoration: none;
}
}
}