Skip to content

Commit

Permalink
initial edit to react website
Browse files Browse the repository at this point in the history
  • Loading branch information
alyson647 committed Apr 5, 2023
1 parent 870000d commit 0b34496
Show file tree
Hide file tree
Showing 23 changed files with 787 additions and 66 deletions.
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "es5",
"tabWidth": 2,
"semi": false,
"singleQuote": true
}
325 changes: 325 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,23 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@emailjs/browser": "^3.10.0",
"@fortawesome/free-brands-svg-icons": "^6.4.0",
"@fortawesome/free-solid-svg-icons": "^6.4.0",
"@fortawesome/react-fontawesome": "^0.2.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"animate.css": "^4.1.1",
"gsap-trial": "^3.11.5",
"loaders.css": "^0.1.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-leaflet": "^4.2.1",
"react-loaders": "^3.0.1",
"react-router-dom": "^6.10.0",
"react-scripts": "5.0.1",
"sass": "^1.60.0",
"web-vitals": "^2.1.4"
},
"scripts": {
Expand Down
38 changes: 0 additions & 38 deletions src/App.css

This file was deleted.

33 changes: 13 additions & 20 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@
import logo from './logo.svg';
import './App.css';
import './App.scss';
import { Routes, Route } from 'react-router-dom'
import Layout from './components/Layout'
import Home from './components/Home'

function App() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
</div>
);
<>
<Routes>
<Route path="/" element={<Layout />}>
<Route index element={<Home />} />
</Route>
</Routes>
</>
)
}

export default App;
export default App
23 changes: 23 additions & 0 deletions src/App.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
$primary-color: #ffd700;

@import 'animate.css';

@font-face {
font-family: 'Helvetica Neue';
src: url('./assets/fonts/helvetica-neu.ttf') format('ttf') ;
}

@font-face {
font-family: 'La Belle Aurore';
src: url('./assets/fonts/LaBelleAurore.woff2') format('woff2') ;
}

@font-face {
font-family: 'Coolvetica';
src: url('./assets/fonts/CoolveticaRg-Regular.woff2') format('woff2') ;
}

input,
textarea {
font-family: 'Helvetica Neue';
}
Binary file added src/assets/fonts/CoolveticaRg-Regular.woff
Binary file not shown.
Binary file added src/assets/fonts/CoolveticaRg-Regular.woff2
Binary file not shown.
Binary file added src/assets/fonts/LaBelleAurore.woff
Binary file not shown.
Binary file added src/assets/fonts/LaBelleAurore.woff2
Binary file not shown.
Binary file added src/assets/fonts/helvetica-neu.ttf
Binary file not shown.
Binary file added src/assets/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.
Binary file added src/assets/images/logo_sub.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions src/components/AnimatedLetters/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import './index.scss';

const AnimatedLetters = ({ letterClass, strArray, idx }) => {
return (
<span>
{
strArray.map((char, i) => (
<span key={char + i} className={`${letterClass} _${i + idx}`}>
{char}
</span>
))
}
</span>
)
};

export default AnimatedLetters
25 changes: 25 additions & 0 deletions src/components/AnimatedLetters/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.text-animate {
display: inline-block;
opacity: 0;
animation: bounceIn 1s 1s;
animation-fill-mode: forwards;
min-width: 10px;

}

.text-animate-hover {
min-width: 10px;
display: inline-block;
animation-fill-mode: both;

&:hover {
animation: rubberBand 1s;
color: #ffd700;
}
}

@for $i from 1 through 35 {
.text-animate._#{$i} {
animation-delay: #{$i / 10}s;
}
}
45 changes: 45 additions & 0 deletions src/components/Home/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import { Link } from 'react-router-dom';
import LogoTitle from '../../assets/images/logo.png';
import './index.scss'
import AnimatedLetters from '../AnimatedLetters';
import { useEffect, useState } from 'react'


const Home = () => {
const [letterClass, setLetterClass] = useState('text-animate')
const nameArray = ['l', 'y', 's', 'o', 'n']
const jobArray = ['C', 'o', 'm', 'p', 'u', 't', 'e', 'r', ' ', 'S', 'c', 'i', 'e', 'n', 'c', 'e', ' ', 'S', 't', 'u', 'd', 'e', 'n', 't']

// useEffect(() => {
// return setTimeout(() => {
// setLetterClass('text-animate-hover')
// }, 4000)
// }, [])

return (
<div className="container home-page">
<div className="text-zone">
<h1>
<span className={letterClass}>H</span>
<span className={`${letterClass} _12`}>i,</span>
<br />
<span className={`${letterClass} _13`}>I</span>
<span className={`${letterClass} _14`}>'m</span>
<img src={LogoTitle} alt="developer"/>
<AnimatedLetters letterClass={letterClass}
strArray={nameArray}
idx={15} />
<br />
<AnimatedLetters letterClass={letterClass}
strArray={jobArray}
idx={22} />
</h1>
<h2>Frontend Developer / JavaScript </h2>
<Link to="/contact" className="flat-button">CONTACT ME</Link>
</div>

</div>
)
}

export default Home
79 changes: 79 additions & 0 deletions src/components/Home/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
.home-page {

.text-zone {
position: absolute;
left: 10%;
top: 50%;
transform: translateY(-50%);
width: 40%;
max-height: 90%;
}
h1 {
color: #fff;
font-size: 53px;
margin: 0;
font-family: 'Coolvetica';
font-weight: 400;

&::before {
content: '<h1>';
font-family: 'La Belle Aurore';
color: #ffd700;
font-size: 18px;
position: absolute;
margin-top: -40px;
left: 15px;
opacity: 0.6;
}

&::after {
content: '<h1>';
font-family: 'La Belle Aurore';
color: #ffd700;
font-size: 18px;
position: absolute;
margin-top: 18px;
margin-left: 20px;
animation: fadeIn 1s 1.7s backwards;
opacity: 0.6;
}
img {
width: 32px;
margin-left: 20px;
opacity: 0;
height: auto;
animation: rotateIn 1s linear both;
animation-delay: 1.4s;
}
}

h2 {
color: #8d8d8d;
margin-top: 20px;
font-weight: 400;
font-size: 11px;
font-family: sans-serif;
letter-spacing: 3px;
animation: fadeIn 1s 1.8s backwards;
}

.flat-button {
color: #ffd700;
font-size: 13px;
font-weight: 400;
letter-spacing: 4px;
font-family: sans-serif;
text-decoration: none;
padding: 10px 18px;
border: 1px solid #ffd700;
margin-top: 25px;
float: left;
animation: fadeIn 1s 1.8s backwards;
white-space: nowrap;

&:hover {
background: #ffd700;
color: #333;
}
}
}
23 changes: 23 additions & 0 deletions src/components/Layout/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { Outlet } from 'react-router-dom';
import Sidebar from '../Sidebar'
import './index.scss';

const Layout = () => {
return (
<div className="App">
<Sidebar />
<div className='page'>
<span className='tags top-tags'>&lt;body&gt;</span>

<Outlet />

<span className='tags bottom-tags'>
&lt;/body&gt;
<br />
<span className='bottom-tag-html'>&lt;/html&gt;</span>
</span>
</div>
</div>
)
}
export default Layout
39 changes: 39 additions & 0 deletions src/components/Layout/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
.page {
width: 100%;
height: 100%;
position: absolute;
}

.top-tags {
bottom: auto;
top: 35px;
}

.tags {
color: #ffd700;
opacity: 0.6;
position: absolute;
bottom: 0;
left: 120px;
font-size: 18px;
font-family: 'La Belle Aurore';
}

.bottom-tag-html {
margin-left: -20px;
}

.container {
width: 100%;
will-change: contents;
height: 90%;
min-height: 566px;
position: absolute;
opacity: 0;
top: 5;
margin: 0 auto;
z-index: 1;
transform-style: preserve-3d;
animation: fadeIn 1s forwards;
animation-delay: 1s;
}
Loading

0 comments on commit 0b34496

Please sign in to comment.