ux dla udostepnionej listy
This commit is contained in:
@ -1,20 +1,30 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block title %}{{ list.title }} (Gość){% endblock %}
|
||||
{% block content %}
|
||||
<h2>{{ list.title }} (Gość)</h2>
|
||||
|
||||
<div class="d-flex justify-content-between align-items-center flex-wrap mb-3">
|
||||
<h2 class="mb-2">🛍️ {{ list.title }} <small class="text-muted">(Gość)</small></h2>
|
||||
<a href="/" class="btn btn-outline-secondary">← Powrót do list</a>
|
||||
</div>
|
||||
|
||||
<ul id="items" class="list-group mb-3">
|
||||
{% for item in items %}
|
||||
<li class="list-group-item bg-dark text-white">
|
||||
<input type="checkbox" onchange="checkItem({{ item.id }})" {% if item.purchased %}checked{% endif %}> {{ item.name }}
|
||||
<li class="list-group-item bg-dark text-white d-flex align-items-center gap-2">
|
||||
<input type="checkbox" onchange="checkItem({{ item.id }})" {% if item.purchased %}checked{% endif %}>
|
||||
<span>{{ item.name }}</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<input id="newItem" class="form-control mb-2" placeholder="Nowy produkt">
|
||||
<button onclick="addItem({{ list.id }})" class="btn btn-primary">Dodaj</button>
|
||||
<div class="input-group mb-2">
|
||||
<input id="newItem" class="form-control" placeholder="Nowy produkt">
|
||||
<button onclick="addItem({{ list.id }})" class="btn btn-success">➕ Dodaj</button>
|
||||
</div>
|
||||
|
||||
<div id="toast-container" class="toast-container position-fixed bottom-0 end-0 p-3"></div>
|
||||
|
||||
<a href="/" class="btn btn-secondary mt-3">Powrót</a>
|
||||
{% endblock %}
|
||||
<script>
|
||||
setupList({{ list.id }}, 'Gość');
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user