Skip to content

Commit

Permalink
Fix banner heading content
Browse files Browse the repository at this point in the history
Squash and merge the following commits into develop:
* fix(Banner): fix content and text length
* fix(Banner): make heading text shadow smoother
  • Loading branch information
mateusriff authored Jan 25, 2024
1 parent ee875ae commit 1e29f4d
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 6 deletions.
1 change: 1 addition & 0 deletions public/locales/en/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions public/locales/pt-BR/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
7 changes: 6 additions & 1 deletion src/components/Home/BannerV2/Banner.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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, 0.8);
@media (max-width: 768px) {
padding: 0;
}
`

export const BannerImg = styled(Image)`
Expand Down
5 changes: 3 additions & 2 deletions src/components/Home/BannerV2/Banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<S.SectionContainer>
<S.TextContainer>
<S.Heading>ROBÔCIN</S.Heading>
<S.Paragraph>IA que vence competições mundiais</S.Paragraph>
<S.Paragraph>{translate.heading}</S.Paragraph>
</S.TextContainer>
<S.BannerImg src={GroupPhoto} alt="Group photo" />
</S.SectionContainer>
Expand Down
5 changes: 3 additions & 2 deletions src/components/Home/BannerV2/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import React from 'react'

import { BannerDefaultProps } from './interfaces'
import Main from './Banner'

const Banner = () => {
return <Main />
const Banner = ({ translate }: BannerDefaultProps) => {
return <Main translate={translate} />
}

export default Banner
5 changes: 5 additions & 0 deletions src/components/Home/BannerV2/interfaces.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export interface BannerDefaultProps {
translate: {
heading: string
}
}
2 changes: 1 addition & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default function Home() {
return (
<S.PageWrap>
<S.ContentWrap>
<Banner />
<Banner translate={t.home.banner} />
<AboutUs translate={t.home.about_us} />
<Activities translate={t.home.activities} />
<Sponsors translate={t.home.sponsors} />
Expand Down

0 comments on commit 1e29f4d

Please sign in to comment.