From acb3b285a461d0284289ef9348ae613d1b3636ac Mon Sep 17 00:00:00 2001 From: jgleal Date: Wed, 20 Dec 2023 12:59:58 +0100 Subject: [PATCH] chore: last minute changes --- src/components/Button/Button.styles.tsx | 4 +++- src/components/Hero/Hero.styles.tsx | 7 ++++++- src/components/Hero/Hero.tsx | 2 +- src/components/NavBar/NavBar.tsx | 7 +------ src/components/NavBar/Navbar.styles.tsx | 22 ++++---------------- src/components/Technologies/Technologies.tsx | 2 +- src/index.css | 2 ++ src/layout/MainLayout/MainLayout.styles.tsx | 1 + src/pages/About/About.styles.tsx | 9 ++++++++ src/pages/About/About.tsx | 17 ++++++++------- 10 files changed, 38 insertions(+), 35 deletions(-) create mode 100644 src/pages/About/About.styles.tsx diff --git a/src/components/Button/Button.styles.tsx b/src/components/Button/Button.styles.tsx index 72dbe89..50978ba 100644 --- a/src/components/Button/Button.styles.tsx +++ b/src/components/Button/Button.styles.tsx @@ -6,10 +6,11 @@ const getSize = (size?: 'small' | 'large') => ({ default: '14px 30px 16px' })[size || 'default'] -export const StyledButton = styled.button<{ size?: 'small' | 'large' }>` +export const StyledButton = styled.a<{ size?: 'small' | 'large' }>` line-height: 1; font-size: 15px; cursor: pointer; + text-decoration: none; font-weight: 700; display: inline-block; color: #1b116e; @@ -20,6 +21,7 @@ export const StyledButton = styled.button<{ size?: 'small' | 'large' }>` padding: ${props => getSize(props.size)}; &:hover { background-color: #55bd90; + color: #1b116e; }; &:active { border: solid 2px #1b116e; diff --git a/src/components/Hero/Hero.styles.tsx b/src/components/Hero/Hero.styles.tsx index ed7ebf4..d1d4579 100644 --- a/src/components/Hero/Hero.styles.tsx +++ b/src/components/Hero/Hero.styles.tsx @@ -55,12 +55,17 @@ export const HeroImage = styled.img` } ` -export const HeroButton = styled.button` +export const HeroButton = styled.a` margin: auto; width: max-content; color: black; + cursor: pointer; + text-decoration: none; border-radius: 40px; border: 1px solid rgb(97, 218, 251); padding: 0.5rem 2rem; background: ${props => props.theme.colors.gradientButton}; + &:hover { + color: black; + } ` diff --git a/src/components/Hero/Hero.tsx b/src/components/Hero/Hero.tsx index 583b623..4ea75cc 100644 --- a/src/components/Hero/Hero.tsx +++ b/src/components/Hero/Hero.tsx @@ -23,7 +23,7 @@ export const Hero: React.FC = () => { {t('subtitle', { interpolation: { escapeValue: true } })} {t('description')} - {t('button')} + {t('button')} diff --git a/src/components/NavBar/NavBar.tsx b/src/components/NavBar/NavBar.tsx index dfb2755..36f8833 100644 --- a/src/components/NavBar/NavBar.tsx +++ b/src/components/NavBar/NavBar.tsx @@ -1,18 +1,16 @@ import React, { useState } from 'react' import { StyledDesktopNav, StyledMobileNav, - StyledNav, StyledMobileNavMenu, StyledImage, StyledNavButton, StyledRightContainer + StyledNav, StyledMobileNavMenu, StyledImage, StyledRightContainer } from '@/components/NavBar/Navbar.styles' import shieldjsLogo from '@/assets/shieldjs.svg' import { Link } from 'react-router-dom' import { NavBarItems } from './components/NavBarItems/NavBarItems' import { HamburguerMenu } from './components/HamburguerMenu/HamburguerMenu' import { LanguageSelector } from './components/LanguageSelector' -import { useTranslation } from 'react-i18next' export const NavBar: React.FC = () => { const [expanded, setExpanded] = useState(false) - const { t } = useTranslation('navBar') const handleToggleMenu = () => { setExpanded(!expanded) @@ -38,9 +36,6 @@ export const NavBar: React.FC = () => { - - {t('startButton')} - diff --git a/src/components/NavBar/Navbar.styles.tsx b/src/components/NavBar/Navbar.styles.tsx index 0097e21..25833c8 100644 --- a/src/components/NavBar/Navbar.styles.tsx +++ b/src/components/NavBar/Navbar.styles.tsx @@ -1,5 +1,4 @@ import styled from 'styled-components' -import { StyledButton } from '../Button/Button.styles' export const StyledNavMenu = styled.ul` display: flex; @@ -24,6 +23,8 @@ export const StyledMobileNav = styled.div` ` export const StyledNav = styled.nav` + position: sticky; + top: 0; display: flex; align-items: center; justify-content: space-between; @@ -31,7 +32,7 @@ export const StyledNav = styled.nav` padding: 1rem 2rem; width: 100vw; height: 6.6rem; - box-shadow: 0 0 5px rgba(0,0,0,.2); + box-shadow: 0 9px 15px rgba(0,0,0,0.4); ${props => props.theme.mediaQueries.sm} { padding: 1rem 2rem; } @@ -63,6 +64,7 @@ export const StyledRightContainer = styled.div` align-items: center; justify-content: space-between; gap: 1rem; + margin-left: auto; ` export const StyledImage = styled.img` @@ -71,19 +73,3 @@ export const StyledImage = styled.img` height: 3rem; } ` - -export const StyledNavButton = styled(StyledButton)` - display: none; - color: black; - border-radius: 40px; - border: 1px solid rgb(97, 218, 251); - padding: 0.5rem 1rem; - min-width: auto; - background: ${props => props.theme.colors.gradientButton}; - ${props => props.theme.mediaQueries.sm} { - display: flex; - } - &:hover { - background: ${props => props.theme.colors.gradientButton}; - } -` diff --git a/src/components/Technologies/Technologies.tsx b/src/components/Technologies/Technologies.tsx index d8d1a13..069e003 100644 --- a/src/components/Technologies/Technologies.tsx +++ b/src/components/Technologies/Technologies.tsx @@ -12,7 +12,7 @@ export const Technologies: React.FC = () => { {t('title')} {t('subtitle')} - + {technologiesImages.map(({ src, alt, key, href }) => diff --git a/src/index.css b/src/index.css index c803ad6..54caedc 100644 --- a/src/index.css +++ b/src/index.css @@ -26,6 +26,8 @@ -webkit-text-size-adjust: 100%; max-width: 1280px; text-align: center; + scroll-behavior: smooth; + } * { diff --git a/src/layout/MainLayout/MainLayout.styles.tsx b/src/layout/MainLayout/MainLayout.styles.tsx index f5c82c1..0b0757f 100644 --- a/src/layout/MainLayout/MainLayout.styles.tsx +++ b/src/layout/MainLayout/MainLayout.styles.tsx @@ -5,6 +5,7 @@ export const MainWrapper = styled.div` flex-direction: column; min-height: 100vh; width: 100%; + ` export const Main = styled.main` diff --git a/src/pages/About/About.styles.tsx b/src/pages/About/About.styles.tsx new file mode 100644 index 0000000..adb7b37 --- /dev/null +++ b/src/pages/About/About.styles.tsx @@ -0,0 +1,9 @@ +import styled from 'styled-components' + +export const AboutWrapper = styled.div` + min-height: 100vh; + max-width: 1000px; + display: flex; + flex-direction: column; + margin: 0 auto; +` diff --git a/src/pages/About/About.tsx b/src/pages/About/About.tsx index 4430eab..9deb1f4 100644 --- a/src/pages/About/About.tsx +++ b/src/pages/About/About.tsx @@ -1,19 +1,22 @@ import { MainLayout } from '@/layout/MainLayout/MainLayout' import { useTranslation } from 'react-i18next' import { Link } from 'react-router-dom' +import { AboutWrapper } from './About.styles' export const About = () => { const { t } = useTranslation('about') return ( -

{t('title')}

-

{t('subtitle')}

-

{t('description.p1')}

-

{t('description.p2')}

-

{t('description.p3')}

-

{t('conclusion')}

- {t('sendBack')} + +

{t('title')}

+

{t('subtitle')}

+

{t('description.p1')}

+

{t('description.p2')}

+

{t('description.p3')}

+

{t('conclusion')}

+ {t('sendBack')} +
) }