Browse Source

Add Website

master
Conor 5 months ago
parent
commit
b5e5f5ebcf
Signed by: Snaddyvitch-Dispenser GPG Key ID: A28C6F51829932B9
  1. 1
      package.json
  2. BIN
      public/favicon.ico
  3. BIN
      public/logo192.png
  4. BIN
      public/logo512.png
  5. 38
      src/App.css
  6. 79
      src/App.js
  7. 87
      src/App.scss
  8. 152
      src/App2.scss
  9. 13
      src/index.css
  10. 1
      src/index.js
  11. 1
      src/logo.svg
  12. 46
      yarn.lock

1
package.json

@ -9,6 +9,7 @@
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-scripts": "4.0.3",
"sass": "^1.35.1",
"web-vitals": "^1.0.1"
},
"scripts": {

BIN
public/favicon.ico

BIN
public/logo192.png

Before

Width: 192  |  Height: 192  |  Size: 5.2 KiB

After

Width: 192  |  Height: 192  |  Size: 8.3 KiB

BIN
public/logo512.png

Before

Width: 512  |  Height: 512  |  Size: 9.4 KiB

After

Width: 512  |  Height: 512  |  Size: 9.4 KiB

38
src/App.css

@ -1,38 +0,0 @@
.App {
text-align: center;
}
.App-logo {
height: 40vmin;
pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
.App-logo {
animation: App-logo-spin infinite 20s linear;
}
}
.App-header {
background-color: #282c34;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}
.App-link {
color: #61dafb;
}
@keyframes App-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}

79
src/App.js

@ -1,25 +1,72 @@
import logo from './logo.svg';
import './App.css';
import './App.scss';
import './App2.scss';
import {useState} from "react";
function App() {
let [uploaded, setUploaded] = useState(false);
let [secondPage, setSecondPage] = useState(false);
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 id={"uploader"} className={"uploader"} style={{display: secondPage ? "none" : "block"}}>
<h1>Find Hot Singles in your Area</h1>
<input type="file" id="file-upload" onChange={event => getUploadedFile(event, setUploaded)} name="fileUpload" accept="image/*" />
<p>Upload a photo of yourself so we can match you with hot singles in your area.</p>
<label htmlFor="file-upload" id="file-drag" style={{pointerEvents: uploaded ? "none" : "auto"}}>
<img id="file-image" src="#" alt="Preview" className="hidden" />
<div id="start">
<div>{uploaded ? "File Uploaded" : "Select a file or drag here"}</div>
<div id="notimage" className="hidden">Please select an image</div>
<span id="file-upload-btn" style={{display: uploaded ? "none" : "inline-block"}} className="btn btn-primary">Select a file</span>
</div>
</label>
<p>Privacy: This image is only used in your browser and is not uploaded to any server. <a target={"_blank"} rel={"noopener noreferrer"} href={"https://git.dbuidl.com/Snaddyvitch-Dispenser/singles-in-your-area"}>You can check the code to verify this!</a></p>
<button style={{marginLeft: "0"}} onClick={event => onFindHotSingles(event, setSecondPage)} className={"btn"} disabled={!uploaded}>Find Hot Singles!</button>
</div>
<div id={"result"} style={{display: secondPage ? "block" : "none"}}>
<h1 className={"hot-single"}>We've found <strong>1</strong> hot single in your area...</h1>
<div className={"card"}>
<img id={"cutie"} alt={"You"} />
<div className={"card-bottom"}>
<p className={"large"}><strong>You</strong></p>
<p className={"location"}><strong>0</strong> Miles Away</p>
</div>
</div>
</div>
</div>
);
}
function onFindHotSingles(event, setSecondPage) {
event.preventDefault(); event.stopPropagation();
setSecondPage(true);
}
function getUploadedFile(evt, setUploaded) {
const tgt = evt.target || window.event.srcElement,
files = tgt.files;
// FileReader support
if (FileReader && files && files.length) {
const fr = new FileReader();
fr.onload = function () {
document.getElementById("cutie").src = fr.result;
}
fr.readAsDataURL(files[0]);
setUploaded(true);
}
// Not supported
else {
// fallback -- perhaps submit the input to an iframe and temporarily store
// them on the server until the user's session ends.
setUploaded(false);
}
}
export default App;

87
src/App.scss

@ -0,0 +1,87 @@
body {
margin: 0;
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;
font-size: 14px;
background-color: #333;
color: #fff;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}
html, body, #root, .App {
width: 100%;
}
div#uploader {
margin: 0 auto;
max-width: 1000px;
width: 100%;
}
div#result {
margin: 0 auto;
max-width: 1000px;
width: 100%;
img {
max-width: 100%;
max-height: 750px;
}
}
h1 {
font-size: 2em;
margin-bottom: 0;
}
p {
margin-top: 0;
}
a {
color: inherit;
}
.card-bottom {
position: absolute;
bottom: 0;
left: 0;
right: 0;
background-color: rgba(255, 255, 255, 0.8);
padding: 5px;
color: black;
}
.large {
font-size: 1.5em;
margin-bottom: 0;
}
.location {
font-size: 1.2em;
margin-bottom: 6px;
}
.hot-single {
font-weight: normal;
margin-top: 5px;
margin-bottom: 10px;
}
.card {
max-width: 500px;
max-height: 100vh;
position: relative;
width: auto;
display: inline-block;
border-radius: 10px;
overflow: hidden;
box-shadow: 5px 5px 10px 1px rgba(255, 255, 255, 0.4);
}

152
src/App2.scss

@ -0,0 +1,152 @@
// Vars and Reset
//
$theme: #454cad;
$dark-text: #5f6982;
.uploader {
display: block;
clear: both;
margin: 0 auto;
width: 100%;
max-width: 600px;
label {
float: left;
clear: both;
width: 100%;
padding: 2rem 1.5rem;
text-align: center;
background: #fff;
border-radius: 7px;
border: 3px solid #eee;
transition: all .2s ease;
user-select: none;
&:hover {
border-color: $theme;
}
&.hover {
border: 3px solid $theme;
box-shadow: inset 0 0 0 6px #eee;
#start {
i.fa {
transform: scale(0.8);
opacity: 0.3;
}
}
}
}
#start {
float: left;
clear: both;
width: 100%;
&.hidden {
display: none;
}
i.fa {
font-size: 50px;
margin-bottom: 1rem;
transition: all .2s ease-in-out;
}
}
#response {
float: left;
clear: both;
width: 100%;
&.hidden {
display: none;
}
#messages {
margin-bottom: .5rem;
}
}
#file-image {
display: inline;
margin: 0 auto .5rem auto;
width: auto;
height: auto;
max-width: 180px;
&.hidden {
display: none;
}
}
#notimage {
display: block;
float: left;
clear: both;
width: 100%;
&.hidden {
display: none;
}
}
progress,
.progress {
// appearance: none;
display: inline;
clear: both;
margin: 0 auto;
width: 100%;
max-width: 180px;
height: 8px;
border: 0;
border-radius: 4px;
background-color: #eee;
overflow: hidden;
}
.progress[value]::-webkit-progress-bar {
border-radius: 4px;
background-color: #eee;
}
.progress[value]::-webkit-progress-value {
background: linear-gradient(to right, darken($theme,8%) 0%, $theme 50%);
border-radius: 4px;
}
.progress[value]::-moz-progress-bar {
background: linear-gradient(to right, darken($theme,8%) 0%, $theme 50%);
border-radius: 4px;
}
input[type="file"] {
display: none;
}
div {
margin: 0 0 .5rem 0;
color: $dark-text;
}
}
.btn {
display: inline-block;
margin: .5rem .5rem 1rem .5rem;
clear: both;
font-family: inherit;
font-weight: 700;
font-size: 14px;
text-decoration: none;
text-transform: initial;
border: none;
border-radius: .2rem;
outline: none;
padding: 0 1rem;
height: 36px;
line-height: 36px;
color: #fff;
transition: all 0.2s ease-in-out;
box-sizing: border-box;
background: $theme;
border-color: $theme;
cursor: pointer;
&:disabled {
background: mix($theme, #555, 10);
cursor: not-allowed;
}
}

13
src/index.css

@ -1,13 +0,0 @@
body {
margin: 0;
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;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}

1
src/index.js

@ -1,6 +1,5 @@
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';

1
src/logo.svg

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3"><g fill="#61DAFB"><path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zM421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24 4.7 8 9.5 15.8 14.4 23.4zM420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6 0-15.7 22.9-35.6 58.3-50.6 8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zM310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6zM320.8 78.4z"/><circle cx="420.9" cy="296.5" r="45.7"/><path d="M520.5 78.1z"/></g></svg>

46
yarn.lock

@ -2277,6 +2277,14 @@ anymatch@^3.0.3, anymatch@~3.1.1:
normalize-path "^3.0.0"
picomatch "^2.0.4"
anymatch@~3.1.2:
version "3.1.2"
resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716"
integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==
dependencies:
normalize-path "^3.0.0"
picomatch "^2.0.4"
aproba@^1.1.1:
version "1.2.0"
resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a"
@ -3136,6 +3144,21 @@ check-types@^11.1.1:
resolved "https://registry.yarnpkg.com/check-types/-/check-types-11.1.2.tgz#86a7c12bf5539f6324eb0e70ca8896c0e38f3e2f"
integrity sha512-tzWzvgePgLORb9/3a0YenggReLKAIb2owL03H2Xdoe5pKcUyWRSEQ8xfCar8t2SIAuEDwtmx2da1YB52YuHQMQ==
"chokidar@>=3.0.0 <4.0.0":
version "3.5.2"
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.2.tgz#dba3976fcadb016f66fd365021d91600d01c1e75"
integrity sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==
dependencies:
anymatch "~3.1.2"
braces "~3.0.2"
glob-parent "~5.1.2"
is-binary-path "~2.1.0"
is-glob "~4.0.1"
normalize-path "~3.0.0"
readdirp "~3.6.0"
optionalDependencies:
fsevents "~2.3.2"
chokidar@^2.1.8:
version "2.1.8"
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917"
@ -5114,7 +5137,7 @@ fsevents@^1.2.7:
bindings "^1.5.0"
nan "^2.12.1"
fsevents@^2.1.2, fsevents@^2.1.3, fsevents@~2.3.1:
fsevents@^2.1.2, fsevents@^2.1.3, fsevents@~2.3.1, fsevents@~2.3.2:
version "2.3.2"
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
@ -5199,6 +5222,13 @@ glob-parent@^5.0.0, glob-parent@^5.1.0, glob-parent@~5.1.0:
dependencies:
is-glob "^4.0.1"
glob-parent@~5.1.2:
version "5.1.2"
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
dependencies:
is-glob "^4.0.1"
glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6:
version "7.1.6"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6"
@ -9123,6 +9153,13 @@ readdirp@~3.5.0:
dependencies:
picomatch "^2.2.1"
readdirp@~3.6.0:
version "3.6.0"
resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7"
integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==
dependencies:
picomatch "^2.2.1"
recursive-readdir@2.2.2:
version "2.2.2"
resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.2.tgz#9946fb3274e1628de6e36b2f6714953b4845094f"
@ -9543,6 +9580,13 @@ sass-loader@^10.0.5:
schema-utils "^3.0.0"
semver "^7.3.2"
sass@^1.35.1:
version "1.35.1"
resolved "https://registry.yarnpkg.com/sass/-/sass-1.35.1.tgz#90ecf774dfe68f07b6193077e3b42fb154b9e1cd"
integrity sha512-oCisuQJstxMcacOPmxLNiLlj4cUyN2+8xJnG7VanRoh2GOLr9RqkvI4AxA4a6LHVg/rsu+PmxXeGhrdSF9jCiQ==
dependencies:
chokidar ">=3.0.0 <4.0.0"
sax@~1.2.4:
version "1.2.4"
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"

Loading…
Cancel
Save