{% extends "main.html" %}

{% block header %}
<title>{{ title }}</title>
<link rel="stylesheet" href="static/novels/css/result.css">
<style>
    td, th {
        text-align: center !important;
    }
</style>
{% endblock %}

{% block content %}
{% include "search_bar.html" %}
<div class="container">
    {% if is_similar %}
    <table class="table table-striped table-hover" style="margin-bottom: 50px;">
        <thead>
        <tr align="center">
            <th>相似用户</th>
            <th>相似度</th>
        </tr>
        </thead>
        <tbody>
        {% for v in similar_user%}
        {% for key in v %}
        <tr>
            <td>
                <a href="/admin/search_user?ss={{key|replace('&#183;','.')}}" target="_blank">{{key|replace('&#183;','.')}}</a>
            </td>
            <td>
                <a href="#">{{v[key]}}</a>
            </td>
        </tr>
        {% endfor %}
        {% endfor %}
        </tbody>
    </table>
    {% else %}
    <center>暂无相似书友</center>
    {% endif %}

</div>
{% endblock %}
{% block script %}
<script src="static/novels/js/books.js"></script>
{% endblock %}