Skip to content
This repository has been archived by the owner on May 26, 2024. It is now read-only.

Commit

Permalink
Initial working copy.
Browse files Browse the repository at this point in the history
  • Loading branch information
James Manes committed Feb 27, 2022
1 parent 913b774 commit e5c65da
Show file tree
Hide file tree
Showing 13 changed files with 277 additions and 509 deletions.
439 changes: 94 additions & 345 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
"@babel/preset-react": "^7.16.0",
"babel-loader": "^8.2.0",
"babel-plugin-styled-components": "^2.0.0",
"css-loader": "^6.6.0",
"style-loader": "^3.3.0",
"url-loader": "^4.1.1",
"html-webpack-plugin": "^5.5.0",
"webpack-dev-server": "^4.7.0",
"webpack": "^5.69.0",
Expand Down
Binary file added src/img/photo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 5 additions & 2 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@

<meta name="viewport" content="width=device-width, initial-scale=1"/>

<link href="https://fonts.googleapis.com/css?family=Raleway"
rel="stylesheet"/>
<script defer src="bundle.js"></script>
<style type="text/css">
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
background: #005e6f linear-gradient(223deg, #005e6f 20%, #001d7a);
height: 100vh;
width: 100vw;
Expand Down
52 changes: 52 additions & 0 deletions src/js/components/About.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import React from 'react';
import styled from 'styled-components';

/**
* A component that displays a name and biography.
*
* @author James Manes ([email protected])
*/
const About = () => {

const About = styled.div`
`
const Link = styled.a`
color: white;
`
const Header = styled.h1`
margin: 0;
`

const Biography = styled.p`
`

const Paragraph = styled.p`
margin-bottom: 4px;
:last-child {
margin-top: 2px;
}
`

return(
<About>
<Header>James Manes</Header>
<div>
<Biography>
Senior Software Engineer passionate about clean code and concise
documentation.
</Biography>
<Paragraph>
🎓 Bachelor & Master of Science from <Link rel="noopener noreferrer"
href="https://ucmo.edu" target="_blank">UCM</Link>.
</Paragraph>
<Paragraph>
💼 Currently employed at <Link rel="noopener noreferrer"
href="https://www.cerner.com/" target="_blank">Cerner Corporation</Link>.
</Paragraph>
</div>
</About>
);
}

export default About;
40 changes: 0 additions & 40 deletions src/js/components/AboutPane.jsx

This file was deleted.

35 changes: 28 additions & 7 deletions src/js/components/App.jsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,37 @@
import React from 'react';
import Container from './Container';
import AboutPane from './AboutPane';
import styled from 'styled-components';
import About from './About';
import Navigation from './Navigation';
import BackgroundGrid from './BackgroundGrid';
import Avatar from './Avatar';

/**
* Main application component.
*/
const App = () => {
const Container = styled.div`
background-color: rgba(255, 255, 255, 0.1);
font-family: "Raleway", sans-serif;
border-radius: 14px;
font-size: 11pt;
width: 350px;
color: white;
padding: 20px;
margin: 20px;
`
const OuterContainer = styled.div`
display: flex;
align-items: center;
justify-content: center;
`

return (
<Container>
<AboutPane/>
<Navigation/>
</Container>
<OuterContainer>
<Avatar/>
<Container>
<About/>
<Navigation/>
</Container>
</OuterContainer>
)
}

Expand Down
32 changes: 32 additions & 0 deletions src/js/components/Avatar.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import styled, { keyframes} from 'styled-components';
import Image from '../../img/photo.jpg';

const rotate = keyframes`
to {
transform: rotate(360deg);
}
`

const Avatar = styled.div`
background-image: url(${Image});
background-size: 100%;
outline-offset: 10px;
border-radius: 100%;
margin-right: 20px;
width: 150px;
height: 150px;
position: relative;
:before {
animation: ${rotate} 60s linear infinite;
outline: 4px dotted rgba(255, 255, 255, 0.1);
postion: absolute;
display: block;
border-radius: 100%;
outline-offset: 10px;
width: 150px;
height: 150px;
content: '';
}
`

export default Avatar;
47 changes: 47 additions & 0 deletions src/js/components/Button.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import React from 'react';
import styled from 'styled-components';

const Button = ({ children, angle, href }) => {
const OuterButton = styled.a`
border-radius: 10px;
display: inline-block;
background: rgba(240, 0, 20, 0.4);
text-decoration: none;
text-align: center;
line-height: 30px;
min-width: 100px;
margin-left: 20px;
user-select: none;
color: white;
transform: rotate(${props => props.angle}deg);
transition: transform .2s;
:first-child {
margin-left: 0;
}
:hover {
text-decoration: underline;
transform: scale(1.2);
cursor: pointer;
}
:focus {
outline: 4px solid rgba(0, 0, 0, 0.3);
}
`
const InnerButton = styled.div`
border-radius: 5px;
background: rgba(0, 0, 0, 0.3);
margin: 6px;
transform: rotate(-${props => props.angle}deg);
`

return (
<OuterButton angle={angle} href={href} rel="noopener noreferrer" target="_blank">
<InnerButton angle={angle}>
{children}
</InnerButton>
</OuterButton>
)
}

export default Button;
13 changes: 0 additions & 13 deletions src/js/components/Container.jsx

This file was deleted.

59 changes: 0 additions & 59 deletions src/js/components/MainView.jsx

This file was deleted.

50 changes: 12 additions & 38 deletions src/js/components/Navigation.jsx
Original file line number Diff line number Diff line change
@@ -1,57 +1,31 @@
import React from 'react';
import styled, { keyframes} from 'styled-components';
import styled from 'styled-components';
import Button from './Button';

/**
* Represents the navigation bar.
* Navigation bar component.
*
* @author James Manes ([email protected])
*/
const Navigation = () => {

const randomAngle = () => {
return Math.floor((Math.random() * 3) + 1);
return Math.floor((Math.random() * 4) + 1);
}

const angle1 = randomAngle();
const angle2 = randomAngle();

const Button = styled.a`
border-radius: 10px;
display: inline-block;
background: rgba(240, 0, 20, 0.4);
text-decoration: none;
text-align: center;
line-height: 30px;
min-width: 100px;
margin-right: 8px;
margin-left: 8px;
user-select: none;
color: white;
transform: rotate(${props => props.angle}deg);
`
const InnerButton = styled.div`
border-radius: 5px;
background: rgba(0, 0, 0, 0.3);
margin: 6px;
transform: rotate(-${props => props.angle}deg);
const ButtonContainer = styled.div`
margin-top: 20px
`

return(
<div id="navigation">
<ButtonContainer>
<Button href="http://stackoverflow.com/story/jmanes"
rel="noopener noreferrer" target="_blank"
className="navigation-item"
angle={angle1}>
<InnerButton angle={angle1}>History</InnerButton>
</Button>
angle={randomAngle()}>History</Button>
<Button href="https://www.linkedin.com/in/jamesmanes"
rel="noopener noreferrer" target="_blank"
className="navigation-item"
angle={angle2}>
<InnerButton angle={angle2}>LinkedIn</InnerButton>
</Button>
</div>
angle={randomAngle()}>LinkedIn</Button>
<Button href="https://jmanes.blog"
angle={randomAngle()}>Blog</Button>
</ButtonContainer>
);
}

Expand Down
Loading

0 comments on commit e5c65da

Please sign in to comment.