|
|
|
@ -4,6 +4,9 @@
|
|
|
|
|
<h1>{% block title %} Welcome to grgr's library {% endblock %}</h1>
|
|
|
|
|
|
|
|
|
|
<div class="all-cards">
|
|
|
|
|
<div class="card" id="new-card">
|
|
|
|
|
<a class="nav-link" href="{{ url_for('create') }}">+</a>
|
|
|
|
|
</div>
|
|
|
|
|
{% for category, cards in categories.items() %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -12,33 +15,36 @@
|
|
|
|
|
<div class="card-header">
|
|
|
|
|
<h6 class = "category">{{ category }}</h6>
|
|
|
|
|
|
|
|
|
|
<button class="btn" id="edit-btn">
|
|
|
|
|
<a class="btn btn-warning btn-sm" href="{{ url_for('edit', id=card['id']) }}">edit</a>
|
|
|
|
|
</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="btn" id="delete-btn">
|
|
|
|
|
<form action="{{ url_for('delete', id=card['id']) }}" method="POST">
|
|
|
|
|
<input type="submit" value="delete" class="btn btn-danger btn-sm">
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{% if card['topics'] %}
|
|
|
|
|
<div class="topics">
|
|
|
|
|
{% for topic in card['topics'] %}
|
|
|
|
|
<h6 class="topic">
|
|
|
|
|
<span class="topic-tag">
|
|
|
|
|
{{ topic['content'] }}
|
|
|
|
|
</h6>
|
|
|
|
|
</span>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
<div class="list-group-card">{{ card['content'] }}</div>
|
|
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
|
|
<div class="col-12 col-md-3">
|
|
|
|
|
<a class="btn btn-warning btn-sm" href="{{ url_for('edit', id=card['id']) }}">Edit</a>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="col-12 col-md-3">
|
|
|
|
|
<form action="{{ url_for('delete', id=card['id']) }}" method="POST">
|
|
|
|
|
<input type="submit" value="Delete" class="btn btn-danger btn-sm">
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{% endfor %}
|
|
|
|
|