From 3a7f501733b06a93a4153b03846f660838344cb4 Mon Sep 17 00:00:00 2001 From: mateusriff Date: Thu, 25 Jan 2024 20:31:53 -0300 Subject: [PATCH 1/2] fix(Banner): fix content and text length --- public/locales/en/index.js | 1 + public/locales/pt-BR/index.js | 1 + src/components/Home/BannerV2/Banner.styles.ts | 7 ++++++- src/components/Home/BannerV2/Banner.tsx | 5 +++-- src/components/Home/BannerV2/index.tsx | 5 +++-- src/components/Home/BannerV2/interfaces.ts | 5 +++++ src/pages/index.tsx | 2 +- 7 files changed, 20 insertions(+), 6 deletions(-) diff --git a/public/locales/en/index.js b/public/locales/en/index.js index aba183b..3e411ee 100644 --- a/public/locales/en/index.js +++ b/public/locales/en/index.js @@ -104,6 +104,7 @@ const en = { largest robotics competition"`, complement: `Read more at:`, }, + heading: 'Award-winning AI and Robotics Research', achievements: [ { title: 'Small Size League World Champions', diff --git a/public/locales/pt-BR/index.js b/public/locales/pt-BR/index.js index 346ff89..874ce8e 100644 --- a/public/locales/pt-BR/index.js +++ b/public/locales/pt-BR/index.js @@ -102,6 +102,7 @@ const ptBR = { robótica do mundo"`, complement: 'Leia mais em:', }, + heading: 'Pesquisa de IA e Robótica premiada internacionalmente', achievements: [ { title: 'Campeões Mundiais em SSL', diff --git a/src/components/Home/BannerV2/Banner.styles.ts b/src/components/Home/BannerV2/Banner.styles.ts index 5669ee2..75dbe1c 100644 --- a/src/components/Home/BannerV2/Banner.styles.ts +++ b/src/components/Home/BannerV2/Banner.styles.ts @@ -13,12 +13,17 @@ export const SectionContainer = styled.section` export const TextContainer = styled.div` width: 100vw; + padding: 10vw; position: absolute; text-align: center; margin: auto; padding: auto; color: white; - text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8); + text-shadow: 5px 5px 4px rgba(0, 0, 0, 1); + + @media (max-width: 768px) { + padding: 0; + } ` export const BannerImg = styled(Image)` diff --git a/src/components/Home/BannerV2/Banner.tsx b/src/components/Home/BannerV2/Banner.tsx index bf74631..0a7fac0 100644 --- a/src/components/Home/BannerV2/Banner.tsx +++ b/src/components/Home/BannerV2/Banner.tsx @@ -3,13 +3,14 @@ import React from 'react' import { GroupPhoto } from '@/assets' import * as S from './Banner.styles' +import { BannerDefaultProps } from './interfaces' -const Banner = () => { +const Banner = ({ translate }: BannerDefaultProps) => { return ( ROBÔCIN - IA que vence competições mundiais + {translate.heading} diff --git a/src/components/Home/BannerV2/index.tsx b/src/components/Home/BannerV2/index.tsx index a112fbf..0950e8d 100644 --- a/src/components/Home/BannerV2/index.tsx +++ b/src/components/Home/BannerV2/index.tsx @@ -1,9 +1,10 @@ import React from 'react' +import { BannerDefaultProps } from './interfaces' import Main from './Banner' -const Banner = () => { - return
+const Banner = ({ translate }: BannerDefaultProps) => { + return
} export default Banner diff --git a/src/components/Home/BannerV2/interfaces.ts b/src/components/Home/BannerV2/interfaces.ts index e69de29..eac2fab 100644 --- a/src/components/Home/BannerV2/interfaces.ts +++ b/src/components/Home/BannerV2/interfaces.ts @@ -0,0 +1,5 @@ +export interface BannerDefaultProps { + translate: { + heading: string + } +} diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 925e373..90e41f6 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -13,7 +13,7 @@ export default function Home() { return ( - + From 89489e3b4042d07d9de468fd88e6a530c8798c94 Mon Sep 17 00:00:00 2001 From: mateusriff Date: Thu, 25 Jan 2024 20:37:35 -0300 Subject: [PATCH 2/2] fix(Banner): make heading text shadow smoother --- src/components/Home/BannerV2/Banner.styles.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Home/BannerV2/Banner.styles.ts b/src/components/Home/BannerV2/Banner.styles.ts index 75dbe1c..4aa32d1 100644 --- a/src/components/Home/BannerV2/Banner.styles.ts +++ b/src/components/Home/BannerV2/Banner.styles.ts @@ -19,7 +19,7 @@ export const TextContainer = styled.div` margin: auto; padding: auto; color: white; - text-shadow: 5px 5px 4px rgba(0, 0, 0, 1); + text-shadow: 5px 5px 4px rgba(0, 0, 0, 0.8); @media (max-width: 768px) { padding: 0;