Files
FotoSharing/target/classes/templates/galerie.html

59 lines
1.5 KiB
HTML

<!doctype html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8"/>
<title>Galerie publique</title>
</head>
<header>
<p>
<a th:href="@{/}">Accueil</a> |
<a th:href="@{/upload}">Uploader une photo</a> |
<a th:href="@{/mes-photos}">Mes photos</a> |
<a th:href="@{/mes-albums}">Mes albums</a> |
<a th:href="@{/galerie}">Galerie publique</a>
</p>
<hr/>
</header>
<body>
<h1>Galerie publique</h1>
<!-- Affichage des photos -->
<div>
<a th:each="p : ${photosPage.content}"
th:href="@{'/photo/' + ${p.id}}"
style="display:inline-block; margin:10px;">
<img th:src="@{'/photo/' + ${p.id} + '/thumb'}"
width="150"
style="border:1px solid #ccc;"/>
</a>
</div>
<!-- Pagination -->
<div style="margin-top:20px;">
<a th:if="${currentPage > 0}"
th:href="@{/galerie(page=${currentPage - 1})}">
⬅ Précédent
</a>
<span th:text="'Page ' + (${currentPage} + 1)"></span>
<a th:if="${photosPage.hasNext()}"
th:href="@{/galerie(page=${currentPage + 1})}">
Suivant ➡
</a>
</div>
</body>
<footer>
<hr/>
<form th:action="@{/logout}" method="post" style="display: inline;">
<button type="submit"
style="background: none; border: none; color: blue; text-decoration: underline; cursor: pointer;">
Se déconnecter
</button>
</form>
</footer>
</html>