source: src/main/resources/templates/myReviews.html

main
Last change on this file was f4b4afa, checked in by Nikola Todoroski <nikola.todoroski@…>, 6 months ago

Pushed whole project, original project location on github:https://github.com/hehxd/Tech-Harbor

  • Property mode set to 100644
File size: 4.5 KB
RevLine 
[f4b4afa]1<!DOCTYPE html>
2<html lang="en" xmlns:th="http://www.thymeleaf.org">
3<head>
4 <meta charset="UTF-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <title>Reviews</title>
7 <!-- Tailwind CSS from CDN for development purposes -->
8 <script src="https://cdn.tailwindcss.com"></script>
9 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
10 <link href="./output.css" rel="stylesheet">
11</head>
12
13<body class="font-sans antialiased bg-gray-100 flex flex-col min-h-screen">
14
15<nav class="bg-gray-800 text-white p-4 text-lg sm:text-xl">
16 <div class="container mx-auto flex justify-between items-center">
17 <div class="flex items-center">
18 <img src="/images/logoWhite.png" alt="Logo" class="object-cover h-32 w-32 rounded-lg">
19 <h1 class="text-2xl font-semibold ml-4 sm:text-3xl">Tech Harbor</h1>
20 </div>
21 <ul class="flex space-x-8">
22 <li><a href="/" class="hover:text-emerald-500">Home</a></li>
23 <li><a th:href="@{'/aboutUs'}" class="hover:text-emerald-500">About Us</a></li>
24 <li th:if="${user != null}">
25 <a th:href="@{'/orders/{id}' (id=${user.userId})}" class="hover:text-emerald-500">My Orders</a>
26 </li>
27 <li th:if="${user != null}">
28 <a th:href="@{'/reviews/{id}' (id=${user.userId})}" class="text-emerald-500 hover:text-emerald-500">My
29 Reviews</a>
30 </li>
31 </ul>
32 <ul class="flex space-x-4">
33 <li th:if="${user != null}">
34 <span>Welcome <span th:text="${user.nameUser}"></span></span>
35 </li>
36 <li th:if="${user != null}">
37 <a th:href="@{'/shoppingCart'}"><i class="fa-solid fa-cart-shopping"></i></a>
38 </li>
39 <li th:if="${user != null}">
40 <a class="hover:text-emerald-500" th:href="@{/logout}">Log out</a>
41 </li>
42 <li th:if="${user == null}">
43 <a th:href="@{/login}" class="hover:text-emerald-500">Sign In</a>
44 </li>
45 <li th:if="${user == null}">
46 <a th:href="@{/register}" class="hover:text-emerald-500">Register</a>
47 </li>
48 </ul>
49 </div>
50</nav>
51
52<main class="container mx-auto mt-8 flex-grow">
53
54
55 <div class="max-w-5xl mx-auto py-8 grid grid-cols-1 md:grid-cols-2 gap-4 font-sans">
56 <div class="card bg-gray-700 p-4 rounded-md shadow-md text-white col-span-1 md:col-span-full">
57 <div class="mb-4">
58 <h2 class="text-2xl font-semibold text-white">My Reviews</h2>
59 </div>
60 <div class="mb-4">
61 <table class="w-full text-left border-collapse border border-gray-800">
62 <thead>
63 <tr class="bg-gray-800 text-white text-center">
64 <th class="px-4 py-2">Product Name</th>
65 <th class="px-4 py-2">Description</th>
66 <th class="px-4 py-2">Rating</th>
67 </tr>
68 </thead>
69 <tbody>
70 <tr th:each="review,iterator : ${reviews} " class="hover:bg-gray-600 text-center">
71 <td class="px-4 py-2 border border-gray-800"
72 th:text="${products.get(iterator.index).getProductName()}"></td>
73 <td class="px-4 py-2 border border-gray-800" th:text="${review.reviewDescription}"></td>
74 <td class="px-4 py-2 border border-gray-800" th:text="${review.reviewRating}"></td>
75 </tr>
76 </tbody>
77 </table>
78 </div>
79 </div>
80 </div>
81</main>
82
83<!-- Footer -->
84<footer class="bg-white rounded-lg shadow m-4 dark:bg-gray-800">
85 <div class="w-full mx-auto max-w-screen-xl p-4 md:flex md:items-center md:justify-between">
86 <span class="text-sm text-gray-500 sm:text-center dark:text-gray-400">© 2024 Tech Harbor. All rights reserved.™
87 </span>
88 <ul class="flex flex-wrap items-center mt-3 text-sm font-medium text-gray-500 dark:text-gray-400 sm:mt-0">
89 <li>
90 <a th:href="@{'/aboutUs'}" class="hover:underline me-4 md:me-6">About</a>
91 </li>
92 <li>
93 <a href="#" class="hover:underline me-4 md:me-6">Privacy Policy</a>
94 </li>
95 <li>
96 <a href="#" class="hover:underline">Contact</a>
97 </li>
98 </ul>
99 </div>
100</footer>
101</body>
102</html>
Note: See TracBrowser for help on using the repository browser.