<!doctype html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <!-- Bootstrap Styles -->
        <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
        <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap-theme.min.css" integrity="sha384-6pzBo3FDv/PJ8r2KRkGHifhEocL+1X2rVCTTkUfGk7/0pbek5mMa1upzvWbrUbOZ" crossorigin="anonymous">

        <style>
            .img_col {
                width: 51px;
            }

            .b64_logo{
                display:block;
                width:50px;
                height:50px;
            }

        </style>
    </head>

    <body>
        <div class="container" style="width: 99%">
            <div class="row">
                <h1>TEx - Telegram Explorer ({{target_phone}})</h1>
            </div>
            <div class="row">
                <b>Report generated at</b> {{now}}
                <br><b>From</b> {{start}} <b>To</b> {{end}}
                <br><b>Groups:</b> {{groups_filter}}
                <br><b>Filtering:</b> {{words_filter}}
            </div>
            <div class="row">
                <table class="table table-striped table-bordered">
                    <tr>
                        <td colspan="2">Groups</td>
                        <td>N. Messages</td>
                    </tr>
                    {% for group in groups %}
                    <tr>
                        <td class="img_col">
                            <a href="result_{{group.group_username}}_{{group.id}}.html" target="_report">
                                <img class="b64_logo" id='base64image' src='data:image/jpeg;base64, {{group.photo_base64}}' />
                            </a>
                        </td>
                        <td style="vertical-align: middle">
                            <a href="result_{{group.group_username}}_{{group.id}}.html" style="color:black;" target="_report">
                                <b>{{group.title}}</b> - {{group.group_username}} ({{group.id}})
                            </a>
                        </td>
                        <td style="vertical-align: middle">
                            {{group.meta_message_count}}
                        </td>
                    </tr>
                    {% endfor %}
                </table>
            </div>
        </div>

    </body>

</html>