-
+
+
{(video?.url !== null && video?.url !== undefined) ?
}
@@ -107,4 +107,24 @@ const VideoBackground = ({
)
}
+VideoBackground.propTypes = {
+ data: PropTypes.shape({
+ video: PropTypes.shape({
+ url: PropTypes.string.isRequired
+ }),
+ videoUrl: PropTypes.string,
+ description: PropTypes.string,
+ backgroundImage: PropTypes.shape({
+ url: PropTypes.string.isRequired,
+ }),
+ button: PropTypes.shape({
+ content: PropTypes.string.isRequired,
+ url: PropTypes.string,
+ landing_page: PropTypes.shape({
+ slug: PropTypes.string.isRequired
+ })
+ })
+ })
+}
+
export default VideoBackground
diff --git a/src/components/videoBackground/videoBackground.scss b/src/components/videoBackground/videoBackground.scss
index e97512dc..a0d0d875 100644
--- a/src/components/videoBackground/videoBackground.scss
+++ b/src/components/videoBackground/videoBackground.scss
@@ -1,10 +1,14 @@
@import "../../styles/global.scss";
.videoBackground {
+ aspect-ratio: 1.91/1;
+ max-width: 100%;
+
&-container {
- margin-top: 50px;
- margin-bottom: 50px;
+ padding-top: 50px;
+ padding-bottom: 50px;
}
+
video,
iframe {
width: 100%;
@@ -12,7 +16,9 @@
object-fit: cover;
display: block;
border-radius: 5px;
+ margin-bottom: 0px;
}
+
&-card {
width: 100%;
backdrop-filter: blur(14px);
@@ -23,30 +29,29 @@
word-wrap: break-all;
padding: 15px;
}
- h5 {
+
+ h4 {
width: 100%;
+ margin-bottom: 8px;
color: $grey;
}
- button {
+
+ a {
@include secondaryBtn;
- a {
- color: $grey;
- }
+ color: $grey;
+ display: block;
+ width: max-content;
+ padding: 8px 16px;
}
}
@media screen and (min-width: $breakpoint-md) {
.videoBackground {
- // width: calc(100% - 6em);
height: 400px;
position: relative;
z-index: 3;
display: flex;
- // margin: 3em;
- &-container {
- margin-top: 80px;
- margin-bottom: 80px;
- }
+
.video {
top: 0;
position: absolute;
@@ -55,8 +60,8 @@
object-fit: cover;
z-index: -1;
cursor: pointer;
- // border-radius: 20px;
}
+
&-card {
z-index: 4;
align-self: flex-end;
@@ -70,12 +75,9 @@
margin: 2em;
padding: 2em;
- h5 {
+ h4 {
color: $grey;
}
- button {
- @include secondaryBtn;
- }
}
}
}
@@ -83,9 +85,6 @@
@media screen and (min-width: $breakpoint-lg) {
.videoBackground {
height: 520px;
- &-container {
- margin-bottom: 80px;
- }
}
}
@@ -93,16 +92,4 @@
.videoBackground {
height: 720px;
}
-}
-
-// @media screen and (max-width: $breakpoint-md) {
-// .videoBackground {
-// height: 500px;
-// video {
-// height: 80%;
-// }
-// &-card {
-// height: 20%;
-// }
-// }
-// }
+}
\ No newline at end of file
diff --git a/src/context/themeContext.js b/src/context/themeContext.js
index f4bfa746..3d533e14 100644
--- a/src/context/themeContext.js
+++ b/src/context/themeContext.js
@@ -50,7 +50,7 @@ const getDeviseTheme = () => {
}
}
ThemeProvider.propTypes = {
- children: PropTypes.object,
+ children: PropTypes.node,
}
export default ThemeProvider
diff --git a/src/hooks/useBlog.js b/src/hooks/useBlog.js
index 2a2821b0..10cb46b6 100644
--- a/src/hooks/useBlog.js
+++ b/src/hooks/useBlog.js
@@ -22,6 +22,15 @@ const useBlog = () => {
}
}
}
+ imagePage {
+ url
+ alternativeText
+ localFile {
+ childImageSharp {
+ gatsbyImageData
+ }
+ }
+ }
blog_category {
name
diff --git a/src/hooks/useFooter.js b/src/hooks/useFooter.js
index b8097518..9018cc3b 100644
--- a/src/hooks/useFooter.js
+++ b/src/hooks/useFooter.js
@@ -44,6 +44,7 @@ const useFooter = () => {
contact {
title
iconText {
+ id
name
icon {
code
@@ -59,6 +60,7 @@ const useFooter = () => {
location {
title
iconText {
+ id
name
icon {
code
diff --git a/src/schema/blogSchema.js b/src/schema/blogSchema.js
index 122f4891..fc860c26 100644
--- a/src/schema/blogSchema.js
+++ b/src/schema/blogSchema.js
@@ -247,6 +247,7 @@ type StrapiBlogCategory implements Node {
locale: String
): Date
image: LocalFile
+ imagePage: LocalFile
slug: String
}
diff --git a/src/templates/BlogItemDetail.js b/src/templates/BlogItemDetail.js
index 04f65e60..9b44c76c 100644
--- a/src/templates/BlogItemDetail.js
+++ b/src/templates/BlogItemDetail.js
@@ -1,21 +1,16 @@
import React from "react"
import { graphql } from "gatsby"
-import showdown from "showdown"
-// import ReactMarkdown from "react-markdown"
import MarkdownView from "react-showdown"
import Layout from "../components/layout"
-import { Seo } from "../components/index.js"
-import { BannerTop } from "../components/index.js"
-import { getImage, GatsbyImage } from "gatsby-plugin-image"
+import { Seo, BannerTop, CustomImage } from "../components/index.js"
+import PropTypes from "prop-types"
import "./BlogItemDetail.scss"
const BlogDetail = ({ data }) => {
const { title, description, image, imagePage, author } = data?.allStrapiArticle?.nodes[0]
- const bannerTop = imagePage ? { title, imagePage } : { title, image }
+ const bannerTop = imagePage ? { title, imagePage } : { title, image }
- let { summary } = author
-
return (
@@ -25,15 +20,16 @@ const BlogDetail = ({ data }) => {
- {/*
*/}
{author?.map(author => (
-
@@ -46,27 +42,59 @@ const BlogDetail = ({ data }) => {
- {/*
-
-
Artículos relacionados
-
-
-
-
{title}
-
{summary}
-
- Ver más
-
-
-
-
-
-
*/}
)
}
+BlogDetail.propTypes = {
+ data: PropTypes.shape({
+ allStrapiArticle: PropTypes.shape({
+ nodes: PropTypes.arrayOf(
+ PropTypes.shape({
+ title: PropTypes.string.isRequired,
+ description: PropTypes.string.isRequired,
+ slug: PropTypes.string.isRequired,
+ image: PropTypes.shape({
+ url: PropTypes.string.isRequired,
+ alternativeText: PropTypes.string,
+ localFile: PropTypes.shape({
+ childImageSharp: PropTypes.shape({
+ gatsbyImageData: PropTypes.object.isRequired
+ })
+ })
+ }),
+ imagePage: PropTypes.shape({
+ url: PropTypes.string.isRequired,
+ alternativeText: PropTypes.string,
+ localFile: PropTypes.shape({
+ childImageSharp: PropTypes.shape({
+ gatsbyImageData: PropTypes.object.isRequired
+ })
+ })
+ }),
+ author: PropTypes.arrayOf(
+ PropTypes.shape({
+ name: PropTypes.string.isRequired,
+ subTitle: PropTypes.string,
+ summary: PropTypes.string,
+ image: PropTypes.shape({
+ url: PropTypes.string.isRequired,
+ alternativeText: PropTypes.string,
+ localFile: PropTypes.shape({
+ childImageSharp: PropTypes.shape({
+ gatsbyImageData: PropTypes.object.isRequired
+ })
+ })
+ })
+ })
+ )
+ })
+ )
+ })
+ })
+}
+
export const query = graphql`
query($slug: String!) {
allStrapiArticle(filter: { slug: { eq: $slug } }) {
@@ -75,6 +103,8 @@ export const query = graphql`
description
slug
image {
+ url
+ alternativeText
localFile {
childImageSharp {
gatsbyImageData
@@ -82,6 +112,8 @@ export const query = graphql`
}
}
imagePage{
+ url
+ alternativeText
localFile {
childImageSharp {
gatsbyImageData
@@ -93,6 +125,8 @@ export const query = graphql`
subTitle
summary
image {
+ url
+ alternativeText
localFile {
childImageSharp {
gatsbyImageData(width: 150, height: 150)
@@ -104,4 +138,5 @@ export const query = graphql`
}
}
`
+
export default BlogDetail
diff --git a/src/templates/LandingPage.js b/src/templates/LandingPage.js
index fe9b2b2c..41cf5ccc 100644
--- a/src/templates/LandingPage.js
+++ b/src/templates/LandingPage.js
@@ -13,7 +13,10 @@ const LandingPage = ({ data, location }) => {
return (
-
+
{pageData?.body?.length > 0 && (
)}
@@ -29,7 +32,12 @@ LandingPage.propTypes = {
name: PropTypes.string.isRequired,
body: PropTypes.arrayOf(
PropTypes.object
- )
+ ),
+ seo: PropTypes.shape({
+ pageTitle: PropTypes.string.isRequired,
+ pageDescription: PropTypes.string.isRequired,
+ pageKeywords: PropTypes.string
+ })
})
)
})
@@ -43,6 +51,11 @@ export const query = graphql`
nodes {
body
name
+ seo {
+ pageTitle
+ pageKeywords
+ pageDescription
+ }
}
}
}