{% extends base %}

{% block head %}
<style type="text/css">
    .notice-link {
        color: orange;
    }

    .recent {
        float: left;
        width: 33.33%;
        line-height: 20px;
    }

    @media screen and (max-width: 800px) {
        .recent {
            width: 100%;
        }
    }
</style>
{% end %}

{% block body %}

    {# 今日提醒 #}
    {% include common/mod_notice.html %}

    <div class="col-md-12 card">
        <div class="grid-title">
            最近更新
            <div class="float-right">
                <a href="{{_server_home}}/note/recent_edit">{{T("More")}}</a>
            </div>
        </div>
        <div class="row" style="padding:5px;">
            {% for item in notes %}
                <div class="recent">
                    <a href="{{_server_home}}/note/view?id={{item.id}}">
                        {% if item.priority > 0 %}[{{T("Sticky")}}]{% end %}
                        {{xutils.short_text(item.name, 18)}}
                    </a>
                </div>
            {% end %}
        </div>
    </div>

    
    <div class="col-md-12 bottom-offset-1 box">
        <div class="grid-title">
            工具库
            <a class="link float-right" href="{{_server_home}}/more?type=tool">更多</a>
        </div>
        <div class="grid-row">
            {% for item in tools %}
                <div class="grid-item">
                    <a class="link" href="{{item.link}}">{{T(item.name)}}</a>
                </div>
            {% end %}
        </div>
    </div>
    

    {% if _has_login %}
        <div class="col-md-12">
        </div>
    {% end %}

    {# 标签用的比较少，基本上可以用搜索替代
    <div class="col-md-12 card">
        <h3>标签列表</h3>
        {% for tag_info in tags %}
        <span class="tag-span">
            <a href="{{_server_home}}/note/tagname/{{tag_info.name}}">{{tag_info.name}}</a>
            {{tag_info.amount}}
        </span>
        {% end %}
    </div>
    #}

{% end %}

{% block aside %}
    {% include note/component/mod_aside.html %}
{% end %}
