From 793e72b67ce75ea231c85d3e42dab7c4bb3c2fea Mon Sep 17 00:00:00 2001 From: Manuel Correia Date: Tue, 10 Oct 2023 23:57:45 +0100 Subject: [PATCH 1/2] Removed barrel files --- src/components/Button/Button.test.tsx | 2 +- src/components/Button/Button.tsx | 35 ---------- src/components/Button/index.tsx | 36 +++++++++- src/components/Card/Card.test.tsx | 2 +- src/components/Card/Card.tsx | 97 -------------------------- src/components/Card/index.tsx | 98 ++++++++++++++++++++++++++- src/components/Header/Header.tsx | 17 ----- src/components/Header/index.tsx | 18 ++++- src/components/Input/Input.tsx | 25 ------- src/components/Input/index.tsx | 26 ++++++- src/components/Textarea/Textarea.tsx | 24 ------- src/components/Textarea/index.tsx | 25 ++++++- src/disableReactDevTools.ts | 1 - 13 files changed, 200 insertions(+), 206 deletions(-) delete mode 100644 src/components/Button/Button.tsx delete mode 100644 src/components/Card/Card.tsx delete mode 100644 src/components/Header/Header.tsx delete mode 100644 src/components/Input/Input.tsx delete mode 100644 src/components/Textarea/Textarea.tsx diff --git a/src/components/Button/Button.test.tsx b/src/components/Button/Button.test.tsx index 67d6ec5..f128af8 100644 --- a/src/components/Button/Button.test.tsx +++ b/src/components/Button/Button.test.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { fireEvent, render, screen } from '@testing-library/react'; -import { Button } from './Button'; +import { Button } from '.'; it('renders snapshot correctly', () => { const tree = render(
- - - Frontend Web Developer - -
- +
- - Hi! I use React & Typescript to build a lot of cool things. - -
- Working at: - +
+

- Boost-IT - + Frontend Web Developer +

+

+ Hey there! 👋 I'm passionate about crafting seamless user experiences using the power of HTML, CSS, and JavaScript/Typescript. With a knack for creative problem-solving, I specialize in Frontend development. My toolkit includes popular frameworks like React and technologies like TypeScript. +

- +
+
+ +
+ + Working with the following technologies: + +
+
+ + Typescript + + Typescript +
+
+ + Javascript + + Javascript +
+
+ + React + + React +
+
+ + Nextjs + + Nextjs +
+
+ + React Query + +
+
+ + React Hook Form + +
+
+ + React Router + +
+
+ + Jotai + +
+
+ + Module-Federation + +
+
+ + MicroFrontends + +
+
+ + Component Libraries + +
+
+ + Storybook + +
+
+ + GraphQL + + GraphQL +
+
+ + Webpack + + Webpack +
+
+ + Docker + + Docker +
+
+ + Bash + + Bash +
+
+ + Babel + + Babel +
+
+ + GIT + + GIT +
+
+ + CI/CD + +
+
+ + Jest + + Jest +
+
+ + Styled-Components + +
+
+
+
+
- - - Frontend Web Developer - -
- +
Button Label @@ -25,7 +25,7 @@ exports[`renders component with all sizes 1`] = ` data-testid="button" > Button Label @@ -96,7 +96,7 @@ exports[`renders component with all sizes 2`] = ` data-testid="button" > Button Label @@ -109,7 +109,7 @@ exports[`renders component with all sizes 2`] = ` data-testid="button" > Button Label @@ -123,7 +123,7 @@ exports[`renders component with all sizes 2`] = ` data-testid="button" > Button Label @@ -194,7 +194,7 @@ exports[`renders component with all sizes 3`] = ` data-testid="button" > Button Label @@ -207,7 +207,7 @@ exports[`renders component with all sizes 3`] = ` data-testid="button" > Button Label @@ -220,7 +220,7 @@ exports[`renders component with all sizes 3`] = ` data-testid="button" > Button Label @@ -234,7 +234,7 @@ exports[`renders component with all sizes 3`] = ` data-testid="button" > Button Label @@ -305,7 +305,7 @@ exports[`renders component with two types 1`] = ` data-testid="button" > Button Label @@ -319,7 +319,7 @@ exports[`renders component with two types 1`] = ` data-testid="button" > Button Label @@ -390,7 +390,7 @@ exports[`renders component with two types 2`] = ` data-testid="button" > Button Label @@ -403,7 +403,7 @@ exports[`renders component with two types 2`] = ` data-testid="button" > Button Label @@ -417,7 +417,7 @@ exports[`renders component with two types 2`] = ` data-testid="button" > Button Label @@ -488,7 +488,7 @@ exports[`renders snapshot correctly 1`] = ` data-testid="button" > Button Label @@ -502,7 +502,7 @@ exports[`renders snapshot correctly 1`] = ` data-testid="button" > Button Label @@ -573,7 +573,7 @@ exports[`renders without crashing 1`] = ` data-testid="button" > Button Label @@ -587,7 +587,7 @@ exports[`renders without crashing 1`] = ` data-testid="button" > Button Label diff --git a/src/components/Header/__snapshots__/Header.test.tsx.snap b/src/components/Header/__snapshots__/Header.test.tsx.snap index 7b16ccc..1fd4349 100644 --- a/src/components/Header/__snapshots__/Header.test.tsx.snap +++ b/src/components/Header/__snapshots__/Header.test.tsx.snap @@ -6,13 +6,13 @@ exports[`renders snapshot correctly 1`] = ` "baseElement":
, "container":
, "debug": [Function], @@ -75,13 +75,13 @@ exports[`renders without crashing 1`] = ` "baseElement":
, "container":
, "debug": [Function], diff --git a/src/components/Header/styles.tsx b/src/components/Header/styles.tsx index 433b57e..bddac23 100644 --- a/src/components/Header/styles.tsx +++ b/src/components/Header/styles.tsx @@ -10,11 +10,9 @@ const setColor = ({ backgroundColor }: { backgroundColor?: string }) => { export const StyledHeader = styled.div` position: relative; - top: 0; width: 100%; display: flex; background: ${setColor}; - z-index: 999; flex-direction: row; justify-content: flex-end; height: 60px; diff --git a/src/components/Portefolio/__snapshots__/Portefolio.test.tsx.snap b/src/components/Portefolio/__snapshots__/Portefolio.test.tsx.snap index ef7ad8c..c0ebb9f 100644 --- a/src/components/Portefolio/__snapshots__/Portefolio.test.tsx.snap +++ b/src/components/Portefolio/__snapshots__/Portefolio.test.tsx.snap @@ -2,11 +2,35 @@ exports[`renders snapshot correctly 1`] = `
-
+
+
+
+
+
+ +
+ + Working with the following technologies: + +
+
+ +
+
`; @@ -16,21 +40,69 @@ exports[`renders without crashing 1`] = ` "baseElement":
-
+
+
+
+
+
+ +
+ + Working with the following technologies: + +
+
+ +
+
, "container":
-
+
+
+
+
+
+ +
+ + Working with the following technologies: + +
+
+ +
+
, "debug": [Function], diff --git a/src/components/Portefolio/index.tsx b/src/components/Portefolio/index.tsx index b923854..3b18be9 100644 --- a/src/components/Portefolio/index.tsx +++ b/src/components/Portefolio/index.tsx @@ -3,10 +3,17 @@ import React from 'react'; import { StyledCard, StyledCardContainer, + StyledFlexContainer, + StyledHeaderLabelContainer, StyledHeadline, StyledImage, + StyledImageStack, + StyledItemStack, StyledLabel, - StyledLink, + StyledLabelHeader, + StyledStackItemLabel, + StyledStackList, + StyledSubtitle, StyledTextContainer, StyledWrapper } from './styles'; @@ -16,27 +23,38 @@ export const Portefolio: React.FC = ({ img, headline, label, - link, - linkLabel, + currentStack, + otherStack, cards }: PortefolioProps) => { return ( - {img && } - {headline && {headline}} - - {link && linkLabel - ? label && ( - - {label} -
- Working at: - {linkLabel} -
-
- ) - : label && {label}} -
+
+ + {img && } + + {headline && {headline}} + {label && {label}} + + + + +
+ Working with the following technologies: + + {currentStack?.map((stack) => ( + + {stack.name} + {stack.logoUrl && ( + + )} + + ))} + +
+
+
+
{cards && ( {cards.map((card, i) => ( diff --git a/src/components/Portefolio/styles.tsx b/src/components/Portefolio/styles.tsx index 752ae5d..a11bee3 100644 --- a/src/components/Portefolio/styles.tsx +++ b/src/components/Portefolio/styles.tsx @@ -6,12 +6,33 @@ export const alignCenter = css` text-align: center; `; -export const StyledHeadline = styled.span` +export const StyledHeadline = styled.h1` margin: 20px 0 15px 0; font-size: 30px; color: white; `; +export const StyledSubtitle = styled.h2` + margin: 20px 0 15px 0; + font-size: 16px; + font-weight: 500; + line-height: initial; + color: white; + max-width: 600px; + text-align: justify; + + @media (max-width: 600px) { + text-align: center; + } +`; + +export const StyledLabelHeader = styled.span` + display: flex; + flex-direction: column; + color: white; + padding-bottom: 1rem; +`; + export const StyledLabel = styled.span` display: flex; flex-direction: column; @@ -19,6 +40,39 @@ export const StyledLabel = styled.span` color: white; `; +export const StyledStackItemLabel = styled.span` + font-weight: 500; + font-size: 1.2rem; + position: relative; + z-index: 1; + user-select: none; +`; + +export const StyledHeaderLabelContainer = styled.div` + display: flex; + flex-direction: column; + align-items: flex-start; +`; + +export const StyledFlexContainer = styled.div` + display: flex; + align-items: center; + gap: 50px; + + @media (max-width: 600px) { + flex-direction: column; + padding: 20px; + } +`; + +export const StyledImageStack = styled.img` + height: 50px; + top: 3px; + right: 3px; + position: absolute; + object-fit: contain; +`; + export const StyledImage = styled.img` max-height: 178px; max-width: 178px; @@ -26,7 +80,7 @@ export const StyledImage = styled.img` width: 50%; height: 70%; border-radius: 50%; - margin: auto; + margin: 0; border: 2px solid white; `; @@ -51,11 +105,37 @@ export const StyledLink = styled.a` `; export const StyledTextContainer = styled.div` - margin-bottom: 50px; font-size: 1.5rem; + padding: 20px 0; +`; + +export const StyledStackList = styled.div` + display: flex; + flex-wrap: wrap; + justify-content: space-between; + overflow-y: auto; +`; + +export const StyledItemStack = styled.div` + display: flex; + position: relative; + background-color: #3332321f; + border-bottom: 1px solid #ccc; + transition: background-color 0.3s ease; + margin-bottom: 10px; + flex-basis: calc(33% - 10px); + margin-bottom: 10px; padding: 20px; - * { - margin-bottom: 20px; + font-size: 1rem; + box-sizing: border-box; + overflow: hidden; + + @media screen and (max-width: 767px) { + flex-basis: calc(100% - 20px); + } + + :hover { + background-color: #e3e3e336; } `; @@ -89,8 +169,11 @@ export const StyledSocialSection = styled.div` export const StyledWrapper = styled.div` display: flex; flex-direction: column; + height: 100%; padding: 50px; color: white; + justify-content: space-between; + overflow-y: auto; ${StyledHeadline}, ${StyledLabel}, diff --git a/src/components/Portefolio/types.ts b/src/components/Portefolio/types.ts index 9fd23c7..71ad62b 100644 --- a/src/components/Portefolio/types.ts +++ b/src/components/Portefolio/types.ts @@ -1,13 +1,3 @@ -export interface PubLinksData { - link?: string; - linkLabel?: string; -} - -export interface PubLinks { - label?: string; - data?: PubLinksData[]; -} - export interface CardType { title?: string; subtitle?: string; @@ -18,11 +8,16 @@ export interface CardType { }; } +export interface StackType { + name: string; + logoUrl: string; +} + export interface PortefolioProps { img?: string; headline?: string; label?: string; - link?: string; - linkLabel?: string; + currentStack?: StackType[]; + otherStack?: StackType[]; cards?: CardType[]; } diff --git a/src/data/index.json b/src/data/index.json index 860d06e..6223cea 100644 --- a/src/data/index.json +++ b/src/data/index.json @@ -1,10 +1,106 @@ { "profile": { - "label": "Hi! I use React & Typescript to build a lot of cool things.", + "label": "Hey there! 👋 I'm passionate about crafting seamless user experiences using the power of HTML, CSS, and JavaScript/Typescript. With a knack for creative problem-solving, I specialize in Frontend development. My toolkit includes popular frameworks like React and technologies like TypeScript.", "headline": "Frontend Web Developer", "img": "/images/me.jpg", - "link": "https://boost-it.pt/pt/", - "linkLabel": "Boost-IT", + "currentTechStack": [ + { + "name": "Typescript", + "logoUrl": "https://raw.githubusercontent.com/danielcranney/readme-generator/main/public/icons/skills/typescript-colored.svg" + }, + { + "name": "Javascript", + "logoUrl": "https://raw.githubusercontent.com/danielcranney/readme-generator/main/public/icons/skills/javascript-colored.svg" + }, + { + "name": "React", + "logoUrl": "https://raw.githubusercontent.com/danielcranney/readme-generator/main/public/icons/skills/react-colored.svg" + }, + { + "name": "Nextjs", + "logoUrl": "https://raw.githubusercontent.com/danielcranney/readme-generator/main/public/icons/skills/nextjs-colored.svg" + }, + { + "name": "React Query", + "logoUrl": "" + }, + { + "name": "React Hook Form", + "logoUrl": "" + }, + { + "name": "React Router", + "logoUrl": "" + }, + { + "name": "Jotai", + "logoUrl": "" + }, + { + "name": "Module-Federation", + "logoUrl": "" + }, + { + "name": "MicroFrontends", + "logoUrl": "" + }, + { + "name": "Component Libraries", + "logoUrl": "" + }, + { + "name": "Storybook", + "logoUrl": "" + }, + { + "name": "GraphQL", + "logoUrl": "https://raw.githubusercontent.com/danielcranney/readme-generator/main/public/icons/skills/graphql-colored.svg" + }, + { + "name": "Webpack", + "logoUrl": "https://raw.githubusercontent.com/devicons/devicon/d00d0969292a6569d45b06d3f350f463a0107b0d/icons/webpack/webpack-original-wordmark.svg" + }, + { + "name": "Docker", + "logoUrl": "https://raw.githubusercontent.com/devicons/devicon/master/icons/docker/docker-original-wordmark.svg" + }, + { "name": "Bash", "logoUrl": "https://www.vectorlogo.zone/logos/gnu_bash/gnu_bash-icon.svg" }, + { "name": "Babel", "logoUrl": "https://www.vectorlogo.zone/logos/babeljs/babeljs-icon.svg" }, + { + "name": "GIT", + "logoUrl": "https://www.vectorlogo.zone/logos/git-scm/git-scm-icon.svg" + }, + { + "name": "CI/CD", + "logoUrl": "" + }, + { + "name": "Jest", + "logoUrl": "https://www.vectorlogo.zone/logos/jestjsio/jestjsio-icon.svg" + }, + { + "name": "Styled-Components", + "logoUrl": "" + } + ], + "otherToolsFrameworks": [ + { + "name": "Angular", + "logoUrl": "https://angular.io/assets/images/logos/angular/angular.svg" + }, + { + "name": "AngularJS", + "logoUrl": "https://raw.githubusercontent.com/devicons/devicon/master/icons/angularjs/angularjs-original-wordmark.svg" + }, + { + "name": "Vuejs", + "logoUrl": "https://raw.githubusercontent.com/devicons/devicon/master/icons/vuejs/vuejs-original-wordmark.svg" + }, + { + "name": "Redux", + "logoUrl": "https://raw.githubusercontent.com/danielcranney/readme-generator/main/public/icons/skills/graphql-colored.svg" + } + ], "cards": [ { "title": "LinkedIn", diff --git a/src/index.css b/src/index.css deleted file mode 100644 index ac9124b..0000000 --- a/src/index.css +++ /dev/null @@ -1,82 +0,0 @@ -/* Global CSS Variables */ - -html { - height: 100%; - min-height: 100%; - position: relative; - background-color: #fafafa; -} - -body { - width: 100%; - height: 100%; - margin: 0; - font-family: monospace; - font-size: 1.2rem; - color: #333; - background-color: #fafafa; -} - -#root { - width: 100%; - height: 100%; - - /* Global Size Standards */ - --mobile: 600px; - --small: 768px; - --medium: 1024px; - --large: 1440px; -} - -* { - font: 1rem brandon-grotesque, Helvetica, sans-serif; -} - -*, -*::before, -*::after { - box-sizing: border-box; -} - -table, -th, -td { - border-collapse: collapse; -} - -th, -td { - border-width: 0; -} - -table { - width: 100%; -} - -thead { - width: 100%; - color: white; - background: rgb(27, 27, 27); - font-size: 14px; -} - -tr { - width: 100%; -} - -td, -.header__item { - flex: 1 1 20%; - text-align: center; -} - -.header__item { - text-transform: uppercase; -} - -.filter__link { - color: white; - text-decoration: none; - position: relative; - display: inline-block; -} diff --git a/src/index.tsx b/src/index.tsx index efa5c4b..c67bd3c 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -5,12 +5,14 @@ import { BrowserRouter } from 'react-router-dom'; import { App } from './App'; import { disableReactDevTools } from './disableReactDevTools'; import * as serviceWorker from './serviceWorker'; +import { GlobalStyle } from './GlobalStyles'; const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement); root.render( + diff --git a/src/pages/projects/styles.tsx b/src/pages/projects/styles.tsx index 3df3769..4160135 100644 --- a/src/pages/projects/styles.tsx +++ b/src/pages/projects/styles.tsx @@ -4,11 +4,9 @@ import { Card, Header } from '../../components'; import { COLOR_PRIMARY_2 } from '../../GlobalStyles'; export const StyledContainer = styled.div` - display: block; height: 100%; - width: 100%; - box-sizing: border-box; - overflow: hidden; + display: flex; + flex-direction: column; `; export const StyledContent = styled.div` @@ -40,7 +38,7 @@ export const StyledOverlay = styled.div` gap: 20px; -webkit-column-gap: 20px; column-gap: 20px; - justify-content: center; + justify-content: space-evenly; align-content: center; align-items: center; overflow-y: auto; @@ -63,6 +61,11 @@ export const StyledCard = styled(Card)` export const StyledHeader = styled(Header)` border-bottom: 1px solid ${COLOR_PRIMARY_2}; + display: flex; + flex-direction: row; + justify-content: flex-end; + height: 60px; + align-items: center; > * { margin: 10px; diff --git a/src/AppStyles.tsx b/src/styles.tsx similarity index 100% rename from src/AppStyles.tsx rename to src/styles.tsx