templates/base.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>{% block title %}BDD-Books{% endblock %}</title>
  7. {% block stylesheets %}
  8. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css">
  9. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
  10. <style>
  11. /* Variables et styles globaux */
  12. :root {
  13. --primary-color: #4a90d9;
  14. --secondary-color: #6c757d;
  15. --success-color: #28a745;
  16. --bg-light: #f8f9fa;
  17. --shadow: 0 2px 10px rgba(0,0,0,0.1);
  18. }
  19. body { background-color: #f5f7fa; }
  20. /* _index.scss */
  21. #list_user { padding: 3%; }
  22. #list_user #users { text-align: center; }
  23. #list_user .logo { width: auto; height: 150px; }
  24. #list_user #div-btn-user { width: 100%; margin: auto; padding-top: 2%; padding-bottom: 1%; }
  25. #list_user #btn-user { text-align: center; width: 250px; height: 250px; }
  26. .navbar { width: 100%; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important; box-shadow: var(--shadow); }
  27. .navbar .navbar-brand { color: white !important; font-weight: bold; font-size: 1.5rem; }
  28. .navbar .btn-outline-secondary { color: white; border-color: rgba(255,255,255,0.5); }
  29. .navbar .btn-outline-secondary:hover { background-color: rgba(255,255,255,0.2); color: white; }
  30. .navbar .btn-outline-primary { color: white; border-color: white; }
  31. .navbar .btn-outline-primary:hover { background-color: white; color: #667eea; }
  32. #circleUser { width: 30px; height: 30px; color: white; }
  33. #bodyContain { padding-top: 20px; }
  34. #titleListe { margin: 0 20px; }
  35. #acceuilSite { padding-top: 20px; justify-content: center; margin-right: 5%; margin-left: 5%; max-width: 1200px; margin: 20px auto; }
  36. #acceuilSite h2 { font-size: 2rem; text-align: center; padding-bottom: 10px; color: #333; }
  37. #acceuilSite .btn { margin-bottom: 10px; }
  38. #acceuilSite #cameraButton { position: absolute; top: 0; border-radius: 5px; right: 18px; z-index: 2; border: none; height: 38px; cursor: pointer; transform: translateX(2px); }
  39. #acceuilSite #divSearchButton { padding-top: 15px; }
  40. #acceuilSite #selectuser { padding-top: 15px; }
  41. .row { padding-bottom: 15px; }
  42. /* Cards améliorées */
  43. .card { border: none; border-radius: 12px; box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s; }
  44. .card:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0,0,0,0.15); }
  45. .card-header { border-radius: 12px 12px 0 0 !important; }
  46. /* _tablivres.scss */
  47. #tableBook { padding: 20px; background: white; border-radius: 12px; box-shadow: var(--shadow); margin: 0 20px; }
  48. #tableBook table { margin-bottom: 0; }
  49. #tableBook thead th { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; border: none; padding: 15px 10px; font-weight: 500; }
  50. #tableBook thead th a { color: white; text-decoration: none; }
  51. #tableBook thead th a:hover { color: #ddd; }
  52. #tableBook tbody tr { transition: background-color 0.2s; }
  53. #tableBook tbody tr:hover { background-color: #f8f9fa; }
  54. #tableBook tbody td { vertical-align: middle; padding: 10px; border-color: #eee; }
  55. #tableBook tbody > tr { height: auto; min-height: 120px; }
  56. @media only screen and (max-device-width: 900px) {
  57. #tableBook { padding: 10px; margin: 0 10px; }
  58. #tableBook tr th:nth-child(3), #tableBook tr td:nth-child(3),
  59. #tableBook tr th:nth-child(4), #tableBook tr td:nth-child(4),
  60. #tableBook tr th:nth-child(5), #tableBook tr td:nth-child(5),
  61. #tableBook tr th:nth-child(6), #tableBook tr td:nth-child(6) { display: none; }
  62. }
  63. .pagination { display: flex; flex-wrap: wrap; padding: 20px 0; list-style: none; border-radius: 0.25rem; justify-content: center; }
  64. .pagination .page-link { border-radius: 8px; margin: 0 3px; border: none; color: #667eea; }
  65. .pagination .page-item.active .page-link { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border: none; }
  66. .indexAuteur { flex-wrap: wrap; display: flex; padding-left: 0; list-style: none; border-radius: 0.25rem; justify-content: center; }
  67. #myImg { border-radius: 8px; cursor: pointer; transition: 0.3s; }
  68. #myImg:hover { opacity: 0.7; }
  69. #caption { margin: auto; display: block; width: 80%; max-width: 700px; text-align: center; color: #ccc; padding: 10px 0; height: 150px; }
  70. /* Images de couverture dans le tableau */
  71. .img-cover { border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.15); transition: transform 0.2s, box-shadow 0.2s; }
  72. .img-cover:hover { transform: scale(1.05); box-shadow: 0 4px 15px rgba(0,0,0,0.25); }
  73. /* Fix input-group alignment */
  74. .border-right-0 { border-right: 0 !important; }
  75. .border-left-0 { border-left: 0 !important; }
  76. .input-group-lg > .input-group-prepend > .input-group-text,
  77. .input-group-lg > .input-group-append > .btn {
  78. height: 100%;
  79. display: flex;
  80. align-items: center;
  81. }
  82. /* _livres.scss */
  83. #titleLivre { text-align: center; margin-bottom: 30px; }
  84. .detail-infos th, .detail-infos td { padding: 5px; }
  85. .cover { display: block; margin-left: auto; margin-right: auto; margin-bottom: 30px; }
  86. .details_listuser { border-collapse: collapse; border: 2px solid black; font-family: sans-serif; font-size: 0.8rem; letter-spacing: 1px; }
  87. .details_listuser thead, .details_listuser tfoot { background-color: grey; }
  88. .details_listuser th, .details_listuser td { border: 1px solid black; padding: 8px 10px; }
  89. .details_listuser td:last-of-type { text-align: center; }
  90. /* Image Modal (pour la liste des livres) */
  91. .image-modal {
  92. display: none;
  93. position: fixed;
  94. z-index: 9999;
  95. padding-top: 50px;
  96. left: 0;
  97. top: 0;
  98. width: 100%;
  99. height: 100%;
  100. overflow: auto;
  101. background-color: rgba(0,0,0,0.9);
  102. }
  103. .image-modal-content {
  104. margin: auto;
  105. display: block;
  106. max-width: 80%;
  107. max-height: 80vh;
  108. animation: zoomIn 0.3s;
  109. }
  110. .image-modal-close {
  111. position: absolute;
  112. top: 15px;
  113. right: 35px;
  114. color: #f1f1f1;
  115. font-size: 40px;
  116. font-weight: bold;
  117. cursor: pointer;
  118. z-index: 10000;
  119. }
  120. .image-modal-close:hover { color: #bbb; }
  121. @keyframes zoomIn {
  122. from { transform: scale(0.5); opacity: 0; }
  123. to { transform: scale(1); opacity: 1; }
  124. }
  125. .img-cover { cursor: pointer; transition: opacity 0.3s; }
  126. .img-cover:hover { opacity: 0.7; }
  127. /* User Avatar Styles */
  128. .user-menu-btn {
  129. display: flex;
  130. align-items: center;
  131. text-decoration: none;
  132. color: white;
  133. padding: 5px 10px;
  134. border-radius: 25px;
  135. transition: background-color 0.2s;
  136. }
  137. .user-menu-btn:hover {
  138. background-color: rgba(255,255,255,0.2);
  139. text-decoration: none;
  140. color: white;
  141. }
  142. .user-avatar {
  143. width: 36px;
  144. height: 36px;
  145. border-radius: 50%;
  146. background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  147. display: flex;
  148. align-items: center;
  149. justify-content: center;
  150. border: 2px solid rgba(255,255,255,0.8);
  151. box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  152. }
  153. .user-avatar-img {
  154. width: 100%;
  155. height: 100%;
  156. border-radius: 50%;
  157. object-fit: cover;
  158. }
  159. .user-avatar-initials {
  160. color: white;
  161. font-weight: bold;
  162. font-size: 14px;
  163. text-transform: uppercase;
  164. }
  165. .user-name {
  166. font-weight: 500;
  167. font-size: 14px;
  168. }
  169. .dropdown-header {
  170. padding: 10px 15px;
  171. background-color: #f8f9fa;
  172. }
  173. /* Navbar Brand Dropdown */
  174. .navbar-brand.dropdown-toggle {
  175. cursor: pointer;
  176. }
  177. .navbar-brand.dropdown-toggle::after {
  178. margin-left: 8px;
  179. }
  180. </style>
  181. {% endblock %}
  182. </head>
  183. <body>
  184. <nav class="navbar navbar-light bg-light">
  185. <div class="d-flex align-items-center">
  186. <!-- Liste déroulante BDD-Books / BDD-Magazines -->
  187. <div class="dropdown mr-3">
  188. <a class="navbar-brand dropdown-toggle" href="#" id="navbarBddDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  189. <i class="fas fa-database mr-1"></i>BDD
  190. </a>
  191. <div class="dropdown-menu" aria-labelledby="navbarBddDropdown">
  192. <a class="dropdown-item" href="{{ path('index') }}">
  193. <i class="fas fa-book mr-2 text-primary"></i>BDD-Books
  194. </a>
  195. <a class="dropdown-item" href="{{ path('magazines_search') }}">
  196. <i class="fas fa-newspaper mr-2 text-success"></i>BDD-Magazines
  197. </a>
  198. </div>
  199. </div>
  200. </div>
  201. <div class="d-flex align-items-center">
  202. {% if is_granted('IS_AUTHENTICATED_REMEMBERED') %}
  203. <div class="dropdown">
  204. <a class="user-menu-btn" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  205. <div class="user-avatar">
  206. {% if app.user.logo %}
  207. <img src="{{ asset('uploads/avatars/' ~ app.user.logo) }}" alt="{{ app.user.username }}" class="user-avatar-img">
  208. {% else %}
  209. <span class="user-avatar-initials">{{ app.user.name|first|upper }}{{ app.user.lastname|first|upper }}</span>
  210. {% endif %}
  211. </div>
  212. <span class="user-name d-none d-md-inline ml-2">{{ app.user.username }}</span>
  213. <i class="fas fa-chevron-down ml-1 small"></i>
  214. </a>
  215. <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdownMenuLink">
  216. <div class="dropdown-header">
  217. <strong>{{ app.user.name }} {{ app.user.lastname }}</strong>
  218. <br><small class="text-muted">{{ app.user.email }}</small>
  219. </div>
  220. <div class="dropdown-divider"></div>
  221. <a class="dropdown-item" href="{{ path('user_profile') }}">
  222. <i class="fas fa-user-cog mr-2"></i>Mon profil
  223. </a>
  224. <div class="dropdown-divider"></div>
  225. <a class="dropdown-item" href="{{ path('magazines_list') }}">
  226. <i class="fas fa-newspaper mr-2"></i>Magazines
  227. </a>
  228. <a class="dropdown-item" href="{{ path('listesLivres') }}">
  229. <i class="fas fa-book mr-2"></i>Livres
  230. </a>
  231. <div class="dropdown-divider"></div>
  232. <a class="dropdown-item text-danger" href="{{ path('app_logout') }}">
  233. <i class="fas fa-sign-out-alt mr-2"></i>Déconnexion
  234. </a>
  235. </div>
  236. </div>
  237. {% else %}
  238. <button class="btn btn-outline-primary btn-sm" data-toggle="modal" data-target="#loginModal">
  239. <i class="fas fa-sign-in-alt mr-1"></i>{{ 'Connexion' }}
  240. </button>
  241. {% endif %}
  242. </div>
  243. </nav>
  244. {% for message in app.flashes('warning') %}
  245. <div class="alert alert-success">
  246. {{ message }}
  247. </div>
  248. {% endfor %}
  249. <div id="bodyContain">
  250. {% block body %}
  251. {% endblock %}
  252. </div>
  253. {% if not is_granted('IS_AUTHENTICATED_REMEMBERED') %}
  254. {% include 'includes/loginModal.html.twig' %}
  255. {% endif %}
  256. {% block javascripts %}
  257. <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script>
  258. <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js"></script>
  259. {% endblock %}
  260. </body>
  261. </html>