1 | @model List<Models.DataTransferObjects.Serach.CarsDTO>
|
---|
2 |
|
---|
3 |
|
---|
4 | @{
|
---|
5 | ViewData["Title"] = "Search results";
|
---|
6 | }
|
---|
7 |
|
---|
8 | @{
|
---|
9 | <div class="container">
|
---|
10 | <h1 class="text-light my-5">Search results</h1>
|
---|
11 | <div class="d-flex justify-content-center align-items-center flex-wrap">
|
---|
12 | @foreach (var item in Model)
|
---|
13 | {
|
---|
14 | <div class="ad">
|
---|
15 | <h3 class="mb-4 text-center">@item.Brand @item.Model</h3>
|
---|
16 | @if (item.FuelEfficiency.ToLower().Equals("luxury"))
|
---|
17 | {
|
---|
18 | <span class="fuel-eff luxury">@item.FuelEfficiency</span>
|
---|
19 | }
|
---|
20 | else
|
---|
21 | {
|
---|
22 | <span class="fuel-eff eco">@item.FuelEfficiency</span>
|
---|
23 | }
|
---|
24 | <div class="d-flex justify-content-between align-items-center">
|
---|
25 | <img src="@item.ImgUrl" alt="slika" />
|
---|
26 | <div class="d-flex justify-content-center align-items-center">
|
---|
27 | <div class="d-flex flex-column justify-content-center align-items-center mx-3">
|
---|
28 | <img src="~/img/icons/gearbox.png" alt="car seat" class="ad-icons" />
|
---|
29 | <b>@item.Transmission</b>
|
---|
30 | </div>
|
---|
31 | <div class="d-flex flex-column justify-content-center align-items-center mx-3">
|
---|
32 | <img src="~/img/icons/car-seat.png" alt="car seat" class="ad-icons" />
|
---|
33 | <b>@item.NumSeats</b>
|
---|
34 | </div>
|
---|
35 | <div class="d-flex flex-column justify-content-center align-items-center mx-3">
|
---|
36 | <img src="~/img/icons/car-door.png" alt="car seat" class="ad-icons" />
|
---|
37 | <b>@item.NumOfDoors</b>
|
---|
38 | </div>
|
---|
39 | <div class="d-flex flex-column justify-content-center align-items-center mx-3">
|
---|
40 | <span class="color" style="background-color: @item.Color.ToLower();"></span>
|
---|
41 | <b>@item.Color</b>
|
---|
42 | </div>
|
---|
43 | <div class="d-flex flex-column justify-content-center align-items-center mx-3">
|
---|
44 | <img class="ad-icons" src="~/img/icons/arrows.png" alt="produced" />
|
---|
45 | <b>@item.ModelYear</b>
|
---|
46 | </div>
|
---|
47 | </div>
|
---|
48 | </div>
|
---|
49 | <hr />
|
---|
50 | <div class="d-flex justify-content-between align-items-center flex-wrap px-3">
|
---|
51 | <p>@item.CompanyName</p>
|
---|
52 | <span class="price">@item.DailyRentalPrice$ / day</span>
|
---|
53 | </div>
|
---|
54 | <hr />
|
---|
55 | <div>
|
---|
56 | <div id="accordion">
|
---|
57 | <div class="card my-2">
|
---|
58 | <div class="card-header" id="heading_@item.CarId">
|
---|
59 | <h5 class="mb-0">
|
---|
60 | <button class="btn btn-link collapsed" data-bs-toggle="collapse" data-bs-target="#collapse_@item.CarId" aria-expanded="true" aria-controls="collapse_@item.CarId">
|
---|
61 | Additional equipment
|
---|
62 | </button>
|
---|
63 | </h5>
|
---|
64 | </div>
|
---|
65 | <div id="collapse_@item.CarId" class="collapse" aria-labelledby="heading_@item.CarId" data-bs-parent="#accordion">
|
---|
66 | <div class="card-body d-flex align-items-center flex-wrap">
|
---|
67 | <div class="d-flex align-items-center justify-content-center flex-column">
|
---|
68 | <img class="ad-icons" src="~/img/icons/map.png" alt="navigation" />
|
---|
69 | <div class="d-flex align-items-center justify-content-center">
|
---|
70 | <span class="mr-1">Navigation</span>
|
---|
71 | <input type="checkbox" />
|
---|
72 | </div>
|
---|
73 | <span>+5 €</span>
|
---|
74 | </div>
|
---|
75 | <div class="d-flex align-items-center justify-content-center flex-column">
|
---|
76 | <img class="ad-icons" src="~/img/icons/contract.png" alt="navigation" />
|
---|
77 | <div class="d-flex align-items-center justify-content-center">
|
---|
78 | <span class="mr-1">Green card</span>
|
---|
79 | <input type="checkbox" />
|
---|
80 | </div>
|
---|
81 | <span>+5 €</span>
|
---|
82 | </div>
|
---|
83 | <div class="d-flex align-items-center justify-content-center flex-column">
|
---|
84 | <img class="ad-icons" src="~/img/icons/baby-car-seat (1).png" alt="navigation" />
|
---|
85 | <div class="d-flex align-items-center justify-content-center">
|
---|
86 | <span class="mr-1">Baby seat</span>
|
---|
87 | <input type="checkbox" />
|
---|
88 | </div>
|
---|
89 | <span>+5 €</span>
|
---|
90 | </div>
|
---|
91 | <div class="d-flex align-items-center justify-content-center flex-column">
|
---|
92 | <img class="ad-icons" src="~/img/icons/trunk.png" alt="trunk" />
|
---|
93 | <div class="d-flex align-items-center justify-content-center">
|
---|
94 | <span class="mr-1">Roof rack</span>
|
---|
95 | <input type="checkbox" />
|
---|
96 | </div>
|
---|
97 | <span>+5 €</span>
|
---|
98 | </div>
|
---|
99 | </div>
|
---|
100 | </div>
|
---|
101 | </div>
|
---|
102 | </div>
|
---|
103 | </div>
|
---|
104 | <hr />
|
---|
105 | @Html.ActionLink("RENT NOW", "Index", "Rent", new { @id = item.CarId }, new { @class = "rent-now text-center" })
|
---|
106 | </div>
|
---|
107 | }
|
---|
108 | </div>
|
---|
109 | </div>
|
---|
110 |
|
---|
111 | <style>
|
---|
112 | img {
|
---|
113 | max-width: 300px;
|
---|
114 | border-radius: 10px;
|
---|
115 | }
|
---|
116 |
|
---|
117 | .ad {
|
---|
118 | background-color: white;
|
---|
119 | position: relative;
|
---|
120 | border-radius: 10px;
|
---|
121 | padding: 10px;
|
---|
122 | min-width: 800px;
|
---|
123 | margin-bottom: 50px;
|
---|
124 | }
|
---|
125 |
|
---|
126 | .ad-icons {
|
---|
127 | width: 40px;
|
---|
128 | height: 40px;
|
---|
129 | padding: 5px;
|
---|
130 | }
|
---|
131 |
|
---|
132 | .fuel-eff {
|
---|
133 | position: absolute;
|
---|
134 | top: 10px;
|
---|
135 | right: 10px;
|
---|
136 | font-weight: bold;
|
---|
137 | text-transform: uppercase;
|
---|
138 | padding: 5px;
|
---|
139 | border-radius: 5px;
|
---|
140 | color: black;
|
---|
141 | }
|
---|
142 |
|
---|
143 | .eco {
|
---|
144 | background-color: #6eff3e;
|
---|
145 | }
|
---|
146 |
|
---|
147 | .luxury {
|
---|
148 | background-color: gold;
|
---|
149 | }
|
---|
150 |
|
---|
151 | .rent-now {
|
---|
152 | padding: 10px;
|
---|
153 | display: block;
|
---|
154 | margin: 10px auto;
|
---|
155 | min-width: 200px;
|
---|
156 | border-radius: 10px;
|
---|
157 | background-color: cornflowerblue;
|
---|
158 | color: #121d33;
|
---|
159 | font-weight: bold;
|
---|
160 | border: none;
|
---|
161 | }
|
---|
162 |
|
---|
163 | .rent-now:hover {
|
---|
164 | box-shadow: 0 0 3px 3px cornflowerblue;
|
---|
165 | background-color: #121d33;
|
---|
166 | color: cornflowerblue;
|
---|
167 | }
|
---|
168 |
|
---|
169 | .company-logo {
|
---|
170 | max-width: 80px;
|
---|
171 | }
|
---|
172 |
|
---|
173 | .price {
|
---|
174 | font-weight: bold;
|
---|
175 | font-size: 35px;
|
---|
176 | }
|
---|
177 |
|
---|
178 | .color {
|
---|
179 | width: 30px;
|
---|
180 | height: 30px;
|
---|
181 | border-radius: 50%;
|
---|
182 | border: 2px solid black;
|
---|
183 | margin-bottom: 8px;
|
---|
184 | }
|
---|
185 |
|
---|
186 | .card-body {
|
---|
187 | justify-content: space-evenly;
|
---|
188 | }
|
---|
189 | </style>
|
---|
190 |
|
---|
191 | <script>
|
---|
192 | function changeHandler() {
|
---|
193 |
|
---|
194 | }
|
---|
195 | </script>
|
---|
196 | }
|
---|