mirror of
https://github.com/lucaspalomodevelop/Party.git
synced 2026-03-13 08:09:37 +00:00
copied iframes to templates
This commit is contained in:
parent
55a737af27
commit
03211ed0d2
3
static/js/control.js
Normal file
3
static/js/control.js
Normal file
@ -0,0 +1,3 @@
|
||||
function save() {
|
||||
|
||||
}
|
||||
54
static/js/game.js
Normal file
54
static/js/game.js
Normal file
@ -0,0 +1,54 @@
|
||||
var modal = document.getElementById('id01');
|
||||
// When the user clicks anywhere outside of the modal, close it
|
||||
window.onclick = (event) =>
|
||||
if (event.target == modal)
|
||||
modal.style.display = "none";
|
||||
|
||||
window.onload = function () {
|
||||
var seconds = 00;
|
||||
var tens = 00;
|
||||
var appendTens = document.getElementById("tens")
|
||||
var appendSeconds = document.getElementById("seconds")
|
||||
var buttonStart = document.getElementById('button-start');
|
||||
var buttonStop = document.getElementById('button-stop');
|
||||
var buttonReset = document.getElementById('button-reset');
|
||||
var Interval ;
|
||||
var time = seconds + tens;
|
||||
|
||||
buttonStart.onclick = function() {
|
||||
clearInterval(Interval);
|
||||
Interval = setInterval(startTimer, 10);
|
||||
}
|
||||
|
||||
buttonStop.onclick = () =>
|
||||
clearInterval(Interval);
|
||||
|
||||
buttonReset.onclick = function() {
|
||||
clearInterval(Interval);
|
||||
tens = "00";
|
||||
seconds = "00";
|
||||
appendTens.innerHTML = tens;
|
||||
appendSeconds.innerHTML = seconds;
|
||||
}
|
||||
|
||||
function startTimer () {
|
||||
tens++;
|
||||
|
||||
if(tens <= 9)
|
||||
appendTens.innerHTML = "0" + tens;
|
||||
|
||||
if (tens > 9)
|
||||
appendTens.innerHTML = tens;
|
||||
|
||||
if (tens > 99) {
|
||||
console.log("seconds");
|
||||
seconds++;
|
||||
appendSeconds.innerHTML = "0" + seconds;
|
||||
tens = 0;
|
||||
appendTens.innerHTML = "0" + 0;
|
||||
}
|
||||
|
||||
if (seconds > 9)
|
||||
appendSeconds.innerHTML = seconds;
|
||||
}
|
||||
}
|
||||
@ -11,8 +11,100 @@
|
||||
</head>
|
||||
<body>
|
||||
<a href="http://127.0.0.1:5000/logout">
|
||||
<button class="btn btn-primary btn-lg">Logout</button>
|
||||
</a>
|
||||
<button class="btn btn-primary btn-lg">Logout</button>
|
||||
</a>
|
||||
<template id="_planer">
|
||||
<h1>Planer</h1>
|
||||
{% block content %}
|
||||
{% for post in asd %}
|
||||
<p>{{ asd }}</p>
|
||||
<hr>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
<p>Füge ein Event ein</p>
|
||||
<form class="modal-content animate" action="/get_planer" method="POST">
|
||||
<div class="container">
|
||||
<input type="text" placeholder="Tomb Raider spielen" name="event" required>
|
||||
<input type="time" placeholder="15:30" name="zeit" required>
|
||||
<button type="submit">➕</button>
|
||||
</div>
|
||||
</form>
|
||||
</template>
|
||||
<template id="_game">
|
||||
<center><h1>Games</h1></center>
|
||||
<div class="wrapper">
|
||||
<center>
|
||||
<p><span id="seconds">00</span>:<span id="tens">00</span></p>
|
||||
<button id="button-start">Start</button>
|
||||
<button id="button-stop">Stop</button>
|
||||
<button id="button-reset">Reset</button>
|
||||
<form class="modal-content animate" action="http://127.0.0.1:5000/stopuhr" method="POST">
|
||||
<div class="container">
|
||||
</br>
|
||||
<input type="text" placeholder="Tomb Raider" name="spiel" required>
|
||||
<input type="text" placeholder="parcour" name="art" required>
|
||||
|
||||
<button type="submit">➕</button>
|
||||
<button type="submit">📁</button>
|
||||
</div>
|
||||
</form>
|
||||
</center>
|
||||
</div>
|
||||
<div id="statistik">
|
||||
<h1>Spiele-Statistiken</h1>
|
||||
{% block content %}
|
||||
{% for post in asd %}
|
||||
<p>{{ asd }}</p>
|
||||
<hr>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</template>
|
||||
<template id="_chat">
|
||||
<h1>Chat</h1>
|
||||
<iframe id="ifr" src="/message" width="800" height="450" frameBorder="0"></iframe>
|
||||
<div id="userNameEntryDiv">
|
||||
<input type="text" placeholder="Username..." id="userNameEntry">
|
||||
<button id="chatUsernameButton" onclick="join_chat()">Join chat</button>
|
||||
</div>
|
||||
<form class="modal-content animate" action="http://127.0.0.1:5000/chat" method="POST">
|
||||
<div class="container">
|
||||
<input type="text" placeholder="Hallo Welt" name="message" required>
|
||||
<button type="submit">
|
||||
➤
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</template>
|
||||
<template id="_session">
|
||||
<h1> Session Information</h1>
|
||||
<label>User Anzahl, Uptime, Creator:</label>
|
||||
<img src="/static/img/user.png" width="60" height="60">
|
||||
{% block content %}
|
||||
<p>{{das}}</p>
|
||||
<p>{{der}}</p>
|
||||
|
||||
<p>{{er}}</p>
|
||||
<h1>QR-Code</h1>
|
||||
{% endblock %}
|
||||
|
||||
<img src="../static/img/qr.png"
|
||||
</template>
|
||||
<template id="_control">
|
||||
<h1>Einstellungen</h1>
|
||||
<div id="LED">
|
||||
<h3>Setze eine Fabe für die LEDs</h3>
|
||||
<label for="colorpicker">Led Streifen:</label>
|
||||
<input type="color" id="colorpicker" value="#0000ff">
|
||||
</div>
|
||||
<div id="userVerwaltung">
|
||||
<h3>User Verwaltung</h3>
|
||||
<p>An dieser Stelle sollen später die User angezeigt werden, und der Session Admin kann diese dann verwalten</p>
|
||||
</div>
|
||||
|
||||
<button onclick="save()">💾</button>
|
||||
</template>
|
||||
|
||||
<label class="switch">
|
||||
<input type="checkbox" onclick="myFunction()">
|
||||
<span class="slider round"></span>
|
||||
@ -55,5 +147,8 @@
|
||||
</script>
|
||||
|
||||
|
||||
<script src="{{url_for('static', filename='js/control.js')}}"></script>
|
||||
<script src="{{url_for('static', filename='js/chat.js')}}"></script>
|
||||
<script src="{{url_for('static', filename='js/game.js')}}"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user