{% extends "base.html" %}

{% block head %}
    {{ super() }}
    <script>
        var CSRF_TOKEN = "{{ csrf_token() }}";
    </script>
    <script src="{{ url_for('static', filename='js/min/common.min.js') }}"></script>
    <script src="{{ url_for('static', filename='js/min/modals.min.js') }}"></script>
    <script src="{{ url_for('static', filename='js/keychains.js') }}"></script>
{% endblock %}

{% block content %}
<h3 class="mb-3">Keychains</h3>
{%- if data -%}
    <div class="row row-cols-1 row-cols-md-2">
    {%- for kc in data -%}
        <div class="col">
            <a href="javascript:" class="btn btn-outline-primary my-1 w-100" onclick="keychainFormModal({{ kc.id }})">{{ kc.name }}</a>
        </div>
    {%- endfor -%}
{%- endif -%}
<div class="row"></div>
<div class="mt-3">
    <a href="javascript:" class="btn btn-sm btn-outline-primary" onclick="keychainFormModal()">+</a>
</div>
{% endblock %}
