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
5 changes: 0 additions & 5 deletions public/page-data/index/page-data.json

This file was deleted.

21 changes: 16 additions & 5 deletions src/components/Banner/Banner.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
import React from "react"
import { Link } from "gatsby"
import "./Banner.scss"
import { useTheme } from "../../context/themeContext"

const Banner = ({ data }) => {
const { theme } = useTheme()
const title = data?.title
const variant = data?.variant
const summary = data?.summary
const image = data?.image
const imageDark = data?.imageDark
const button = data?.button
return (
<div className={`banner ${variant}`} id={data.strapi_component + "-" + data.id}>
<div className="title container">
<div className="col-12 col-md-6">
<h1>{title}</h1>
<div className="title container-md">
<div className="col-12 col-lg-6">
{variant === 'hero' ? <h1>{title}</h1> : <h2>{title}</h2>}
<h3>{summary}</h3>
{button &&
(button?.landing_page ? (
Expand All @@ -32,8 +35,16 @@ const Banner = ({ data }) => {
</div>
</div>

<div className="imagen col-12 col-md-6">
<img src={image?.url} alt={title} />
<div className={`imagen col-12 ${variant === 'diagonal' ? 'col-md-8' : variant === 'diagonalReverse' ? 'col-md-4' : 'col-md-6'} `}>
{/* <img src={image?.url} alt={title} /> */}
<img
src={
theme === "dark" && imageDark
? imageDark?.url
: image?.url
}
alt={title}
/>
</div>
</div>
)
Expand Down
149 changes: 128 additions & 21 deletions src/components/Banner/Banner.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@
.title {
h1 {
text-transform: uppercase;
text-align: left;
margin-bottom: 0.8rem;
word-wrap: initial;
}
h3 {
font-weight: 400;
text-align: left;
}
}
}
Expand All @@ -42,30 +49,65 @@
.imagen {
display: flex;
justify-content: flex-end;
img {
max-width: 450px;
}
}
.title {
padding-top: 2rem;
padding-bottom: 2rem;
h2 {
text-transform: uppercase;
text-align: center;
word-wrap: initial;
}
h3 {
display: none;
}
}
}
&.topReverse {
height: auto;
justify-content: end;
.button {
@include primaryBtn;
margin-top: 20px;
margin-bottom: 20px;
display: inline-block;
}
.imagen {
display: flex;
justify-content: flex-start;
img {
width: 100%;
max-width: 450px;
}
}
.title {
padding-top: 2rem;
h1 {
padding-bottom: 2rem;
h2 {
text-transform: uppercase;
text-align: center;
word-wrap: initial;
}
h3 {
display: none;
}
}
}
&.diagonal {
height: auto;
min-height: 300px;
justify-content: end;
background-color: #f2f0f7;
background-color: $bg-diagonal;
.button {
margin-top: 20px;
margin-bottom: 20px;
display: inline-block;
font-weight: 600;
color: #607ee7;
text-decoration: underline;
padding-left: 5px;
}
.imagen {
display: flex;
Expand All @@ -76,10 +118,12 @@
}
.title {
padding-top: 2rem;
h1 {
padding-bottom: 2rem;
h2 {
text-transform: uppercase;
color: #607ee7;
margin-bottom: 0;
word-wrap: initial;
}
h3 {
display: none;
Expand All @@ -90,25 +134,32 @@
&.diagonalReverse {
height: auto;
justify-content: end;
background-color: #f2f0f7;

.button {
margin-top: 20px;
margin-bottom: 20px;
display: inline-block;
color: #607ee7;
text-decoration: underline;
padding-left: 5px;
}
.imagen {
display: flex;
justify-content: flex-end;
justify-content: center;
align-items: center;
img {
width: 100%;
max-width: 200px;
}
}
.title {
padding-top: 2rem;
h1 {
padding-bottom: 2rem;
background-color: $bg-diagonal;
h2 {
text-transform: uppercase;
color: #607ee7;
margin-bottom: 0;
word-wrap: initial;
}
h3 {
display: none;
Expand Down Expand Up @@ -158,18 +209,18 @@
padding: 0;
justify-content: flex-end;
img {
width: 100%;
max-width: 600px;
}
}

.title {
position: absolute;
padding-top: 0;
padding-bottom: 0;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
h1 {
h2 {
margin-bottom: 1rem;
padding-right: 3rem;
text-align: left;
Expand All @@ -180,41 +231,43 @@
}
}
}
&.diagonal {
&.topReverse {
height: 400px;
position: relative;
align-items: center;
flex-direction: row-reverse;
.imagen {
height: 500px;
max-height: 500px;
overflow: hidden;
padding: 0;
justify-content: flex-end;
img {
width: 100%;
max-width: 600px;
}
}

.title {
position: absolute;
padding-top: 0;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
h1 {
padding-bottom: 0;
flex-direction: row-reverse;
h2 {
margin-bottom: 1rem;
padding-right: 3rem;
text-align: left;
}
h3 {
font-weight: 400;
padding-right: 3rem;
}
}
}
&.diagonalReverse {
height: 400px;
&.diagonal {
height: 300px;
position: relative;
align-items: center;
.imagen {
-webkit-clip-path: polygon(17% 0, 100% 0, 100% 55%, 91% 100%, 0 100%);
clip-path: polygon(17% 0, 100% 0, 100% 55%, 91% 100%, 0 100%);
height: 500px;
overflow: hidden;
padding: 0;
Expand All @@ -227,18 +280,72 @@
.title {
position: absolute;
padding-top: 0;
padding-bottom: 0;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
h1 {

h2 {
margin-bottom: 1rem;
padding-right: 3rem;
max-width: 400px;
}
h3 {
font-weight: 400;
padding-right: 3rem;
}
}
}
&.diagonalReverse {
height: 300px;
position: relative;
align-items: center;
justify-content: flex-start;
flex-direction: row-reverse;
.imagen {
height: 500px;
overflow: hidden;
padding: 0;
justify-content: flex-end;
}
.button {
padding-left: 5rem;
}
.title {
background-color: $bg-diagonal;
-webkit-clip-path: polygon(0 0, 92% 0, 100% 45%, 100% 100%, 17% 100%);
clip-path: polygon(0 0, 92% 0, 100% 45%, 100% 100%, 17% 100%);
display: flex;
justify-content: flex-end;
flex-direction: row-reverse;
height: 100%;
align-items: center;
h2 {
margin-bottom: 1rem;
padding-left: 5rem;
}
h3 {
font-weight: 400;
padding-left: 5rem;
}
}
}
}
@media screen and (min-width: $breakpoint-lg) {
&.diagonal {
height: 400px;
}
&.diagonalReverse {
height: 400px;
.title {
h2 {
padding-left: 10rem;
}
}
.button {
padding-left: 10rem;
}
}

}
}
5 changes: 2 additions & 3 deletions src/components/BlogPage/BlogContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useBlog } from "../../hooks"
import Layout from "../../components/layout"
import BlogGrid from "./BlogGrid/BlogGrid"
import BlogArticle from "./BlogArticle/BlogArticle"
import { Seo, BannerHead } from "../index"
import { Seo } from "../index"

import "./BlogContainer.scss"

Expand All @@ -13,7 +13,6 @@ const Blog = () => {

const data = blogData?.allStrapiBlogCategory?.nodes
const dataArticles = blogData?.allStrapiArticle?.nodes
const bannerHead = blogData?.allStrapiBlogPage?.nodes[0]?.bannerHead
const filterArticle = data.map(category => dataArticles.filter(article => category.name === article.blog_category.name))

const {
Expand All @@ -34,7 +33,7 @@ const Blog = () => {
{data.length > 0 && (
<div className="blog__container">

{bannerHead && <BannerHead data={bannerHead} />}


{filterArticle?.map((category, idx) => (
<BlogGrid key={idx} title={category[0]?.blog_category?.name}>
Expand Down
2 changes: 2 additions & 0 deletions src/context/themeContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const themes = {
"--secondary-container": "#25cad3",
"--border-bottom": "#cdcdcd",
"--bg-form": "#DBDBDD",
"--bg-diagonal": "#f2f0f7",
},
dark: {
"--nav-footer-container": "#383838",
Expand All @@ -32,6 +33,7 @@ const themes = {
"--secondary": "#67f293",
"--secondary-container": "#191919",
"--bg-form": "#FAF8F8",
"--bg-diagonal": "#4A494B",

},
}
Expand Down
Binary file added src/fonts/plain-bold-webfont.woff
Binary file not shown.
Binary file added src/fonts/plain-bold-webfont.woff2
Binary file not shown.
Binary file added src/fonts/plain-medium-webfont.woff
Binary file not shown.
Binary file added src/fonts/plain-medium-webfont.woff2
Binary file not shown.
Binary file added src/fonts/plain-regular-webfont.woff
Binary file not shown.
Binary file added src/fonts/plain-regular-webfont.woff2
Binary file not shown.
Loading