Przeglądaj źródła

contact us page done

staging
AzriIchik 2 miesięcy temu
rodzic
commit
ddf2fc02e7

+ 8
- 0
content/collections/pages/contact.md Wyświetl plik

@@ -0,0 +1,8 @@
1
+---
2
+id: f2363681-10ef-4b90-b2e3-3262234cf5be
3
+blueprint: page
4
+title: Contact
5
+template: contact
6
+updated_by: ab0729b7-bf3b-4b76-930d-938ff5d0a937
7
+updated_at: 1710649138
8
+---

+ 8
- 0
content/collections/pages/download.md Wyświetl plik

@@ -0,0 +1,8 @@
1
+---
2
+id: a1a53da5-7715-4eaa-99f0-cfeb8e0f8092
3
+blueprint: page
4
+title: Download
5
+template: download
6
+updated_by: ab0729b7-bf3b-4b76-930d-938ff5d0a937
7
+updated_at: 1710648926
8
+---

+ 1
- 1
content/globals/company_profile.yaml Wyświetl plik

@@ -1,7 +1,7 @@
1 1
 title: 'Company profile'
2 2
 data:
3 3
   address: '<p>RRI Football Park LGM Sungai Buloh, <br>Jalan Sungai Buloh, PJU4 47000 <br>Petaling Jaya, Selangor, Malaysia</p>'
4
-  phone_no: '+0122274616'
4
+  phone_no: '+60122274616'
5 5
   email_office: help@thebola.club
6 6
   site_url: 'https://thebola.club/'
7 7
   facebook_link: 'https://www.facebook.com/'

+ 4
- 0
content/trees/collections/pages.yaml Wyświetl plik

@@ -5,6 +5,10 @@ tree:
5 5
     entry: 74666b69-45fd-44d0-a7c5-ae56983b63a0
6 6
   -
7 7
     entry: 80e50847-bb80-4980-a9df-5ffbc9b8dc86
8
+  -
9
+    entry: a1a53da5-7715-4eaa-99f0-cfeb8e0f8092
10
+  -
11
+    entry: f2363681-10ef-4b90-b2e3-3262234cf5be
8 12
   -
9 13
     entry: 8d906fcf-8653-4839-bd17-ea8921ffe01b
10 14
   -

+ 26
- 9
public/css/main.css Wyświetl plik

@@ -2,6 +2,7 @@
2 2
 @import url(https://fonts.googleapis.com/css?family=Poppins);
3 3
 :root {
4 4
     --primary-clr: #67eb47;
5
+    --disable-clr: #243e1d;
5 6
     --dark-clr: #000;
6 7
     --light-clr: #fff;
7 8
 }
@@ -39,6 +40,13 @@ p {
39 40
     max-width: -moz-fit-content;
40 41
     max-width: fit-content;
41 42
     border: none;
43
+    font-size: clamp(18px,1vw,23px);
44
+    font-weight: 500;
45
+    padding: 0.5rem 3rem;
46
+}
47
+
48
+.db-btn[disabled]{
49
+    background-color: var(--disable-clr) !important;
42 50
 }
43 51
 
44 52
 .db-h3 {
@@ -65,11 +73,16 @@ p {
65 73
     width: 100%;
66 74
 }
67 75
 
76
+.page-highlight{
77
+    padding: 4rem 3rem;
78
+    background-size: cover;
79
+    background-repeat: no-repeat;
80
+    background-position: center top;
81
+}
82
+
68 83
 .section-2 {
69 84
     padding: 4rem 3rem;
70 85
     background-size: cover;
71
-    padding-top: 10rem;
72
-    padding-bottom: 5rem;
73 86
     background-repeat: no-repeat;
74 87
     background-position: center top;
75 88
 }
@@ -82,6 +95,13 @@ p {
82 95
     border: 1px solid gray;
83 96
 }
84 97
 
98
+.section-8{
99
+    background-size: cover;
100
+    background-repeat: no-repeat;
101
+    background-position: right top;
102
+    padding: 7.5rem 3rem;
103
+}
104
+
85 105
 .db-input {
86 106
     background-color: black;
87 107
     padding: 1.125rem 0;
@@ -92,13 +112,6 @@ p {
92 112
     font-size: 18px;
93 113
 }
94 114
 
95
-.section-8{
96
-    background-size: cover;
97
-    background-repeat: no-repeat;
98
-    background-position: right top;
99
-    padding: 7.5rem 3rem;
100
-}
101
-
102 115
 .db-input::-moz-placeholder {
103 116
     color: var(--light-clr);
104 117
     opacity: 0.5; /* Firefox */
@@ -113,6 +126,10 @@ p {
113 126
     outline: none;
114 127
 }
115 128
 
129
+.db-button{
130
+
131
+}
132
+
116 133
 /* HERO - SECTION 1*/
117 134
 .hero-text-highlight {
118 135
     font-size: 2.3rem;

+ 64
- 5
public/js/main.js Wyświetl plik

@@ -11632,6 +11632,31 @@ var API = /*#__PURE__*/function () {
11632 11632
         return console.log(err);
11633 11633
       });
11634 11634
     }
11635
+  }, {
11636
+    key: "enquiry",
11637
+    value: function enquiry(_ref2, _callback) {
11638
+      var email = _ref2.email,
11639
+        name = _ref2.name,
11640
+        message = _ref2.message;
11641
+      var url = "".concat(this.prefix).concat(this.url, "/public/enquiry");
11642
+      fetch(url, {
11643
+        method: "POST",
11644
+        headers: {
11645
+          'Content-Type': 'application/json;charset=utf-8'
11646
+        },
11647
+        body: JSON.stringify({
11648
+          contact_email: email,
11649
+          contact_name: name,
11650
+          message: message
11651
+        })
11652
+      }).then(function (response) {
11653
+        return response.json();
11654
+      }).then(function (data) {
11655
+        return _callback(data);
11656
+      })["catch"](function (err) {
11657
+        return console.log(err);
11658
+      });
11659
+    }
11635 11660
   }]);
11636 11661
   return API;
11637 11662
 }();
@@ -11649,6 +11674,40 @@ $(document).ready(function () {
11649 11674
     var redirectlink = $(this).data('href');
11650 11675
     location.href = redirectlink;
11651 11676
   });
11677
+  $('#contact-form').on('submit', function (e) {
11678
+    e.preventDefault();
11679
+    var name = $(this).find("#name").val();
11680
+    var email = $(this).find("#email").val();
11681
+    var message = $(this).find("#message").val();
11682
+    var submitButton = $(this).find('#submitButton');
11683
+    var loadingSpan = document.createElement('span');
11684
+    $(submitButton).prop("disabled", true);
11685
+    $(loadingSpan).attr("role", "status");
11686
+    $(loadingSpan).attr("aria-hidden", "true");
11687
+    $(loadingSpan).addClass("spinner-border spinner-border-sm");
11688
+    submitButton.text("Sending ");
11689
+    $(submitButton).append(loadingSpan);
11690
+    var _callback = function _callback(resp) {
11691
+      var status = resp.status;
11692
+      if (status === "Success") {
11693
+        submitButton.text("Success");
11694
+        $("#name").val("");
11695
+        $("#email").val("");
11696
+        $("#message").val("");
11697
+      } else {
11698
+        submitButton.text("Fail");
11699
+      }
11700
+      setTimeout(function () {
11701
+        $(submitButton).prop("disabled", false);
11702
+        submitButton.text("Submit");
11703
+      }, 1000);
11704
+    };
11705
+    api.enquiry({
11706
+      name: name,
11707
+      email: email,
11708
+      message: message
11709
+    }, _callback);
11710
+  });
11652 11711
 
11653 11712
   // this section is for booking page
11654 11713
   //check if booking section exist in any page
@@ -11702,11 +11761,11 @@ $(document).ready(function () {
11702 11761
       $("#input-booking-slot").children(".select-value").remove();
11703 11762
       setTimeout(function () {
11704 11763
         // append slot list
11705
-        bookingRules[dayName].forEach(function (_ref2) {
11706
-          var end_time = _ref2.end_time,
11707
-            start_time = _ref2.start_time,
11708
-            price = _ref2.price,
11709
-            id = _ref2.id;
11764
+        bookingRules[dayName].forEach(function (_ref3) {
11765
+          var end_time = _ref3.end_time,
11766
+            start_time = _ref3.start_time,
11767
+            price = _ref3.price,
11768
+            id = _ref3.id;
11710 11769
           var newOption = document.createElement('option');
11711 11770
           $(newOption).attr("id", id);
11712 11771
           $(newOption).addClass("select-value");

+ 26
- 9
resources/css/main.css Wyświetl plik

@@ -3,6 +3,7 @@
3 3
 
4 4
 :root {
5 5
     --primary-clr: #67eb47;
6
+    --disable-clr: #243e1d;
6 7
     --dark-clr: #000;
7 8
     --light-clr: #fff;
8 9
 }
@@ -39,6 +40,13 @@ p {
39 40
     border-radius: 50px;
40 41
     max-width: fit-content;
41 42
     border: none;
43
+    font-size: clamp(18px,1vw,23px);
44
+    font-weight: 500;
45
+    padding: 0.5rem 3rem;
46
+}
47
+
48
+.db-btn[disabled]{
49
+    background-color: var(--disable-clr) !important;
42 50
 }
43 51
 
44 52
 .db-h3 {
@@ -65,11 +73,16 @@ p {
65 73
     width: 100%;
66 74
 }
67 75
 
76
+.page-highlight{
77
+    padding: 4rem 3rem;
78
+    background-size: cover;
79
+    background-repeat: no-repeat;
80
+    background-position: center top;
81
+}
82
+
68 83
 .section-2 {
69 84
     padding: 4rem 3rem;
70 85
     background-size: cover;
71
-    padding-top: 10rem;
72
-    padding-bottom: 5rem;
73 86
     background-repeat: no-repeat;
74 87
     background-position: center top;
75 88
 }
@@ -82,6 +95,13 @@ p {
82 95
     border: 1px solid gray;
83 96
 }
84 97
 
98
+.section-8{
99
+    background-size: cover;
100
+    background-repeat: no-repeat;
101
+    background-position: right top;
102
+    padding: 7.5rem 3rem;
103
+}
104
+
85 105
 .db-input {
86 106
     background-color: black;
87 107
     padding: 1.125rem 0;
@@ -92,13 +112,6 @@ p {
92 112
     font-size: 18px;
93 113
 }
94 114
 
95
-.section-8{
96
-    background-size: cover;
97
-    background-repeat: no-repeat;
98
-    background-position: right top;
99
-    padding: 7.5rem 3rem;
100
-}
101
-
102 115
 .db-input::placeholder {
103 116
     color: var(--light-clr);
104 117
     opacity: 0.5; /* Firefox */
@@ -108,6 +121,10 @@ p {
108 121
     outline: none;
109 122
 }
110 123
 
124
+.db-button{
125
+
126
+}
127
+
111 128
 /* HERO - SECTION 1*/
112 129
 .hero-text-highlight {
113 130
     font-size: 2.3rem;

+ 56
- 0
resources/js/main.js Wyświetl plik

@@ -27,7 +27,26 @@ export default class API {
27 27
             .then(response => response.json())
28 28
             .then(data => _callback(data) )
29 29
             .catch(err => console.log(err))
30
+    }
31
+
32
+    enquiry({ email, name, message }, _callback){
33
+
34
+        let url = `${this.prefix}${this.url}/public/enquiry`;
30 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))
31 50
     }
32 51
 }
33 52
 
@@ -51,6 +70,43 @@ $(document).ready(function () {
51 70
         location.href = redirectlink;
52 71
     })
53 72
 
73
+    $('#contact-form').on('submit', function(e){
74
+        e.preventDefault();
75
+        let name = $(this).find("#name").val();
76
+        let email = $(this).find("#email").val();
77
+        let message = $(this).find("#message").val();
78
+        let submitButton = $(this).find('#submitButton');
79
+        let loadingSpan = document.createElement('span');
80
+
81
+        $(submitButton).prop("disabled",true);
82
+        $(loadingSpan).attr("role", "status");
83
+        $(loadingSpan).attr("aria-hidden", "true");
84
+        $(loadingSpan).addClass("spinner-border spinner-border-sm");
85
+        submitButton.text("Sending ");
86
+        $(submitButton).append(loadingSpan)
87
+
88
+        const _callback = (resp) => {
89
+
90
+            let {status} = resp
91
+            if(status === "Success"){
92
+                submitButton.text("Success");
93
+                $("#name").val("");
94
+                $("#email").val("");
95
+                $("#message").val("");
96
+            } else {
97
+                submitButton.text("Fail");
98
+            }
99
+
100
+            setTimeout(()=>{
101
+                $(submitButton).prop("disabled",false);
102
+                submitButton.text("Submit");
103
+            },1000)
104
+        }
105
+
106
+        api.enquiry({name, email, message}, _callback)
107
+
108
+    })
109
+
54 110
     // this section is for booking page
55 111
     //check if booking section exist in any page
56 112
     let bookingContainer = $('#booking-section');

+ 1
- 1
resources/views/article/index.antlers.html Wyświetl plik

@@ -1,5 +1,5 @@
1 1
 <section>
2
-    <div class="text-md-center text-light section-2" style="background-image: url(./assets/image/dbparticle2.png);">
2
+    <div class="text-md-center text-light page-highlight" style="background-image: url(./assets/image/dbparticle2.png);">
3 3
         <div class="container-fluid p-0 m-0" data-aos="zoom-in" >
4 4
             <p class="db-h3 text-highlight">News</p>
5 5
             <p class="mx-auto p-0 about-paragraph db-h5">You can book benue and field to organize your matches according to your preferred date and time.</p>

+ 1
- 1
resources/views/booking.antlers.html Wyświetl plik

@@ -1,5 +1,5 @@
1 1
 <section>
2
-    <div class="text-md-center text-light section-2" style="background-image: url(./assets/image/dbparticle2.png);">
2
+    <div class="text-md-center text-light page-highlight" style="background-image: url(./assets/image/dbparticle2.png);">
3 3
         <div class="container-fluid p-0 m-0" data-aos="zoom-in" >
4 4
             <p class="db-h3 text-highlight">Venues</p>
5 5
             <p class="mx-auto p-0 about-paragraph db-h5">You can book venue and field to organize our matches according to you preferred date and time</p>

+ 26
- 0
resources/views/contact.antlers.html Wyświetl plik

@@ -0,0 +1,26 @@
1
+<section>
2
+    <div class="text-md-center text-light page-highlight" style="background-image: url(./assets/image/dbparticle2.png);">
3
+        <div class="container-fluid p-0 m-0" data-aos="zoom-in" >
4
+            <p class="db-h3 text-highlight">Contact</p>
5
+        </div>
6
+    </div>
7
+</section>
8
+<section>
9
+    <div class="text-light">
10
+        <iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3983.7531135535396!2d101.55502981163059!3d3.1596494968024404!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x31cc4fb1c7a77485%3A0x932f09c590b3640b!2sPadang%20Bola%20E%20RRI%20Sungai%20Buloh!5e0!3m2!1sen!2smy!4v1710672957800!5m2!1sen!2smy" width="100%" height="500" style="border:0;" allowfullscreen="" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>
11
+        <div class="row g-0">
12
+            <div class="col-lg-5 my-5 my-lg-0 container-contactus">
13
+                {{ partial:partials/contactusform }}
14
+            </div>
15
+            <div class="col-lg-7 px-5 py-5" style="background-image: url(./assets/image/8.jpg);background-size: cover; background-position: center center;">
16
+
17
+                <p class="p-0 db-h5" style="line-height: clamp(1.7rem,2.5vw,3rem);">
18
+                    <a class="db-link" href="tel:{{ company_profile:phone_no }}">{{ company_profile:phone_no }}</a>
19
+                    <br/>
20
+                    <a class="db-link" href="{{ company_profile:site_url }}">{{ company_profile:site_url }}</a>
21
+                </p>
22
+                <p class="p-0 db-h5" style="line-height: clamp(1.7rem,2.5vw,3rem);">{{ company_profile:address }}</p>
23
+            </div>
24
+        </div>
25
+    </div>
26
+</section>

+ 19
- 0
resources/views/download.antlers.html Wyświetl plik

@@ -0,0 +1,19 @@
1
+<section>
2
+    <div class="text-md-center text-light page-highlight" style="background-image: url(./assets/image/dbparticle2.png);">
3
+        <div class="container-fluid p-0 m-0" data-aos="zoom-in" >
4
+            <p class="db-h3 text-highlight">Downloads</p>
5
+        </div>
6
+    </div>
7
+</section>
8
+<section>
9
+    <div class="text-light section-8" style="background-image: url(./assets/image/dbparticle3.png);">
10
+        <div data-aos="zoom-in" class="text-center ">
11
+            <p class="db-h3 text-highlight" style="line-height: clamp(3rem,2.5vw,4rem);">Our Mobile Apps Is Coming Soon!</p>
12
+            <p class="mx-auto p-0 db-h5 mb-5" style="line-height: clamp(1.7rem,2.5vw,3rem);">Soon all of the amazing features that we provide here will be available in<br/> an exclusive app for both android and iOS.</p>
13
+        </div>
14
+        <div class="container-fluid d-flex flex-wrap justify-content-center">
15
+            <img data-aos="fade-up" data-aos-delay="100" class="mx-2" src="./assets/image/gplay.png" alt="google-play-img" style="width: 200px;">
16
+            <img data-aos="fade-up" data-aos-delay="100" class="mx-2" src="./assets/image/appstore.png" alt="google-play-img" style="width: 200px;">
17
+        </div>
18
+    </div>
19
+</section>

+ 7
- 8
resources/views/home.antlers.html Wyświetl plik

@@ -107,17 +107,16 @@
107 107
         </div>
108 108
         <div class="row g-0">
109 109
             <div class="col-lg-5 my-5 my-lg-0 container-contactus">
110
-                <input class="db-input" type="text" style="margin-top: 1.4375rem;" placeholder="Name" />
111
-                <input class="db-input" type="text" style="margin-top: 1.4375rem;" placeholder="Email" />
112
-                <input class="db-input" type="text" style="margin-top: 1.4375rem;margin-bottom: 3.21875rem;" placeholder="Message" />
113
-                <button class="nav-link db-btn mx-auto mx-lg-0" style="font-size: clamp(18px,1vw,23px);font-weight: 500;padding: 0.5rem 3rem;">Submit</button>
110
+                {{ partial:partials/contactusform }}
114 111
             </div>
115 112
             <div class="col-lg-7 px-5 py-5" style="background-image: url(./assets/image/8.jpg);background-size: cover; background-position: center center;">
116 113
 
117
-                <p class="p-0 db-h5" style="line-height: clamp(1.7rem,2.5vw,3rem);">017-978 7358 <br/> hello@thebola.club</p>
118
-                <p class="p-0 db-h5" style="line-height: clamp(1.7rem,2.5vw,3rem);">Football Park LGM SUngai Buloh, Jalan Sungai Buloh <br/> PJU4, 47000 Petaling Jaya, Selangor</p>
119
-
120
-
114
+                <p class="p-0 db-h5" style="line-height: clamp(1.7rem,2.5vw,3rem);">
115
+                    <a class="db-link" href="tel:{{ company_profile:phone_no }}">{{ company_profile:phone_no }}</a>
116
+                    <br/>
117
+                    <a class="db-link" href="{{ company_profile:site_url }}">{{ company_profile:site_url }}</a>
118
+                </p>
119
+                <p class="p-0 db-h5" style="line-height: clamp(1.7rem,2.5vw,3rem);">{{ company_profile:address }}</p>
121 120
             </div>
122 121
         </div>
123 122
     </div>

+ 9
- 0
resources/views/partials/_contactusform.antlers.html Wyświetl plik

@@ -0,0 +1,9 @@
1
+<div id="contact-form" class="container-fluid p-0">
2
+    <form>
3
+        <input id="name" name="name" class="db-input mt-3" type="text" placeholder="Name" />
4
+        <input id="email" name="email" class="db-input mt-3" type="text" placeholder="Email" />
5
+        <input id="message" name="message" class="db-input mt-3 mb-5" type="text" placeholder="Message" />
6
+        <button id="submitButton" type="submit" class="nav-link db-btn mx-auto mx-lg-0">Submit </button>
7
+    </form>
8
+</div>
9
+

Ładowanie…
Anuluj
Zapisz