Skip to content

Commit

Permalink
Add work in progress layout (#5)
Browse files Browse the repository at this point in the history
* Create WorkInProgress component

* Create stylesheet

* Reinstall node-sass

* Add layout

* Update meta

* Add squirrel

* Add hover
  • Loading branch information
vexuas committed Dec 5, 2021
1 parent 097d9ba commit 7d0ffb5
Show file tree
Hide file tree
Showing 11 changed files with 2,090 additions and 1,865 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"@types/node": "^16.11.11",
"@types/react": "^17.0.37",
"@types/react-dom": "^17.0.11",
"node-sass": "^6.0.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-scripts": "4.0.3",
Expand Down Expand Up @@ -42,6 +41,8 @@
]
},
"devDependencies": {
"auto": "^10.32.3"
"auto": "^10.32.3",
"node-sass": "^6.0.0",
"sass-loader": "^12.0.0"
}
}
Binary file added public/armor_body.png
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.
9 changes: 3 additions & 6 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<link rel="icon" href="%PUBLIC_URL%/armor_body.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<meta name="description" content="Armor Swap Training For Apex Legends" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
Expand All @@ -24,7 +21,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>Armor Swap | Apex Legends</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
38 changes: 0 additions & 38 deletions src/App.css

This file was deleted.

10 changes: 10 additions & 0 deletions src/App.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@import './assets/styles/variables.scss';

.Container {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: rgba(0, 0, 0, 0.8);
color: $color-white;
}
21 changes: 4 additions & 17 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
import logo from './logo.svg';
import './App.css';
import styles from './App.module.scss';
import { WorkInProgress } from './app/components/WorkInProgress';

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 className={styles.Container}>
<WorkInProgress />
</div>
);
}
Expand Down
26 changes: 26 additions & 0 deletions src/app/components/WorkInProgress/WorkInProgress.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.Container {
font-size: 64px;
}
.Squirrel {
display: flex;
justify-content: center;
margin-top: 42px;
}
.ImagePlaying,
.ImageDisabled {
width: 500px;
border: 5px solid red;
border-radius: 12px;
filter: saturate(1.7);
cursor: pointer;
transition: transform cubic-bezier(0.165, 0.84, 0.44, 1) 0.1s;
}
.ImagePlaying {
transform: scale(1.05);
}
.ImageDisabled {
filter: grayscale(1);
&:hover {
filter: grayscale(0.7);
}
}
42 changes: 42 additions & 0 deletions src/app/components/WorkInProgress/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { useState } from 'react';
import styles from './WorkInProgress.module.scss';

export function WorkInProgress() {
const [audio] = useState(
new Audio('/audio/Jamie Berry ft. Octavia Rose - Lost In The Rhythm (128 kbps).mp3')
);
const [isPlaying, setIsPlaying] = useState(false);

const handleAudio = () => {
if (isPlaying) {
setIsPlaying(false);
audio.pause();
} else {
setIsPlaying(true);
audio.play();
}
};
return (
<div className={styles.Container}>
<div>Nothing here yet :)</div>
<div>Have a dancing squirrel while you wait</div>
<div className={styles.Squirrel}>
{isPlaying ? (
<img
onClick={handleAudio}
className={styles.ImagePlaying}
alt="Dancing Squirrel"
src="https://cdn.discordapp.com/attachments/248430185463021569/917123652200321034/dancing_squirrel.gif"
/>
) : (
<img
onClick={handleAudio}
className={styles.ImageDisabled}
alt="Dancing Squirrel"
src="https://cdn.discordapp.com/attachments/248430185463021569/917137831716085780/dancing_squirrel_still.png"
/>
)}
</div>
</div>
);
}
4 changes: 4 additions & 0 deletions src/assets/styles/variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
//Text color
$color-default: #002240;
$color-white: #fff;
$color-black: #000;

0 comments on commit 7d0ffb5

Please sign in to comment.