[fdfbdde] | 1 | <!DOCTYPE html>
|
---|
| 2 | <html lang="es" xmlns="http://www.w3.org/1999/xhtml"
|
---|
| 3 | xmlns:th="http://www.thymeleaf.org"
|
---|
| 4 | xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
|
---|
| 5 | <head>
|
---|
| 6 | <meta charset="UTF-8">
|
---|
| 7 | <title>Title</title>
|
---|
| 8 | </head>
|
---|
| 9 | <body>
|
---|
| 10 |
|
---|
| 11 | <nav class="navbar navbar-expand-lg bg-danger-subtle" th:fragment="navbar">
|
---|
| 12 | <div class="container-fluid">
|
---|
| 13 | <a class="navbar-brand navbar-logo" href="#">STMA</a>
|
---|
| 14 | <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent"
|
---|
| 15 | aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
---|
| 16 | <span class="navbar-toggler-icon"></span>
|
---|
| 17 | </button>
|
---|
| 18 | <div class="collapse navbar-collapse" id="navbarSupportedContent">
|
---|
| 19 | <ul class="navbar-nav me-auto mb-2 mb-lg-0">
|
---|
| 20 | <li class="nav-item">
|
---|
| 21 | <a class="nav-link" aria-current="page" href="/">Home</a>
|
---|
| 22 | </li>
|
---|
| 23 |
|
---|
| 24 | <li class="nav-item" sec:authorize="hasAuthority('ADMIN')">
|
---|
| 25 | <a class="nav-link" aria-current="page" href="/category">Category</a>
|
---|
| 26 | </li>
|
---|
| 27 |
|
---|
| 28 | <li class="nav-item dropdown" sec:authorize="isAuthenticated() and hasAuthority('USER')">
|
---|
| 29 | <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown"
|
---|
| 30 | aria-expanded="false">
|
---|
| 31 | Task
|
---|
| 32 | </a>
|
---|
| 33 | <ul class="dropdown-menu">
|
---|
| 34 | <li class="dropdown-item">
|
---|
| 35 | <div class="d-flex justify-content-between align-items-center">
|
---|
| 36 | <span><a href="/add/task" style="text-decoration: none; color: black">Add Task</a></span>
|
---|
| 37 | </div>
|
---|
| 38 | </li>
|
---|
| 39 | <li class="dropdown-item">
|
---|
| 40 | <div class="d-flex justify-content-between align-items-center">
|
---|
| 41 | <span><a href="/task" style="text-decoration: none; color: black">List Task</a></span>
|
---|
| 42 | </div>
|
---|
| 43 | </li>
|
---|
| 44 | </ul>
|
---|
| 45 | </li>
|
---|
| 46 |
|
---|
| 47 | <li class="nav-item dropdown" sec:authorize="isAuthenticated() and hasAuthority('USER')">
|
---|
| 48 | <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown"
|
---|
| 49 | aria-expanded="false">
|
---|
| 50 | Exam
|
---|
| 51 | </a>
|
---|
| 52 | <ul class="dropdown-menu">
|
---|
| 53 | <li class="dropdown-item">
|
---|
| 54 | <div class="d-flex justify-content-between align-items-center">
|
---|
| 55 | <span><a href="/add/subject/exam" style="text-decoration: none; color: black">Add Subject Exam</a></span>
|
---|
| 56 | </div>
|
---|
| 57 | </li>
|
---|
| 58 | <li class="dropdown-item">
|
---|
| 59 | <div class="d-flex justify-content-between align-items-center">
|
---|
| 60 | <span><a href="/exam" style="text-decoration: none; color: black">List Exam</a></span>
|
---|
| 61 | </div>
|
---|
| 62 | </li>
|
---|
| 63 | </ul>
|
---|
| 64 | </li>
|
---|
| 65 |
|
---|
| 66 | <li class="nav-item dropdown" sec:authorize="isAuthenticated() and hasAuthority('USER')">
|
---|
| 67 | <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown"
|
---|
| 68 | aria-expanded="false">
|
---|
| 69 | Class
|
---|
| 70 | </a>
|
---|
| 71 | <ul class="dropdown-menu">
|
---|
| 72 | <li class="dropdown-item">
|
---|
| 73 | <div class="d-flex justify-content-between align-items-center">
|
---|
| 74 | <span><a href="/add/subject/class" style="text-decoration: none; color: black">Add Subject Class</a></span>
|
---|
| 75 | </div>
|
---|
| 76 | </li>
|
---|
| 77 | <li class="dropdown-item">
|
---|
| 78 | <div class="d-flex justify-content-between align-items-center">
|
---|
| 79 | <span><a href="/class" style="text-decoration: none; color: black">List Class</a></span>
|
---|
| 80 | </div>
|
---|
| 81 | </li>
|
---|
| 82 | </ul>
|
---|
| 83 | </li>
|
---|
| 84 |
|
---|
| 85 |
|
---|
| 86 | </ul>
|
---|
| 87 |
|
---|
| 88 |
|
---|
| 89 | <a th:if="${not #authorization.expression('isAuthenticated()')}" href="/login">
|
---|
| 90 | <i class="fas fa-sign-in-alt"></i>
|
---|
| 91 | </a>
|
---|
| 92 |
|
---|
| 93 |
|
---|
| 94 |
|
---|
| 95 |
|
---|
| 96 | <a th:if="${not #authorization.expression('isAuthenticated()')}" href="/register">
|
---|
| 97 | <i class="fas fa-user-plus"></i>
|
---|
| 98 | </a>
|
---|
| 99 |
|
---|
| 100 |
|
---|
| 101 | <span th:if="${#authorization.expression('isAuthenticated()')}" style="color: blue; margin-right: 15px;">
|
---|
| 102 | <i class="fas fa-user"></i> <span th:text="${#authentication.principal.username}"></span>
|
---|
| 103 | </span>
|
---|
| 104 |
|
---|
| 105 | <a th:if="${#authorization.expression('isAuthenticated()')}" href="/logout" style="margin-right: 10px">
|
---|
| 106 | <i class="fas fa-sign-in-alt"></i>
|
---|
| 107 | </a>
|
---|
| 108 |
|
---|
| 109 |
|
---|
| 110 | </div>
|
---|
| 111 | </div>
|
---|
| 112 | <style>
|
---|
| 113 | .navbar {
|
---|
| 114 | background: linear-gradient(135deg, #ff6b6b, #0d0c65);
|
---|
| 115 | }
|
---|
| 116 |
|
---|
| 117 | .navbar a.navbar-brand {
|
---|
| 118 | color: #FFFFFF;
|
---|
| 119 | font-size: 1.5rem;
|
---|
| 120 | font-weight: 600;
|
---|
| 121 | }
|
---|
| 122 |
|
---|
| 123 | .navbar a.nav-link {
|
---|
| 124 | color: #FFFFFF;
|
---|
| 125 | font-size: 1rem;
|
---|
| 126 | }
|
---|
| 127 | </style>
|
---|
| 128 | </nav>
|
---|
| 129 |
|
---|
| 130 | </body>
|
---|
| 131 | </html> |
---|