{% extends 'pinboard/base.html' %}

{% block breadcrumbs %}
    <li><a href="{% url 'ditto:home' %}">Home</a></li>
    <li><a href="{% url 'pinboard:home' %}">Pinboard</a></li>
    <li><a href="{% url 'pinboard:account_detail' username=bookmark.account.username %}">{{ bookmark.account.username }}</a></li>
    <li class="active">Bookmark</li>
{% endblock %}

{% block content %}

    <h1 class="m-y-2">
        {% block title %}
            Pinboard bookmark by {{ bookmark.account.username }}
        {% endblock %}
    </h1>

    <div class="row">
        <div class="col-md-9">
            {% with bookmark.get_previous as previous_bookmark %}
                {% with bookmark.get_next as next_bookmark %}
                    {% if previous_bookmark or next_bookmark %}
                        <div class="row nextprev pinboard-bookmark-nextprev ">
                            {% if previous_bookmark %}
                                <div class="col-xs-6 nextprev-prev pinboard-bookmark-nextprev-prev">
                                    <a href="{% url 'pinboard:bookmark_detail' username=previous_bookmark.account.username hash=previous_bookmark.url_hash %}" title="Previous bookmark">&larr; Previous</a>
                                </div>
                            {% endif %}
                            {% if next_bookmark %}
                                <div class="col-xs-6 text-xs-right nextprev-next twitter-bookmark-nextprev-next">
                                    <a href="{% url 'pinboard:bookmark_detail' username=next_bookmark.account.username hash=next_bookmark.url_hash %}" title="Next bookmark">Next &rarr;</a>
                                </div>
                            {% endif %}
                        </div>
                    {% endif %}
                {% endwith %}
            {% endwith %}

            <div class="media m-t-0 pinboard-bookmark pinboard-bookmark-detail">
                <hr>
                {% include 'pinboard/includes/bookmark.html' with bookmark=bookmark view='detail' perms=perms only %}
                <hr>
            </div>
        </div> <!-- .col -->

        <div class="col-md-3">
            {% include 'pinboard/includes/account.html' with account=bookmark.account perms=perms only %}
        </div> <!-- .col -->
    </div>

{% endblock content %}

