File tree Expand file tree Collapse file tree 2 files changed +22
-35
lines changed Expand file tree Collapse file tree 2 files changed +22
-35
lines changed Original file line number Diff line number Diff line change 1
1
import React from "react"
2
2
import PropTypes from "prop-types"
3
- import { getImage , GatsbyImage } from "gatsby-plugin-image"
3
+ import { getImage } from "gatsby-plugin-image"
4
+ import { BgImage } from "gbimage-bridge"
4
5
import "./BannerTop.scss"
5
6
6
7
const BannerTop = ( { banner } ) => {
@@ -18,14 +19,14 @@ const BannerTop = ({ banner }) => {
18
19
loading = "eager"
19
20
fetchpriority = "high"
20
21
>
21
- < div className = { ` BannerTop__titleContainer ${ variant } ` } >
22
+ < div className = " BannerTop__titleContainer" >
22
23
< h1 className = { `BannerTop__title ${ variant && "background container" } ` } >
23
24
{ title }
24
25
</ h1 >
25
26
</ div >
26
27
</ BgImage >
27
28
) : (
28
- < div className = { ` BannerTop__titleContainer ${ variant } ` } >
29
+ < div className = " BannerTop__titleContainer" >
29
30
< h1 className = { `BannerTop__title ${ variant && "background container" } ` } >
30
31
{ title }
31
32
</ h1 >
@@ -48,4 +49,4 @@ BannerTop.propTypes = {
48
49
} ) . isRequired ,
49
50
}
50
51
51
- export default BannerTop
52
+ export default BannerTop
Original file line number Diff line number Diff line change 1
1
@import " ../../styles/global.scss" ;
2
2
3
3
.BannerTop {
4
- position : relative ;
5
- position : relative ;
6
-
7
4
& __bgImage {
8
5
min-height : 40vh ;
9
6
width : 100% ;
10
7
display : flex ;
11
8
align-items : flex-end ;
12
- object-fit : cover ;
13
9
}
14
10
15
11
& __titleContainer {
16
12
position : absolute ;
17
13
bottom : 0 ;
18
- width : 100% ;
19
- width : 100% ;
20
- padding : 24px 8px ;
21
- background-color : rgba (36 , 39 , 42 , 0.4 );
22
- z-index : 2 ;
23
14
background-color : rgba (36 , 39 , 42 , 0.4 );
24
- z-index : 2 ;
15
+ padding : 24px 8px ;
16
+ width : 100% ;
25
17
}
26
18
27
19
& __title {
20
+ text-wrap : pretty;
28
21
color : $white ;
22
+ font-weight : $max-bold ;
29
23
margin-bottom : 0 ;
30
24
text-transform : uppercase ;
31
- font-family : " Plain" , sans-serif ;
32
- font-weight : 900 ;
33
- font-size : $large ;
34
- font-family : " Plain" , sans-serif ;
35
- font-weight : 900 ;
36
- font-size : $large ;
37
25
38
26
& :not (.background ) {
39
27
text-transform : none ;
40
28
font-size : $medium ;
41
29
}
42
30
}
43
31
44
- & .background & __title {
45
- padding : 24px 8px ;
32
+ & .background {
33
+ & __titleContainer {
34
+ padding : 24px 8px ;
35
+ }
46
36
}
37
+ }
47
38
48
- @media (min-width : $breakpoint-md ) {
39
+ @media (min-width : $breakpoint-md ) {
40
+ .BannerTop {
49
41
& __bgImage {
50
42
min-height : 55vh ;
51
43
}
54
46
padding : 30px ;
55
47
}
56
48
57
- & __title {
58
- padding : 30px ;
49
+ & __title :not (.background ) {
59
50
font-size : $extra-large ;
60
51
}
61
52
62
- & .background & __title {
63
- padding : 30px 0 ;
64
- }
65
- }
66
-
67
- @media (max-width : $breakpoint-md ) {
68
- & __titleContainer {
69
- background-color : transparent ;
70
- backdrop-filter : none ;
53
+ & .background {
54
+ & __titleContainer {
55
+ padding : 30px 0 ;
56
+ }
71
57
}
72
58
}
73
- }
59
+ }
You can’t perform that action at this time.
0 commit comments