source: src/main/resources/templates/common/navbar.html@ 2d8c0e7

Last change on this file since 2d8c0e7 was 2d8c0e7, checked in by KostaFortumanov <kfortumanov@…>, 3 years ago

home page

  • Property mode set to 100644
File size: 2.9 KB
Line 
1<!DOCTYPE html>
2<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml" xmlns:sec="http://www.w3.org/1999/xhtml">
3<head>
4 <meta charset="UTF-8">
5 <title>Title</title>
6</head>
7<body>
8<header th:fragment="navbar">
9 <nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark" >
10 <div class="container-fluid">
11 <a class="navbar-brand" th:href="@{/}">
12 <img th:src="@{/image/charity.png}" class="bi me-2" width="40" height="32" />
13 <span class="fs-4">Charitable</span>
14 </a>
15 <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse"
16 aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
17 <span class="navbar-toggler-icon"></span>
18 </button>
19 <div class="collapse navbar-collapse" id="navbarCollapse">
20 <ul class="navbar-nav me-auto mb-2 mb-md-0">
21 <li class="nav-item">
22 <a sec:authorize="isAnonymous() or hasAuthority('USER')" th:href="@{/}" class="nav-link px-2 text-white">Home</a>
23 </li>
24 <li class="nav-item">
25 <a sec:authorize="isAnonymous() or hasAuthority('USER')" th:href="@{/album?page=1&sort=id&order=desc&groupBy=all}" class="nav-link px-2 text-white">Posts</a>
26 <a sec:authorize="hasAuthority('MODERATOR')" th:href="@{/moderator/approval?page=1&sort=id}" class="nav-link px-2 text-white">Posts for approval</a>
27 </li>
28 <li class="nav-item">
29 <a sec:authorize="hasAuthority('USER')" th:href="@{/upload}" class="nav-link px-2 text-white">Upload</a>
30 <a sec:authorize="hasAuthority('MODERATOR')" th:href="@{/moderator/report?page=1&sort=id}" class="nav-link px-2 text-white">Reported posts</a>
31 </li>
32 </ul>
33
34 <div class="text-end">
35 <a sec:authorize="isAnonymous()" type="button" class="btn btn-outline-light me-2" th:href="@{/login}">Login</a>
36 <a sec:authorize="isAnonymous()" type="button" class="btn btn-warning" th:href="@{/register}">Sign-up</a>
37 <a sec:authorize="isAuthenticated() and hasAuthority('USER')" type="button" class="btn btn-outline-light me-2" th:href="@{/userInformation}">My profile - <span th:text="${user.firstName}"></span></a>
38 <a sec:authorize="isAuthenticated() and hasAuthority('MODERATOR')" type="button" class="btn btn-outline-light me-2" th:href="@{/moderator/myApprovedPosts?page=1&sort=id}">My approved posts - <span th:text="${user.firstName} + ${user.lastName}"></span></a>
39 <a sec:authorize="isAuthenticated()" type="button" class="btn btn-warning" th:href="@{/logout}">Logout</a>
40 </div>
41 </div>
42 </div>
43 </nav>
44</header>
45</body>
46</html>
Note: See TracBrowser for help on using the repository browser.