Skip to content

Commit

Permalink
adding header
Browse files Browse the repository at this point in the history
  • Loading branch information
sapi committed Feb 3, 2025
1 parent 6587605 commit b3caa88
Show file tree
Hide file tree
Showing 13 changed files with 724 additions and 116 deletions.
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
"preview": "vite preview"
},
"dependencies": {
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@material-ui/core": "^4.12.4",
"@material-ui/icons": "^4.11.3",
"@mui/icons-material": "^6.4.2",
"@mui/material": "^6.4.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "7.1.4"
Expand Down
Binary file added src/assets/CV_SARA_VIEIRA.pdf
Binary file not shown.
42 changes: 42 additions & 0 deletions src/components/SocialMediaButton/SocialMediaButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { colors, SvgIcon, SvgIconProps } from "@material-ui/core";

type SocialMediaButtonProps = {
href: string;
icon: string | React.ElementType<SvgIconProps>;
label: string;
alt?: string;
download?: string;
};

const link = {
color: '#2D4160',
}

const iconStyle = {
fontSize: '250%',
}

const SocialMediaButton: React.FC<SocialMediaButtonProps> = ({
href,
icon,
alt,
download,
}) => {
return (
<a
href={href}
target="_blank"
rel="noopener noreferrer"
download={download ? download : undefined}
style={link}
>
{typeof icon === "string" ? (
<img src={icon} alt={alt} />
) : (
<SvgIcon component={icon} style={iconStyle}/>
)}
</a>
);
};

export default SocialMediaButton;
3 changes: 1 addition & 2 deletions src/containers/App/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import Routing from '../Routing/Routing';
import './App.css'

function App() {



return (
<Routing/>
);
Expand Down
60 changes: 58 additions & 2 deletions src/containers/Header/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,2 +1,58 @@
export default function Header() {
}
import { FC,memo } from "react";
import LinkedInIcon from "@material-ui/icons/LinkedIn";
import GitHubIcon from "@material-ui/icons/GitHub";
import DescriptionIcon from '@material-ui/icons/Description';
import SocialMediaButton from "../../components/SocialMediaButton/SocialMediaButton";
import logoImg from "../../images/logo.png"
import cvPDF from "../../assets/CV_SARA_VIEIRA.pdf"

const Header: FC = memo(() => {
const style = {
backgroundColor: '#FFFBF0',
color: '#2D4160',
margin: '0.5%',
padding: '1%',
font: '',
borderRadius: '10px',
position: 'relative',
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
} as const
const leftCorner = {
display: 'flex',
flexDirection: 'row',
alignItems: 'center',
} as const
const rightCorner = {
position: 'relative',
display: 'flex',
right: 0,
} as const
return (
<div style={style}>
<div style={leftCorner}>
<img src={logoImg}/>
</div>
<div style={rightCorner}>
<SocialMediaButton
href={cvPDF}
icon = {DescriptionIcon}
label="CV"
/>
<SocialMediaButton
href="https://github.com/spgvieira"
icon = {GitHubIcon}
label="Github"
/>
<SocialMediaButton
href="https://www.linkedin.com/in/sarapvieira/"
icon = {LinkedInIcon}
label="LinkedIn"
/>
</div>
</div>
)
});

export default Header;
10 changes: 7 additions & 3 deletions src/containers/Routing/Routing.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import { Route, Routes } from 'react-router-dom'
import UnderConstruction from '../UnderConstruction/UnderConstruction'
import Header from '../Header/Header'

function Routing() {
return (
<Routes>
<Route path="/" element={<UnderConstruction/>}></Route>
</Routes>
<div>
<Header></Header>
<Routes>
<Route path="/" element={<UnderConstruction/>}></Route>
</Routes>
</div>
)
}

Expand Down
5 changes: 3 additions & 2 deletions src/containers/UnderConstruction/UnderConstruction.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
}

html{
background: url("../../images/UnderConstruction.png") no-repeat center center fixed;
background-color: #313c52;
/* background: url("../../images/UnderConstruction.png") no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
background-size: 100% 100%;
background-size: 100% 100%; */

}
24 changes: 23 additions & 1 deletion src/containers/UnderConstruction/UnderConstruction.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,31 @@
import { FC, memo } from "react";
import './UnderConstruction.css'
import underConstructionImg from '../../images/UnderConstruction.png'

const UnderConstruction: FC = memo(() => {
const myStyle = {
backgroundColor: '#FFFBF0',
color: '#2D4160',
textAlign: 'center',
fontSize: '400%',
fontFamily: 'sans-serif',
position: 'fixed',
width: '100%',
height: '100%',
} as const
const imgStyle = {
margin: "5%",
marginBottom: "5%",
marginLeft: "0",
width: "100%"
}
return (
<div></div>
<div style={myStyle}>
<img src={underConstructionImg} style={imgStyle}/>
<header> MUCH LIKE ME, THIS WEBSITE IS A WORK IN PROGRESS </header>
<body> IMPROVING STEP BY STEP </body>
<img src={underConstructionImg} style={imgStyle}/>
</div>
);
});

Expand Down
Binary file modified src/images/UnderConstruction.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 0 additions & 67 deletions src/index.css
Original file line number Diff line number Diff line change
@@ -1,68 +1 @@
:root {
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
line-height: 1.5;
font-weight: 400;

color-scheme: light dark;
color: rgba(255, 255, 255, 0.87);
background-color: #242424;

font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

a {
font-weight: 500;
color: #646cff;
text-decoration: inherit;
}
a:hover {
color: #535bf2;
}

body {
margin: 0;
display: flex;
place-items: center;
min-width: 320px;
min-height: 100vh;
}

h1 {
font-size: 3.2em;
line-height: 1.1;
}

button {
border-radius: 8px;
border: 1px solid transparent;
padding: 0.6em 1.2em;
font-size: 1em;
font-weight: 500;
font-family: inherit;
background-color: #1a1a1a;
cursor: pointer;
transition: border-color 0.25s;
}
button:hover {
border-color: #646cff;
}
button:focus,
button:focus-visible {
outline: 4px auto -webkit-focus-ring-color;
}

@media (prefers-color-scheme: light) {
:root {
color: #213547;
background-color: #ffffff;
}
a:hover {
color: #747bff;
}
button {
background-color: #f9f9f9;
}
}
34 changes: 0 additions & 34 deletions src/themes.tsx

This file was deleted.

Loading

0 comments on commit b3caa88

Please sign in to comment.