Skip to content

Commit 3983025

Browse files
Merge pull request #367 from bitlogic/SBIT-617-Corregir-componente-BannerTop
Sbit 617 corregir componente banner top
2 parents 501b410 + 99c2770 commit 3983025

File tree

2 files changed

+22
-35
lines changed

2 files changed

+22
-35
lines changed

src/components/Banners/BannerTop.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from "react"
22
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"
45
import "./BannerTop.scss"
56

67
const BannerTop = ({ banner }) => {
@@ -18,14 +19,14 @@ const BannerTop = ({ banner }) => {
1819
loading="eager"
1920
fetchpriority="high"
2021
>
21-
<div className={`BannerTop__titleContainer ${variant}`}>
22+
<div className="BannerTop__titleContainer">
2223
<h1 className={`BannerTop__title ${variant && "background container"}`}>
2324
{title}
2425
</h1>
2526
</div>
2627
</BgImage>
2728
) : (
28-
<div className={`BannerTop__titleContainer ${variant}`}>
29+
<div className="BannerTop__titleContainer">
2930
<h1 className={`BannerTop__title ${variant && "background container"}`}>
3031
{title}
3132
</h1>
@@ -48,4 +49,4 @@ BannerTop.propTypes = {
4849
}).isRequired,
4950
}
5051

51-
export default BannerTop
52+
export default BannerTop
Lines changed: 17 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,43 @@
11
@import "../../styles/global.scss";
22

33
.BannerTop {
4-
position: relative;
5-
position: relative;
6-
74
&__bgImage {
85
min-height: 40vh;
96
width: 100%;
107
display: flex;
118
align-items: flex-end;
12-
object-fit: cover;
139
}
1410

1511
&__titleContainer {
1612
position: absolute;
1713
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;
2314
background-color: rgba(36, 39, 42, 0.4);
24-
z-index: 2;
15+
padding: 24px 8px;
16+
width: 100%;
2517
}
2618

2719
&__title {
20+
text-wrap: pretty;
2821
color: $white;
22+
font-weight: $max-bold;
2923
margin-bottom: 0;
3024
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;
3725

3826
&:not(.background) {
3927
text-transform: none;
4028
font-size: $medium;
4129
}
4230
}
4331

44-
&.background &__title {
45-
padding: 24px 8px;
32+
&.background {
33+
&__titleContainer {
34+
padding: 24px 8px;
35+
}
4636
}
37+
}
4738

48-
@media (min-width: $breakpoint-md) {
39+
@media (min-width: $breakpoint-md) {
40+
.BannerTop {
4941
&__bgImage {
5042
min-height: 55vh;
5143
}
@@ -54,20 +46,14 @@
5446
padding: 30px;
5547
}
5648

57-
&__title {
58-
padding: 30px;
49+
&__title:not(.background) {
5950
font-size: $extra-large;
6051
}
6152

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+
}
7157
}
7258
}
73-
}
59+
}

0 commit comments

Comments
 (0)