{% extends 'base.html.twig' %}
{% block title %}
	{{parent()}}Liste des types de bonbons
{% endblock %}
{% block body %}
	<div class="container-fluid">
		<h1 class="text-center text-primary mt-4 pt-4 display-1 fw-bold">
			Liste des types de bonbons</h1>
		<div class="row justify-content-center">
			<div class="col-12 col-md-8 bg-white p-4 m-0 text-primary">
				<div class="table-responsive">
					<table class="table table-hover">
						<thead>
							<tr class="fw-bold text-primary">
								<th scope="col">Nom</th>
							</tr>
						</thead>
						<tbody>
							{% for bonbon in bonbons |sort((a, b) => a.designation <=> b.designation) %}
								<tr class="{{ cycle(['table-primary', 'table-secondary'], loop.index0) }}">
									<td>{{ bonbon.designation | capitalize }}</td>
								</tr>
							{% endfor %}
						</tbody>
					</table>
				</div>
			</div>
		</div>
	</div>
{% endblock %}
