obscreen/views/default.jinja.html
2024-02-02 01:36:47 +01:00

64 lines
1.9 KiB
HTML
Executable File

<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function updateTime() {
var date = new Date();
var hours = (date.getHours() < 10 ? '0' : '') + date.getHours();
var minutes = (date.getMinutes() < 10 ? '0' : '') + date.getMinutes();
var seconds = (date.getSeconds() < 10 ? '0' : '') + date.getSeconds();
var dayInMonth = date.getDate();
var month = date.getMonth();
var year = date.getFullYear();
var day = date.getDay();
var dayLabels = ["Dimanche", "Lundi", "Mardis", "Mercredi", "Jeudi", "Vendredi", "Samedi"];
var monthLabels = ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"];
var timeLabel = hours + ":" + minutes;
var dateLabel = dayLabels[day] + " " + dayInMonth + " " + monthLabels[month] + " " + year;
document.getElementById('time').innerHTML = timeLabel;
document.getElementById('date').innerHTML = dateLabel;
setTimeout(updateTime, 1000);
}
window.addEventListener("load", updateTime);
const urlParams = new URLSearchParams(window.location.search);
</script>
<style>
body {
text-align: center;
font-family: 'Arial', 'sans-serif';
color: white;
background-color: black
}
#bottom {
background: #111;
position: fixed;
left: 0;
right: 0;
bottom: 0;
padding: 20px 0;
}
#time {
font-size: 10em;
}
#date {
font-size: 3em;
}
#ipaddr {
font-size: 1em;
}
</style>
</head>
<body>
<div id="time"></div>
<div id="date"></div>
<div id="bottom">
<div id="ipaddr"></div>
</div>
<script>
document.getElementById('ipaddr').innerText = '{{ ipaddr|safe }}';
</script>
</body>
</html>