<excludeFolder url="file://$MODULE_DIR$/temp" /> | <excludeFolder url="file://$MODULE_DIR$/temp" /> | ||||
<excludeFolder url="file://$MODULE_DIR$/.tmp" /> | <excludeFolder url="file://$MODULE_DIR$/.tmp" /> | ||||
<excludeFolder url="file://$MODULE_DIR$/tmp" /> | <excludeFolder url="file://$MODULE_DIR$/tmp" /> | ||||
<excludeFolder url="file://$MODULE_DIR$/venv" /> | |||||
</content> | </content> | ||||
<orderEntry type="inheritedJdk" /> | <orderEntry type="inheritedJdk" /> | ||||
<orderEntry type="sourceFolder" forTests="false" /> | <orderEntry type="sourceFolder" forTests="false" /> |
from flask import Flask, jsonify | |||||
from flask import Flask, jsonify, Response | |||||
app = Flask(__name__) | app = Flask(__name__) | ||||
@app.route('/CONNECTION', methods=['GET']) | |||||
def connection(): | |||||
return Response(status=200) | |||||
@app.route('/GETQUESTION', methods=['GET']) | |||||
def hello(): | |||||
return jsonify({'TEST': 'Dies ist eine Testfrage', | |||||
'firstanswer': 'erste Antwort', | |||||
'secondanswer': 'zweite Antwort', | |||||
'thirdanswer': 'dritte Antwort'}) | |||||
def main(): | |||||
app.run(host='127.0.0.1', port=5555, debug=True) | |||||
if __name__ == '__main__': | if __name__ == '__main__': | ||||
app.run(host='127.0.0.1', port=5555, debug=True) | |||||
main() |
# 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* |
# Default ignored files | |||||
/shelf/ | |||||
/workspace.xml | |||||
# Editor-based HTTP Client requests | |||||
/httpRequests/ |
<?xml version="1.0" encoding="UTF-8"?> | |||||
<module type="WEB_MODULE" version="4"> | |||||
<component name="NewModuleRootManager"> | |||||
<content url="file://$MODULE_DIR$"> | |||||
<excludeFolder url="file://$MODULE_DIR$/.tmp" /> | |||||
<excludeFolder url="file://$MODULE_DIR$/build" /> | |||||
<excludeFolder url="file://$MODULE_DIR$/temp" /> | |||||
<excludeFolder url="file://$MODULE_DIR$/tmp" /> | |||||
</content> | |||||
<orderEntry type="inheritedJdk" /> | |||||
<orderEntry type="sourceFolder" forTests="false" /> | |||||
</component> | |||||
</module> |
<component name="InspectionProjectProfileManager"> | |||||
<profile version="1.0"> | |||||
<option name="myName" value="Project Default" /> | |||||
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" /> | |||||
</profile> | |||||
</component> |
<?xml version="1.0" encoding="UTF-8"?> | |||||
<project version="4"> | |||||
<component name="ProjectModuleManager"> | |||||
<modules> | |||||
<module fileurl="file://$PROJECT_DIR$/.idea/app.iml" filepath="$PROJECT_DIR$/.idea/app.iml" /> | |||||
</modules> | |||||
</component> | |||||
</project> |
<?xml version="1.0" encoding="UTF-8"?> | |||||
<project version="4"> | |||||
<component name="VcsDirectoryMappings"> | |||||
<mapping directory="$PROJECT_DIR$/../../.." vcs="Git" /> | |||||
</component> | |||||
</project> |
# Getting Started with Create React App | |||||
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). | |||||
## Available Scripts | |||||
In the project directory, you can run: | |||||
### `npm start` | |||||
Runs the app in the development mode.\ | |||||
Open [http://localhost:3000](http://localhost:3000) to view it in your browser. | |||||
The page will reload when you make changes.\ | |||||
You may also see any lint errors in the console. | |||||
### `npm test` | |||||
Launches the test runner in the interactive watch mode.\ | |||||
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. | |||||
### `npm run build` | |||||
Builds the app for production to the `build` folder.\ | |||||
It correctly bundles React in production mode and optimizes the build for the best performance. | |||||
The build is minified and the filenames include the hashes.\ | |||||
Your app is ready to be deployed! | |||||
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. | |||||
### `npm run eject` | |||||
**Note: this is a one-way operation. Once you `eject`, you can't go back!** | |||||
If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. | |||||
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own. | |||||
You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it. | |||||
## Learn More | |||||
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). | |||||
To learn React, check out the [React documentation](https://reactjs.org/). | |||||
### Code Splitting | |||||
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) | |||||
### Analyzing the Bundle Size | |||||
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) | |||||
### Making a Progressive Web App | |||||
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) | |||||
### Advanced Configuration | |||||
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) | |||||
### Deployment | |||||
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) | |||||
### `npm run build` fails to minify | |||||
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) |
{ | |||||
"name": "app", | |||||
"version": "0.1.0", | |||||
"private": true, | |||||
"dependencies": { | |||||
"@testing-library/jest-dom": "^5.16.5", | |||||
"@testing-library/react": "^13.4.0", | |||||
"@testing-library/user-event": "^13.5.0", | |||||
"react": "^18.2.0", | |||||
"react-dom": "^18.2.0", | |||||
"react-modal": "^3.16.1", | |||||
"react-scripts": "5.0.1", | |||||
"web-vitals": "^2.1.4" | |||||
}, | |||||
"scripts": { | |||||
"start": "react-scripts start", | |||||
"build": "react-scripts build", | |||||
"test": "react-scripts test", | |||||
"eject": "react-scripts eject" | |||||
}, | |||||
"eslintConfig": { | |||||
"extends": [ | |||||
"react-app", | |||||
"react-app/jest" | |||||
] | |||||
}, | |||||
"browserslist": { | |||||
"production": [ | |||||
">0.2%", | |||||
"not dead", | |||||
"not op_mini all" | |||||
], | |||||
"development": [ | |||||
"last 1 chrome version", | |||||
"last 1 firefox version", | |||||
"last 1 safari version" | |||||
] | |||||
} | |||||
} |
<?xml version="1.0" standalone="no"?> | |||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" | |||||
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> | |||||
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" | |||||
width="6001.000000pt" height="4001.000000pt" viewBox="0 0 6001.000000 4001.000000" | |||||
preserveAspectRatio="xMidYMid meet"> | |||||
<g transform="translate(0.000000,4001.000000) scale(0.100000,-0.100000)" | |||||
fill="#000000" stroke="none"> | |||||
</g> | |||||
</svg> |
<!DOCTYPE html> | |||||
<html lang="en"> | |||||
<head> | |||||
<meta charset="utf-8" /> | |||||
<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="manifest" href="%PUBLIC_URL%/manifest.json" /> | |||||
<title>1_2_oder3</title> | |||||
</head> | |||||
<body> | |||||
<div id="root"></div> | |||||
</body> | |||||
</html> |
{ | |||||
"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" | |||||
} |
.PopUpBackground { | |||||
width: 100vw; | |||||
height: 100vh; | |||||
background-color: rgba(200, 200, 200, 200); | |||||
position: absolute; | |||||
display: flex; | |||||
justify-content: center; | |||||
align-items: center; | |||||
z-index: 10; | |||||
top: 0; | |||||
left: 0; | |||||
} | |||||
.PopUpContainer { | |||||
width: 500px; | |||||
height: 500px; | |||||
border-radius: 20px; | |||||
background-color: white; | |||||
} | |||||
.Header { | |||||
display: flex; | |||||
align-items: center; | |||||
padding: 30px; | |||||
} | |||||
.HeaderDiv { | |||||
margin-left: 50px; | |||||
text-align: center; | |||||
max-width: 1000px; | |||||
width: 100%; | |||||
padding: 10px; | |||||
box-shadow: 5px 5px black; | |||||
background: linear-gradient(white, white) padding-box, | |||||
linear-gradient(to right, #a10012 0%, #fba51b 50%, #3b5da4 100%) border-box; | |||||
border-style: solid; | |||||
border-width: 5px; | |||||
border-radius: 20px; | |||||
border-color: transparent; | |||||
} | |||||
.TimerDiv { | |||||
background: linear-gradient(white, white) padding-box, | |||||
linear-gradient(to right, #a10012 0%, #fba51b 50%, #3b5da4 100%) border-box; | |||||
border-style: solid; | |||||
border-width: 5px; | |||||
border-radius: 20px; | |||||
border-color: transparent; | |||||
padding: 20px; | |||||
box-shadow: 5px 5px black; | |||||
margin-left: 50px; | |||||
} | |||||
#TimerPic { | |||||
visibility: hidden; | |||||
} | |||||
#Seconds { | |||||
visibility: hidden; | |||||
border: solid 2px black; | |||||
border-radius: 10px; | |||||
padding: 2px; | |||||
} | |||||
#QuestionHeaderDiv { | |||||
background-color: white; | |||||
border: solid #0C134F 2px; | |||||
margin-bottom: 5px; | |||||
border-radius: 10px; | |||||
box-shadow: 2px 2px #0C134F; | |||||
} | |||||
#QuestionHeader { | |||||
color: #0C134F; | |||||
} | |||||
#QuestionDiv { | |||||
background-color: white; | |||||
border: solid #0C134F 2px; | |||||
margin-bottom: 5px; | |||||
border-radius: 10px; | |||||
box-shadow: 2px 2px black; | |||||
} | |||||
#Question { | |||||
color: black; | |||||
} | |||||
#headingimage { | |||||
width: 250px; | |||||
height: auto; | |||||
padding: 10px ; | |||||
background: linear-gradient(white, white) padding-box, | |||||
linear-gradient(to right, #a10012 0%, #fba51b 50%, #3b5da4 100%) border-box; | |||||
border-style: solid; | |||||
border-width: 5px; | |||||
border-radius: 20px; | |||||
border-color: transparent; | |||||
box-shadow: 5px 5px black; | |||||
cursor: pointer; | |||||
} | |||||
#headingimage:hover { | |||||
background-color: #F6F6F6; | |||||
} | |||||
.Body{ | |||||
text-align: center; | |||||
} | |||||
.Answers { | |||||
padding: 10px; | |||||
float: left; | |||||
width: 100%; | |||||
max-width: 1000px;; | |||||
height: 500px; | |||||
margin-left: 80px; | |||||
} | |||||
.AnswerBox { | |||||
margin-left: 6px; | |||||
position: relative; | |||||
height: 500px; | |||||
width: 32%; | |||||
float: left; | |||||
border: solid 2px; | |||||
} | |||||
#firstans { | |||||
border: solid 2px #a10012; | |||||
} | |||||
#secondans { | |||||
border: solid 2px #fba51b; | |||||
} | |||||
#thirdans { | |||||
border: solid 2px #3b5da4; | |||||
} | |||||
.Buttons { | |||||
float: left; | |||||
max-width: 250px; | |||||
padding-top: 10px; | |||||
padding-left: 30px; | |||||
} | |||||
.MyButton { | |||||
margin-bottom: 20px; | |||||
padding: 10px 20px; | |||||
font-size: 30px; | |||||
font-weight: bold; | |||||
color: white; | |||||
border-style: solid; | |||||
border-radius: 20px; | |||||
box-shadow: 5px 5px black; | |||||
cursor: pointer; | |||||
} | |||||
.ScoreBoard { | |||||
float: left; | |||||
padding: 10px; | |||||
width: 100px; | |||||
height: 500px; | |||||
margin-left: 40px; | |||||
background: linear-gradient(white, white) padding-box, | |||||
linear-gradient(to right, #a10012 0%, #fba51b 50%, #3b5da4 100%) border-box; | |||||
border-style: solid; | |||||
border-width: 5px; | |||||
border-radius: 20px; | |||||
border-color: transparent; | |||||
box-shadow: 5px 5px black; | |||||
} | |||||
#StartButton { | |||||
background-color: #4CAF50; | |||||
} | |||||
#QuitButton { | |||||
background-color: red; | |||||
} | |||||
.MyButton:hover { | |||||
background-color: #3E8E41; /* darker shade of green */ | |||||
} | |||||
#QuitButton { | |||||
visibility: hidden; | |||||
} | |||||
import { useEffect, useState} from "react"; | |||||
import './App.css'; | |||||
import Header from "./components/Header"; | |||||
import Body from "./components/Body"; | |||||
function App() { | |||||
return (<> | |||||
<Header/> | |||||
<Body/> | |||||
</> | |||||
); | |||||
} | |||||
export default App; |
import React from "react"; | |||||
function Answers() { | |||||
return( | |||||
<div className="Answers"> | |||||
<div className="AnswerBox" id="firstans">AnswerBox1 </div> | |||||
<div className="AnswerBox" id="secondans">AnswerBox2</div> | |||||
<div className="AnswerBox" id="thirdans">AnswerBox3</div> | |||||
</div> | |||||
) | |||||
} | |||||
export default Answers |
import React from "react"; | |||||
import Buttons from "./Buttons"; | |||||
import Answers from "./Answers"; | |||||
import ScoreBoard from "./ScoreBoard"; | |||||
function Body() { | |||||
return( | |||||
<div className="Body"> | |||||
<Buttons/> | |||||
<Answers/> | |||||
<ScoreBoard/> | |||||
</div> | |||||
) | |||||
} | |||||
export default Body |
import React from "react"; | |||||
import StartButton from "./StartButton"; | |||||
import QuitButton from "./QuitButton"; | |||||
function Buttons() { | |||||
return( | |||||
<div className="Buttons"> | |||||
<StartButton/> | |||||
<QuitButton/> | |||||
</div> | |||||
) | |||||
} | |||||
export default Buttons |
import React from "react"; | |||||
import Heading from "./Heading"; | |||||
import Timer from "./Timer"; | |||||
import Question from "./Question"; | |||||
function Header() { | |||||
return( | |||||
<header className="Header"> | |||||
<Heading/> | |||||
<Question/> | |||||
<Timer/> | |||||
</header> | |||||
) | |||||
} | |||||
export default Header |
import React from "react"; | |||||
function Heading() { | |||||
return( | |||||
<div className="Heading"> | |||||
<img src={process.env.PUBLIC_URL + "12oder3-logo.png"} alt="1_2_oder_3" id="headingimage"/> | |||||
</div> | |||||
) | |||||
} | |||||
export default Heading |
import React from "react"; | |||||
function Question() { | |||||
return( | |||||
<div className="HeaderDiv"> | |||||
<div id="QuestionHeaderDiv"> | |||||
<h2 id="QuestionHeader">Frage:</h2> | |||||
</div> | |||||
<div id="QuestionDiv"> | |||||
<h2 id="Question">?</h2> | |||||
</div> | |||||
</div> | |||||
) | |||||
} | |||||
export default Question |
import React from "react"; | |||||
function QuitButton() { | |||||
return( | |||||
<button className="MyButton" id="QuitButton"> | |||||
Abbruch | |||||
</button> | |||||
) | |||||
} | |||||
export default QuitButton |
import React from "react"; | |||||
function ScoreBoard() { | |||||
return(<div className={"ScoreBoard"}>ScoreBoard</div>) | |||||
} | |||||
export default ScoreBoard |
import {useState} from "react"; | |||||
import TeamSizePopUp from "./TeamsizePopUp"; | |||||
function StartButton() { | |||||
const [openPopUp, setOpenPopUp] = useState(false) | |||||
function startclicked() { | |||||
setOpenPopUp(true); | |||||
} | |||||
return( | |||||
<> | |||||
<button className="MyButton" id="StartButton" onClick={startclicked}> | |||||
Start Game | |||||
</button> | |||||
{openPopUp && <TeamSizePopUp closeModal={setOpenPopUp}/>} | |||||
</> | |||||
) | |||||
} | |||||
export default StartButton |
import React from "react"; | |||||
import setTeamsize from "./data_functions"; | |||||
function TeamSizePopUp({closeModal}) { | |||||
function closePopUp() { | |||||
closeModal(false); | |||||
} | |||||
return ( | |||||
<div className="PopUpBackground"> | |||||
<div className="PopUpContainer"> | |||||
<h2>Bitte Teamgröße wählen</h2> | |||||
<input type="number" id="TeamSizeInput"/> | |||||
<button className="MyButton" onClick={closePopUp}>Bestätigen</button> | |||||
</div> | |||||
</div> | |||||
) | |||||
} | |||||
export default TeamSizePopUp |
import React from "react"; | |||||
function Timer() { | |||||
return( | |||||
<div className="TimerDiv"> | |||||
<img src={process.env.PUBLIC_URL + "icons8-time.gif"} alt="timer" id="TimerPic"/> | |||||
<h2 id="Seconds">0:00 s</h2> | |||||
</div> | |||||
) | |||||
} | |||||
export default Timer |
let teamsize | |||||
function setTeamsize(_teamsize) { | |||||
teamsize = _teamsize; | |||||
} | |||||
export default setTeamsize |
body { | |||||
background-image: url("../public/17580.jpg"); | |||||
background-size: 1920px; | |||||
} | |||||
import React from 'react'; | |||||
import ReactDOM from 'react-dom/client'; | |||||
import './index.css'; | |||||
import App from './App'; | |||||
const root = ReactDOM.createRoot(document.getElementById('root')); | |||||
root.render( | |||||
<React.StrictMode> | |||||
<App /> | |||||
</React.StrictMode> | |||||
); |