1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta http-equiv="refresh" content="5">
- <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
- <title>Active goals</title>
- <style>
- body {
- background-color: transparent;
- color: white;
- width: 600px;
- text-align: left;
- }
- </style>
- </head>
- <body style="position: absolute;
- bottom: 0; left: 0;">
- {% if goals %}
- <table>
- <thead>
- <tr>
- <th></th>
- <th style="width: 50%"></th>
- <th></th>
- </tr>
- </thead>
- <tbody>
- {% for goal in goals %}
- <tr>
- <td style="text-align: left;"> {{ goal[3] }} </td>
- {% set progress = goal[1] / goal[2] * 100 %}
- <td><div class="bar-light-grey bar-tiny bar-round">
- <div class="bar-round bar-blue" style="text-align: center; width:{{ goal[1] / goal[2] * 100 }}%;">{{ '%0.0f'| format(progress| float) }}%</div>
- </div>
- </td>
- {% if goal[1] == goal[2] %}
- <td style="text-align: right;">{{ goal[1] }} / {{ goal[2] }} <img src=/static/img/tada.png style="width: 24px; height: 24px;"></td>
- {% else %}
- <td style="text-align: right;">{{ goal[1] }} / {{ goal[2] }}</td>
- {% endif %}
-
- </tr>
- {% endfor %}
- </tbody>
- </table>
- {% endif %}
- </body>
- </html>
|