deployment, frontend updates
This commit is contained in:
@@ -1,80 +1,104 @@
|
||||
<html>
|
||||
<head>
|
||||
<!-- <link rel="stylesheet" href="{{ url_for('static', filename='styles/dm.css') }}"> -->
|
||||
{% block head %}
|
||||
{% endblock %}
|
||||
<!-- <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;
|
||||
}
|
||||
<style>
|
||||
body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 100vh;
|
||||
margin: 0;
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
background-color: #1a1a1a;
|
||||
color: #e0e0e0;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.nav-bar {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 20px;
|
||||
display: flex;
|
||||
gap: 15px;
|
||||
}
|
||||
.nav-bar {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 20px;
|
||||
display: flex;
|
||||
gap: 20px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 2px solid #444;
|
||||
}
|
||||
|
||||
.nav-bar a {
|
||||
text-decoration: none;
|
||||
color: #6b9bd1;
|
||||
font-size: 11pt;
|
||||
padding: 5px 10px;
|
||||
border-radius: 3px;
|
||||
background-color: #2a2a2a;
|
||||
}
|
||||
.nav-bar a {
|
||||
text-decoration: none;
|
||||
color: #6b9bd1;
|
||||
font-size: 12pt;
|
||||
padding: 5px 10px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.nav-bar a:hover {
|
||||
background-color: #3a3a3a;
|
||||
}
|
||||
.nav-bar a:hover {
|
||||
background-color: #2a2a2a;
|
||||
}
|
||||
|
||||
.grey {
|
||||
color: #888;
|
||||
}
|
||||
.grey {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.blue {
|
||||
color: #6b9bd1;
|
||||
}
|
||||
.blue {
|
||||
color: #6b9bd1;
|
||||
}
|
||||
|
||||
table {
|
||||
font-size: 84pt
|
||||
}
|
||||
td {
|
||||
padding-right: 100px;
|
||||
}
|
||||
</style>
|
||||
table {
|
||||
font-size: clamp(14pt, 3vw, 28pt);
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
{% 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();
|
||||
}
|
||||
td {
|
||||
padding: 0.1em 0.5em;
|
||||
}
|
||||
|
||||
// Auto-refresh every 5 seconds using AJAX
|
||||
setInterval(refreshData, 5000);
|
||||
</script>
|
||||
{% endif %}
|
||||
td:first-child {
|
||||
text-align: right;
|
||||
padding-right: 0.3em;
|
||||
}
|
||||
|
||||
td:last-child {
|
||||
text-align: left;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.workspace-table {
|
||||
font-size: clamp(10pt, 2vw, 18pt);
|
||||
margin-top: 20px;
|
||||
padding-top: 15px;
|
||||
border-top: 1px solid #444;
|
||||
}
|
||||
|
||||
.workspace-table td {
|
||||
padding: 0.05em 0.4em;
|
||||
}
|
||||
</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) -->
|
||||
|
||||
@@ -87,9 +111,7 @@
|
||||
</div>
|
||||
|
||||
<div id="content-container">
|
||||
{% block content %}
|
||||
{% include 'main_content.html' %}
|
||||
{% endblock %}
|
||||
{% block content %} {% include 'main_content.html' %} {% endblock %}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -1,23 +1,39 @@
|
||||
{% if current_task_path and current_task_time %}
|
||||
<div id="current-task-info" style="font-size: 48pt; margin-bottom: 40px; text-align: center;">
|
||||
<div style="color: #e0e0e0;">{{ current_task_path }}</div>
|
||||
<div style="color: #999; font-size: 36pt;">{{ current_task_time }}</div>
|
||||
{% if current_task_path %}
|
||||
<div
|
||||
id="current-task-info"
|
||||
style="
|
||||
font-size: clamp(10pt, 2vw, 16pt);
|
||||
margin-bottom: 15px;
|
||||
text-align: center;
|
||||
color: #666;
|
||||
"
|
||||
>
|
||||
Current: <span style="color: #6b9bd1">{{ current_task_path }}</span>
|
||||
</div>
|
||||
{% endif %} {% if task_rows %}
|
||||
<div id="task-list" style="margin-bottom: 25px">
|
||||
<table>
|
||||
<tbody>
|
||||
{% for row in task_rows %}
|
||||
<tr>
|
||||
<td>{{ row["ws"] }}</td>
|
||||
<td>{{ row["total"] }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
<table>
|
||||
<tbody>
|
||||
{% 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 %}
|
||||
|
||||
<table class="workspace-table">
|
||||
<tbody>
|
||||
{% 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>
|
||||
<td class="{{my_class}}">{{ row["ws"] }}</td>
|
||||
<td class="{{my_class}}">{{ row["total"] }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user