Files
deskmeter/dmapp/dmweb/templates/main.html
2025-02-04 02:19:47 -03:00

59 lines
1.5 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 */
}
.grey {
color:grey;
}
.blue {
color:blue;
}
table {
font-size: 84pt
}
td {
padding-right: 100px;
}
</style>
</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) -->
{% block content %}
<table>
{% for row in rows %}
{% if row["ws"] in ['Away', 'Other'] %}
{% set my_class = 'grey' %}
{% elif row["ws"] in ['Active', 'Idle'] %}
{% set my_class = 'blue' %}
{% else %}
{% set my_class = '' %}
{% endif %}
<tr>
<td class="{{my_class}}" >{{ row["ws"] }}</td>
<td class="{{my_class}}" >{{ row["total"] }}</td>
</tr>
{% endfor %}
</table>
{% endblock %}
</body>
</html>