-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
1,649 additions
and
91 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
import React, { useState, useEffect } from "react"; | ||
import { Row, Col, } from "../Grid"; | ||
import Portrait from "../../Assets/portrait.png" | ||
import "./style.css"; | ||
import { defaultTheme } from "react-select"; | ||
|
||
|
||
|
||
function useFadeIn(fire) { | ||
let duration = 1500; | ||
const [opacity, setOpacity] = useState(0); | ||
const [filter, setFilter] = useState(0); | ||
const [time, setTime] = useState(Date.now()); | ||
|
||
|
||
useEffect(() => { | ||
console.log("effect called") | ||
setTime(Date.now()) | ||
let queuedFrame | ||
const frameIn = function () { | ||
const now = Date.now() - time; | ||
if (now < duration) { | ||
queuedFrame = requestAnimationFrame(frameIn) | ||
} | ||
|
||
switch (fire) { | ||
case "showing": | ||
setOpacity(Math.min(1, (now / duration))) | ||
setFilter(Math.min(1, (duration / now) - 1)) | ||
break; | ||
case "hidden": | ||
setOpacity(0) | ||
setFilter(0) | ||
break; | ||
default: | ||
break; | ||
} | ||
|
||
} | ||
frameIn(); | ||
|
||
return () => cancelAnimationFrame(queuedFrame) | ||
}, [fire]); | ||
|
||
const reset = () => setTime(Date.now()); | ||
const filterVal = `blur(${filter}em)` | ||
return [opacity, filterVal, reset] | ||
} | ||
|
||
function AboutMe(props) { | ||
|
||
const [opacity, filterVal, reset] = useFadeIn(props.showing) | ||
|
||
|
||
return ( | ||
<div className={"aboutMe " + (!props.showing ? "" : "")}> | ||
<Row custom> | ||
<Col size="md-12" custom> | ||
<div id="parent"> | ||
<div id="mask" style={{ opacity: opacity, filter: filterVal }}> | ||
<div id="aboutMeContent" className="pl-4 mt-3 border-left d-flex flex-column justify-content-center"> | ||
<h2 className="mt-3">Hello, I'm Matt Baber</h2> | ||
<h2>I am a Full Stack Web Developer</h2> | ||
<hr id="hr" /> | ||
<h6>A little bit about me...</h6> | ||
<p>I am 33 years old. I live in Euclid, Ohio with | ||
my wife Emily, and our daughter Dottie and our dog and cat, Rudy and Snacky. My whole adult life I | ||
have worked as a Chef, and have made the decision to leave that career path and learn how to | ||
program.</p> | ||
<img className="img-fluid mt-3" src={Portrait} alt="my portrait"></img> | ||
</div> | ||
</div> | ||
</div> | ||
</Col> | ||
</Row> | ||
</div> | ||
); | ||
} | ||
|
||
export default AboutMe; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#hr { | ||
border-color: white; | ||
height: 1px; | ||
width: 100% | ||
} | ||
|
||
.aboutMe { | ||
height: 100%; | ||
width: 100%; | ||
} | ||
|
||
.rowCustom{ | ||
height: 100%; | ||
width: 100%; | ||
} | ||
|
||
.rowCustom{ | ||
height: 100%; | ||
width: 100%; | ||
} | ||
|
||
#parent { | ||
|
||
|
||
height: 100%; | ||
overflow: hidden; | ||
width: 100%; | ||
|
||
margin: auto; | ||
position: absolute; | ||
left: 0; right: 0; | ||
top: 0; bottom: 0; | ||
} | ||
|
||
|
||
|
||
#mask { | ||
height: 100%; | ||
width: 100%; | ||
} | ||
|
||
|
Oops, something went wrong.