Skip to content

Commit e3ba995

Browse files
Merge pull request #95 from bitlogic/develop
Release 09-12-2024
2 parents dbc2c36 + 0f02f84 commit e3ba995

File tree

10 files changed

+91
-24
lines changed

10 files changed

+91
-24
lines changed

src/components/BannerList/Banner.scss

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,17 @@
99
gap: 16px;
1010
}
1111

12+
h2 {
13+
font-size: 52px;
14+
margin: 0;
15+
}
16+
17+
1218
.card_item {
1319
gap: 8px;
1420
align-items: center;
1521

16-
h2 {
22+
h3 {
1723
font-size: 28px;
1824
margin: 0;
1925
}

src/components/BannerList/BannerList.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ export default function BannerList({ data }) {
2525
<div className="card_item col-9 pe-2">
2626
{item?.english_landing_page ? (
2727
<Link to={getUrl(item.english_landing_page.slug)}>
28-
<h2>{item.title}</h2>
28+
<h3>{item.title}</h3>
2929
<p>{item.description}</p>
3030
</Link>
3131
) : (
3232
<>
33-
<h2>{item.title}</h2>
33+
<h3>{item.title}</h3>
3434
<p>{item.description}</p>
3535
</>
3636
)}
@@ -42,12 +42,12 @@ export default function BannerList({ data }) {
4242
return (
4343
<div className="container pt-5">
4444
<div className="bannerList d-md-flex flex-row">
45-
<h1 className="bannerList__title col-md-6 col-xl-6 align-self-center mb-4">
45+
<h2 className="bannerList__title col-md-6 col-xl-6 align-self-center mb-4">
4646
{title}
4747
{contactForm && concactFormAnchor && callToAction && (
4848
<a href={concactFormAnchor}>{callToAction}</a>
4949
)}
50-
</h1>
50+
</h2>
5151
<div className="bannerList__cards col-md-6 col-xl-6">{cards}</div>
5252
</div>
5353
</div>

src/components/FaIcon/FaIcon.js

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,34 @@
11
import React from "react"
22
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
3-
import "../FontAwesomeOne/FontAwesomeOne"
3+
import { faEnvelope, faLocationDot } from "@fortawesome/free-solid-svg-icons"
4+
import { faLinkedin, faTwitter, faInstagram, faYoutube, faSpotify } from "@fortawesome/free-brands-svg-icons"
45
import PropTypes from "prop-types"
56

7+
// Mapeo de los íconos que se usan
8+
const iconMap = {
9+
"fa-envelope": faEnvelope,
10+
"fa-location-dot": faLocationDot,
11+
"fa-linkedin": faLinkedin,
12+
"fa-twitter": faTwitter,
13+
"fa-instagram": faInstagram,
14+
"fa-youtube": faYoutube,
15+
"fa-spotify": faSpotify,
16+
}
617

718
const FaIcon = ({ type, code }) => {
8-
return (
9-
<div>
10-
<FontAwesomeIcon icon={[type, code]} />
11-
</div>
12-
)
19+
const icon = iconMap[code]
20+
21+
if (!icon) {
22+
console.warn(`Icono no encontrado: type=${type}, code=${code}`)
23+
return null
24+
}
25+
26+
return <FontAwesomeIcon icon={icon} />
1327
}
1428

1529
FaIcon.propTypes = {
1630
type: PropTypes.string.isRequired,
17-
code: PropTypes.string.isRequired
31+
code: PropTypes.string.isRequired,
1832
}
1933

2034
export default FaIcon
Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
import { library } from '@fortawesome/fontawesome-svg-core'
2-
import { fas } from '@fortawesome/free-solid-svg-icons'
3-
import { far } from '@fortawesome/free-regular-svg-icons'
4-
import { fab } from '@fortawesome/free-brands-svg-icons'
2+
import { faEnvelope, faLocationDot } from "@fortawesome/free-solid-svg-icons"
3+
import { faLinkedin, faTwitter, faInstagram, faYoutube, faSpotify } from "@fortawesome/free-brands-svg-icons"
54

6-
library.add(fas)
7-
library.add(far)
8-
library.add(fab)
5+
library.add(faEnvelope)
6+
library.add(faLocationDot)
7+
library.add(faLinkedin)
8+
library.add(faTwitter)
9+
library.add(faInstagram)
10+
library.add(faYoutube)
11+
library.add(faSpotify)

src/components/animatedTransitionContinous/AnimatedTransitionContinous.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const AnimatedTransitionContinous = ({ data }) => {
3030
className={""}
3131
/>
3232
)}
33-
<h1 style={{ color: color }}>{innerText || ""}</h1>
33+
<h2 style={{ color: color }}>{innerText || ""}</h2>
3434
{(imagePosition === "last" || !imagePosition) && image && (
3535
<CustomImage
3636
image={image}

src/components/animatedTransitionContinous/animatedTransitionContinous.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
z-index: 1;
1010
margin: 2rem auto;
1111

12+
h2{
13+
font-size: 52px;
14+
}
15+
1216
&__title {
1317
display: flex;
1418
position: absolute;

src/components/videoBackground/VideoBackground.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ function getVideoContent(video, videoRef, isIntersecting, pausePlay, handleKeyDo
103103

104104
}
105105
} else {
106-
videoContent = imageData ? <GatsbyImage className="image" image={imageData} alt={image.alternativeText || "Image"} /> : <div><br /></div>
106+
videoContent = imageData ? <GatsbyImage width={290} height={200} className="image" image={imageData} alt={image.alternativeText || "Image"} /> : <div><br /></div>
107107
}
108108

109109
return videoContent;

src/hooks/useBlog.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ const useBlog = () => {
3838
blog_category {
3939
name
4040
}
41+
seo {
42+
pageTitle
43+
pageKeywords
44+
pageDescription
45+
}
4146
}
4247
}
4348
allStrapiBlogPage: allStrapiEnglishBlogPage {

src/templates/BlogItemDetail.js

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,53 @@ import Layout from "../components/layout"
55
import { Seo, BannerTop } from "../components/index.js"
66
import "./BlogItemDetail.scss"
77
import PropTypes from "prop-types"
8+
import { Helmet } from "react-helmet"
89
import { getImage, GatsbyImage } from "gatsby-plugin-image"
910

1011
const BlogDetail = ({ data }) => {
11-
const { title, description, image, imagePage, author, seo } =
12+
const { title, description, image, imagePage, author, seo, published_at, updated_at } =
1213
data?.allStrapiArticle?.nodes[0] || {}
1314

1415
const bannerTop = imagePage ? { title, imagePage } : { title, image }
1516

17+
const structuredData = {
18+
"@context": "https://schema.org",
19+
"@type": "Article",
20+
"headline": seo?.pageTitle || title, // Usa pageTitle de SEO o el título
21+
"description": seo?.pageDescription || description,
22+
"image": imagePage?.url || image?.url, // Imagen principal
23+
"author": author?.map(auth => ({
24+
"@type": "Person",
25+
"name": auth.name,
26+
})),
27+
"datePublished": published_at, // Ajusta con la fecha real
28+
"dateModified": updated_at, // Ajusta con la fecha real
29+
"mainEntityOfPage": {
30+
"@type": "WebPage",
31+
"@id": `https://es.bitlogic.io/blog/${data?.allStrapiArticle?.nodes[0]?.slug}`,
32+
},
33+
"publisher": {
34+
"@type": "Organization",
35+
"name": "Bitlogic",
36+
"logo": {
37+
"@type": "ImageObject",
38+
"url": "https://bitlogic.io/static/64f396cb88cfcbfda46b86c5218242f2/de081/Logo_Bit_azul_7e725e9726.webp", // URL del logo del sitio
39+
},
40+
},
41+
}
42+
1643
return (
1744
<Layout>
1845
<Seo
19-
title={title}
46+
title={seo?.pageTitle}
2047
description={seo?.pageDescription}
2148
keywords={seo?.pageKeywords}
2249
/>
50+
<Helmet>
51+
<script type="application/ld+json">
52+
{JSON.stringify(structuredData)}
53+
</script>
54+
</Helmet>
2355
<BannerTop banner={bannerTop} />
2456
<div className="detail__container row">
2557
<div className="col-lg-12">
@@ -110,6 +142,8 @@ export const query = graphql`
110142
title
111143
description
112144
slug
145+
published_at
146+
updated_at
113147
seo {
114148
pageTitle
115149
pageDescription

src/templates/LandingPage.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ const LandingPage = ({ data, location }) => {
1616
ref: wrapperRef,
1717
}
1818

19-
const { pageKeywords, pageDescription } = seo || {}
19+
const {pageTitle, pageKeywords, pageDescription } = seo || {}
2020

2121
return (
2222
<Layout location={location} options={{ hasHeader: true }}>
23-
<Seo title={name} description={pageDescription} keywords={pageKeywords} />
23+
<Seo title={pageTitle} description={pageDescription} keywords={pageKeywords} />
2424
{body?.length > 0 && navigation ? (
2525
<>
2626
<CustomSection sections={body.slice(0, 1)} />
@@ -72,6 +72,7 @@ export const query = graphql`
7272
slug
7373
}
7474
seo {
75+
pageTitle
7576
pageKeywords
7677
pageDescription
7778
}

0 commit comments

Comments
 (0)