diff --git a/src/components/Banner/Banner.js b/src/components/Banner/Banner.js
index 7d8b2d3..058633e 100644
--- a/src/components/Banner/Banner.js
+++ b/src/components/Banner/Banner.js
@@ -9,7 +9,8 @@ import CustomImage from "../CustomImage/CustomImage"
const Banner = ({ data }) => {
const { theme } = useTheme()
- const { title, variant, summary, animation, image, imageDark, button } = data
+ const { title, variant, summary, animation, image, imageDark, arrayButtons, button } = data
+
const defaultOptions = {
loop: true,
@@ -39,14 +40,27 @@ const Banner = ({ data }) => {
dangerouslySetInnerHTML={{ __html: summary }}
/>
}
- {button && (
-
+ {Array.isArray(arrayButtons) && arrayButtons.length > 0 && (
+
+ {arrayButtons.map((btn, index) => (
+
+ ))}
+
)}
+ {button && (
+
+ )}
@@ -81,6 +95,15 @@ Banner.propTypes = {
title: PropTypes.string.isRequired,
variant: PropTypes.string.isRequired,
summary: PropTypes.string,
+ arrayButtons: PropTypes.arrayOf(
+ PropTypes.shape({
+ content: PropTypes.string,
+ url: PropTypes.string,
+ english_landing_page: PropTypes.shape({
+ slug: PropTypes.string.isRequired,
+ }),
+ })
+ ),
button: PropTypes.shape({
content: PropTypes.string.isRequired,
url: PropTypes.string,
diff --git a/src/components/Banner/Banner.scss b/src/components/Banner/Banner.scss
index 5313508..4bb3726 100644
--- a/src/components/Banner/Banner.scss
+++ b/src/components/Banner/Banner.scss
@@ -170,6 +170,8 @@
&.diagonalReverse {
.banner__wrapper {
margin: 32px auto;
+ display: flex;
+ flex-direction: column;
}
.imagen {
@@ -184,13 +186,22 @@
}
}
+ .banner__buttons{
+ display: flex;
+ flex-direction: row;
+ justify-content: flex-start;
+ padding-top: 25px;
+ padding-right: 10px;
+ }
+
.button {
- margin-top: 20px;
- margin-bottom: 20px;
- display: inline-block;
- color: #607ee7;
- text-decoration: underline;
- padding-left: 5px;
+ color:$primary;
+
+ @include primaryBtn;
+ display: block;
+ width: max-content;
+ padding: 10px 15px;
+ margin-right: 20px;
}
.title {
@@ -356,9 +367,7 @@
}
}
- .button {
- padding-left: 5rem;
- }
+
.title {
display: flex;
diff --git a/src/components/BannerList/Banner.scss b/src/components/BannerList/Banner.scss
index bc40eb9..fdbff1c 100644
--- a/src/components/BannerList/Banner.scss
+++ b/src/components/BannerList/Banner.scss
@@ -54,11 +54,16 @@
a {
margin-top: 10px;
@include primaryBtn;
- align-self: baseline;
+ align-self: flex-start;
- @media screen and (max-width: ($breakpoint-md - 1px)) {
- display: none;
- }
+ @media screen and (max-width: ($breakpoint-md - 1px)) {
+ display: inline-block;
+ @include primaryBtn;
+ //margin: 10px auto 0;
+ text-align: center;
+ align-self:flex-start;
+ }
+
}
}
}
diff --git a/src/components/Banners/BannerTop.js b/src/components/Banners/BannerTop.js
index a1185f5..92600d9 100644
--- a/src/components/Banners/BannerTop.js
+++ b/src/components/Banners/BannerTop.js
@@ -12,15 +12,26 @@ const BannerTop = ({ banner }) => {
return (
-
+ {imageBanner ? (
+
+
+
+ {title}
+
+
+
+ ) : (
-
+
{title}
-
+ )}
)
}
diff --git a/src/components/Banners/BannerTop.scss b/src/components/Banners/BannerTop.scss
index 6ff3a95..9429e4a 100644
--- a/src/components/Banners/BannerTop.scss
+++ b/src/components/Banners/BannerTop.scss
@@ -56,4 +56,4 @@
}
}
}
-}
+}
\ No newline at end of file
diff --git a/src/components/BlogPage/BlogContainer.js b/src/components/BlogPage/BlogContainer.js
index d53629d..624ce2d 100644
--- a/src/components/BlogPage/BlogContainer.js
+++ b/src/components/BlogPage/BlogContainer.js
@@ -7,7 +7,7 @@ import Layout from "../layout"
import Banner from "../Banner/Banner"
import "./BlogContainer.scss"
-const Blog = () => {
+const Blog = ({location}) => {
const { allStrapiBlogCategory, allStrapiArticle, allStrapiBlogPage } = useBlog()
const categorias = allStrapiBlogCategory.nodes
const articulos = allStrapiArticle.nodes
@@ -44,6 +44,7 @@ const Blog = () => {
title={seo?.pageTitle}
description={seo?.pageDescription}
keywords={seo?.pageKeywords}
+ location={location}
/>
diff --git a/src/components/DualSection/OneSection.js b/src/components/DualSection/OneSection.js
index 872b47f..9820d86 100644
--- a/src/components/DualSection/OneSection.js
+++ b/src/components/DualSection/OneSection.js
@@ -19,7 +19,6 @@ const OneSection = ({ data: { dualSectionPart } }) => {
import("./BannerRedirect/BannerRedirect"))
@@ -16,7 +18,7 @@ const Layout = ({ children, options = {}, location }) => {
options = { ...defaultOptions, ...options }
- React.useEffect(() => {
+ useEffect(() => {
const hash = location?.state?.component
let el = hash && document.getElementById(hash)
if (el) {
@@ -27,17 +29,57 @@ const Layout = ({ children, options = {}, location }) => {
const userLanguage =
typeof window !== "undefined" ? navigator.language : undefined
+ const { strapiEnglishHome } = useStaticQuery(graphql`
+ query GetVideoBackgroundImage {
+ strapiEnglishHome {
+ body {
+ strapi_component
+ backgroundImage {
+ url
+ alternativeText
+ localFile {
+ childImageSharp {
+ gatsbyImageData(
+ layout: FULL_WIDTH
+ placeholder: BLURRED
+ formats: [WEBP, AUTO]
+ )
+ }
+ }
+ }
+ }
+ }
+ }
+ `)
+
+ const videoBlock = strapiEnglishHome?.body?.find(
+ block => block.strapi_component === "home.video-background"
+ )
+
+ const heroUrl = videoBlock?.backgroundImage?.url
+ const fullHeroUrl = heroUrl?.startsWith("http")
+ ? heroUrl
+ : heroUrl
+ ? `https://strapi-s3-bitlogic.s3.sa-east-1.amazonaws.com${heroUrl}`
+ : null
+
return (
+
+
+
+
{options.hasHeader && }
+
{userLanguage?.startsWith("es") && (
-
+
)}
+
{children}
+
{options.hasFooter && }
- {/*© {new Date().getFullYear()}, Built with*/}
)
}
diff --git a/src/components/videoBackground/VideoBackground.js b/src/components/videoBackground/VideoBackground.js
index e8da60b..8f2a14f 100644
--- a/src/components/videoBackground/VideoBackground.js
+++ b/src/components/videoBackground/VideoBackground.js
@@ -4,6 +4,7 @@ import CustomLink from "../CustomLink/CustomLink"
import PropTypes from "prop-types"
import { GatsbyImage, getImage } from "gatsby-plugin-image"
+// ✅ CAMBIO: detectar versión de iOS
function getIOSVersion() {
if (typeof window === "undefined" || typeof navigator === "undefined") return null
const userAgent = navigator.userAgent
@@ -35,7 +36,9 @@ function getVideoContent(
image,
posterData
) {
- const posterUrl = posterData?.url
+ const posterUrl = posterData?.url?.startsWith("http")
+ ? getImage(posterData.url)
+ : getImage(`https://strapi-s3-bitlogic.s3.sa-east-1.amazonaws.com${posterData?.url}`)
const posterSharp = posterData?.localFile && getImage(posterData.localFile)
const url = videoUrl?.replace("watch?v=", "embed/")
@@ -43,43 +46,73 @@ function getVideoContent(
const codeIndex = code.indexOf("?")
if (codeIndex !== -1) code = code.substring(0, codeIndex)
- if (!isIOSPriorTo("17.4")) {
- if (video?.url) {
- return (
-
- )
- }
- if (videoUrl) {
- return (
-