Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/banner #25

Merged
merged 2 commits into from
Jan 25, 2024
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
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
Loading