|
|
|
@ -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>
|
|
|
|
|
|
|
|
|
|
{% if card['topics'] %}
|
|
|
|
|
{% for topic in card['topics'] %}
|
|
|
|
|
<h6 class="topic">
|
|
|
|
|
{{ topic['content'] }}
|
|
|
|
|
</h6>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<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 class="list-group-card">{{ card['content'] }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
{% if card['topics'] %}
|
|
|
|
|
<div class="topics">
|
|
|
|
|
{% for topic in card['topics'] %}
|
|
|
|
|
<span class="topic-tag">
|
|
|
|
|
{{ topic['content'] }}
|
|
|
|
|
</span>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</div>
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
<div class="list-group-card">{{ card['content'] }}</div>
|
|
|
|
|
|
|
|
|
|
<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="row">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<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 %}
|
|
|
|
|