Browse Source

done fetch booking data from BE

staging
azri 1 month ago
parent
commit
9c6e8e54a0

+ 48
- 5
public/css/main.css View File

@@ -282,21 +282,22 @@ p {
282 282
     overflow: hidden;
283 283
 }
284 284
 
285
-.booking-item{
285
+.field-item{
286 286
     padding-top: 80%;
287 287
     background-size: cover;
288 288
     background-repeat: no-repeat;
289 289
     background-position: center center;
290
+    cursor: pointer;
290 291
 }
291 292
 
292
-.booking-details{
293
+.field-details{
293 294
     height: 100%;
294 295
     width: 100%;
295 296
     top:0;
296 297
     left:0
297 298
 }
298 299
 
299
-.booking-overlay{
300
+.field-overlay{
300 301
     background-color: rgba(0, 0, 0, 0.5);
301 302
     width: 100%;
302 303
     padding: 1.688rem 3.625rem;
@@ -305,15 +306,57 @@ p {
305 306
     height: fit-content;
306 307
 }
307 308
 
308
-.booking-item.active .booking-overlay{
309
+.field-c.active .field-overlay{
309 310
     background-color: rgba(103, 235, 71, 0.5);
310 311
 }
311 312
 
312 313
 
313
-.booking-item:hover .booking-overlay{
314
+.field-item:hover .field-overlay{
314 315
     background-color: rgba(103, 235, 71, 0.5);
315 316
 }
316 317
 
318
+.location-item{
319
+    padding-top: 80%;
320
+    background-size: cover;
321
+    background-repeat: no-repeat;
322
+    background-position: center center;
323
+}
324
+
325
+.location-overlay{
326
+    background-color: rgba(0, 0, 0, 0.5);
327
+    width: 100%;
328
+    padding: 1.688rem 3.625rem;
329
+    transition: all 300ms ease-in-out;
330
+    height: 100%;
331
+}
332
+
333
+
334
+#field-location-container:has(> :last-child:nth-child(2)){
335
+   display: none !important;
336
+}
337
+
338
+#field-container:has(> :last-child:nth-child(2)){
339
+    display: none !important;
340
+ }
341
+
342
+
343
+.location-item{
344
+    padding-top: 80%;
345
+    background-size: cover;
346
+    background-repeat: no-repeat;
347
+    background-position: center center;
348
+}
349
+
350
+.select-field.active .location-overlay{
351
+    background-color: rgba(103, 235, 71, 0.5);
352
+}
353
+
354
+
355
+.location-item:hover .location-overlay{
356
+    background-color: rgba(103, 235, 71, 0.5);
357
+}
358
+
359
+
317 360
 .container-contactus{
318 361
     padding-left: 6.5rem;
319 362
     padding-right: 6.5rem;

+ 142
- 0
public/js/api/API.js View File

@@ -0,0 +1,142 @@
1
+/******/ (() => { // webpackBootstrap
2
+/******/ 	"use strict";
3
+/******/ 	// The require scope
4
+/******/ 	var __webpack_require__ = {};
5
+/******/ 	
6
+/************************************************************************/
7
+/******/ 	/* webpack/runtime/define property getters */
8
+/******/ 	(() => {
9
+/******/ 		// define getter functions for harmony exports
10
+/******/ 		__webpack_require__.d = (exports, definition) => {
11
+/******/ 			for(var key in definition) {
12
+/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
13
+/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
14
+/******/ 				}
15
+/******/ 			}
16
+/******/ 		};
17
+/******/ 	})();
18
+/******/ 	
19
+/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
20
+/******/ 	(() => {
21
+/******/ 		__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
22
+/******/ 	})();
23
+/******/ 	
24
+/******/ 	/* webpack/runtime/make namespace object */
25
+/******/ 	(() => {
26
+/******/ 		// define __esModule on exports
27
+/******/ 		__webpack_require__.r = (exports) => {
28
+/******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
29
+/******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
30
+/******/ 			}
31
+/******/ 			Object.defineProperty(exports, '__esModule', { value: true });
32
+/******/ 		};
33
+/******/ 	})();
34
+/******/ 	
35
+/************************************************************************/
36
+var __webpack_exports__ = {};
37
+/*!*********************************!*\
38
+  !*** ./resources/js/api/API.js ***!
39
+  \*********************************/
40
+__webpack_require__.r(__webpack_exports__);
41
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
42
+/* harmony export */   "default": () => (/* binding */ API)
43
+/* harmony export */ });
44
+function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
45
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
46
+function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
47
+function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
48
+function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
49
+function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
50
+var server_url = "https://thebola.club";
51
+var API = /*#__PURE__*/function () {
52
+  function API() {
53
+    _classCallCheck(this, API);
54
+    this.prefix = server_url;
55
+    this.url = "/api";
56
+    this.test = 200;
57
+  }
58
+  _createClass(API, [{
59
+    key: "listState",
60
+    value: function listState(_ref) {
61
+      var _ref$_callback = _ref._callback,
62
+        _callback = _ref$_callback === void 0 ? function () {} : _ref$_callback;
63
+      var url = "".concat(this.prefix).concat(this.url, "/public/event/location/state");
64
+      fetch(url).then(function (response) {
65
+        return response.json();
66
+      }).then(function (data) {
67
+        return _callback(data);
68
+      })["catch"](function (err) {
69
+        return console.log(err);
70
+      });
71
+    }
72
+  }, {
73
+    key: "listLocation",
74
+    value: function listLocation(_ref2) {
75
+      var state = _ref2.state,
76
+        city = _ref2.city,
77
+        _ref2$_callback = _ref2._callback,
78
+        _callback = _ref2$_callback === void 0 ? function () {} : _ref2$_callback;
79
+      var url = "".concat(this.prefix).concat(this.url, "/public/event/location/field?") + new URLSearchParams({
80
+        state: state,
81
+        city: city
82
+      });
83
+      fetch(url).then(function (response) {
84
+        return response.json();
85
+      }).then(function (data) {
86
+        return _callback(data);
87
+      })["catch"](function (err) {
88
+        return console.log(err);
89
+      });
90
+    }
91
+  }, {
92
+    key: "listField",
93
+    value: function listField(_ref3) {
94
+      var state = _ref3.state,
95
+        city = _ref3.city,
96
+        field_name = _ref3.field_name,
97
+        _ref3$_callback = _ref3._callback,
98
+        _callback = _ref3$_callback === void 0 ? function () {} : _ref3$_callback;
99
+      var url = "".concat(this.prefix).concat(this.url, "/public/event/location?") + new URLSearchParams({
100
+        state: state,
101
+        city: city,
102
+        field_name: field_name
103
+      });
104
+      fetch(url).then(function (response) {
105
+        return response.json();
106
+      }).then(function (data) {
107
+        return _callback(data);
108
+      })["catch"](function (err) {
109
+        return console.log(err);
110
+      });
111
+    }
112
+  }, {
113
+    key: "enquiry",
114
+    value: function enquiry(_ref4, _callback) {
115
+      var email = _ref4.email,
116
+        name = _ref4.name,
117
+        message = _ref4.message;
118
+      var url = "".concat(this.prefix).concat(this.url, "/public/enquiry");
119
+      fetch(url, {
120
+        method: "POST",
121
+        headers: {
122
+          'Content-Type': 'application/json;charset=utf-8'
123
+        },
124
+        body: JSON.stringify({
125
+          contact_email: email,
126
+          contact_name: name,
127
+          message: message
128
+        })
129
+      }).then(function (response) {
130
+        return response.json();
131
+      }).then(function (data) {
132
+        return _callback(data);
133
+      })["catch"](function (err) {
134
+        return console.log(err);
135
+      });
136
+    }
137
+  }]);
138
+  return API;
139
+}();
140
+
141
+/******/ })()
142
+;

+ 244
- 882
public/js/main.js
File diff suppressed because it is too large
View File


+ 1
- 0
public/mix-manifest.json View File

@@ -3,6 +3,7 @@
3 3
     "/js/jquery.js": "/js/jquery.js",
4 4
     "/js/main.js": "/js/main.js",
5 5
     "/js/aos.js": "/js/aos.js",
6
+    "/js/api/API.js": "/js/api/API.js",
6 7
     "/css/main.css": "/css/main.css",
7 8
     "/css/aos.css": "/css/aos.css",
8 9
     "/css/normalize.css": "/css/normalize.css",

+ 48
- 5
resources/css/main.css View File

@@ -275,21 +275,22 @@ p {
275 275
     overflow: hidden;
276 276
 }
277 277
 
278
-.booking-item{
278
+.field-item{
279 279
     padding-top: 80%;
280 280
     background-size: cover;
281 281
     background-repeat: no-repeat;
282 282
     background-position: center center;
283
+    cursor: pointer;
283 284
 }
284 285
 
285
-.booking-details{
286
+.field-details{
286 287
     height: 100%;
287 288
     width: 100%;
288 289
     top:0;
289 290
     left:0
290 291
 }
291 292
 
292
-.booking-overlay{
293
+.field-overlay{
293 294
     background-color: rgba(0, 0, 0, 0.5);
294 295
     width: 100%;
295 296
     padding: 1.688rem 3.625rem;
@@ -297,15 +298,57 @@ p {
297 298
     height: fit-content;
298 299
 }
299 300
 
300
-.booking-item.active .booking-overlay{
301
+.field-c.active .field-overlay{
301 302
     background-color: rgba(103, 235, 71, 0.5);
302 303
 }
303 304
 
304 305
 
305
-.booking-item:hover .booking-overlay{
306
+.field-item:hover .field-overlay{
306 307
     background-color: rgba(103, 235, 71, 0.5);
307 308
 }
308 309
 
310
+.location-item{
311
+    padding-top: 80%;
312
+    background-size: cover;
313
+    background-repeat: no-repeat;
314
+    background-position: center center;
315
+}
316
+
317
+.location-overlay{
318
+    background-color: rgba(0, 0, 0, 0.5);
319
+    width: 100%;
320
+    padding: 1.688rem 3.625rem;
321
+    transition: all 300ms ease-in-out;
322
+    height: 100%;
323
+}
324
+
325
+
326
+#field-location-container:has(> :last-child:nth-child(2)){
327
+   display: none !important;
328
+}
329
+
330
+#field-container:has(> :last-child:nth-child(2)){
331
+    display: none !important;
332
+ }
333
+
334
+
335
+.location-item{
336
+    padding-top: 80%;
337
+    background-size: cover;
338
+    background-repeat: no-repeat;
339
+    background-position: center center;
340
+}
341
+
342
+.select-field.active .location-overlay{
343
+    background-color: rgba(103, 235, 71, 0.5);
344
+}
345
+
346
+
347
+.location-item:hover .location-overlay{
348
+    background-color: rgba(103, 235, 71, 0.5);
349
+}
350
+
351
+
309 352
 .container-contactus{
310 353
     padding-left: 6.5rem;
311 354
     padding-right: 6.5rem;

+ 50
- 5
resources/js/api/API.js View File

@@ -1,5 +1,3 @@
1
-//import some server backend
2
-//set app url from env file
3 1
 const server_url = "https://thebola.club";
4 2
 
5 3
 export default class API {
@@ -9,11 +7,58 @@ export default class API {
9 7
         this.test = 200;
10 8
     }
11 9
 
12
-    listLocation(_page, _pagesize, _callback) {
10
+    listState({_callback = () => {}}){
11
+        const url = `${this.prefix}${this.url}/public/event/location/state`
13 12
 
14
-        let url =  `${this.prefix}${this.url}/public/event/location?`
13
+        fetch(url)
14
+            .then(response => response.json())
15
+            .then(data => _callback(data))
16
+            .catch(err => console.log(err))
15 17
 
16
-        console.log(url)
18
+    }
19
+
20
+    listLocation({ state, city, _callback = () => {}}) {
21
+
22
+        const url = `${this.prefix}${this.url}/public/event/location/field?` + new URLSearchParams({
23
+            state, city
24
+        })
25
+
26
+        fetch(url)
27
+            .then(response => response.json())
28
+            .then(data => _callback(data) )
29
+            .catch(err => console.log(err))
30
+    }
31
+
32
+    listField({state, city, field_name, _callback = () => {}}){
33
+
34
+        const url = `${this.prefix}${this.url}/public/event/location?` + new URLSearchParams({
35
+            state, city, field_name
36
+        })
37
+
38
+        fetch(url)
39
+            .then(response => response.json())
40
+            .then(data => _callback(data) )
41
+            .catch(err => console.log(err))
42
+
43
+    }
44
+
45
+    enquiry({ email, name, message }, _callback){
46
+
47
+        let url = `${this.prefix}${this.url}/public/enquiry`;
17 48
 
49
+        fetch(url,{
50
+            method: "POST",
51
+            headers: {
52
+                'Content-Type': 'application/json;charset=utf-8',
53
+            },
54
+            body: JSON.stringify({
55
+                contact_email: email,
56
+                contact_name: name,
57
+                message
58
+            })
59
+        } )
60
+            .then(response => response.json())
61
+            .then(data => _callback(data) )
62
+            .catch(err => console.log(err))
18 63
     }
19 64
 }

+ 133
- 96
resources/js/main.js View File

@@ -1,59 +1,10 @@
1 1
 import AOS from "aos";
2 2
 import jQuery from "jquery";
3
-import queryString from "query-string";
4
-//import API from './api/api';
5
-
6
-const server_url = "https://thebola.club";
7
-
8
-export default class API {
9
-    constructor() {
10
-        this.prefix = server_url;
11
-        this.url = "/api";
12
-        this.test = 200;
13
-    }
14
-
15
-    listLocation({ _search, _page = 1, _pagesize = 20, _callback = () => {} }) {
16
-
17
-        let url = `${this.prefix}${
18
-            this.url
19
-        }/public/event/location?${queryString.stringify({
20
-            _search,
21
-            _page,
22
-            _pagesize,
23
-        })}`;
24
-
25
-
26
-        fetch(url)
27
-            .then(response => response.json())
28
-            .then(data => _callback(data) )
29
-            .catch(err => console.log(err))
30
-    }
31
-
32
-    enquiry({ email, name, message }, _callback){
33
-
34
-        let url = `${this.prefix}${this.url}/public/enquiry`;
35
-
36
-        fetch(url,{
37
-            method: "POST",
38
-            headers: {
39
-                'Content-Type': 'application/json;charset=utf-8',
40
-            },
41
-            body: JSON.stringify({
42
-                contact_email: email,
43
-                contact_name: name,
44
-                message
45
-            })
46
-        } )
47
-            .then(response => response.json())
48
-            .then(data => _callback(data) )
49
-            .catch(err => console.log(err))
50
-    }
51
-}
3
+import API from './api/api';
52 4
 
53 5
 const $ = jQuery;
54 6
 const api = new API();
55 7
 
56
-var bookingList = [];
57 8
 var bookingRules = [];
58 9
 
59 10
 setTimeout(() => {
@@ -111,62 +62,141 @@ $(document).ready(function () {
111 62
     //check if booking section exist in any page
112 63
     let bookingContainer = $('#booking-section');
113 64
     if(bookingContainer.length > 0){
114
-        api.listLocation({
115
-            _search: "",
116
-            _page: 1,
117
-            _pagesize: 20,
118
-            _callback: (data) => {
119
-                console.log("fetch")
120
-                localStorage.setItem('thebola-booking', JSON.stringify(data))
121
-                bookingList = data;
122
-
123
-                // set date max and min
124
-                let { maxDate, minDate } = createDateInputWithRange(14)
125
-                $('#input-booking-date').attr("min", minDate)
126
-                $('#input-booking-date').attr("max", maxDate)
127
-
128
-            },
129
-        });
65
+
66
+        api.listState({
67
+            _callback: ({state_city}) => {
68
+
69
+                const selectLocationInput = $("#select-location");
70
+
71
+                $(selectLocationInput).children(".select-value").remove()
72
+
73
+                if(Array.isArray(state_city)){
74
+                    state_city.forEach(({state, city}, i) => {
75
+                        let newOption = document.createElement('option');
76
+                        $(newOption).attr("id", `location_${i}`)
77
+                        $(newOption).attr("value",JSON.stringify({state,city}))
78
+                        $(newOption).addClass("select-value")
79
+                        newOption.text = `${city}, ${state}`
80
+                        $(selectLocationInput).append(newOption)
81
+                    });
82
+                }
83
+
84
+                $(selectLocationInput).on('change', ()=>{
85
+                    resetField()
86
+                })
87
+
88
+            }
89
+        })
90
+
91
+        // set date max and min
92
+        let { maxDate, minDate } = createDateInputWithRange(14)
93
+        let inputDate = $('#input-booking-date')
94
+        $(inputDate).attr("min", minDate)
95
+        $(inputDate).attr("max", maxDate)
96
+        resetDate()
97
+
130 98
     }
131 99
 
100
+    $("#select-location").on('change', function(){
132 101
 
133
-    $(".booking-item").on("click", function () {
102
+        resetDate()
103
+        resetRules()
104
+        resetField()
134 105
 
135
-        let fieldID = $(this).data('fieldid');
136
-        // remove all child active class, then add active on clicked
137
-        let bookingContainer = $('.booking-container');
138
-        $(bookingContainer).find(".booking-item").removeClass("active")
139
-        $(this).addClass("active");
106
+        if(this.value !== "default" ){
107
+            let {state, city} = JSON.parse(this.value);
140 108
 
141
-        // remove option child
142
-        $("#input-booking-slot").children(".select-value").remove();
109
+            api.listLocation({
110
+                state,
111
+                city,
112
+                _callback: ({field_location}) => {
143 113
 
144
-        //ensure everything exist
145
-        if(bookingList === undefined || bookingList.length == 0){
146
-            bookingList = localStorage.getItem('thebola-booking')
147
-        }
114
+                    let template = $('#field-location-template')
115
+                    let container = $(template).parent()
116
+
117
+                    //reset eveything
118
+                    $(container).children(".select-field").remove()
119
+
120
+                    try{
148 121
 
149
-        if(fieldID && bookingList){
122
+                        field_location.forEach(({field_name, city, state, photo_path}) => {
123
+                            let newField = $(template).clone()
124
+                            $(newField).css('display','block')
125
+                            $(newField).removeAttr("id")
126
+                            $(newField).addClass("select-field")
127
+                            $(newField).find('.field-location-text').text("")
128
+                            $(newField).on('click', ()=>{ handleClickFieldLocation(city, state, field_name, newField) })
129
+                            $(newField).find('.field-location-img').attr("style", `background-image:url(https://thebola.club/files/${photo_path})`)
130
+                            $(container).append(newField)
150 131
 
151
-            let { results } = bookingList;
152
-            let slots = results.filter( data => data.id == fieldID )
153
-            let { rules } = slots[0].slot_rules
154
-            bookingRules = rules
132
+                        });
155 133
 
156
-        }else{
157
-            console.log("no booking data")
134
+                    }catch(err){
135
+                        console.log(err)
136
+                    }
137
+                },
138
+            });
158 139
         }
159 140
 
141
+    })
160 142
 
161
-    });
143
+
144
+    const handleClickFieldLocation = function (city, state, field_name, refElem) {
145
+
146
+        $("#field-location-container").find(".select-field").removeClass("active")
147
+        $(refElem).addClass("active")
148
+        resetDate()
149
+        resetRules()
150
+        resetField()
151
+
152
+        api.listField({state, city, field_name, _callback:({results})=>{
153
+
154
+            let container = $('#field-container')
155
+            let template = $('#field-template')
156
+            try{
157
+
158
+                results.forEach(({location_name, photo_path, slot_rules}) => {
159
+
160
+                    let newField = $(template).clone()
161
+                    $(newField).css('display','block')
162
+                    $(newField).removeAttr("id")
163
+                    $(newField).addClass("select-field")
164
+                    $(newField).find('.field-text').text(location_name)
165
+                    $(newField).on('click', ()=>{ handleClickField(slot_rules, newField)})
166
+                    $(newField).find('.field-img').attr("style", `background-image:url(https://thebola.club/files/${photo_path})`)
167
+                    $(container).append(newField)
168
+
169
+                });
170
+
171
+            }catch(err){
172
+                console.log(err)
173
+            }
174
+
175
+        }})
176
+
177
+    }
178
+
179
+    const handleClickField = function (slot_rules,refElem){
180
+
181
+        // remove all child active class, then add active on clicked
182
+        let fieldContainer = $('#field-container');
183
+        $(fieldContainer).find(".select-field").removeClass("active")
184
+        $(refElem).addClass("active");
185
+        resetRules()
186
+        resetDate()
187
+        bookingRules = slot_rules.rules
188
+
189
+
190
+    }
162 191
 
163 192
     $('#input-booking-date').change(function() {
164 193
 
194
+
165 195
         if(bookingRules){
166 196
 
167 197
             // render rule of slot base on current input value date
168 198
             var dayName = getDayNameFromInput(document.getElementById("input-booking-date"));
169
-            $("#input-booking-slot").children(".select-value").remove();
199
+            resetRules()
170 200
 
171 201
             setTimeout(() => {
172 202
 
@@ -196,21 +226,28 @@ $(document).ready(function () {
196 226
     }
197 227
 
198 228
     function getDayNameFromInput(inputElement) {
199
-        // Get the value of the input element
200
-        var selectedDate = inputElement.value;
201 229
 
202
-        // Create a new Date object from the input date string
230
+        var selectedDate = inputElement.value;
203 231
         var date = new Date(selectedDate);
204
-
205
-        // Array of day names
206 232
         var dayNames = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
207
-
208
-        // Get the day of the week (0 for Sunday, 1 for Monday, ..., 6 for Saturday)
209 233
         var dayIndex = date.getDay();
210
-
211
-        // Return the name of the day corresponding to the day index
212 234
         return dayNames[dayIndex];
235
+
236
+    }
237
+
238
+    function resetField(){
239
+        $('#field-container').children(".select-field").remove()
213 240
     }
214 241
 
242
+    function resetDate(){
243
+        $('#input-booking-date').val("")
244
+    }
245
+
246
+    function resetRules(){
247
+        $("#input-booking-slot").children(".select-value").remove();
248
+    }
249
+
250
+
251
+
215 252
 
216 253
 });

+ 20
- 22
resources/views/booking.antlers.html View File

@@ -8,36 +8,34 @@
8 8
 </section>
9 9
 <section id="booking-section">
10 10
     <div class="text-light section-5">
11
-        <div class="row g-0 booking-container">
11
+        <div class="row g-0 booking-container text-center">
12 12
 
13
-            <div data-aos="fade-up" class="col-xl-4 position-relative p-0 p-lg-3">
14
-                <div data-fieldid="1" class="position-relative booking-item" style="background-image: url(./assets/group-6770.jpg);">
15
-                    <div class="position-absolute d-flex flex-wrap booking-details">
16
-                        <div class="mt-auto booking-overlay">
17
-                            <p class="text-highlight db-h5 fw-bold p-0"> FIELD A </p>
18
-                            <p class="p-0 m-0"><a class="text-light d-block article-details-href"> Book Now <span><i class="fa-solid fa-angle-right ps-3 text-db"></i></span></a></p>
19
-                        </div>
20
-                    </div>
21
-                </div>
13
+            <div class="col-12 position-relative px-3 mb-5">
14
+                <select id="select-location" class="db-input" id="cars" name="cars">
15
+                    <option value="default" selected>Select City and State</option>
16
+                  </select>
22 17
             </div>
23 18
 
24
-            <div data-aos="fade-up" class="col-xl-4 position-relative p-0 p-lg-3">
25
-                <div data-fieldid="2" class="position-relative booking-item" style="background-image: url(./assets/group-6771.jpg);">
26
-                    <div class="position-absolute d-flex flex-wrap booking-details">
27
-                        <div class="mt-auto booking-overlay">
28
-                            <p class="text-highlight db-h5 fw-bold p-0"> FIELD B </p>
29
-                            <p class="p-0 m-0"><a class="text-light d-block article-details-href"> Book Now <span><i class="fa-solid fa-angle-right ps-3 text-db"></i></span></a></p>
19
+            <div id="field-location-container" class="container-fluid p-0 col-12 row text-center my-5">
20
+                <p class="db-h5 text-highlight title">SELECT LOCATION</p>
21
+                <div id="field-location-template" class="col-xl-4 position-relative p-0 p-lg-3 animate__animated animate__fadeIn" style="display: none;">
22
+                    <div class="position-relative location-item field-location-img">
23
+                        <div class="position-absolute d-flex flex-wrap field-details">
24
+                            <div class="mt-auto d-flex location-overlay"></div>
30 25
                         </div>
31 26
                     </div>
32 27
                 </div>
33 28
             </div>
34 29
 
35
-            <div data-aos="fade-up" class="col-xl-4 position-relative p-0 p-lg-3">
36
-                <div data-fieldid="3" class="position-relative booking-item" style="background-image: url(./assets/group-6772.jpg);">
37
-                    <div class="position-absolute d-flex flex-wrap booking-details">
38
-                        <div class="mt-auto booking-overlay">
39
-                            <p class="text-highlight db-h5 fw-bold p-0"> FIELD C </p>
40
-                            <p class="p-0 m-0"><a class="text-light d-block article-details-href"> Book Now <span><i class="fa-solid fa-angle-right ps-3 text-db"></i></span></a></p>
30
+            <div id="field-container" class="container-fluid p-0 col-12 row my-5">
31
+                <p class="db-h5 text-highlight">SELECT FIELD</p>
32
+                <div id="field-template" class="col-xl-4 position-relative p-0 p-lg-3 animate__animated animate__fadeIn field-c" style="display: none;">
33
+                    <div class="position-relative field-item field-img">
34
+                        <div class="position-absolute d-flex flex-wrap field-details">
35
+                            <div class="mt-auto field-overlay text-start">
36
+                                <p class="text-highlight db-h5 fw-bold m-0 field-text"></p>
37
+                                <p class="p-0 m-0"><a class="text-light d-block article-details-href"> Book Now <span><i class="fa-solid fa-angle-right ps-3 text-db"></i></span></a></p>
38
+                            </div>
41 39
                         </div>
42 40
                     </div>
43 41
                 </div>

+ 1
- 0
resources/views/layout.antlers.html View File

@@ -14,6 +14,7 @@
14 14
         <script src="{{ mix src='js/jquery.js' }}"></script>
15 15
         <script src="{{ mix src='js/aos.js' }}" defer></script>
16 16
         <script src="{{ mix src='js/main.js' }}"></script>
17
+        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"/>
17 18
     </head>
18 19
     <body style="background-color: black;">
19 20
 

+ 1
- 1
webpack.mix.js View File

@@ -20,7 +20,7 @@ mix.js('resources/js/bootstrap.bundle.js', 'public/js')
20 20
 mix.js('resources/js/jquery.js', 'public/js')
21 21
 mix.js('resources/js/main.js', 'public/js')
22 22
 mix.js('resources/js/aos.js', 'public/js')
23
-
23
+mix.js('resources/js/api/API.js', 'public/js/api')
24 24
 
25 25
 if (mix.inProduction()) {
26 26
    mix.version();

Loading…
Cancel
Save