source: PaintOfHeart-main/PaintOfHeart/src/main/resources/templates/cart.html@ bdc68e0

Last change on this file since bdc68e0 was bdc68e0, checked in by AnastasijaCv <ane.cvetkovska000@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 4.4 KB
Line 
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <title>Cart</title>
6
7 <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"></script>
8 <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet">
9
10</head>
11<style>
12 .photo{
13 width:300px;
14 height:60px;
15 }
16 .nv{
17
18 background-color: rgba(240, 248, 255, .5);
19 margin-top: 20px;
20 }
21 body {
22 background-color: #a0a5e9;
23 }
24 tbody{
25 background-color: aliceblue;
26 }
27 .btn0{
28 background-color: blueviolet;
29 border-radius: 8px;
30 border-style: none;
31 box-sizing: border-box;
32 color: #FFFFFF;
33 cursor: pointer;
34 display: inline-block;
35 font-family: Montserrat;
36 font-size: 14px;
37 font-weight: bold;
38 height: 40px;
39 line-height: 20px;
40 list-style: none;
41 margin: 0;
42 outline: none;
43 padding: 10px 16px;
44 position: relative;
45 text-align: center;
46 text-decoration: none;
47 transition: color 100ms;
48 vertical-align: baseline;
49 user-select: none;
50 -webkit-user-select: none;
51 touch-action: manipulation;
52 }
53
54 .btn0:hover,
55 .btn0:focus {
56 background-color: cornflowerblue;
57
58 }
59 .btn1{
60 border-radius: 8px;
61 border-style: none;
62 box-sizing: border-box;
63 color: #FFFFFF;
64 cursor: pointer;
65 display: inline-block;
66 font-family: Montserrat;
67 font-size: 14px;
68 font-weight: bold;
69 height: 40px;
70 line-height: 20px;
71 list-style: none;
72 margin: 0;
73 outline: none;
74 padding: 10px 16px;
75 position: relative;
76 text-align: center;
77 text-decoration: none;
78 transition: color 100ms;
79 vertical-align: baseline;
80 user-select: none;
81 -webkit-user-select: none;
82 touch-action: manipulation;
83 }
84
85 .btn1:hover,
86 .btn1:focus {
87 background-color: darkslateblue;
88 }
89 a {
90 text-decoration: none;
91 }
92</style>
93<body>
94<nav class="navbar navbar-expand-lg nv">
95 <div class="container">
96 <a class="navbar-brand" href="#"><img src="../../images/logo.png" class="photo" alt="logo"></a>
97 <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
98 <span class="navbar-toggler-icon"><i class="fa-solid fa-bars"></i></span>
99 </button>
100 <div class="collapse navbar-collapse" id="navbarSupportedContent">
101 <ul class="navbar-nav m-auto mb-2 mb-lg-0">
102 <li class="nav-item">
103 <a class="nav-link" href="/home"><b>Home</b></a>
104 </li>
105 <li class="nav-item">
106 <a class="nav-link" href="/events"><b>Events</b></a>
107 </li>
108 <li class="nav-item">
109 <a class="nav-link" href="/about"><b>About</b></a>
110 </li>
111 </ul>
112 <form class="d-flex">
113 <th:block th:if="${session.user == null}">
114 <button class="btn0" >
115 <a type="button" href="/registerUser" style="color: black">Register</a>
116 </button>
117 </th:block>
118 <th:block th:if="${session.user == null}">
119 <button class="btn1" >
120 <a type="button" href="/userLogin" style="color: darkblue">Login</a>
121 </button>
122 </th:block>
123 <th:block th:if="${session.user != null}">
124 <button class="btn1" >
125 <a type="button" href="/userLogout" style="color: darkblue">Logout</a>
126 </button>
127 </th:block>
128 <th:block th:if="${session.user != null}">
129 <button class="btn0" href="#">
130 <th:block th:if="${session.user != null}"
131 th:text="${session.user.getUsername()}"></th:block>
132 </button>
133 </th:block>
134
135 </form>
136 </div>
137 </div>
138</nav>
139<div class="container mb-4">
140 <div class="row">
141 <div class="col-12">
142 <h3>Кошничка:</h3>
143 <div class="table-responsive">
144 <table class="table table-striped">
145 <thead>
146 <tr>
147 <th scope="col">Event name</th>
148 <th scope="col">Ticket price</th>
149
150 </tr>
151 </thead>
152 <tbody>
153 <tr th:each=" ticket : ${ticketList}">
154 <td th:text="${ticket.getEvent().getName()}">
155 <td th:text="${ticket.getPrice()}"></td>
156 </tr>
157 </tbody>
158 </table>
159
160 <div>
161 <h3>Total: <th:block th:text="${cart.getTotal()}"></th:block></h3>
162 </div>
163
164 <a href="events.html"></a>
165 </div>
166 </div>
167 </div>
168</div>
169</body>
170</html>
Note: See TracBrowser for help on using the repository browser.