🎁 feat: front facing site

This commit is contained in:
ysandler 2020-09-13 00:36:05 -05:00 committed by Joshua Shoemaker
parent ada51a2100
commit 5db1e18bef
21 changed files with 14982 additions and 1 deletions

View File

@ -4,7 +4,9 @@
"description": "Api that powers the brightScreen Vs Code Extention", "description": "Api that powers the brightScreen Vs Code Extention",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"dev": "ts-node ./src/index.ts", "server": "ts-node ./src/index.ts",
"web": "cd ./web && npm start",
"build-web": "cd ./web && npm run build",
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },
"author": "Joshua Shoemaker", "author": "Joshua Shoemaker",

23
web/.gitignore vendored Normal file
View File

@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# production
/build
# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*

14378
web/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

42
web/package.json Normal file
View File

@ -0,0 +1,42 @@
{
"name": "web",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.5.0",
"@testing-library/user-event": "^7.2.1",
"@types/jest": "^24.9.1",
"@types/node": "^12.12.58",
"@types/react": "^16.9.49",
"@types/react-dom": "^16.9.8",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-scripts": "3.4.3",
"semantic-ui-css": "^2.4.1",
"semantic-ui-react": "^1.2.1",
"typescript": "^3.7.5"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"proxy": "http://localhost:5000"
}

BIN
web/public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

43
web/public/index.html Normal file
View File

@ -0,0 +1,43 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<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"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
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>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>

BIN
web/public/logo192.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
web/public/logo512.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

25
web/public/manifest.json Normal file
View File

@ -0,0 +1,25 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}

3
web/public/robots.txt Normal file
View File

@ -0,0 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:

52
web/src/Views/App.css Normal file
View File

@ -0,0 +1,52 @@
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;
}
.App nav {
background-color: rgb(40, 40, 40);
color: white;
height: 50px;
display: flex;
justify-content: space-between;
align-items: center;
}
.App nav a {
display: flex;
font-size: 16px;
align-items: center;
height: 50px;
padding: 6px;
cursor: pointer;
text-decoration: none;
color: white;
}
.App nav a:visited {
color: white;
}
.App nav a:hover {
background-color: white;
color: black;
}
.App nav a img {
width: 26px;
margin: 0px 4px;
}
.App .topNav {
margin: 0px auto;
text-align: center;
}

34
web/src/Views/App.tsx Normal file
View File

@ -0,0 +1,34 @@
import React, { Component } from 'react'
import 'semantic-ui-css/semantic.min.css'
import './App.css'
import logo from '../media/logoBlue.svg'
import supportIcon from '../media/heartIcon.svg'
import infoIcon from '../media/infoIcon.svg'
import { Header } from 'semantic-ui-react'
import Home from './Home/Home'
class App extends Component {
render (): JSX.Element {
return (
<div className="App">
<nav>
<a href='https://github.com/joshuashoemaker/brightScreen' target='_blank' rel='noopener noreferrer'>
<img src={infoIcon} alt='info icon' />
Docs
</a>
<Header className="topNav" as='h3' image={logo} content='brightScreen ( )' style={{color: 'white'}} />
<a href='https://github.com/sponsors/joshuashoemaker/' target='_blank' rel='noopener noreferrer'>
Sponsor
<img src={supportIcon} alt='support icon' />
</a>
</nav>
<Home />
</div>
)
}
}
export default App

View File

@ -0,0 +1,41 @@
.Home header{
height: calc(100vh - 50px);
align-items: center;
display: flex;
justify-content: space-around;
background-color: rgb(252, 252, 252);
}
.homeContentWrapper {
filter: drop-shadow(0.25rem 0.45rem 1rem rgba(0, 0, 0, 0.3));
}
.homeButtonWrappers {
margin-top: 40px;
display: flex;
justify-content: space-evenly;
}
.homeButtonWrappers .button {
text-transform: uppercase !important;
}
.homeInfoColumn {
max-width: 500px;
margin: 40px auto !important;
font-size: 18px !important;
text-align: justify;
}
.homeInfoColumn .button {
margin-top: 20px !important;
}
.courseList {
max-width: 500px;
margin: 40px auto !important;
}
.courseListSubheader {
color: aqua;
}

100
web/src/Views/Home/Home.tsx Normal file
View File

@ -0,0 +1,100 @@
import React, { Component } from 'react'
import 'semantic-ui-css/semantic.min.css'
import './Home.css'
import logo from '../../media/logoBlue.svg'
import { Button, Header, Image, List, Segment, Icon } from 'semantic-ui-react'
interface CourseInterface {
name: string,
repo: string,
username: string,
link: string
}
type HomeProps = {}
type HomeState = { courses: CourseInterface[] }
class Home extends Component<HomeProps, HomeState> {
constructor (props = {}) {
super(props)
this.state = {courses: []}
}
async componentDidMount () {
const courses = await (await fetch('/api/courses')).json()
this.setState({courses: courses})
}
getCourseElements (courses: CourseInterface[]) {
if (!courses) return []
const coureseElements = courses.map((c: CourseInterface ) => {
return (
<List.Item>
<List.Icon name='github' size='large' verticalAlign='middle' />
<List.Content>
<List.Header as='a' style={{ color: 'rgb(102,252,241)' }} href={c.link} target='_blank' rel='noopener noreferrer'>{c.name}</List.Header>
<List.Description>by: { c.username } </List.Description>
</List.Content>
</List.Item>
)
})
return coureseElements
}
render(): JSX.Element {
return (
<div className="Home">
<header>
<section className='homeContentWrapper'>
<Image centered size='large' src={logo} />
<Header as='h1' textAlign='center'>
<Header.Content>
brightScreen ()
<Header.Subheader>Code Challanges For VS Code</Header.Subheader>
</Header.Content>
</Header>
<Button as='a' href='https://github.com/joshuashoemaker/brightScreen' target='_blank' rel='noopener noreferrer' fluid basic>README</Button>
</section>
</header>
<section>
<Segment className='homeInfoColumn'>
brightScreen is an extention for your favorite text editor (as long as your text
editor is VS Code) that brings interactive coding tutorials to help bring a new
dynamic to learning. Instead of just following along with an article or video,
you can download coding challanges that help solidify those theoretical lessons
into something tangible.
<Button as='a' href='https://github.com/joshuashoemaker/brightScreen' target='_blank' rel='noopener noreferrer' style={{ backgroundColor: 'rgb(102,252,241)', color: 'black' }} fluid primary>LEARN</Button>
</Segment>
<Segment className='homeInfoColumn'>
brightScreen is a great place for software instructors to create interactive
homework for those that follow their courses, videos, or articles. The amount
of effort in seting up a brightScreen course is virtually non existant.
<Button fluid basic href='mailto:joshua@jshoemaker.dev' as='a'>TEACH</Button>
</Segment>
</section>
<section className='courseList'>
<Segment className=''>
<Header as='h2' textAlign='center' icon>
<Icon name='code' />
<Header.Content>
Current Courses
<Header.Subheader><Button fluid basic href='mailto:joshua@jshoemaker.dev' as='a'>Contact to Add Course</Button></Header.Subheader>
</Header.Content>
</Header>
<List divided relaxed>
{ this.getCourseElements(this.state.courses)}
</List>
</Segment>
</section>
</div>
)
}
}
export default Home

16
web/src/index.tsx Normal file
View File

@ -0,0 +1,16 @@
import React from 'react'
import ReactDOM from 'react-dom'
import App from './Views/App'
import * as serviceWorker from './serviceWorker'
ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root')
)
// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister()

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80" width="16px" height="16px"><path fill="#ffcfcf" d="M40.014,70.925C36.786,68.966,2.5,47.711,2.5,29.5C2.5,20.073,7.097,10,20,10 c9.238,0,16.317,6.333,19.571,11.757L40,22.472l0.429-0.714C43.839,16.073,50.771,10,60,10c12.089,0,17.5,9.794,17.5,19.5 C77.5,50.076,43.278,69.154,40.014,70.925z"/><path fill="#f7a3a3" d="M60,10.5c11.743,0,17,9.543,17,19c0,19.849-32.548,38.417-36.972,40.848 C35.646,67.663,3,47.06,3,29.5c0-9.185,4.466-19,17-19c9.03,0,15.955,6.203,19.143,11.514L40,23.444l0.857-1.429 C44.198,16.448,50.98,10.5,60,10.5 M60,9.5c-9.286,0-16.424,6.04-20,12c-3.576-5.96-10.855-12-20-12c-12.211,0-18,9.218-18,20 c0,19.522,38,42,38,42s38-19.952,38-42C78,18.834,71.857,9.5,60,9.5L60,9.5z"/></svg>

After

Width:  |  Height:  |  Size: 755 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80" width="16px" height="16px"><path fill="#8bb7f0" d="M40,77.5C19.322,77.5,2.5,60.678,2.5,40S19.322,2.5,40,2.5S77.5,19.322,77.5,40S60.678,77.5,40,77.5 z"/><path fill="#4e7ab5" d="M40,3c20.402,0,37,16.598,37,37S60.402,77,40,77S3,60.402,3,40S19.598,3,40,3 M40,2 C19.013,2,2,19.013,2,40s17.013,38,38,38s38-17.013,38-38S60.987,2,40,2L40,2z"/><path fill="#fff" d="M40 21A3 3 0 1 0 40 27A3 3 0 1 0 40 21Z"/><g><path fill="#fff" d="M43 56L43 31 35 31 35 33 37 33 37 56 35 56 35 58 45 58 45 56z"/></g></svg>

After

Width:  |  Height:  |  Size: 556 B

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 331 276" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-miterlimit:10;">
<g id="Artboard1" transform="matrix(0.838537,0,0,0.897683,-89.4004,-44.0313)">
<rect x="106.615" y="49.05" width="393.853" height="306.879" style="fill:none;"/>
<clipPath id="_clip1">
<rect x="106.615" y="49.05" width="393.853" height="306.879"/>
</clipPath>
<g clip-path="url(#_clip1)">
<g id="Layer_1" transform="matrix(1.19255,0,0,1.11398,-58.9948,-25.8648)">
<path d="M223.83,336.73L388.17,336.73" style="fill:none;stroke:rgb(102,252,241);stroke-width:12px;"/>
<path d="M286.43,293.25L328.17,293.25C329,298.81 331.3,308.51 338.6,317.6C354.89,337.85 381.41,336.9 384.69,336.73" style="fill:none;stroke:rgb(102,252,241);stroke-width:12px;"/>
<path d="M282.44,220.94L283.89,221.15C283.97,221.16 284.04,221.18 284.12,221.19L285.87,221.6L286.57,221.76C286.99,221.86 287.42,221.85 287.84,221.74L291.43,220.78C292.09,220.6 292.66,220.17 293,219.57L293.34,218.98C293.68,218.39 293.78,217.68 293.6,217.02L293.06,215C292.88,214.34 292.46,213.78 291.87,213.44L284.85,209.31C284.77,209.26 284.68,209.21 284.61,209.15L270.06,198.19C268.14,196.74 269.05,193.68 271.45,193.54C271.85,193.52 272.26,193.5 272.68,193.49C275.7,193.41 282.17,193.54 282.12,193.54C282.12,193.54 289.11,191.95 291.21,191.4C294.34,190.59 295.42,190.31 295.5,190.25C295.81,190.01 296.07,189.74 296.29,189.47C297.04,188.58 297.06,187.29 296.39,186.34L295.72,185.39C295.27,184.76 294.57,184.36 293.8,184.3L289.16,183.95C289.04,183.94 288.92,183.92 288.8,183.9L265.18,178.77C264.92,178.71 264.66,178.7 264.39,178.72C262.31,178.91 259.92,179.13 257.22,179.38C257.02,179.4 256.83,179.44 256.65,179.5C252.83,180.76 242.03,184.33 231.61,187.77C231.3,187.87 230.98,187.91 230.66,187.9L218.72,187.25C218.45,187.24 218.17,187.26 217.91,187.33L212.98,188.65C212.53,188.77 212.13,189.01 211.8,189.33L206.36,194.86C206.22,195 206.06,195.13 205.89,195.24L183.69,209.15L149.78,228.77C149.68,228.83 149.58,228.89 149.49,228.97L146.47,231.31C146.17,231.55 145.92,231.85 145.74,232.19L140.43,242.77C140.15,243.32 140.08,243.95 140.23,244.55L178.68,277.2C178.68,277.2 180.77,266.98 180.48,265.9C180.22,264.91 182.63,260.89 183.02,260.23C183.06,260.17 183.1,260.11 183.14,260.06L183.88,259.04C184,258.88 184.13,258.73 184.28,258.6L223.41,224.9C223.61,224.73 223.84,224.59 224.08,224.48L237.39,218.76C237.76,218.6 238.15,218.53 242.45,211.16L264.97,212.37L282.19,220.9C282.28,220.92 282.36,220.93 282.44,220.94Z" style="fill:rgb(102,252,241);fill-rule:nonzero;stroke:rgb(102,252,241);stroke-width:0.75px;"/>
<path d="M288.55,221L245.72,203.7L183.37,246.63L179.88,256.77C179.88,256.77 187.23,258.83 187.41,258.89C188.17,259.15 199.17,256.89 199.17,256.89C199.17,256.89 212.17,254.33 213.1,254.31C214.02,254.29 224.28,245.79 224.28,245.79L233.07,241.36L240.18,241.06L248.94,241.7C248.94,241.7 256.43,241.07 257.73,240.73C259.03,240.38 263.58,239.16 263.58,239.16L266.79,235.54L261.53,228.9L252.75,224.7L245.66,217.28L248.04,216.64L252.44,216.61L256.48,214.38L261.95,216.6L275.18,221.8L281.93,226.2L285.39,225.27L286.99,223.46L288.55,221" style="fill:rgb(102,252,241);fill-rule:nonzero;stroke:rgb(102,252,241);stroke-width:0.75px;"/>
<path d="M223.76,227.76L232.91,223.7L234.71,221.83L238.46,223.82L242.08,226.99L223.76,227.76Z" style="fill:white;fill-rule:nonzero;stroke:rgb(102,252,241);stroke-width:0.75px;"/>
<path id="Layer_3" d="M423.29,165.92L434.85,161.25C434.85,161.25 439.74,153.25 439.74,152.58C439.74,151.91 442.63,141.25 442.63,141.25L444.85,134.14L447.29,130.36L462.62,122.8L462.62,77.48L459.06,73.26L447.28,74.82L421.72,93.26L410.16,100.37L397.72,109.04L389.72,117.04L377.72,131.48L368.83,141.92L354.61,153.25L348.39,157.69L338.61,166.8L324.61,177.8L313.72,184.64L313.72,187.46L315.5,189.46L321.94,189.46L331.5,187.02L340.39,179.46L345.5,175.46L347.72,173.9L357.94,171.62L368.16,169.23L377.05,160.56L372.16,175.23L364.16,187.01L363.05,195.23L366.16,198.34C369.05,200.12 372.8,198.34 374.38,198.34L377.94,197.23" style="fill:rgb(102,252,241);fill-rule:nonzero;stroke:rgb(102,252,241);stroke-width:0.75px;"/>
<path id="Layer_7" d="M385.09,187.36L385.09,198.41L386.51,207.21C386.51,207.21 391.12,216.3 390.94,216.81C390.76,217.32 392.71,218.92 392.71,218.92L396.96,218.92C396.96,218.92 399.45,217.88 399.45,214.67C399.45,213.94 398.63,209.96 397.81,206.11C396.97,202.18 396.12,198.4 396.12,198.4C396.12,198.4 396.34,190.36 396.12,188.59C395.9,186.82 397.67,179.37 397.67,179.37L385.09,187.36Z" style="fill:rgb(102,252,241);fill-rule:nonzero;stroke:rgb(102,252,241);stroke-width:0.75px;"/>
<path id="Layer_8" d="M397.68,179.38L396.13,201.19L399.46,213.37L400.34,215.36C400.34,215.36 404.77,216.06 405.48,215.36L408.32,212.18L408.32,207.93C408.32,207.93 406.72,203.74 406.72,202.91C406.72,202.08 404.95,198.59 405.48,197.05C406.01,195.52 406.19,191.44 406.37,190.2C406.55,188.96 406.9,182.22 407.08,181.16C407.26,180.1 408.32,174.78 408.32,174.78L409.56,171.41L397.68,179.38Z" style="fill:rgb(102,252,241);fill-rule:nonzero;stroke:rgb(102,252,241);stroke-width:0.75px;"/>
<path id="Layer_9" d="M407.84,171.38L405.71,178.74L409.96,175.19L411.96,175.9L411.96,188.13L416.17,195.37C416.17,195.37 419.41,196.7 420.63,196.76C422.98,196.01 423.17,193.87 422.56,190.08C422.61,189.29 421.01,187.72 420.63,185.97C420.25,184.23 420.63,175.18 420.63,175.18L419.72,170.11L422.56,168.43L426.81,162.59L433.19,159.58" style="fill:rgb(102,252,241);fill-rule:nonzero;stroke:rgb(102,252,241);stroke-width:0.75px;"/>
<g id="Layer_10">
<path d="M422.56,168.45L433.2,161.25L424.88,161.25L422.56,168.45Z" style="fill:rgb(102,252,241);fill-rule:nonzero;stroke:rgb(102,252,241);stroke-width:0.75px;"/>
<path d="M409.97,175.19C409.97,175.19 410.8,188.8 411.97,188.13C413.14,187.46 415.54,174.12 414.65,174.12C413.75,174.13 409.97,175.19 409.97,175.19Z" style="fill:rgb(102,252,241);fill-rule:nonzero;stroke:rgb(102,252,241);stroke-width:0.75px;"/>
</g>
<path d="M463.13,262.99C463.13,269.59 457.73,274.99 451.13,274.99L156.87,274.99C150.27,274.99 144.87,269.59 144.87,262.99L144.87,85.25C144.87,78.65 150.27,73.25 156.87,73.25L451.13,73.25C457.73,73.25 463.13,78.65 463.13,85.25L463.13,262.99Z" style="fill:none;stroke:rgb(102,252,241);stroke-width:12px;"/>
<path d="M144.94,244.57L144.94,270.24L183.39,277.22" style="fill:rgb(102,252,241);fill-rule:nonzero;stroke:rgb(102,252,241);stroke-width:0.75px;"/>
</g>
<g id="Layer_5" transform="matrix(1.19255,0,0,1.11398,-58.9948,-25.8648)">
<path d="M392.376,181.649C396.196,174.059 398.54,164.19 400.87,161.58C401,161.44 401.92,160.42 403.14,158.95C403.14,158.95 403.82,158.13 404.43,157.35C409.16,151.33 411.54,145.57 411.54,145.57C412.75,142.65 414.26,138.03 414.65,132.01" style="fill:none;stroke:white;stroke-width:0.75px;"/>
<path d="M445.34,136.21C440.39,143.7 435.67,147.32 432.23,149.24C429.48,150.78 426.8,151.64 419.12,155.46C418.3,155.87 413.34,158.42 413.34,158.42C412.6,158.81 411.86,159.21 411.12,159.6" style="fill:none;stroke:white;stroke-width:0.75px;"/>
<path d="M189.87,233.08C192.21,233.53 195.89,233.88 199.83,232.48C202.38,231.58 204.57,229.76 208.94,226.13C212.74,222.97 215.01,220.58 219.52,217.54C220.52,216.87 221.31,216.38 222.08,215.93C226.07,213.63 227.8,213.54 229.89,212.46C233.02,210.83 232.27,209.4 239.08,201.25C242.37,197.32 243.25,196.81 243.8,196.53C246.68,195.09 248.06,196.23 253.47,194.86C256.45,194.1 256.67,193.59 258.84,193.42C261.17,193.24 262.24,193.72 265.21,194.01C266.77,194.17 269.06,194.29 271.89,194.06" style="fill:none;stroke:white;stroke-width:0.75px;"/>
<path d="M239.34,211.62C242.53,209.15 245.24,208.39 247.15,208.15C249.07,207.91 249.65,208.27 251.4,207.7C253.93,206.87 254.65,205.48 257.12,205.02C258.48,204.76 259.56,204.94 260.36,205.07C265.72,205.96 271.89,211.89 274.53,214.16C277.41,216.64 282.01,219.84 289.11,222.22" style="fill:none;stroke:white;stroke-width:0.75px;"/>
</g>
<g id="Layer_6" transform="matrix(1.19255,0,0,1.11398,-58.9948,-25.8648)">
<path d="M195.89,217.96L203.45,220.18L211,220.18L222.33,217.96L231.49,213.93L239.44,210.4C239.44,210.4 242.77,210.62 244.77,209.51C246.77,208.4 256.1,203.29 256.1,203.29L260.77,200.18L266.99,198.85C266.99,198.85 272.77,199.96 273.43,199.96" style="fill:none;stroke:white;stroke-width:0.75px;"/>
<path d="M254.11,209.51L257.44,209.51L260.33,208.18C260.33,208.18 264.77,209.07 266.11,209.51C267.45,209.95 272.11,209.51 272.11,209.51L273.89,208.94L278.33,213.06L286.631,221.356" style="fill:none;stroke:white;stroke-width:0.75px;"/>
<path d="M384.972,192.779C384.972,192.779 391.44,186.4 391.44,185.51C391.44,184.62 394.55,174.12 394.55,174.12L398.55,167.28L400.11,161.72C400.11,161.72 402.33,160.16 403.67,159.05C405,157.94 413,151.26 413.23,148.82C413.45,146.38 415.01,139.49 415.01,139.49" style="fill:none;stroke:white;stroke-width:0.75px;"/>
<path d="M443.89,141.51C442.56,142.62 425.67,155.73 425.67,155.73C425.67,155.73 421,159.29 418.56,159.95C416.12,160.62 408.56,162.17 408.56,162.17L405.45,163.28L402.12,163.28" style="fill:none;stroke:white;stroke-width:0.75px;"/>
<path d="M399.44,172.84L404.11,172.84L415,171.73L421.44,169.84" style="fill:none;stroke:white;stroke-width:0.75px;"/>
<path d="M397,214.62L393.44,208.18C393.44,208.18 392.77,205.38 392.55,203C392.33,200.62 390.99,199.51 390.33,197.29C389.66,195.07 387.3,192.69 387.3,192.69" style="fill:none;stroke:white;stroke-width:0.75px;"/>
<path d="M408.33,196.4C408.33,196.4 405.66,186.18 405.66,185.51C405.66,184.84 405.66,181.73 405.66,180.29C405.66,178.85 404.55,174.13 404.55,174.13L404.11,172.85" style="fill:none;stroke:white;stroke-width:0.75px;"/>
<path d="M375.952,162.292L380.33,151.07L386.33,139.51L389.89,135.07" style="fill:none;stroke:white;stroke-width:0.75px;"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 10 KiB

1
web/src/react-app-env.d.ts vendored Normal file
View File

@ -0,0 +1 @@
/// <reference types="react-scripts" />

149
web/src/serviceWorker.ts Normal file
View File

@ -0,0 +1,149 @@
// This optional code is used to register a service worker.
// register() is not called by default.
// This lets the app load faster on subsequent visits in production, and gives
// it offline capabilities. However, it also means that developers (and users)
// will only see deployed updates on subsequent visits to a page, after all the
// existing tabs open on the page have been closed, since previously cached
// resources are updated in the background.
// To learn more about the benefits of this model and instructions on how to
// opt-in, read https://bit.ly/CRA-PWA
const isLocalhost = Boolean(
window.location.hostname === 'localhost' ||
// [::1] is the IPv6 localhost address.
window.location.hostname === '[::1]' ||
// 127.0.0.0/8 are considered localhost for IPv4.
window.location.hostname.match(
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
)
);
type Config = {
onSuccess?: (registration: ServiceWorkerRegistration) => void;
onUpdate?: (registration: ServiceWorkerRegistration) => void;
};
export function register(config?: Config) {
if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
// The URL constructor is available in all browsers that support SW.
const publicUrl = new URL(
process.env.PUBLIC_URL,
window.location.href
);
if (publicUrl.origin !== window.location.origin) {
// Our service worker won't work if PUBLIC_URL is on a different origin
// from what our page is served on. This might happen if a CDN is used to
// serve assets; see https://github.com/facebook/create-react-app/issues/2374
return;
}
window.addEventListener('load', () => {
const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
if (isLocalhost) {
// This is running on localhost. Let's check if a service worker still exists or not.
checkValidServiceWorker(swUrl, config);
// Add some additional logging to localhost, pointing developers to the
// service worker/PWA documentation.
navigator.serviceWorker.ready.then(() => {
console.log(
'This web app is being served cache-first by a service ' +
'worker. To learn more, visit https://bit.ly/CRA-PWA'
);
});
} else {
// Is not localhost. Just register service worker
registerValidSW(swUrl, config);
}
});
}
}
function registerValidSW(swUrl: string, config?: Config) {
navigator.serviceWorker
.register(swUrl)
.then(registration => {
registration.onupdatefound = () => {
const installingWorker = registration.installing;
if (installingWorker == null) {
return;
}
installingWorker.onstatechange = () => {
if (installingWorker.state === 'installed') {
if (navigator.serviceWorker.controller) {
// At this point, the updated precached content has been fetched,
// but the previous service worker will still serve the older
// content until all client tabs are closed.
console.log(
'New content is available and will be used when all ' +
'tabs for this page are closed. See https://bit.ly/CRA-PWA.'
);
// Execute callback
if (config && config.onUpdate) {
config.onUpdate(registration);
}
} else {
// At this point, everything has been precached.
// It's the perfect time to display a
// "Content is cached for offline use." message.
console.log('Content is cached for offline use.');
// Execute callback
if (config && config.onSuccess) {
config.onSuccess(registration);
}
}
}
};
};
})
.catch(error => {
console.error('Error during service worker registration:', error);
});
}
function checkValidServiceWorker(swUrl: string, config?: Config) {
// Check if the service worker can be found. If it can't reload the page.
fetch(swUrl, {
headers: { 'Service-Worker': 'script' }
})
.then(response => {
// Ensure service worker exists, and that we really are getting a JS file.
const contentType = response.headers.get('content-type');
if (
response.status === 404 ||
(contentType != null && contentType.indexOf('javascript') === -1)
) {
// No service worker found. Probably a different app. Reload the page.
navigator.serviceWorker.ready.then(registration => {
registration.unregister().then(() => {
window.location.reload();
});
});
} else {
// Service worker found. Proceed as normal.
registerValidSW(swUrl, config);
}
})
.catch(() => {
console.log(
'No internet connection found. App is running in offline mode.'
);
});
}
export function unregister() {
if ('serviceWorker' in navigator) {
navigator.serviceWorker.ready
.then(registration => {
registration.unregister();
})
.catch(error => {
console.error(error.message);
});
}
}

25
web/tsconfig.json Normal file
View File

@ -0,0 +1,25 @@
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react"
},
"include": [
"src"
]
}