Skip to content

Commit 3c4e49d

Browse files
Merge pull request #130 from bitlogic/develop
Release 3
2 parents 3f55f89 + 1d74d32 commit 3c4e49d

File tree

17 files changed

+265
-110
lines changed

17 files changed

+265
-110
lines changed

src/components/Banner/Banner.js

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import CustomImage from "../CustomImage/CustomImage"
99

1010
const Banner = ({ data }) => {
1111
const { theme } = useTheme()
12-
const { title, variant, summary, animation, image, imageDark, button } = data
12+
const { title, variant, summary, animation, image, imageDark, arrayButtons, button } = data
13+
1314

1415
const defaultOptions = {
1516
loop: true,
@@ -39,14 +40,27 @@ const Banner = ({ data }) => {
3940
dangerouslySetInnerHTML={{ __html: summary }}
4041
/>
4142
}
42-
{button && (
43-
<CustomLink
44-
content={button?.content}
45-
url={button?.url}
46-
landing={button?.english_landing_page}
47-
className={"button"}
48-
/>
43+
{Array.isArray(arrayButtons) && arrayButtons.length > 0 && (
44+
<div className="banner__buttons">
45+
{arrayButtons.map((btn, index) => (
46+
<CustomLink
47+
key={index}
48+
content={btn.content}
49+
url={btn.url}
50+
landing={btn.english_landing_page}
51+
className="button"
52+
/>
53+
))}
54+
</div>
4955
)}
56+
{button && (
57+
<CustomLink
58+
content={button.content}
59+
url={button?.url}
60+
landing={button?.landing_page}
61+
className={'button'}
62+
/>
63+
)}
5064
</div>
5165
</div>
5266

@@ -81,6 +95,15 @@ Banner.propTypes = {
8195
title: PropTypes.string.isRequired,
8296
variant: PropTypes.string.isRequired,
8397
summary: PropTypes.string,
98+
arrayButtons: PropTypes.arrayOf(
99+
PropTypes.shape({
100+
content: PropTypes.string,
101+
url: PropTypes.string,
102+
english_landing_page: PropTypes.shape({
103+
slug: PropTypes.string.isRequired,
104+
}),
105+
})
106+
),
84107
button: PropTypes.shape({
85108
content: PropTypes.string.isRequired,
86109
url: PropTypes.string,

src/components/Banner/Banner.scss

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@
170170
&.diagonalReverse {
171171
.banner__wrapper {
172172
margin: 32px auto;
173+
display: flex;
174+
flex-direction: column;
173175
}
174176

175177
.imagen {
@@ -184,13 +186,22 @@
184186
}
185187
}
186188

189+
.banner__buttons{
190+
display: flex;
191+
flex-direction: row;
192+
justify-content: flex-start;
193+
padding-top: 25px;
194+
padding-right: 10px;
195+
}
196+
187197
.button {
188-
margin-top: 20px;
189-
margin-bottom: 20px;
190-
display: inline-block;
191-
color: #607ee7;
192-
text-decoration: underline;
193-
padding-left: 5px;
198+
color:$primary;
199+
200+
@include primaryBtn;
201+
display: block;
202+
width: max-content;
203+
padding: 10px 15px;
204+
margin-right: 20px;
194205
}
195206

196207
.title {
@@ -356,9 +367,7 @@
356367
}
357368
}
358369

359-
.button {
360-
padding-left: 5rem;
361-
}
370+
362371

363372
.title {
364373
display: flex;

src/components/BannerList/Banner.scss

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,16 @@
5454
a {
5555
margin-top: 10px;
5656
@include primaryBtn;
57-
align-self: baseline;
57+
align-self: flex-start;
5858

59-
@media screen and (max-width: ($breakpoint-md - 1px)) {
60-
display: none;
61-
}
59+
@media screen and (max-width: ($breakpoint-md - 1px)) {
60+
display: inline-block;
61+
@include primaryBtn;
62+
//margin: 10px auto 0;
63+
text-align: center;
64+
align-self:flex-start;
65+
}
66+
6267
}
6368
}
6469
}

src/components/Banners/BannerTop.js

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,26 @@ const BannerTop = ({ banner }) => {
1212

1313
return (
1414
<div className={`BannerTop ${variant}`}>
15-
<BgImage image={imageBanner} className="BannerTop__bgImage">
15+
{imageBanner ? (
16+
<BgImage
17+
image={imageBanner}
18+
className="BannerTop__bgImage"
19+
loading="eager"
20+
fetchpriority="high"
21+
>
22+
<div className="BannerTop__titleContainer">
23+
<h1 className={`BannerTop__title ${variant && "background container"}`}>
24+
{title}
25+
</h1>
26+
</div>
27+
</BgImage>
28+
) : (
1629
<div className="BannerTop__titleContainer">
17-
<h1
18-
className={`BannerTop__title ${variant && "background container"}`}
19-
>
30+
<h1 className={`BannerTop__title ${variant && "background container"}`}>
2031
{title}
2132
</h1>
2233
</div>
23-
</BgImage>
34+
)}
2435
</div>
2536
)
2637
}

src/components/Banners/BannerTop.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@
5656
}
5757
}
5858
}
59-
}
59+
}

src/components/BlogPage/BlogContainer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Layout from "../layout"
77
import Banner from "../Banner/Banner"
88
import "./BlogContainer.scss"
99

10-
const Blog = () => {
10+
const Blog = ({location}) => {
1111
const { allStrapiBlogCategory, allStrapiArticle, allStrapiBlogPage } = useBlog()
1212
const categorias = allStrapiBlogCategory.nodes
1313
const articulos = allStrapiArticle.nodes
@@ -44,6 +44,7 @@ const Blog = () => {
4444
title={seo?.pageTitle}
4545
description={seo?.pageDescription}
4646
keywords={seo?.pageKeywords}
47+
location={location}
4748
/>
4849
<Banner data={banner} />
4950

src/components/DualSection/OneSection.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ const OneSection = ({ data: { dualSectionPart } }) => {
1919
<div
2020
className="one_sec-background"
2121
style={{
22-
backgroundRepeat: "repeat",
2322
backgroundPosition: "center",
2423
backgroundImage: `url(${
2524
theme === "dark" && backgroundImageDark?.url

src/components/FaIcon/FaIcon.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
import React from "react"
22
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
33
import { faEnvelope, faLocationDot } from "@fortawesome/free-solid-svg-icons"
4-
import { faLinkedin, faTwitter, faInstagram, faYoutube, faSpotify } from "@fortawesome/free-brands-svg-icons"
4+
import {
5+
faLinkedin,
6+
faTwitter,
7+
faXTwitter,
8+
faInstagram,
9+
faYoutube,
10+
faSpotify
11+
12+
} from "@fortawesome/free-brands-svg-icons"
513
import PropTypes from "prop-types"
614

7-
// Mapeo de los íconos que se usan
815
const iconMap = {
916
"fa-envelope": faEnvelope,
1017
"fa-location-dot": faLocationDot,
1118
"fa-linkedin": faLinkedin,
1219
"fa-twitter": faTwitter,
20+
"fa-x-twitter": faXTwitter,
1321
"fa-instagram": faInstagram,
1422
"fa-youtube": faYoutube,
1523
"fa-spotify": faSpotify,
@@ -31,4 +39,6 @@ FaIcon.propTypes = {
3139
code: PropTypes.string.isRequired,
3240
}
3341

34-
export default FaIcon
42+
43+
export default FaIcon
44+

src/components/Seo/Seo.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ import PropTypes from "prop-types"
33
import { Helmet } from "react-helmet"
44
import { useGlobalSeo } from "../../hooks"
55

6-
function Seo({ description, lang, meta, title, keywords }) {
6+
function Seo({ description, lang, meta, title, keywords, location }) {
77
const data = useGlobalSeo()
88

9+
const pathname = location?.pathname || "/"
910
const {
1011
author,
1112
robots,
@@ -77,17 +78,13 @@ function Seo({ description, lang, meta, title, keywords }) {
7778
},
7879
].concat(meta)}
7980
link={[
80-
{
81-
rel: "canonical",
82-
href: `https://bitlogic.io`
83-
},
8481
{
8582
rel: "alternate",
86-
href: `https://en.bitlogic.io`
83+
href: `https://bitlogic.io${pathname}`
8784
},
8885
{
8986
rel: "alternate",
90-
href: `https://www.bitlogic.io`
87+
href: `https://www.bitlogic.io${pathname}`
9188
}
9289

9390
]}
@@ -99,14 +96,16 @@ Seo.defaultProps = {
9996
lang: `en`,
10097
meta: [],
10198
description: ``,
99+
location: null,
102100
}
103101

104102
Seo.propTypes = {
105103
description: PropTypes.string,
106104
lang: PropTypes.string,
107105
meta: PropTypes.arrayOf(PropTypes.object),
108106
title: PropTypes.string.isRequired,
109-
keywords: PropTypes.string
107+
keywords: PropTypes.string,
108+
location: PropTypes.object,
110109
}
111110

112111
export default Seo

src/components/Text/Text.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
flex: 2;
2323
background-color: $primary-container;
2424
border-radius: 10px;
25-
padding: 32px 16px;
25+
padding: 32px 35px;
2626
@media (min-width: $breakpoint-lg) {
2727
padding: 24px 32px;
2828
}

0 commit comments

Comments
 (0)