iceholidays-frontend 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1f50c77c77c53b3790f60e5635bd2de1268a0085c7a95508fb31db394271f3a1
4
- data.tar.gz: eb86f0b2a34fd67b3b14a52a2f4d03d4b6210127c989c75674f16f61284d5b16
3
+ metadata.gz: ff4468b5bb9777f1aa1b907f832ae75fc918847e5c721bc3bbf434a56d2bb11c
4
+ data.tar.gz: 3bbc05e5a116b40f46291d072497fd315b445e1ebb5c382dcf7a82083a1e4a45
5
5
  SHA512:
6
- metadata.gz: 22ccaa192dc4db372f231e1c61c35a7db6f1ffded4c098df3ac914a48c25d4a57eab80c5a71bcc79d551cc0e7baaf3a493e0e2ab1761f37265da662ad606a4c1
7
- data.tar.gz: 50ae100ed07dc32ed4079cab8e0aa76cb3ee1e10a5c30e19b347c08abb23b98d37ed02aba67e925be720dc2b4410fcd385df9b03d54f8d28cff6ca6e35f98747
6
+ metadata.gz: 41b36ae9c5787a229e9dabf1c7a02434dbf7dddb7f662fb6d2ec7601b3e6139aa1ac5d4e973cacfdefce3b66f1af9c810609f4159a38e2aaf0ae0eaa98051f70
7
+ data.tar.gz: de17d34551a35097c3e11dcd957ea0ce29199c6f07054ac8af0ba5c61dcbdbc1691198d83d41a89c7f4d5eaa0b8f59a921562e634df133483358ea812d1acd42
@@ -5,7 +5,7 @@
5
5
  height: 50px;
6
6
  width: 100%;
7
7
  background: linear-gradient(241.37deg, #D1AC6E -108.33%, #D1AC6E -14.72%, $secondary-color -2.73%, #B68B31 108.18%);
8
- padding-inline-end: 25px;
8
+ // padding-inline-end: 25px;
9
9
  display: inline-flex;
10
10
  justify-content: space-between;
11
11
  align-items: center;
@@ -39,27 +39,28 @@
39
39
  padding-top: 25px;
40
40
  }
41
41
  }
42
+ }
43
+
42
44
 
43
- #get-brochure{
44
- width: 152px;
45
- height: var(--button-height);
46
- padding: 7px 8px 7px 8px;
47
- border-radius: 20px;
48
- border: 1px solid;
49
- background: linear-gradient(287.63deg, $primary-color -19.9%, $primary-color 10.87%, #F9E298 26.63%, #B68B31 93.91%);
50
- border-image-source: linear-gradient(0deg, rgba(255, 255, 255, 0.5) 0%, rgba(42, 42, 42, 0.5) 100%);
51
- box-shadow: 0px 3px 10px 0px #AA853E80, 0px 4px 4px 0px #F9F6F31A inset;
52
- text-align: center;
53
- text-transform: uppercase;
54
- font-family: $font-default;
55
- font-size: 14px;
56
- font-weight: 500;
57
- line-height: 21px;
58
- letter-spacing: 0.05em;
59
- text-align: left;
60
- text-underline-position: from-font;
61
- text-decoration-skip-ink: none;
62
- }
45
+ .get-brochure{
46
+ width: 152px;
47
+ height: var(--button-height);
48
+ padding: 7px 8px 7px 8px;
49
+ border-radius: 20px;
50
+ border: 1px solid;
51
+ background: linear-gradient(287.63deg, $primary-color -19.9%, $primary-color 10.87%, #F9E298 26.63%, #B68B31 93.91%);
52
+ border-image-source: linear-gradient(0deg, rgba(255, 255, 255, 0.5) 0%, rgba(42, 42, 42, 0.5) 100%);
53
+ box-shadow: 0px 3px 10px 0px #AA853E80, 0px 4px 4px 0px #F9F6F31A inset;
54
+ text-align: center;
55
+ text-transform: uppercase;
56
+ font-family: $font-default;
57
+ font-size: 14px;
58
+ font-weight: 500;
59
+ line-height: 21px;
60
+ letter-spacing: 0.05em;
61
+ text-align: left;
62
+ text-underline-position: from-font;
63
+ text-decoration-skip-ink: none;
63
64
  }
64
65
 
65
66
  #main-footer{
@@ -186,7 +187,8 @@
186
187
  height: 56px;
187
188
  }
188
189
 
189
- .ant-menu-item:has(.logo_desktop){
190
+ .ant-menu-item:has(.logo_desktop),
191
+ .ant-menu-item:has(.get-brochure){
190
192
  display: none;
191
193
  }
192
194
  }
@@ -215,25 +217,30 @@
215
217
  }
216
218
  }
217
219
 
218
- @media only screen and (min-width: 768px) {
220
+ @media only screen and (min-width: 769px) {
219
221
  #main-header{
220
222
  #toggle-menu{
221
223
  display: none;
222
224
  }
223
225
 
226
+ #get-brochure-mobile{
227
+ display: none;
228
+ }
229
+
224
230
  .nav-menu{
225
231
  display: flex;
226
232
  flex: 1;
227
233
  background: transparent;
228
234
  height: 100%;
229
235
  justify-content: center;
230
- margin-inline-start: 80px;
236
+ min-width: 100%;
237
+ // padding-inline-start: 25px;
231
238
 
232
239
  a{
233
240
  color: white;
234
241
  text-transform: uppercase;
235
242
  font-family: $font-default;
236
- font-size: 16px;
243
+ font-size: 14px;
237
244
  font-weight: 500;
238
245
  line-height: 24px;
239
246
  letter-spacing: 0.05em;
@@ -252,11 +259,23 @@
252
259
  .ant-menu-item:has(.logo){
253
260
  // margin: 0 -35px;
254
261
  padding: 0;
262
+ order: 1 !important;
263
+ padding-inline-start: 20px;
255
264
  }
265
+
266
+ .ant-menu-item:has(.get-brochure) .ant-menu-title-content{
267
+ height: 100%;
268
+ display: flex;
269
+ align-items: center;
270
+ }
271
+
272
+ // .ant-menu-item[data-menu-id*=app] {
273
+ // order: 10 !important;
274
+ // }
256
275
  }
257
276
 
258
277
  .logo{
259
- width: 304px;
278
+ width: 295px;
260
279
  // height: 66px;
261
280
 
262
281
  &.logo_mobile{
@@ -310,4 +329,46 @@
310
329
  }
311
330
  }
312
331
  }
332
+ }
333
+
334
+ @media only screen and (min-width: 899px) {
335
+ #main-header .nav-menu {
336
+ // padding-inline-start: 0;
337
+
338
+ .ant-menu-item:has(.logo) {
339
+ order: 2 !important;
340
+ padding-inline-start: 0;
341
+ }
342
+ }
343
+ }
344
+
345
+ @media only screen and (min-width: 1008px) {
346
+ #main-header .nav-menu .ant-menu-item:has(.logo) {
347
+ order: 3 !important;
348
+ }
349
+ }
350
+
351
+ @media only screen and (min-width: 1300px) {
352
+ #main-header{
353
+ .nav-menu{
354
+ padding-inline-start: 80px;
355
+
356
+ a{
357
+ font-size: 16px;
358
+ }
359
+ }
360
+
361
+ .logo{
362
+ width: 304px;
363
+ // height: 66px;
364
+
365
+ &.logo_mobile{
366
+ display: none;
367
+ }
368
+
369
+ &.logo_desktop{
370
+ display: block;
371
+ }
372
+ }
373
+ }
313
374
  }
@@ -108,15 +108,24 @@ a{
108
108
 
109
109
  &>.ant-menu-item:hover,
110
110
  &>.ant-menu-item-selected,
111
- &>.ant-menu-item-active{
111
+ &>.ant-menu-item-active,
112
+ &>.ant-menu-submenu-open,
113
+ &>.ant-menu-submenu-selected,
114
+ &>.ant-menu-submenu-active{
112
115
 
113
116
  &::after{
114
- display: none;
117
+ display: none !important;
115
118
  }
116
119
  }
117
120
  }
118
121
 
119
122
  .ant-menu-item-selected{
120
- background-color: transparent;
123
+ background-color: transparent !important;
124
+ color: unset !important;
125
+ text-transform: uppercase;
121
126
  }
127
+
128
+ // .ant-menu-submenu-selected>.ant-menu-submenu-title{
129
+ // color: #FFFFFF !important;
130
+ // }
122
131
  }
@@ -3,6 +3,16 @@ import axios from "axios";
3
3
  class ContactUsApi
4
4
  {
5
5
 
6
+ contactInquiry(formValues){
7
+ const apiUrl = "/api/v1/inquiries";
8
+
9
+ return axios.post(apiUrl, {inquiry: formValues})
10
+ .then(response => {
11
+ return Promise.resolve(null);
12
+ });
13
+ }
14
+
15
+
6
16
  getStates(): Promise<any[]> {
7
17
  const apiUrl = "/api/v1/states";
8
18
 
@@ -9,39 +9,6 @@ import BrochueApi from "../../api-services/brochure-api.service";
9
9
  type MenuItem = Required<MenuProps>['items'][number];
10
10
 
11
11
 
12
- const items: MenuItem[] = [
13
- {
14
- key: 'app',
15
- label: <Link to="/app"> Home </Link>
16
- },
17
- {
18
- key: 'about-us',
19
- label: <Link to="/app/about-us"> About Us </Link>
20
- },
21
- {
22
- key: 'countries',
23
- label: <Link to="/app/countries"> Countries </Link>
24
- },
25
- {
26
- key: 'blog',
27
- label: <Link to="/app/blog"> Blog </Link>
28
- },
29
- {
30
- key: 'logo',
31
- label: <img src="/iceholidays-assets/images/logo.png" className="logo logo_desktop"/>,
32
- disabled: true
33
- },
34
- {
35
- key: 'contact-agents',
36
- label: <Link to="/app/contact-agents"> Contact Agents </Link>
37
- },
38
- {
39
- key: 'contact-us',
40
- label: <Link to="/app/contact-us"> Contact Us </Link>
41
- },
42
- ]
43
-
44
-
45
12
  function withLocation(Component) {
46
13
  return props => <Component {...props} location={useLocation()} />;
47
14
  }
@@ -49,6 +16,45 @@ function withLocation(Component) {
49
16
  class MainHeader extends React.Component <{location}> {
50
17
  brochureApi = new BrochueApi;
51
18
 
19
+
20
+
21
+ items: MenuItem[] = [
22
+ {
23
+ key: 'app',
24
+ label: <Link to="/app"> Home </Link>
25
+ },
26
+ {
27
+ key: 'about-us',
28
+ label: <Link to="/app/about-us"> About Us </Link>
29
+ },
30
+ {
31
+ key: 'countries',
32
+ label: <Link to="/app/countries"> Countries </Link>
33
+ },
34
+ {
35
+ key: 'blog',
36
+ label: <Link to="/app/blog"> Blog </Link>
37
+ },
38
+ {
39
+ key: 'logo',
40
+ label: <img src="/iceholidays-assets/images/logo.png" className="logo logo_desktop"/>,
41
+ disabled: true
42
+ },
43
+ {
44
+ key: 'contact-agents',
45
+ label: <Link to="/app/contact-agents"> Contact Agents </Link>
46
+ },
47
+ {
48
+ key: 'contact-us',
49
+ label: <Link to="/app/contact-us"> Contact Us </Link>
50
+ },
51
+ {
52
+ key: 'brochure',
53
+ label: <Button onClick={()=>this.downloadBrochure()} className="get-brochure" id="get-brochure-menu" type="primary"><Icon path={mdiFileDownload} size="18px" /> get brochure</Button>,
54
+ disabled: true
55
+ },
56
+ ]
57
+
52
58
  state = {
53
59
  open: false,
54
60
  current: "",
@@ -64,7 +70,7 @@ class MainHeader extends React.Component <{location}> {
64
70
  }
65
71
 
66
72
 
67
- downloadBrochure = () => {
73
+ downloadBrochure() {
68
74
  this.brochureApi.getBrochure()
69
75
  .then((brochureUrl:any) => {
70
76
  // const blob = brochureUrl.blob();
@@ -107,12 +113,12 @@ class MainHeader extends React.Component <{location}> {
107
113
  const {open, current } = this.state;
108
114
  return (
109
115
  <div id="main-header">
110
- <Menu mode="horizontal" items={items} onClick={this.onClick} selectedKeys={[current]} className="nav-menu"/>
116
+ <Menu mode="horizontal" items={this.items} onClick={this.onClick} selectedKeys={[current]} className="nav-menu"/>
111
117
 
112
118
  <a href="/app"><img src="/iceholidays-assets/images/logo_mobile.png" className="logo logo_mobile"/></a>
113
119
 
114
120
  <div id="nav-buttons">
115
- <Button onClick={this.downloadBrochure} id="get-brochure" type="primary"><Icon path={mdiFileDownload} size="18px" /> get brochure</Button>
121
+ <Button onClick={()=>this.downloadBrochure()} className="get-brochure" id="get-brochure-mobile" type="primary"><Icon path={mdiFileDownload} size="18px" /> get brochure</Button>
116
122
 
117
123
  <Button id="toggle-menu" type="primary" onClick={()=>this.showDrawer()}>
118
124
  <Icon path={mdiMenu} size="25px" />
@@ -120,7 +126,7 @@ class MainHeader extends React.Component <{location}> {
120
126
  </div>
121
127
 
122
128
  <Drawer title={null} onClose={()=>this.onClose()} open={open} id="nav-drawer">
123
- <Menu items={items} onClick={this.onClick} selectedKeys={[current]} className="nav-menu_mobile"/>
129
+ <Menu items={this.items} onClick={this.onClick} selectedKeys={[current]} className="nav-menu_mobile"/>
124
130
  </Drawer>
125
131
  </div>
126
132
  )
@@ -44,7 +44,13 @@ export default class ContactUsPage extends React.Component {
44
44
  }
45
45
 
46
46
  submitForm(formValues) {
47
- console.log(formValues)
47
+ this.api.contactInquiry(formValues)
48
+ .then(_ => {
49
+ notification.success({message: "Inquiry sent."})
50
+ })
51
+ .catch(error => {
52
+ notification.error({ message: 'An error occured while sending inquiry.'});
53
+ });
48
54
  }
49
55
 
50
56
  render(){
@@ -67,24 +73,24 @@ export default class ContactUsPage extends React.Component {
67
73
  validateMessages={validateMessages}
68
74
  onFinish={(formValues)=>this.submitForm(formValues)}
69
75
  >
70
- <Form.Item label="Enter Name" name="name">
76
+ <Form.Item label="Enter Name" name="name" required>
71
77
  <Input placeholder="Enter Here" />
72
78
  </Form.Item>
73
79
 
74
80
  <Row gutter={20}>
75
81
  <Col span={12}>
76
- <Form.Item label="Enter Email" name="email" rules={[{ type: 'email' }]}>
82
+ <Form.Item label="Enter Email" name="email" rules={[{ type: 'email' }]} required>
77
83
  <Input placeholder="Enter Here" />
78
84
  </Form.Item>
79
85
  </Col>
80
86
  <Col span={12}>
81
- <Form.Item label="Enter Phone Number" name="phoneNumber">
87
+ <Form.Item label="Enter Phone Number" name="phone" required>
82
88
  <Input placeholder="Enter Here" />
83
89
  </Form.Item>
84
90
  </Col>
85
91
  </Row>
86
92
 
87
- <Form.Item label="Select State" name="state">
93
+ <Form.Item label="Select State" name="state" required>
88
94
  <Select
89
95
  placeholder="Please Select"
90
96
  options={this.state?.states}
@@ -99,7 +105,7 @@ export default class ContactUsPage extends React.Component {
99
105
  <Input placeholder="Enter Here" />
100
106
  </Form.Item>
101
107
 
102
- <Form.Item label="Write your message" name="message">
108
+ <Form.Item label="Write your message" name="message" required>
103
109
  <TextArea rows={4} placeholder="Write Here"/>
104
110
  </Form.Item>
105
111
 
@@ -1,5 +1,5 @@
1
1
  module Iceholidays
2
2
  module Frontend
3
- VERSION = "0.10.0"
3
+ VERSION = "0.11.0"
4
4
  end
5
5
  end
@@ -339,11 +339,13 @@ a {
339
339
  color: rgba(0, 0, 0, 0.5019607843);
340
340
  }
341
341
 
342
- .ant-menu-light.ant-menu-horizontal > .ant-menu-item:hover::after, .ant-menu-light.ant-menu-horizontal > .ant-menu-item-selected::after, .ant-menu-light.ant-menu-horizontal > .ant-menu-item-active::after {
343
- display: none;
342
+ .ant-menu-light.ant-menu-horizontal > .ant-menu-item:hover::after, .ant-menu-light.ant-menu-horizontal > .ant-menu-item-selected::after, .ant-menu-light.ant-menu-horizontal > .ant-menu-item-active::after, .ant-menu-light.ant-menu-horizontal > .ant-menu-submenu-open::after, .ant-menu-light.ant-menu-horizontal > .ant-menu-submenu-selected::after, .ant-menu-light.ant-menu-horizontal > .ant-menu-submenu-active::after {
343
+ display: none !important;
344
344
  }
345
345
  .ant-menu-light .ant-menu-item-selected {
346
- background-color: transparent;
346
+ background-color: transparent !important;
347
+ color: unset !important;
348
+ text-transform: uppercase;
347
349
  }
348
350
 
349
351
  .slick-track {
@@ -356,7 +358,6 @@ a {
356
358
  height: 50px;
357
359
  width: 100%;
358
360
  background: linear-gradient(241.37deg, #D1AC6E -108.33%, #D1AC6E -14.72%, #F9E298 -2.73%, #B68B31 108.18%);
359
- padding-inline-end: 25px;
360
361
  display: inline-flex;
361
362
  justify-content: space-between;
362
363
  align-items: center;
@@ -386,7 +387,8 @@ a {
386
387
  #main-header .logo.logo_mobile {
387
388
  padding-top: 25px;
388
389
  }
389
- #main-header #get-brochure {
390
+
391
+ .get-brochure {
390
392
  width: 152px;
391
393
  height: var(--button-height);
392
394
  padding: 7px 8px 7px 8px;
@@ -508,7 +510,8 @@ a {
508
510
  padding: 16px 0;
509
511
  height: 56px;
510
512
  }
511
- #nav-drawer.ant-drawer-content .ant-drawer-body .ant-menu-light .ant-menu-item:has(.logo_desktop) {
513
+ #nav-drawer.ant-drawer-content .ant-drawer-body .ant-menu-light .ant-menu-item:has(.logo_desktop),
514
+ #nav-drawer.ant-drawer-content .ant-drawer-body .ant-menu-light .ant-menu-item:has(.get-brochure) {
512
515
  display: none;
513
516
  }
514
517
  #nav-drawer.ant-drawer-content .ant-drawer-body .nav-menu_mobile a {
@@ -529,23 +532,26 @@ a {
529
532
  white-space: nowrap;
530
533
  }
531
534
  }
532
- @media only screen and (min-width: 768px) {
535
+ @media only screen and (min-width: 769px) {
533
536
  #main-header #toggle-menu {
534
537
  display: none;
535
538
  }
539
+ #main-header #get-brochure-mobile {
540
+ display: none;
541
+ }
536
542
  #main-header .nav-menu {
537
543
  display: flex;
538
544
  flex: 1;
539
545
  background: transparent;
540
546
  height: 100%;
541
547
  justify-content: center;
542
- margin-inline-start: 80px;
548
+ min-width: 100%;
543
549
  }
544
550
  #main-header .nav-menu a {
545
551
  color: white;
546
552
  text-transform: uppercase;
547
553
  font-family: Poppins, san-serif;
548
- font-size: 16px;
554
+ font-size: 14px;
549
555
  font-weight: 500;
550
556
  line-height: 24px;
551
557
  letter-spacing: 0.05em;
@@ -559,9 +565,16 @@ a {
559
565
  }
560
566
  #main-header .nav-menu .ant-menu-item:has(.logo) {
561
567
  padding: 0;
568
+ order: 1 !important;
569
+ padding-inline-start: 20px;
570
+ }
571
+ #main-header .nav-menu .ant-menu-item:has(.get-brochure) .ant-menu-title-content {
572
+ height: 100%;
573
+ display: flex;
574
+ align-items: center;
562
575
  }
563
576
  #main-header .logo {
564
- width: 304px;
577
+ width: 295px;
565
578
  }
566
579
  #main-header .logo.logo_mobile {
567
580
  display: none;
@@ -600,6 +613,34 @@ a {
600
613
  align-items: center;
601
614
  }
602
615
  }
616
+ @media only screen and (min-width: 899px) {
617
+ #main-header .nav-menu .ant-menu-item:has(.logo) {
618
+ order: 2 !important;
619
+ padding-inline-start: 0;
620
+ }
621
+ }
622
+ @media only screen and (min-width: 1008px) {
623
+ #main-header .nav-menu .ant-menu-item:has(.logo) {
624
+ order: 3 !important;
625
+ }
626
+ }
627
+ @media only screen and (min-width: 1300px) {
628
+ #main-header .nav-menu {
629
+ padding-inline-start: 80px;
630
+ }
631
+ #main-header .nav-menu a {
632
+ font-size: 16px;
633
+ }
634
+ #main-header .logo {
635
+ width: 304px;
636
+ }
637
+ #main-header .logo.logo_mobile {
638
+ display: none;
639
+ }
640
+ #main-header .logo.logo_desktop {
641
+ display: block;
642
+ }
643
+ }
603
644
  #headline {
604
645
  --side-padding: 20px;
605
646
  }