{% extends "main.html" %}

{% block header %}
<title>{{ title }}</title>
<link rel="stylesheet" href="/md/static/md/css/md.css">
{% endblock %}

{% block content %}
<body class="mdui-appbar-with-toolbar">

<div class="mdui-drawer mdui-drawer-close" id="drawer">
    <ul class="mdui-list">
        <li class="mdui-list-item mdui-ripple">
            <i class="mdui-list-item-icon mdui-icon material-icons">library_books</i>
            <div class="mdui-list-item-content"><a href="/md/books">我的书架</a></div>
        </li>
        <li class="mdui-list-item mdui-ripple">
            <i class="mdui-list-item-icon mdui-icon material-icons">directions_run</i>
            <div class="mdui-list-item-content"><a href="/md/similar_user">书友推荐</a></div>
        </li>
        <li class="mdui-list-item mdui-ripple mdui-list-item-active">
            <i class="mdui-list-item-icon mdui-icon material-icons">book</i>
            <div class="mdui-list-item-content"><a href="/md/bookmarks">我的书签</a></div>
        </li>
        <li class="mdui-list-item mdui-ripple">
            <i class="mdui-list-item-icon mdui-icon material-icons">favorite</i>
            <div class="mdui-list-item-content"><a href="/md/book_list">我的书单</a></div>
        </li>
        <li class="mdui-list-item mdui-ripple">
            <i class="mdui-list-item-icon mdui-icon material-icons">notifications</i>
            <div class="mdui-list-item-content"><a href="/md/noti_book">新书提醒</a></div>
        </li>
        <li class="mdui-subheader">设置</li>
        <li class="mdui-list-item mdui-ripple">
            <i class="mdui-list-item-icon mdui-icon material-icons">settings</i>
            <div class="mdui-list-item-content"><a href="/md/setting">个人设置</a></div>
        </li>
        <li class="mdui-list-item mdui-ripple">
            <i class="mdui-list-item-icon mdui-icon material-icons">security</i>
            <div class="mdui-list-item-content">修改密码</div>
        </li>
        <li class="mdui-list-item mdui-ripple">
            <i class="mdui-list-item-icon mdui-icon material-icons">feedback</i>
            <div class="mdui-list-item-content">我要反馈</div>
        </li>
    </ul>
</div>

{% include "toolbar.html" %}

<div class="mdui-container-fluid">
    <div class="mdui-table-fluid">
        {% if is_bookmark %}
        <table class="mdui-table mdui-table-hoverable" style="margin-bottom: 50px;">
            <thead>
            <tr align="center">
                <th>小说名</th>
                <th>章节名</th>
                <th>源目录</th>
                <th>添加时间</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            {%for item in result%}
            <tr>
                <td>
                    <a href="/search?wd={{item.novels_name}}" target="_blank">{{item.novels_name}}</a>
                </td>
                <td>
                    <a href="{{item.bookmark}}" target="_blank">{{item.chapter_name}}</a>
                </td>
                <td>
                    <a href="/chapter?url={{item.chapter_url}}&novels_name={{item.novels_name}}" target="_blank">查看{{item.novels_name}}源目录</a>
                </td>
                <td>{{item.add_time}}</td>
                <th class="del-bookmark">
                    <a class="bookmark_url" data-value="{{item.bookmark}}" href="javascript:;">删除</a>
                </th>
            </tr>
            {%endfor%}
            </tbody>
        </table>
        {% else %}
        <center style="height: 50px;line-height: 50px">暂无书签数据</center>
        {% endif %}
    </div>
</div>
{% endblock %}
{% block script %}
<script src="/md/static/md/js/index.js"></script>
<script src="/static/novels/js/bookmarks.js"></script>
{% endblock %}