95 lines
2.4 KiB
HTML
95 lines
2.4 KiB
HTML
<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 */
|
|
background-color: #1a1a1a;
|
|
color: #e0e0e0;
|
|
}
|
|
|
|
.nav-bar {
|
|
position: absolute;
|
|
top: 20px;
|
|
left: 20px;
|
|
display: flex;
|
|
gap: 15px;
|
|
}
|
|
|
|
.nav-bar a {
|
|
text-decoration: none;
|
|
color: #6b9bd1;
|
|
font-size: 11pt;
|
|
padding: 5px 10px;
|
|
border-radius: 3px;
|
|
background-color: #2a2a2a;
|
|
}
|
|
|
|
.nav-bar a:hover {
|
|
background-color: #3a3a3a;
|
|
}
|
|
|
|
.grey {
|
|
color: #888;
|
|
}
|
|
|
|
.blue {
|
|
color: #6b9bd1;
|
|
}
|
|
|
|
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 class="nav-bar">
|
|
<a href="/">Today</a>
|
|
<a href="/calendar/daily">Calendar</a>
|
|
<a href="/switches/daily">Switches</a>
|
|
<a href="/work">Work</a>
|
|
<a href="/totals">All Time</a>
|
|
</div>
|
|
|
|
<div id="content-container">
|
|
{% block content %}
|
|
{% include 'main_content.html' %}
|
|
{% endblock %}
|
|
</div>
|
|
</body>
|
|
</html> |