Skip to content

Commit 5fcb5fb

Browse files
authored
Merge pull request #290 from bitlogic/dev
Release 24-09-2024
2 parents 73a44cd + 3e14c01 commit 5fcb5fb

File tree

27 files changed

+704
-1018
lines changed

27 files changed

+704
-1018
lines changed

gatsby-config.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
module.exports = {
2+
trailingSlash: "always",
23
siteMetadata: {
34
title: `Bitlogic`,
45
description: `Bitlogic Web es una empresa dedicada al diseño, ingeniería y desarrollo ágil de productos de software, especializada en la transformación digital de instituciones educativas .`,
56
author: `Bitlogic.io`,
67
siteUrl: process.env.SITE_URL,
7-
// siteUrl: "https://bitlogic.io",
8+
// siteUrl: "https://es.bitlogic.io",
89
},
910
plugins: [
1011
{
@@ -39,7 +40,7 @@ module.exports = {
3940
lastmod: homePage.updated_at,
4041
},
4142
{
42-
path: "/blog",
43+
path: "/blog/",
4344
lastmod: blogPage.updated_at,
4445
},
4546
]
@@ -88,8 +89,9 @@ module.exports = {
8889
{
8990
resolve: `gatsby-plugin-canonical-urls`,
9091
options: {
91-
// siteUrl: "https://bitlogic.io",
92+
stripQueryString: true,
9293
siteUrl: process.env.SITE_URL,
94+
// siteUrl: "https://es.bitlogic.io",
9395
},
9496
},
9597
{

src/components/Banner/Banner.js

Lines changed: 43 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import React from "react"
22
import MarkdownView from "react-showdown"
3-
import Lottie from 'react-lottie'
3+
import Lottie from "react-lottie"
44
import { useTheme } from "../../context/themeContext"
55
import "./Banner.scss"
6-
import PropTypes from 'prop-types'
6+
import PropTypes from "prop-types"
77
import CustomLink from "../CustomLink/CustomLink"
88
import CustomImage from "../CustomImage/CustomImage"
99

@@ -15,7 +15,7 @@ const Banner = ({ data }) => {
1515
loop: true,
1616
autoplay: true,
1717
rendererSettings: {
18-
preserveAspectRatio: 'xMidYMid slice'
18+
preserveAspectRatio: "xMidYMid slice",
1919
},
2020
}
2121

@@ -30,69 +30,45 @@ const Banner = ({ data }) => {
3030
return (
3131
<div className={`banner ${variant}`}>
3232
<div className="container banner__wrapper">
33-
{variant === "background" ?
34-
<div className="bgImage"
35-
style={{
36-
backgroundImage: image ? `url(${image?.url})` : '',
37-
backgroundPosition: 'center',
38-
}}>
39-
<div className="title-background">
40-
<h1 style={{ color: theme === 'dark' ? 'white' : '#3F6BE8' }}>{title}</h1>
41-
{summary && (
42-
<MarkdownView
43-
markdown={summary}
44-
dangerouslySetInnerHTML={{ __html: summary }}
45-
/>
46-
)}
47-
{button && (
48-
<CustomLink
49-
content={button.content}
50-
url={button?.url}
51-
landing={button?.landing_page}
52-
className={'button'}
53-
/>
54-
)}
55-
</div>
56-
</div> :
57-
<>
58-
<div className="title container-md">
59-
<div>
60-
{showTitle()}
61-
{summary && (
62-
<MarkdownView
63-
markdown={summary}
64-
dangerouslySetInnerHTML={{ __html: summary }}
65-
/>
66-
)}
67-
{button && (
68-
<CustomLink
69-
content={button.content}
70-
url={button?.url}
71-
landing={button?.landing_page}
72-
className={'button'}
73-
/>
74-
)}
75-
</div>
76-
</div>
33+
<div className="title container-md">
34+
<div>
35+
{showTitle()}
36+
{summary && (
37+
<MarkdownView
38+
markdown={summary}
39+
dangerouslySetInnerHTML={{ __html: summary }}
40+
/>
41+
)}
42+
{button && (
43+
<CustomLink
44+
content={button.content}
45+
url={button?.url}
46+
landing={button?.landing_page}
47+
className={"button"}
48+
/>
49+
)}
50+
</div>
51+
</div>
7752

78-
<div className="imagen">
79-
{image ? (
80-
<CustomImage image={theme === 'dark' && imageDark ? imageDark : image}
81-
alt={image?.alternativeText || title}
82-
className={''}
83-
width={290}
84-
height={200}
53+
<div className="imagen">
54+
{image ? (
55+
<CustomImage
56+
image={theme === "dark" && imageDark ? imageDark : image}
57+
alt={image?.alternativeText || title}
58+
className={""}
59+
width={290}
60+
height={200}
61+
/>
62+
) : (
63+
<div className="cont-lottie">
64+
{animation && (
65+
<Lottie
66+
options={{ ...defaultOptions, animationData: animation }}
8567
/>
86-
) : (
87-
<div className="cont-lottie">
88-
{animation && (
89-
<Lottie options={{ ...defaultOptions, animationData: animation }} />
90-
)}
91-
</div>
9268
)}
9369
</div>
94-
</>
95-
}
70+
)}
71+
</div>
9672
</div>
9773
</div>
9874
)
@@ -107,8 +83,8 @@ Banner.propTypes = {
10783
content: PropTypes.string.isRequired,
10884
url: PropTypes.string,
10985
landing_page: PropTypes.shape({
110-
slug: PropTypes.string.isRequired
111-
})
86+
slug: PropTypes.string.isRequired,
87+
}),
11288
}),
11389
animation: PropTypes.object,
11490
image: PropTypes.shape({
@@ -118,8 +94,8 @@ Banner.propTypes = {
11894
imageDark: PropTypes.shape({
11995
alternativeText: PropTypes.string,
12096
url: PropTypes.string,
121-
})
122-
}).isRequired
123-
};
97+
}),
98+
}).isRequired,
99+
}
124100

125101
export default Banner

src/components/Banner/Banner.scss

Lines changed: 27 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
.banner {
44
width: 100%;
5-
height: 100%;
65

76
&__wrapper {
87
color: $primary;
@@ -26,27 +25,6 @@
2625
height: 100%;
2726
}
2827

29-
&.background {
30-
.banner__wrapper {
31-
padding: 0;
32-
}
33-
34-
.button {
35-
@include primaryBtn;
36-
margin-top: 20px;
37-
margin-bottom: 20px;
38-
}
39-
40-
.bgImage {
41-
margin: 32px 0;
42-
}
43-
44-
.title-background {
45-
text-align: center;
46-
padding: 48px 16px;
47-
}
48-
}
49-
5028
&.hero {
5129
.banner__wrapper {
5230
padding: 16px 0;
@@ -233,19 +211,6 @@
233211
}
234212

235213
@media screen and (min-width: $breakpoint-md) {
236-
&.background {
237-
.banner__wrapper {
238-
margin: 0 !important;
239-
padding: 0 !important;
240-
max-width: 100%;
241-
}
242-
243-
.title-background {
244-
margin: 0 auto;
245-
width: 70%;
246-
}
247-
}
248-
249214
&.hero {
250215
.title {
251216
flex: 1;
@@ -331,12 +296,16 @@
331296
padding: 0;
332297

333298
.banner__wrapper {
299+
height: 400px;
334300
flex-direction: row;
335301
gap: 32px;
302+
padding-right: 0;
303+
margin-right: 0;
304+
max-width: calc(100% - ((100% - 720px) / 2));
336305
}
337306

338307
.imagen {
339-
min-height: 350px;
308+
min-height: 400px;
340309
height: max-content;
341310
overflow: hidden;
342311
padding: 0;
@@ -345,7 +314,7 @@
345314
flex: 2;
346315

347316
img {
348-
min-height: 350px;
317+
min-height: 400px;
349318
height: 100%;
350319
}
351320
}
@@ -356,7 +325,6 @@
356325

357326
h2 {
358327
margin-bottom: 1rem;
359-
max-width: 300px;
360328
}
361329

362330
h3 {
@@ -369,9 +337,9 @@
369337
.banner__wrapper {
370338
height: 400px;
371339
flex-direction: row-reverse;
372-
max-width: 90%;
373-
margin-right: inherit;
374-
padding: 0;
340+
padding-right: 0;
341+
margin-right: 0;
342+
max-width: calc(100% - ((100% - 720px) / 2));
375343
}
376344

377345
.imagen {
@@ -426,14 +394,6 @@
426394
flex-direction: row;
427395
}
428396

429-
&.background {
430-
.title-background {
431-
h1 {
432-
padding-bottom: 20px;
433-
}
434-
}
435-
}
436-
437397
&.hero {
438398
.banner__wrapper {
439399
flex-direction: row;
@@ -524,6 +484,7 @@
524484
&.diagonal {
525485
.banner__wrapper {
526486
max-height: 450px;
487+
max-width: calc(100% - (100% - 960px) / 2);
527488
}
528489

529490
.imagen {
@@ -536,10 +497,24 @@
536497
.title {
537498
h2 {
538499
margin-bottom: 1rem;
539-
max-width: 400px;
540500
}
541501
}
542502
}
503+
504+
&.diagonalReverse {
505+
.banner__wrapper {
506+
max-width: calc(100% - (100% - 960px) / 2);
507+
}
508+
}
509+
}
510+
511+
@media screen and (min-width: $breakpoint-xl) {
512+
&.diagonalReverse,
513+
&.diagonal {
514+
.banner__wrapper {
515+
max-width: calc(100% - (100% - 1140px) / 2);
516+
}
517+
}
543518
}
544519

545520
@media screen and (min-width: $breakpoint-xxl) {
@@ -552,17 +527,10 @@
552527
}
553528
}
554529

530+
&.diagonalReverse,
555531
&.diagonal {
556532
.banner__wrapper {
557-
margin-right: 0;
558-
margin-left: 200px;
559-
max-width: calc(100% - 200px);
560-
padding: 0;
561-
}
562-
563-
.title {
564-
display: flex;
565-
justify-content: end;
533+
max-width: calc(100% - (100% - 1320px) / 2);
566534
}
567535
}
568536
}

src/components/BannerRedirect/BannerRedirect.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ function BannerRedirect() {
3131

3232
if (!isOpen) return null
3333

34+
const redirect = () => {
35+
closeBanner()
36+
window.location.href = REDIRECT.url
37+
}
38+
3439
return (
3540
<section className="BannerRedirect container">
3641
<div className="BannerRedirect__wrapper">
@@ -40,8 +45,11 @@ function BannerRedirect() {
4045
<MdClose />
4146
</button>
4247
</div>
43-
<button className="BannerRedirect__wrapper__btn" onClick={closeBanner}>
44-
<a href={REDIRECT.url}>{REDIRECT.callToAction}</a>
48+
<button
49+
onClick={() => redirect()}
50+
className="BannerRedirect__wrapper__btn"
51+
>
52+
{REDIRECT.callToAction}
4553
</button>
4654
</div>
4755
</section>

0 commit comments

Comments
 (0)