You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
85 lines
2.1 KiB
85 lines
2.1 KiB
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Digital Signage</title>
|
|
<script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
font-family: Arial, sans-serif;
|
|
}
|
|
|
|
#websiteFrame {
|
|
width: 100%;
|
|
height: 100vh;
|
|
border: 0;
|
|
}
|
|
|
|
#container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
height: 100vh;
|
|
}
|
|
|
|
#navigation {
|
|
display: flex;
|
|
margin-top: 10px;
|
|
}
|
|
|
|
#prevBtn, #nextBtn {
|
|
margin: 0 10px;
|
|
padding: 8px 16px;
|
|
font-size: 14px;
|
|
}
|
|
|
|
@media (max-width: 600px) {
|
|
#navigation {
|
|
flex-direction: column;
|
|
}
|
|
|
|
#prevBtn, #nextBtn {
|
|
margin: 5px 0;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="container">
|
|
<iframe id="websiteFrame" src="{{ current_website }}" frameborder="0"></iframe>
|
|
<!-- <div id="navigation">
|
|
<button id="prevBtn">Vorherige Seite</button>
|
|
<button id="nextBtn">Nächste Seite</button>
|
|
</div> -->
|
|
</div>
|
|
|
|
<script>
|
|
var websites = {{ websites|tojson|safe }};
|
|
var currentIndex = 0;
|
|
|
|
function updateWebsite() {
|
|
$("#websiteFrame").attr("src", websites[currentIndex]);
|
|
}
|
|
|
|
$("#prevBtn").click(function() {
|
|
currentIndex = (currentIndex - 1 + websites.length) % websites.length;
|
|
updateWebsite();
|
|
});
|
|
|
|
$("#nextBtn").click(function() {
|
|
currentIndex = (currentIndex + 1) % websites.length;
|
|
updateWebsite();
|
|
});
|
|
|
|
// Starte den Wechselprozess alle 10 Sekunden
|
|
setInterval(function() {
|
|
currentIndex = (currentIndex + 1) % websites.length;
|
|
updateWebsite();
|
|
}, 10000);
|
|
</script>
|
|
</body>
|
|
</html>
|
|
|