Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/components/ButtonLink/ButtonLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ import React from "react"

const ButtonLink = ({ button }) => {
let internal = ""
if (button.landing_page) internal = "/" + button.landing_page.slug
else if (button.singleType) internal = "/" + button.singleType
if(!button) return null
if (button?.landing_page) internal = "/" + button.landing_page.slug
else if (button?.singleType) internal = "/" + button.singleType

if (internal) return <Link to={internal}>{button.content}</Link>
else return <a href={button.url} target="_blank" rel="noreferrer">{button.content}</a>
else return <a href={button?.url} target="_blank" rel="noreferrer">{button.content}</a>
}

export default ButtonLink
58 changes: 25 additions & 33 deletions src/components/DualSection/DualSection.js
Original file line number Diff line number Diff line change
@@ -1,38 +1,30 @@
import React from 'react'
import './DualSection.scss'
import React from "react"
import ButtonLink from "../ButtonLink/ButtonLink"
import "./DualSection.scss"

export default function DualSection({ data }) {
const dualSectionParts = data?.dualSectionPart
const dualSectionParts = data?.dualSectionPart
const listSectionParts = dualSectionParts.map(section => (
<div className="dualSection col-md-6 my-2 p-md-3 p-xl-4">
<div className="dualSection__image">
<img src={section.image.url} alt="naturaleza" />
</div>

const listSectionParts = dualSectionParts.map((section) =>
<div className="dualSection col-md-6 my-2 p-md-3 p-xl-4">
<div className="dualSection__image">
<img
src={section.image.url}
alt="naturaleza"
/>
</div>
<div className="dualSection__textContainer">
<h4>{section.title}</h4>
<p>{section.description}</p>
{section.button && (
<button className="px-4">
<ButtonLink button={section.button} />
</button>
)}
</div>
</div>
))

<div className="dualSection__textContainer">
<h4>{section.title}</h4>
<p>{section.description}</p>
{section.button && (
<a href={section.button?.url} target="_blank" rel="noreferrer" >
<button className="px-4">{section.button?.content}</button>
</a>
)}
</div>
</div>
);

return (
<div className="container py-3" id={data.strapi_component + "-" + data.id}>
<div className="d-flex flex-column flex-md-row">
{listSectionParts}
</div>
</div>



)
return (
<div className="container py-3" id={data.strapi_component + "-" + data.id}>
<div className="d-flex flex-column flex-md-row">{listSectionParts}</div>
</div>
)
}
10 changes: 4 additions & 6 deletions src/components/DualSection/OneSection.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,16 @@ const OneSection = ({ data: { id, strapi_component, dualSectionPart } }) => {
theme === "dark" && backgroundImageDark?.url
? backgroundImageDark?.url
: backgroundImage?.url
})`,
})`,
}}
>
<div className="container one_sec" id={strapi_component + "-" + id}>
<div className="one_sec-title">
<h4>{title}</h4>
<h4 className="one_sec-title-body">{description}</h4>
{button && (
<a href={button?.url} target="_blank" rel="noreferrer" >
<button className="px-4">{button?.content}</button>
</a>
)}
<button className="NavBar_Side-contact">
<ButtonLink button={button} />
</button>
</div>
<div className="one_sec-img">
<img src={image?.url} alt="one_sec" />
Expand Down
3 changes: 0 additions & 3 deletions src/components/Footer/Subscription/subscription.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@
input {
width: 75%;
}
button {
width: 35%;
}
}
}
}
Expand Down
12 changes: 8 additions & 4 deletions src/components/videoBackground/VideoBackground.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useEffect, useRef, useState } from "react"
import ButtonLink from "../ButtonLink/ButtonLink"
import "./videoBackground.scss"
const VideoBackground = ({
data: { video, description, button, strapi_component, id, backgroundImage },
Expand Down Expand Up @@ -42,7 +43,10 @@ const VideoBackground = ({
className="container px-md-0 px-lg-3 videoBackground-container"
id={strapi_component + "-" + id}
>
<section className="videoBackground" style={{ marginTop: backgroundImage && 130}}>
<section
className="videoBackground"
style={{ marginTop: backgroundImage && 130 }}
>
<video
ref={videoRef}
muted
Expand All @@ -55,9 +59,9 @@ const VideoBackground = ({
/>
<div className="videoBackground-card">
<h5>{description}</h5>
<a href={button.url} target="_blank" rel="noreferrer">
<button className="px-4">{button.content}</button>
</a>
<button className="px-4">
<ButtonLink button={button} />
</button>
</div>
</section>
</div>
Expand Down
13 changes: 4 additions & 9 deletions src/components/videoBackground/videoBackground.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,16 @@
h5 {
width: 100%;
color: $grey;

}
button {
@include secondaryBtn;
a {
color: $grey;
}
}
}





@media screen and (min-width: $breakpoint-md) {

.videoBackground {
// width: calc(100% - 6em);
height: 550px;
Expand Down Expand Up @@ -71,7 +68,7 @@
box-shadow: 0px 0px 3px #00000044;
margin: 2em;
padding: 2em;

h5 {
color: $grey;
}
Expand All @@ -82,9 +79,7 @@
}
}


@media screen and (min-width: $breakpoint-lg) {

.videoBackground {
height: 80vh;
&-container {
Expand Down