Browse Source

navbar

master
azri 1 month ago
parent
commit
5357ddf15a
2 changed files with 146 additions and 128 deletions
  1. 129
    126
      resources/views/home.antlers.html
  2. 17
    2
      resources/views/layout.antlers.html

+ 129
- 126
resources/views/home.antlers.html View File

@@ -2,61 +2,44 @@
2 2
 <div class="px-4 py-5" style="height: 120vh;">
3 3
 
4 4
     <div class="d-flex flex-column position-relative" style="height: 100%;overflow: hidden;">
5
-        <!-- <nav class="navbar navbar-expand-lg p-0" style="background-color: rgba(0, 0, 0, 0);">
6
-            <div class="container-fluid p-0">
7
-              <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
8
-                <span class="navbar-toggler-icon"></span>
9
-              </button>
10
-              <div class="collapse navbar-collapse d-flex" id="navbarNavDropdown">
11
-                <ul class="navbar-nav me-auto me-md-0 ms-md-auto">
12
-                  <li class="nav-item">
13
-                    <div class="p-3" style="background-color: rgba(0, 0, 0, 0);">
14
-                        <div class="bg-light trapezium ps-5 pe-4 py-1"><a class="nav-link p-0" href="#">Pricing</a></div>
15
-                    </div>
16
-                  </li>
17
-                  <li class="nav-item">
18
-                    <div class="p-3" style="background-color: rgba(255, 255, 255, 0);">
19
-                        <div class="bg-white trapezium-end ps-5 pe-4 py-1"><a class="nav-link p-0" href="#">Pricing</a></div>
20
-                    </div>
21
-                  </li>
22
-                </ul>
23
-              </div>
24
-            </div>
25
-        </nav> -->
26 5
 
27 6
         <!--TEMP NAVBAR-->
28
-        <nav class="navbar navbar-expand-lg w-100" style="position: absolute;z-index: 2;background-color: rgba(255, 255, 255, 0.2);">
29
-            <div class="container-fluid">
30
-              <a class="navbar-brand py-3 px-5" href="/">
31
-                <img src="/assets/svg/logo.svg" width="100">
32
-              </a>
33
-              <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
34
-                <span class="navbar-toggler-icon"></span>
35
-              </button>
36
-              <div class="collapse navbar-collapse d-flex" id="navbarNavDropdown">
37
-                <ul class="navbar-nav me-auto me-md-0 ms-md-auto">
38
-                  <li class="nav-item mx-3">
39
-                    <a class="nav-link active fw-bolder font-18" aria-current="page" href="/" style="color: #fff;">Home</a>
40
-                  </li>
41
-                  <li class="nav-item mx-3">
42
-                    <a class="nav-link fw-bolder font-18" href="#" style="color: #fff;">Introduction</a>
43
-                  </li>
44
-                  <li class="nav-item mx-3">
45
-                    <a class="nav-link fw-bolder font-18" href="#" style="color: #fff;">What is Text4u?</a>
46
-                  </li>
47
-                  <li class="nav-item mx-3">
48
-                    <a class="nav-link fw-bolder font-18" href="#" style="color: #159B9B;">Submit</a>
49
-                  </li>
50
-                </ul>
51
-              </div>
7
+        <nav class="navbar navbar-expand-lg w-100 p-0"
8
+            style="position: absolute;z-index: 2;background-color: rgba(255, 255, 255, 0);">
9
+            <div class="container-fluid d-flex align-items-stretch p-0">
10
+                <a class="navbar-brand py-3 px-5 m-0 bg-white" href="/">
11
+                    <img src="/assets/svg/logo.svg" width="100">
12
+                </a>
13
+
14
+                <div class="bg-white flex-grow-1">
15
+                    <!--WHITE SPACE-->
16
+                </div>
17
+
18
+                <div class="d-flex">
19
+                    <ul class="navbar-nav me-auto me-md-0 ms-md-auto">
20
+                        <li class="nav-item d-flex" >
21
+                            <a class="nav-link active fw-bolder font-16 my-auto" aria-current="page" href="/" style="color: #000;">Home</a>
22
+                        </li>
23
+                        <li class="nav-item px-4 d-flex">
24
+                            <a class="nav-link active fw-bolder font-16 my-auto" aria-current="page" href="/" style="color: #000;">Introduction</a>
25
+                        </li>
26
+                        <li class="nav-item px-4 d-flex">
27
+                            <a class="nav-link active fw-bolder font-16 my-auto" aria-current="page" href="/" style="color: #000;">What is Text4u?</a>
28
+                        </li>
29
+                        <li class="nav-item px-4 d-flex active">
30
+                            <a class="nav-link active fw-bolder font-16 my-auto" aria-current="page" href="/">Submit</a>
31
+                        </li>
32
+                    </ul>
33
+                </div>
52 34
             </div>
53
-          </nav>
35
+        </nav>
54 36
 
55 37
         <video autoplay muted loop style="width: 100%;">
56 38
             <source src="/assets/video/hero.mp4" type="video/mp4">
57 39
         </video>
58 40
 
59
-        <div class="w-100 flex-grow-1 row p-0 m-0 position-absolute" style="overflow: hidden;z-index: 1; background: rgba(0, 0, 0, 0.5); height: 100%;">
41
+        <div class="w-100 flex-grow-1 row p-0 m-0 position-absolute"
42
+            style="overflow: hidden;z-index: 1; background: rgba(0, 0, 0, 0.5); height: 100%;">
60 43
             <div class="col-4 d-none d-lg-flex">
61 44
                 <img src="/assets/img/group_21.png" class="img-fluid mt-auto mx-auto" style="height: 75%;" />
62 45
             </div>
@@ -66,11 +49,15 @@
66 49
                         <h1 class="fw-bolder hero-main-text text-white">DATA ANDA BANYAK?</h1>
67 50
                     </div>
68 51
 
69
-                    <div class="py-3 px-5 ms-auto mb-4 trapezium-hero" style="width: fit-content;background-color: #BB5C3F;">
70
-                        <p class="text-white m-0 mx-5 my-2" style="font-weight: 500;">Sentiasa sukar buat retarget marketing terus ke pelanggan?</p>
52
+                    <div class="py-3 px-5 ms-auto mb-4 trapezium-hero"
53
+                        style="width: fit-content;background-color: #BB5C3F;">
54
+                        <p class="text-white m-0 mx-5 my-2" style="font-weight: 500;">Sentiasa sukar buat retarget
55
+                            marketing terus ke pelanggan?</p>
71 56
                     </div>
72
-                    <div class="py-3 px-5 ms-auto mb-4 trapezium-hero" style="width: fit-content;background-color: #DE9C46;">
73
-                        <p class="text-white m-0 mx-5 my-2" style="font-weight: 500;">Susah nak reach Database anda dalam satu masa?</p>
57
+                    <div class="py-3 px-5 ms-auto mb-4 trapezium-hero"
58
+                        style="width: fit-content;background-color: #DE9C46;">
59
+                        <p class="text-white m-0 mx-5 my-2" style="font-weight: 500;">Susah nak reach Database anda
60
+                            dalam satu masa?</p>
74 61
                     </div>
75 62
                 </div>
76 63
             </div>
@@ -91,44 +78,52 @@
91 78
                 </p>
92 79
             </div>
93 80
         </div>
94
-        <div class="bg-info trapezium col-7" style="background: url(/assets/img/path_34.jpg) center center no-repeat; background-size: cover;">
81
+        <div class="bg-info trapezium col-7"
82
+            style="background: url(/assets/img/path_34.jpg) center center no-repeat; background-size: cover;">
95 83
             <!-- THIS IS THE IMAGE STUFF -->
96 84
         </div>
97 85
     </div>
98 86
 </div>
99 87
 
100 88
 <div class="container-fluid p-0 m-0">
101
-    <div class="d-flex flex-column m-0 p-5" style="min-height: 500px; background: url(/assets/img/group_29.jpg) center center no-repeat; background-size: cover;">
89
+    <div class="d-flex flex-column m-0 p-5"
90
+        style="min-height: 500px; background: url(/assets/img/group_29.jpg) center center no-repeat; background-size: cover;">
102 91
         <p class="font-37 text-white m-0 mb-5" style="font-weight: 500;">
103 92
             Rakam Notifikasai Perniagaan Anda
104 93
         </p>
105 94
         <div class="d-flex">
106 95
             <div class="flex-grow-1 p-4">
107
-                <div class="position-relative" style="padding-top: 85%;background-color: #BB5C3F;border-radius: 25px;border: 8px dashed #DD9C47;">
96
+                <div class="position-relative"
97
+                    style="padding-top: 85%;background-color: #BB5C3F;border-radius: 25px;border: 8px dashed #DD9C47;">
108 98
                     <div class="position-absolute text-white d-flex" style="top:0; left: 0; width: 100%; height: 100%;">
109 99
                         <div class="my-auto px-5">
110 100
                             <img class="mb-5" src="/assets/svg/bell.svg" width="40">
111
-                            <p class="text-white font-37 fw-bolder" style="line-height: 44px;">Notifikasi <br/> secara <br/> terus</p>
101
+                            <p class="text-white font-37 fw-bolder" style="line-height: 44px;">Notifikasi <br /> secara
102
+                                <br /> terus</p>
112 103
                         </div>
113 104
                     </div>
114 105
                 </div>
115 106
             </div>
116 107
             <div class="flex-grow-1 p-4">
117
-                <div class="position-relative" style="padding-top: 85%;background-color: #BB5C3F;border-radius: 25px;border: 8px dashed #DD9C47;">
108
+                <div class="position-relative"
109
+                    style="padding-top: 85%;background-color: #BB5C3F;border-radius: 25px;border: 8px dashed #DD9C47;">
118 110
                     <div class="position-absolute text-white d-flex" style="top:0; left: 0; width: 100%; height: 100%;">
119 111
                         <div class="my-auto px-5">
120 112
                             <img class="mb-5" src="/assets/svg/table.svg" width="40">
121
-                            <p class="text-white font-37 fw-bolder" style="line-height: 44px;">Pengurusan <br/> database <br/> lebih teratur</p>
113
+                            <p class="text-white font-37 fw-bolder" style="line-height: 44px;">Pengurusan <br />
114
+                                database <br /> lebih teratur</p>
122 115
                         </div>
123 116
                     </div>
124 117
                 </div>
125 118
             </div>
126 119
             <div class="flex-grow-1 p-4">
127
-                <div class="position-relative" style="padding-top: 85%;background-color: #BB5C3F;border-radius: 25px;border: 8px dashed #DD9C47;">
120
+                <div class="position-relative"
121
+                    style="padding-top: 85%;background-color: #BB5C3F;border-radius: 25px;border: 8px dashed #DD9C47;">
128 122
                     <div class="position-absolute text-white d-flex" style="top:0; left: 0; width: 100%; height: 100%;">
129 123
                         <div class="my-auto px-5">
130 124
                             <img class="mb-5" src="/assets/svg/hands-helping.svg" width="40">
131
-                            <p class="text-white font-37 fw-bolder" style="line-height: 44px;">24/7 bantuan <br/> secara online</p>
125
+                            <p class="text-white font-37 fw-bolder" style="line-height: 44px;">24/7 bantuan <br />
126
+                                secara online</p>
132 127
                         </div>
133 128
                     </div>
134 129
                 </div>
@@ -149,7 +144,8 @@
149 144
 
150 145
 <div class="container-fluid p-0 m-0">
151 146
     <div class="row m-0" style="background-color: #DED7C4;min-height: 400px;">
152
-        <div class="col-md-6" style="background: url(/assets/img/rectangle_56.jpg) center center no-repeat; background-size: cover;">
147
+        <div class="col-md-6"
148
+            style="background: url(/assets/img/rectangle_56.jpg) center center no-repeat; background-size: cover;">
153 149
             <!-- THIS IS THE IMAGE STUFF -->
154 150
         </div>
155 151
         <div class="col-md-6 px-5 py-4 d-flex flex-column form-container">
@@ -158,19 +154,19 @@
158 154
                     <h4 class="fw-bold">Hubungi kami untuk mengetahui lebih lanjut :</h4>
159 155
                 </div>
160 156
                 <form id="enquiry-form" class="mx-auto" style="width: 70%;">
161
-                  <div class="form-group">
162
-                    <label for="name">Nama Perniagaan :</label>
163
-                    <input type="text" id="name" name="name" required>
164
-                  </div>
165
-                  <div class="form-group">
166
-                    <label for="email">Email :</label>
167
-                    <input type="email" id="email" name="email" required>
168
-                  </div>
169
-                  <div class="form-group">
170
-                    <label for="phone">No. Telefon :</label>
171
-                    <input type="tel" id="phone" name="phone" required>
172
-                  </div>
173
-                  <button type="submit" class="submit-btn">Submit</button>
157
+                    <div class="form-group">
158
+                        <label for="name">Nama Perniagaan :</label>
159
+                        <input type="text" id="name" name="name" required>
160
+                    </div>
161
+                    <div class="form-group">
162
+                        <label for="email">Email :</label>
163
+                        <input type="email" id="email" name="email" required>
164
+                    </div>
165
+                    <div class="form-group">
166
+                        <label for="phone">No. Telefon :</label>
167
+                        <input type="tel" id="phone" name="phone" required>
168
+                    </div>
169
+                    <button type="submit" class="submit-btn">Submit</button>
174 170
                 </form>
175 171
             </div>
176 172
         </div>
@@ -184,7 +180,8 @@
184 180
 
185 181
             <img class="mb-4 ms-5" src="/assets/svg/logo.svg" width="120">
186 182
 
187
-            <p class="font-16 mb-5" style="line-height: 16px;font-weight:600;"> Bold flavours, savoury snacks,<br/> Taste adventures.</p>
183
+            <p class="font-16 mb-5" style="line-height: 16px;font-weight:600;"> Bold flavours, savoury snacks,<br />
184
+                Taste adventures.</p>
188 185
 
189 186
             <div class="d-flex flex-wrap mt-5" style="height: fit-content;">
190 187
                 <img class="me-3" src="/assets/svg/linkedin.svg" width="20">
@@ -216,7 +213,8 @@
216 213
                             <img class="ms-auto me-2" src="/assets/svg/mapmark.svg" width="20">
217 214
                         </div>
218 215
                         <div class="col">
219
-                            <p class="font-16">Text4U Sdn Bhd, No.89 Jalan KP 7 <br/> Kawasan Perindustrian, Kota Puteri, 48100 Batu Arang, Selangor</p>
216
+                            <p class="font-16">Text4U Sdn Bhd, No.89 Jalan KP 7 <br /> Kawasan Perindustrian, Kota
217
+                                Puteri, 48100 Batu Arang, Selangor</p>
220 218
                         </div>
221 219
                     </div>
222 220
                 </li>
@@ -248,11 +246,14 @@
248 246
 
249 247
             <p class="fw-bold font-21">Enjoy Subscriber Perks</p>
250 248
 
251
-            <p class="font-16 mb-4">Sign up for emails and receive early access to new arrivals, <br/> sales, event and more.</p>
249
+            <p class="font-16 mb-4">Sign up for emails and receive early access to new arrivals, <br /> sales, event and
250
+                more.</p>
252 251
 
253 252
             <div class="input-group border-0 mb-5" style="overflow: hidden;">
254
-                <input type="text" class="form-control border-0 px-4 py-3" placeholder="Your email address" style="border-radius: 30px 0 0 30px;background-color: #F9F9F9;">
255
-                <button class="btn btn-outline-secondary text-white border-0 px-4 py-3" type="button" id="button-addon2" style="border-radius: 0 30px 30px 0px;background-color: #BB5C3F;">Subscribe</button>
253
+                <input type="text" class="form-control border-0 px-4 py-3" placeholder="Your email address"
254
+                    style="border-radius: 30px 0 0 30px;background-color: #F9F9F9;">
255
+                <button class="btn btn-outline-secondary text-white border-0 px-4 py-3" type="button" id="button-addon2"
256
+                    style="border-radius: 0 30px 30px 0px;background-color: #BB5C3F;">Subscribe</button>
256 257
             </div>
257 258
 
258 259
 
@@ -265,7 +266,7 @@
265 266
 
266 267
 <!-- COPYRIGHT -->
267 268
 <div class="container-fluid p-0 m-0">
268
-    <div class="row m-0 p-0 d-flex bg-light" >
269
+    <div class="row m-0 p-0 d-flex bg-light">
269 270
         <div class="d-flex p-0">
270 271
             <div class=" mx-auto d-flex px-5 py-3">
271 272
                 <div class="my-auto mx-auto me-4">
@@ -294,62 +295,64 @@
294 295
 
295 296
 
296 297
 <!-- Button trigger modal -->
297
-<button id="triggerModal" type="button" style="max-height: 1px; max-width: 1px;position: absolute; top: -100px; left: -100px;" data-bs-toggle="modal" data-bs-target="#enquiryModal"> </button>
298
+<button id="triggerModal" type="button"
299
+    style="max-height: 1px; max-width: 1px;position: absolute; top: -100px; left: -100px;" data-bs-toggle="modal"
300
+    data-bs-target="#enquiryModal"> </button>
298 301
 
299 302
 <!-- Modal -->
300 303
 <div class="modal fade" id="enquiryModal" tabindex="-1">
301
-  <div class="modal-dialog modal-dialog-centered">
302
-    <div class="modal-content">
303
-      <div class="modal-body text-center">
304
-          <p>Your Enquiry has been submitted, we will contact you soon</p>
305
-          <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
306
-      </div>
304
+    <div class="modal-dialog modal-dialog-centered">
305
+        <div class="modal-content">
306
+            <div class="modal-body text-center">
307
+                <p>Your Enquiry has been submitted, we will contact you soon</p>
308
+                <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
309
+            </div>
310
+        </div>
307 311
     </div>
308
-  </div>
309 312
 </div>
310 313
 <script>
311 314
     let enquiryForm = document.getElementById("enquiry-form")
312 315
 
313
-      enquiryForm.addEventListener('submit', async function (e) {
314
-      e.preventDefault(); // Prevent form from submitting the traditional way
315
-
316
-      // Gather form data
317
-      const formData = {
318
-        name: document.getElementById('name').value,
319
-        email: document.getElementById('email').value,
320
-        phone: document.getElementById('phone').value
321
-      };
322
-
323
-      try {
324
-        // Send POST request
325
-        const response = await fetch('/api/enquiry/', {
326
-          method: 'POST',
327
-          headers: {
328
-            'Content-Type': 'application/json'
329
-          },
330
-          body: JSON.stringify(formData) // Convert form data to JSON
331
-        });
332
-
333
-        // Parse JSON response
334
-        const result = await response.json();
335
-
336
-        // Handle the response
337
-        if (response.ok) {
338
-
339
-          console.log('Enquiry submitted successfully:', result);
340
-          document.getElementById('name').value = ""
341
-          document.getElementById('email').value = ""
342
-          document.getElementById('phone').value = ""
343
-          document.getElementById("triggerModal").click()
344
-
345
-        } else {
346
-          console.error('Submission failed:', result);
347
-          alert('Submission failed. Please try again.');
316
+    enquiryForm.addEventListener('submit', async function (e) {
317
+        e.preventDefault(); // Prevent form from submitting the traditional way
318
+
319
+        // Gather form data
320
+        const formData = {
321
+            name: document.getElementById('name').value,
322
+            email: document.getElementById('email').value,
323
+            phone: document.getElementById('phone').value
324
+        };
325
+
326
+        try {
327
+            // Send POST request
328
+            const response = await fetch('/api/enquiry/', {
329
+                method: 'POST',
330
+                headers: {
331
+                    'Content-Type': 'application/json'
332
+                },
333
+                body: JSON.stringify(formData) // Convert form data to JSON
334
+            });
335
+
336
+            // Parse JSON response
337
+            const result = await response.json();
338
+
339
+            // Handle the response
340
+            if (response.ok) {
341
+
342
+                console.log('Enquiry submitted successfully:', result);
343
+                document.getElementById('name').value = ""
344
+                document.getElementById('email').value = ""
345
+                document.getElementById('phone').value = ""
346
+                document.getElementById("triggerModal").click()
347
+
348
+            } else {
349
+                console.error('Submission failed:', result);
350
+                alert('Submission failed. Please try again.');
351
+            }
352
+        } catch (error) {
353
+            console.error('Error occurred:', error);
354
+            alert('An error occurred while submitting your enquiry.');
348 355
         }
349
-      } catch (error) {
350
-        console.error('Error occurred:', error);
351
-        alert('An error occurred while submitting your enquiry.');
352
-      }
353 356
     });
354 357
 
355 358
 </script>

+ 17
- 2
resources/views/layout.antlers.html View File

@@ -10,12 +10,10 @@
10 10
         <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous" defer></script>
11 11
         <style>
12 12
             .trapezium-nav-end {
13
-                background-color: #4CAF50; /* Adjust the color as needed */
14 13
                 clip-path: polygon(20% 0, 100% 0, 100% 100%, 0 100%);
15 14
             }
16 15
 
17 16
             .trapezium-nav {
18
-                background-color: #4CAF50; /* Adjust the color as needed */
19 17
                 clip-path: polygon(20% 0, 100% 0, 100% 100%, 0 100%);
20 18
             }
21 19
 
@@ -117,6 +115,23 @@
117 115
                 color: #396868; /* Change color on hover */
118 116
             }
119 117
 
118
+            .nav-item{
119
+                background-color: white;
120
+            }
121
+
122
+            .nav-item.active{
123
+                background-color: rgba(0, 0, 0, 0.2) !important;
124
+            }
125
+
126
+            .nav-item a{
127
+                color: #000 !important;
128
+            }
129
+
130
+            .nav-item.active a{
131
+                color: #159B9B !important;
132
+                background-color: #fff;
133
+            }
134
+
120 135
 
121 136
 
122 137
 

Loading…
Cancel
Save