<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>analytics</title>
    <style>
        body {
            background: #3c3d3c;
        }

        .styled-table {
            border-collapse: collapse;
            margin: 25px 0;
            font-size: 0.9em;
            font-family: sans-serif;
            min-width: 400px;
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
        }

        .styled-table thead tr {
            background-color: #7d2fb5;
            color: #ffffff;
            text-align: left;
        }

        .styled-table th,
        .styled-table td {
            padding: 12px 15px;
        }

        .styled-table tbody tr:not(.changing) {
            border-bottom: 1px solid #dddddd;
            background: #ffffff;
        }

        .styled-table tr.changing {
            border-bottom: 1px solid #7D2FB5;
            background: #bb88e0;
        }

        .styled-table tbody tr:not(.changing):nth-of-type(even) {
            background-color: #f3f3f3;
        }

        .styled-table tbody tr:last-of-type {
            border-bottom: 2px solid #7d2fb5;
        }


    </style>
</head>
<body>
<table class="styled-table">
    <thead>
    <tr>
        <th>date</th>
        <th>register_count</th>
        <th>active_user_count</th>
        <th>post_count</th>
        <th>likes_count</th>
        <th>dislikes_count</th>
        <th>matches_count</th>
        <th>projects_count</th>
    </tr>
    </thead>
    <tbody>
    <tr class="changing">
        <td>{{ current_anaytics.date }}</td>
        <td>{{ current_anaytics.register_count }}</td>
        <td>{{ current_anaytics.active_user_count }}</td>
        <td>{{ current_anaytics.post_count }}</td>
        <td>{{ current_anaytics.likes_count }}</td>
        <td>{{ current_anaytics.dislikes_count }}</td>
        <td>{{ current_anaytics.matches_count }}</td>
        <td>{{ current_anaytics.projects_count }}</td>
    </tr>
    {% for day in analytics %}
        <tr>
            <td>{{ day.date }}</td>
            <td>{{ day.register_count }}</td>
            <td>{{ day.active_user_count }}</td>
            <td>{{ day.post_count }}</td>
            <td>{{ day.likes_count }}</td>
            <td>{{ day.dislikes_count }}</td>
            <td>{{ day.matches_count }}</td>
            <td>{{ day.projects_count }}</td>
        </tr>
    {% endfor %}
    </tbody>
</table>

<br>
<table class="styled-table">
    <thead>
    <tr>
        <th>ref</th>
        <th>count</th>
    </tr>
    </thead>
    <tbody>
    {% for ref in todays_clicks %}
        <tr class="changing">
            <td>{{ ref[0] }}</td>
            <td>{{ ref[1] }}</td>
        </tr>
    {% endfor %}
    </tbody>
</table>

<br>
<table class="styled-table">
    <thead>
    <tr>
        <th>ref</th>
        <th>count</th>
    </tr>
    </thead>
    <tbody>
    {% for ref in all_clicks %}
        <tr>
            <td>{{ ref[0] }}</td>
            <td>{{ ref[1] }}</td>
        </tr>
    {% endfor %}
    </tbody>
</table>
</body>
</html>