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
14 changes: 14 additions & 0 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,20 @@ module.exports = {
icon: `src/images/isotipo.png`,
},
},
{
resolve: `gatsby-transformer-remark`,
options: {
plugins: [
{
resolve: "gatsby-remark-external-links",
options: {
target: "_blank",
rel: "nofollow",
},
},
],
},
},
"gatsby-plugin-offline",
`gatsby-plugin-sass`,
/* {
Expand Down
20,081 changes: 0 additions & 20,081 deletions package-lock.json

This file was deleted.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@
"gatsby-plugin-react-helmet": "^4.12.0",
"gatsby-plugin-sass": "^4.12.0",
"gatsby-plugin-sharp": "^3.12.0",
"gatsby-remark-external-links": "^0.0.4",
"gatsby-source-filesystem": "^3.12.0",
"gatsby-source-strapi": "^1.0.2",
"gatsby-transformer-remark": "^4.11.0",
"gatsby-transformer-sharp": "^3.12.0",
"gbimage-bridge": "^0.1.4",
"nodemon": "^2.0.7",
Expand All @@ -34,7 +36,7 @@
"react-hook-form": "^7.11.0",
"react-hubspot-form": "^1.3.7",
"react-icons": "^4.2.0",
"react-markdown": "^6.0.2",
"react-markdown": "5.0.3",
"react-script-tag": "^1.1.2",
"react-showdown": "^2.3.1",
"sass": "^1.35.1"
Expand Down
2 changes: 1 addition & 1 deletion public/page-data/index/page-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"componentChunkName": "component---src-pages-index-js",
"path": "/",
"result": {"pageContext":{}},
"staticQueryHashes": ["1128713364","1687125271","176670904","2751633039","2900147843","3549188850","4109181808","4179863467","882490824"]}
"staticQueryHashes": ["1128713364","1687125271","176670904","3498872882","3858639830","4070604734","4109181808","854109855","882490824"]}
16 changes: 5 additions & 11 deletions src/components/BlogPage/BlogArticle/BlogArticle.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
import React from "react"
import { getImage, GatsbyImage } from "gatsby-plugin-image"
import { Link } from "gatsby"
import showdown from "showdown"
// import ReactMarkdown from "react-markdown"
import MarkdownView from "react-showdown"
import "./BlogArticle.scss"


const BlogArticle = ({ title, summary, image, slug, text }) => {
let converter = new showdown.Converter()
let html = converter.makeHtml(summary)

const ReplaceHtml = () => {
return { __html: html }
}

return (
<div className="article__container">
<GatsbyImage
Expand All @@ -21,9 +14,10 @@ const BlogArticle = ({ title, summary, image, slug, text }) => {
className="article__image"
/>
<div className="article__description">
<h3>{title}</h3>
<h3>{`${title} ...`}</h3>
<div>
<p dangerouslySetInnerHTML={ReplaceHtml()} />
<MarkdownView markdown={`${summary} ...`} />
{/* <ReactMarkdown source={`${summary} ...`} /> */}
</div>
<div className="article__link">
<Link to={slug}>{text}</Link>
Expand Down
31 changes: 24 additions & 7 deletions src/components/BlogPage/BlogArticle/BlogArticle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
justify-content: center;
align-items: center;
width: 100%;
padding: 15px 0;
padding: 1.5rem 0;
}

&__image {
Expand All @@ -17,28 +17,40 @@
&__description {
display: flex;
flex-direction: column;
justify-content: space-between;
width: 100%;
height: 150px;
padding: 0 15px;

h3 {
h1,
h2,
h3,
h4,
h5,
h6 {
padding-left: 0;
margin-bottom: 15px;
font-size: $small;
line-height: 1rem;
font-weight: $max-bold;
color: $blue;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}

p {
margin-bottom: 15px;
font-size: 14px;
font-size: 12px;
line-height: 24px;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;

em {
font-size: 14px;
font-size: 12px;
}
}
}
Expand All @@ -63,24 +75,29 @@
.article {
&__container {
flex-direction: column;
padding: 2.6rem;
padding: 2rem;
}

&__image {
width: 100%;
height: 300px;
margin-bottom: 1rem;
}

&__description {
width: 100%;
height: 200px;
padding: 0;

h3 {
margin-top: 25px;
margin-bottom: 1.5rem;
font-size: $large;
line-height: 1.6rem;
color: $blue;
-webkit-line-clamp: 2;
}

p,
p,
a {
font-size: 18px;
line-height: 30px;
Expand Down
19 changes: 10 additions & 9 deletions src/components/BlogPage/BlogContainer.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
import React from "react"

import { useBanner, useBlog } from "../../hooks"

import Layout from "../../components/layout"
import BlogGrid from './BlogGrid/BlogGrid'
import BlogArticle from './BlogArticle/BlogArticle'
import BlogGrid from "./BlogGrid/BlogGrid"
import BlogArticle from "./BlogArticle/BlogArticle"

import { Seo, BannerActionCall } from "../index"

import "./BlogContainer.scss"

const Blog = () => {

const bannerData = useBanner()
const blogData = useBlog()
const data = blogData?.allStrapiBlogCategory?.nodes

const bannerBlog = bannerData?.allStrapiBanners?.nodes.find(
banner => banner.page === "blog" && banner.type === "bgColor"
)

const bannerActionCall = bannerData?.allStrapiBanners?.nodes.find(
banner => banner.page === "blog" && banner.type === "actionCall"
)

const { pageTitle, pageDescription, pageKeywords } = blogData?.allStrapiBlogPage?.nodes[0]?.seo

const {
pageTitle,
pageDescription,
pageKeywords,
} = blogData?.allStrapiBlogPage?.nodes[0]?.seo

return (
<Layout>
Expand All @@ -50,7 +51,7 @@ const Blog = () => {
key={idx}
image={item.image}
title={item.title}
summary={item.summary.substring(0, 85)}
summary={item.summary}
slug={"/blog/" + item.slug}
text="Ver más"
/>
Expand Down
1 change: 0 additions & 1 deletion src/components/BlogPage/BlogGrid/BlogGrid.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react'

import './BlogGrid.scss'
import Pagination from '../../Pagination/Pagination'

Expand Down
17 changes: 8 additions & 9 deletions src/templates/BlogItemDetail.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
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"
Expand All @@ -12,21 +14,18 @@ const BlogDetail = ({ data }) => {
const bannerTop = { title, image }

let { summary } = author
let converter = new showdown.Converter()
let html = converter.makeHtml(description)

const ReplaceHtml = () => {
return { __html: html }
}


return (
<Layout>
<Seo title={title} />
<BannerTop banner={bannerTop} />
<div className="detail__container row">
<div className="col-lg-12">
<div className="detail__description">
<p dangerouslySetInnerHTML={ReplaceHtml()} />
<MarkdownView
markdown={description}
/>
{/* <ReactMarkdown source={description} /> */}
<div className="detail__description-author">
{author?.map(author => (
<div className="detail__box-author">
Expand Down Expand Up @@ -88,7 +87,7 @@ export const query = graphql`
image {
localFile {
childImageSharp {
gatsbyImageData
gatsbyImageData(width: 200)
}
}
}
Expand Down
13 changes: 6 additions & 7 deletions src/templates/BlogItemDetail.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
h5,
h6 {
font-size: $large;
color: $blue;
em {
font-size: $large;
}
Expand Down Expand Up @@ -64,7 +65,6 @@
max-width: 95%;
margin: 1.8rem auto 3rem;
border-radius: 3px;
box-shadow: 0px 4px 4px rgb(0 0 0 / 25%);
}

blockquote {
Expand Down Expand Up @@ -208,7 +208,7 @@
&__description {
ul {
li {
font-size: 16px;
font-size: 18px;
}
}

Expand Down Expand Up @@ -243,8 +243,7 @@
}

&__box-author {
flex-direction: row;
margin: 25px auto;
margin: 1.5rem 1rem;
}

&__box-author-image {
Expand Down Expand Up @@ -272,7 +271,7 @@
}

&__description {
padding: 4rem 5rem 3rem;
padding: 4rem 2rem 3rem;

h1,
h2,
Expand Down Expand Up @@ -305,11 +304,11 @@
&__description-author {
display: flex;
justify-content: center;
margin: 3rem 1rem 1rem;
margin: 3rem 0 1rem;
}

&__box-author {
margin: 1.5rem;
margin: .7rem;
}

&__box-autor-description {
Expand Down
Loading