{% extends "frontend/base.html" %}
{% load images %}
{% load request %}
{% block "content" %}

                        <div class="row">

                            <!-- Entry details -->
                            <div class="col-xl-8 col-lg-7">
                                <div class="card shadow mb-4">
                                    <!-- Card Header - Dropdown -->
                                    <div class="card-header py-3 d-flex flex-row align-items-center justify-content-between">
                                        <h6 class="m-0 font-weight-bold text-primary">Mood stats</h6>

                                    </div>
                                    <!-- Card Body -->
                                    <div class="card-body">
                                        <iframe id="plot" src="plot/{% querystring %}" width="800px" height="450px"></iframe>
                                    </div>
                                </div>
                            </div>

                            <div class="col-xl-4 col-lg-5">
                                <div class="card shadow mb-4">
                                    <!-- Card Header - Dropdown -->
                                    <div class="card-header py-3 d-flex flex-row align-items-center justify-content-between">
                                        <h6 class="m-0 font-weight-bold text-primary">Activities</h6>
                                    </div>
                                    <!-- Card Body -->
                                    <div class="card-body">
                                        <table>
                                            <tr>
                                                <th>Activity</th>
                                                <th>7 days</th>
                                                <th>1 month</th>
                                                <th>1 year</th>
                                            </tr>
                                            {% for activity, counts in activities.items %}
                                            <tr>
                                                <td style="color:{{ activity.color }};"><i class="{{ activity.icon }}"></i><b> {{ activity }}</b></td>
                                                <td style="text-align: right;">{{ counts.weekly }}</td>
                                                <td style="text-align: right;">{{ counts.monthly }}</td>
                                                <td style="text-align: right;">{{ counts.yearly }}</td>
                                            </tr>
                                            {% endfor %}
                                        </table>
                                    </div>
                                </div>
                            </div>

                        </div>

{% endblock %}