restore legacy, include shorcut scripts
This commit is contained in:
64
dmold/dmweb/templates/main.html
Normal file
64
dmold/dmweb/templates/main.html
Normal file
@@ -0,0 +1,64 @@
|
||||
<html>
|
||||
<head>
|
||||
<!-- <link rel="stylesheet" href="{{ url_for('static', filename='styles/dm.css') }}"> -->
|
||||
{% block head %}
|
||||
{% endblock %}
|
||||
|
||||
<style>
|
||||
body
|
||||
{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100vh; /* This ensures that the container takes the full height of the viewport */
|
||||
margin: 0; /* Remove default margin */
|
||||
}
|
||||
|
||||
.grey {
|
||||
color:grey;
|
||||
}
|
||||
|
||||
.blue {
|
||||
color:blue;
|
||||
}
|
||||
|
||||
table {
|
||||
font-size: 84pt
|
||||
}
|
||||
td {
|
||||
padding-right: 100px;
|
||||
}
|
||||
</style>
|
||||
|
||||
{% if auto_refresh %}
|
||||
<script>
|
||||
function refreshData() {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', '/api/today', true);
|
||||
xhr.onreadystatechange = function() {
|
||||
if (xhr.readyState === 4 && xhr.status === 200) {
|
||||
document.getElementById('content-container').innerHTML = xhr.responseText;
|
||||
}
|
||||
};
|
||||
xhr.send();
|
||||
}
|
||||
|
||||
// Auto-refresh every 5 seconds using AJAX
|
||||
setInterval(refreshData, 5000);
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- agregar función que me diga cuanto tiempo hace que esta activo el escritorio
|
||||
(calcular el delta con el ultimo switch y pasarlo a mm:ss) -->
|
||||
|
||||
<div id="content-container">
|
||||
{% block content %}
|
||||
{% include 'main_content.html' %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user