@gudhub/ssg-web-components-library 1.0.1 → 1.0.2

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.
Files changed (91) hide show
  1. package/package.json +1 -1
  2. package/src/components/about-us-banner/about-us-banner-data.json +14 -2
  3. package/src/components/about-us-banner/about-us-banner.scss +1 -1
  4. package/src/components/about-us-image-counter/about-us-image-counter-data.json +9 -5
  5. package/src/components/about-us-image-counter/about-us-image-counter.scss +1 -1
  6. package/src/components/about-us-team-members/about-us-team-members-data.json +9 -9
  7. package/src/components/about-us-team-members/about-us-team-members.scss +1 -1
  8. package/src/components/animation-block/animation-block-data.json +48 -17
  9. package/src/components/animation-block/animation-block.html +1 -1
  10. package/src/components/animation-block/animation-block.js +2 -0
  11. package/src/components/animation-block/animation-block.scss +9 -6
  12. package/src/components/animation-block/config.js +1 -1
  13. package/src/components/banner-and-text/banner-and-text-data.json +1 -1
  14. package/src/components/banner-and-text/banner-and-text.html +1 -1
  15. package/src/components/banner-and-text/banner-and-text.js +2 -0
  16. package/src/components/banner-and-text/banner-and-text.scss +1 -1
  17. package/src/components/button-component/button-component.js +6 -6
  18. package/src/components/button-component/button-component.readme.md +4 -3
  19. package/src/components/counter-section/counter-section-data.json +5 -1
  20. package/src/components/counter-section/counter-section.scss +1 -1
  21. package/src/components/counter-section-with-text/counter-section-with-text-data.json +5 -1
  22. package/src/components/counter-section-with-text/counter-section-with-text.scss +1 -1
  23. package/src/components/crm-services-banner/crm-services-banner-data.json +13 -5
  24. package/src/components/crm-services-banner/crm-services-banner.scss +1 -1
  25. package/src/components/fullscreen-image-and-text/fullscreen-image-and-text-data.json +42 -0
  26. package/src/components/fullscreen-image-and-text/fullscreen-image-and-text.html +5 -5
  27. package/src/components/fullscreen-image-and-text/fullscreen-image-and-text.js +2 -0
  28. package/src/components/fullscreen-image-and-text/fullscreen-image-and-text.readme.md +40 -0
  29. package/src/components/fullscreen-image-and-text/fullscreen-image-and-text.scss +8 -4
  30. package/src/components/get-in-touch-block/config.js +1 -1
  31. package/src/components/get-in-touch-block/get-in-touch-block.html +1 -1
  32. package/src/components/get-in-touch-block/get-in-touch-block.scss +1 -0
  33. package/src/components/get-in-touch-form/get-in-touch-form.html +15 -2
  34. package/src/components/get-in-touch-form/get-in-touch-form.js +13 -2
  35. package/src/components/get-in-touch-form/get-in-touch-form.readme.md +2 -2
  36. package/src/components/get-in-touch-form/get-in-touch-form.scss +107 -18
  37. package/src/components/get-in-touch-form/sendEmail.js +35 -44
  38. package/src/components/grid/grid.scss +2 -2
  39. package/src/components/grid-component/grid-component-data.json +29 -13
  40. package/src/components/grid-component/grid-component.html +7 -8
  41. package/src/components/grid-component/grid-component.js +22 -5
  42. package/src/components/grid-component/grid-component.scss +7 -7
  43. package/src/components/homepage-banner/homepage-banner.scss +1 -1
  44. package/src/components/image-component/image-component-placeholder.html +1 -0
  45. package/src/components/image-component/image-component.js +36 -31
  46. package/src/components/list-text-and-media/list-text-and-media-data.json +20 -12
  47. package/src/components/list-text-and-media/list-text-and-media.html +18 -11
  48. package/src/components/list-text-and-media/list-text-and-media.js +32 -0
  49. package/src/components/list-text-and-media/list-text-and-media.readme.md +15 -5
  50. package/src/components/list-text-and-media/list-text-and-media.scss +43 -12
  51. package/src/components/media-and-accordion/media-and-accordion-data.json +6 -6
  52. package/src/components/media-and-accordion/media-and-accordion.html +12 -5
  53. package/src/components/media-and-accordion/media-and-accordion.js +9 -0
  54. package/src/components/media-and-accordion/media-and-accordion.readme.md +32 -0
  55. package/src/components/media-and-accordion/media-and-accordion.scss +12 -6
  56. package/src/components/media-and-list-of-text/media-and-list-of-text-data.json +6 -2
  57. package/src/components/media-and-list-of-text/media-and-list-of-text.html +2 -2
  58. package/src/components/media-and-list-of-text/media-and-list-of-text.readme.md +7 -2
  59. package/src/components/media-and-list-of-text/media-and-list-of-text.scss +2 -2
  60. package/src/components/media-and-text/media-and-text-data.json +20 -18
  61. package/src/components/media-and-text/media-and-text.readme.md +32 -0
  62. package/src/components/media-and-text/media-and-text.scss +1 -1
  63. package/src/components/overflow-cards/overflow-cards-data.json +3 -3
  64. package/src/components/overflow-cards/overflow-cards.scss +1 -1
  65. package/src/components/prices-cards/prices-cards-data.json +15 -13
  66. package/src/components/prices-cards/prices-cards.readme.md +10 -5
  67. package/src/components/prices-cards/prices-cards.scss +5 -5
  68. package/src/components/recent-posts/recent-posts.scss +1 -1
  69. package/src/components/reviews-slider/reviews-slider.scss +5 -5
  70. package/src/components/service-counter/service-counter.scss +1 -1
  71. package/src/components/service-image-counter/service-image-counter-data.json +10 -6
  72. package/src/components/service-image-counter/service-image-counter.html +1 -1
  73. package/src/components/service-image-counter/service-image-counter.js +3 -0
  74. package/src/components/service-image-counter/service-image-counter.scss +3 -3
  75. package/src/components/svgPlaceholder.js +2 -0
  76. package/src/components/tabs/tabs.scss +1 -1
  77. package/src/config.js +0 -3
  78. package/src/generate-articles-and-comments-object.js +272 -0
  79. package/src/components/contact-us-block/config.js +0 -5
  80. package/src/components/contact-us-block/contact-us-block.html +0 -41
  81. package/src/components/contact-us-block/contact-us-block.js +0 -22
  82. package/src/components/contact-us-block/contact-us-block.scss +0 -59
  83. package/src/components/footer/config.js +0 -5
  84. package/src/components/footer/footer.html +0 -74
  85. package/src/components/footer/footer.js +0 -21
  86. package/src/components/footer/footer.scss +0 -356
  87. package/src/components/footer/pages-object.json +0 -58
  88. package/src/components/header/config.js +0 -5
  89. package/src/components/header/header.html +0 -60
  90. package/src/components/header/header.js +0 -55
  91. package/src/components/header/header.scss +0 -556
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gudhub/ssg-web-components-library",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -1,8 +1,20 @@
1
1
  {
2
2
  "title": "Title",
3
- "subtitle": "Subtitle",
3
+ "subtitle": "subtitle Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
4
+ "buttons": {
5
+ "primary": {
6
+ "popupId": "form",
7
+ "placement": "about-us-banner",
8
+ "text": "Primary"
9
+ },
10
+ "secondary": {
11
+ "popupId": "form",
12
+ "placement": "about-us-banner",
13
+ "text": "Secondary"
14
+ }
15
+ },
4
16
  "image": {
5
- "src": "/assets/images/banner-image.png",
17
+ "src": "",
6
18
  "alt": "image alt",
7
19
  "title": "image title"
8
20
  }
@@ -1,5 +1,5 @@
1
1
  about-us-banner {
2
- background-color: var(--primary-bg-color);
2
+ background-color: var(--bg-color);
3
3
  display: block;
4
4
  .subtitle {
5
5
  margin-bottom: 40px;
@@ -1,32 +1,36 @@
1
1
  {
2
2
  "title": "Title",
3
3
  "subtitle": "Etiam sed ullamcorper tortor, sit amet dictum est. Ut posuere dolor sodales euismod feugiat",
4
- "button_text": "Тестувати безкоштовно",
4
+ "button": {
5
+ "popupId": "form",
6
+ "placement": "about-us-image-counter",
7
+ "text": "Button Text"
8
+ },
5
9
  "items": [
6
10
  {
7
11
  "icon": {
8
- "src": "/assets/images/lowes.png",
12
+ "src": "",
9
13
  "alt": "Image alt",
10
14
  "title": "image title"
11
15
  }
12
16
  },
13
17
  {
14
18
  "icon": {
15
- "src": "/assets/images/formica.png",
19
+ "src": "",
16
20
  "alt": "Tristique senectus",
17
21
  "title": "Tristique senectus"
18
22
  }
19
23
  },
20
24
  {
21
25
  "icon": {
22
- "src": "/assets/images/master-brand.png",
26
+ "src": "",
23
27
  "alt": "Donec lacinia orci",
24
28
  "title": "Donec lacinia orci"
25
29
  }
26
30
  },
27
31
  {
28
32
  "icon": {
29
- "src": "/assets/images/lg.png",
33
+ "src": "",
30
34
  "alt": "Suspendisse",
31
35
  "title": "Suspendisse"
32
36
  }
@@ -1,6 +1,6 @@
1
1
  about-us-image-counter {
2
2
  --column-grid-gap: 10px;
3
- background-color: var(--primary-bg-color);
3
+ background-color: var(--bg-color);
4
4
  .container {
5
5
  display: flex;
6
6
  flex-direction: column;
@@ -8,7 +8,7 @@
8
8
  "items": [
9
9
  {
10
10
  "image": {
11
- "src": "/assets/images/placeholder392x324.png",
11
+ "src": "",
12
12
  "alt": "image alt",
13
13
  "title": "image title"
14
14
  },
@@ -17,7 +17,7 @@
17
17
  },
18
18
  {
19
19
  "image": {
20
- "src": "/assets/images/placeholder392x324.png",
20
+ "src": "",
21
21
  "alt": "image alt",
22
22
  "title": "image title"
23
23
  },
@@ -26,7 +26,7 @@
26
26
  },
27
27
  {
28
28
  "image": {
29
- "src": "/assets/images/placeholder392x324.png",
29
+ "src": "",
30
30
  "alt": "image alt",
31
31
  "title": "image title"
32
32
  },
@@ -35,7 +35,7 @@
35
35
  },
36
36
  {
37
37
  "image": {
38
- "src": "/assets/images/placeholder392x324.png",
38
+ "src": "",
39
39
  "alt": "image alt",
40
40
  "title": "image title"
41
41
  },
@@ -44,7 +44,7 @@
44
44
  },
45
45
  {
46
46
  "image": {
47
- "src": "/assets/images/placeholder392x324.png",
47
+ "src": "",
48
48
  "alt": "image alt",
49
49
  "title": "image title"
50
50
  },
@@ -53,7 +53,7 @@
53
53
  },
54
54
  {
55
55
  "image": {
56
- "src": "/assets/images/placeholder392x324.png",
56
+ "src": "",
57
57
  "alt": "image alt",
58
58
  "title": "image title"
59
59
  },
@@ -68,7 +68,7 @@
68
68
  "items": [
69
69
  {
70
70
  "image": {
71
- "src": "/assets/images/placeholder392x324.png",
71
+ "src": "",
72
72
  "alt": "image alt",
73
73
  "title": "image title"
74
74
  },
@@ -77,7 +77,7 @@
77
77
  },
78
78
  {
79
79
  "image": {
80
- "src": "/assets/images/placeholder392x324.png",
80
+ "src": "",
81
81
  "alt": "image alt",
82
82
  "title": "image title"
83
83
  },
@@ -86,7 +86,7 @@
86
86
  },
87
87
  {
88
88
  "image": {
89
- "src": "/assets/images/placeholder392x324.png",
89
+ "src": "",
90
90
  "alt": "image alt",
91
91
  "title": "image title"
92
92
  },
@@ -1,5 +1,5 @@
1
1
  about-us-team-members {
2
- background-color: var(--primary-bg-color);
2
+ background-color: var(--bg-color);
3
3
  --items-in-row: 3;
4
4
  --col-gap: 20px;
5
5
  --row-gap: 50px;
@@ -1,38 +1,69 @@
1
1
  {
2
2
  "title": "Інтеграції CRM для Бізнесу",
3
3
  "subtitle": "Поєднайте інструменти, якими ви користуєтеся разом з вашим бізнесом для максимальної продуктивності та ефективності компанії.",
4
- "buttons": [
5
- {
6
- "class": "btn",
4
+ "buttons": {
5
+ "primary": {
6
+ "popupId": "form",
7
+ "placement": "integrations",
7
8
  "text": "Спробувати CRM"
8
9
  },
9
- {
10
- "class": "btn empty",
10
+ "secondary": {
11
+ "popupId": "form",
12
+ "placement": "integrations",
11
13
  "text": "Більше Інтеграцій"
12
14
  }
13
- ],
15
+ },
14
16
  "rows": [
15
17
  {
16
18
  "row": [
17
19
  {
18
- "src": "/assets/images/slack.jpg",
20
+ "image": {
21
+ "src": "",
22
+ "title": "Facebook - іконка",
23
+ "alt": "Facebook"
24
+ },
25
+ "title": "Facebook",
26
+ "subtitle": "Комунікації"
27
+ },
28
+ {
29
+ "image": {
30
+ "src": "",
31
+ "title": "Slack - іконка",
32
+ "alt": "Slack"
33
+ },
19
34
  "title": "Slack",
20
- "alt": "Slack"
35
+ "subtitle": "Комунікації"
21
36
  },
22
37
  {
23
- "src": "/assets/images/telegram.jpg",
38
+ "image": {
39
+ "src": "",
40
+ "title": "Telegram - іконка",
41
+ "alt": "Telegram"
42
+ },
24
43
  "title": "Telegram",
25
- "alt": "Telegram"
26
- },
44
+ "subtitle": "Комунікації"
45
+ }
46
+ ]
47
+ },
48
+ {
49
+ "row": [
27
50
  {
28
- "src": "/assets/images/slack.jpg",
29
- "title": "Slack",
30
- "alt": "Slack"
51
+ "image": {
52
+ "src": "",
53
+ "title": "Turbo-sms - іконка",
54
+ "alt": "Turbo-sms"
55
+ },
56
+ "title": "Turbo-sms",
57
+ "subtitle": "Комунікації"
31
58
  },
32
59
  {
33
- "src": "/assets/images/telegram.jpg",
34
- "title": "Telegram",
35
- "alt": "Telegram"
60
+ "image": {
61
+ "src": "",
62
+ "title": "Viber - іконка",
63
+ "alt": "Viber"
64
+ },
65
+ "title": "Viber",
66
+ "subtitle": "Комунікації"
36
67
  }
37
68
  ]
38
69
  }
@@ -12,7 +12,7 @@
12
12
  return acc + `
13
13
  <div class="item">
14
14
  <div class="icon-wrapper">
15
- <img src="${row_item.image.src}" alt="${row_item.image.alt}" title="${row_item.image.title}">
15
+ <img src="${row_item.image.src ? row_item.image.src : svgPlaceholder}" alt="${row_item.image.alt}" title="${row_item.image.title}" height="40">
16
16
  </div>
17
17
  <div class="item-text">
18
18
  <div class="bold" gh-id="${ghId}.rows.${rowIndex}.row.${index}.title"></div>
@@ -1,6 +1,7 @@
1
1
  import html from './animation-block.html';
2
2
  import './animation-block.scss';
3
3
  import jsonTemplate from './animation-block-data.json';
4
+ import svgPlaceholder from '../svgPlaceholder.js';
4
5
  class AnimationBlock extends GHComponent {
5
6
  constructor() {
6
7
  super();
@@ -8,6 +9,7 @@ class AnimationBlock extends GHComponent {
8
9
  }
9
10
 
10
11
  async onServerRender() {
12
+ this.svgPlaceholder = svgPlaceholder;
11
13
  this.ghId = this.getAttribute('data-gh-id') || null;
12
14
 
13
15
 
@@ -1,5 +1,5 @@
1
1
  animation-block {
2
- background: var(--primary-bg-color);
2
+ background: var(--bg-color);
3
3
  h1 {
4
4
  text-align: center;
5
5
  }
@@ -21,8 +21,8 @@ animation-block {
21
21
  left: 0;
22
22
  width: 20px;
23
23
  height: 100%;
24
- background: var(--primary-bg-color);
25
- background: linear-gradient(90deg, var(--primary-bg-color) 0%, rgba(0,212,255,0) 100%);
24
+ background: var(--bg-color);
25
+ background: linear-gradient(90deg, var(--bg-color) 0%, rgba(0,212,255,0) 100%);
26
26
  z-index: 1;
27
27
  }
28
28
  &::after {
@@ -33,8 +33,8 @@ animation-block {
33
33
  right: 0;
34
34
  width: 20px;
35
35
  height: 100%;
36
- background: var(--primary-bg-color);
37
- background: linear-gradient(-90deg, var(--primary-bg-color) 0%, rgba(0,212,255,0) 100%);
36
+ background: var(--bg-color);
37
+ background: linear-gradient(-90deg, var(--bg-color) 0%, rgba(0,212,255,0) 100%);
38
38
  }
39
39
  }
40
40
  .row {
@@ -60,7 +60,7 @@ animation-block {
60
60
  justify-content: center;
61
61
  align-items: center;
62
62
  gap: 10px;
63
- width: 230px;
63
+ min-width: 230px;
64
64
  height: 66px;
65
65
  padding: 10px 15px;
66
66
  border-radius: 10px;
@@ -69,6 +69,9 @@ animation-block {
69
69
  display: flex;
70
70
  justify-content: center;
71
71
  align-items: center;
72
+ img {
73
+ height: 40px;
74
+ }
72
75
  }
73
76
  .item-text {
74
77
  display: flex;
@@ -1,5 +1,5 @@
1
1
  export const animationBlock = {
2
2
  tag: 'animation-block',
3
- src: '@gudhub/ssg-web-component-library/src/components/animation-block/animation-block.js',
3
+ src: '@gudhub/ssg-web-components-library/src/components/animation-block/animation-block.js',
4
4
  serverOnly: false
5
5
  }
@@ -17,7 +17,7 @@
17
17
  }
18
18
  ],
19
19
  "image": {
20
- "src": "/assets/images/icons/megaphone.png",
20
+ "src": "",
21
21
  "alt": "image alt",
22
22
  "title": "image title"
23
23
  }
@@ -7,7 +7,7 @@
7
7
  <div class="flex-wrapper">
8
8
  <div class="left">
9
9
  <div class="image">
10
- <img src="${image.src}" alt="${image.alt}" title="${image.title}">
10
+ <img src="${image.src ? image.src : svgPlaceholder}" alt="${image.alt}" title="${image.title}">
11
11
  </div>
12
12
  <div class="offer" gh-id="${ghId}.offer"></div>
13
13
  <div class="offer_subtitle" gh-id="${ghId}.offer_subtitle"></div>
@@ -1,6 +1,7 @@
1
1
  import html from './banner-and-text.html';
2
2
  import './banner-and-text.scss';
3
3
  import jsonTemplate from './banner-and-text-data.json';
4
+ import svgPlaceholder from '../svgPlaceholder.js';
4
5
 
5
6
  class BannerAndText extends GHComponent {
6
7
  constructor() {
@@ -10,6 +11,7 @@ class BannerAndText extends GHComponent {
10
11
  }
11
12
 
12
13
  async onServerRender() {
14
+ this.svgPlaceholder = svgPlaceholder;
13
15
  this.ghId = this.getAttribute('data-gh-id') || null;
14
16
  this.chapter = this.getAttribute('data-chapter') || 'pages';
15
17
 
@@ -1,5 +1,5 @@
1
1
  banner-and-text {
2
- background-color: var(--primary-bg-color);
2
+ background-color: var(--bg-color);
3
3
  .flex-wrapper {
4
4
  gap: 25px;
5
5
  align-items: center;
@@ -7,14 +7,14 @@ class ButtonComponent extends GHComponent {
7
7
  super();
8
8
  this.popupId = this.hasAttribute('data-popup-id') ? this.getAttribute('data-popup-id') : null;
9
9
  this.placement = this.hasAttribute('data-placement') ? this.getAttribute('data-placement') : 'no-placement-attribute';
10
- this.href = this.hasAttribute('href') ? this.getAttribute('href') : null;
11
- this.tag = !this.popupId && this.href ? `a href="${this.href}"` : 'div onclick="openPopup()"';
10
+ this.link = this.hasAttribute('data-link') ? this.getAttribute('data-link') : null;
11
+ this.tag = this.link && !this.popupId ? `a href="${this.link}"` : 'div onclick="openPopup()"';
12
12
  }
13
13
 
14
14
  async onServerRender() {
15
15
  this.text = this.textContent != '' ? this.textContent : 'Замовити консультацію';
16
- if (this.href) {
17
- this.removeHref();
16
+ if (this.link) {
17
+ this.removeLink();
18
18
  }
19
19
 
20
20
  this.className = this.hasAttribute('class') ? this.getAttribute('class') : 'btn';
@@ -32,8 +32,8 @@ class ButtonComponent extends GHComponent {
32
32
  }));
33
33
  }
34
34
 
35
- removeHref() {
36
- this.removeAttribute('href');
35
+ removeLink() {
36
+ this.removeAttribute('link');
37
37
  }
38
38
  }
39
39
  window.customElements.define('button-component', ButtonComponent);
@@ -1,11 +1,12 @@
1
+ # How to customize
2
+ In json that used by component must be object "button", it can have 2 types: popup opener or redirect to link (be like a common <a> tag), it defines by "popupId"+"placement" or "link". Also you must write "text" property that will be displayed in button.
3
+
1
4
  # Button text
2
5
  Button text defines in component innerText: <button-component>button text</button-component>
3
6
 
4
- #
5
-
6
7
  # Data-attributes
7
8
  data-popup-id="popup-id": button will open popup, and "popup-id" determines which popup will be opened
8
9
 
9
10
  href: button will be with tag <a> and open link from href attribute of component
10
11
 
11
- data-placement: value of this attribute will be in event details (for example it used in form to track which button user clicked)
12
+ data-placement: value of this attribute will be in event details (for example it used in form to track which button user clicked)
@@ -1,7 +1,11 @@
1
1
  {
2
2
  "title": "Title",
3
3
  "subtitle": "Subtitle",
4
- "button_text": "button_text",
4
+ "button": {
5
+ "popupId": "form",
6
+ "placement": "counter-section",
7
+ "text": "Button Text"
8
+ },
5
9
  "items": [
6
10
  {
7
11
  "number": "98",
@@ -1,5 +1,5 @@
1
1
  counter-section {
2
- background-color: var(--secondary-bg-color);
2
+ background-color: var(--bg-color);
3
3
  .service_counter {
4
4
  .container {
5
5
  display: flex;
@@ -1,7 +1,11 @@
1
1
  {
2
2
  "title": "Title",
3
3
  "subtitle": "subtitle Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
4
- "button_text": "Спробувати Безкоштовно",
4
+ "button": {
5
+ "popupId": "form",
6
+ "placement": "counter-section-with-text",
7
+ "text": "Button Text"
8
+ },
5
9
  "items": [
6
10
  {
7
11
  "number": "98",
@@ -1,7 +1,7 @@
1
1
  counter-section-with-text {
2
2
  --col-gap: 20px;
3
3
  --items-in-row: 3;
4
- background-color: var(--secondary-bg-color);
4
+ background-color: var(--bg-color);
5
5
  .service_counter {
6
6
  .container {
7
7
  .flex-wrapper {
@@ -1,9 +1,17 @@
1
1
  {
2
2
  "title": "Title",
3
- "subtitle": "Subtitle",
4
- "button": {
5
- "link": "/contact-us/",
6
- "text": "Let's Talk!"
3
+ "subtitle": "subtitle Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
4
+ "buttons": {
5
+ "primary": {
6
+ "popupId": "form",
7
+ "placement": "about-us-banner",
8
+ "text": "Primary"
9
+ },
10
+ "secondary": {
11
+ "popupId": "form",
12
+ "placement": "about-us-banner",
13
+ "text": "Secondary"
14
+ }
7
15
  },
8
16
  "list": [
9
17
  "Lorem ipsum dolor sit amet",
@@ -13,7 +21,7 @@
13
21
  "In hac habitasse platea dictumst"
14
22
  ],
15
23
  "image": {
16
- "src": "/assets/images/banner-image.png",
24
+ "src": "",
17
25
  "alt": "image alt",
18
26
  "title": "image title"
19
27
  }
@@ -1,5 +1,5 @@
1
1
  crm-services-banner {
2
- background-color: var(--primary-bg-color);
2
+ background-color: var(--bg-color);
3
3
  display: block;
4
4
  .main-subtitle {
5
5
  margin-bottom: 40px;
@@ -0,0 +1,42 @@
1
+ {
2
+ "title": "Title",
3
+ "button": {
4
+ "popupId": "form",
5
+ "placement": "fullscreen-image-and-text",
6
+ "text": "Button Text"
7
+ },
8
+ "image": {
9
+ "src": "",
10
+ "alt": "Alt",
11
+ "title": "Title"
12
+ },
13
+ "paragraphs": [
14
+ {
15
+ "text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed faucibus fringilla mi1, Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed faucibus fringilla mi1elit. Sed faucibus fringilla mi1, Lorem ipsum dolor sit amet, consectetur adipiscing elit elit. Sed faucibus fringilla mi1, Lorem ipsum dolor sit amet, consectetur adipiscing elit"
16
+ }
17
+ ],
18
+ "lists": [
19
+ {
20
+ "title": "sit amet",
21
+ "list": [
22
+ {
23
+ "li": "ipsum dolor"
24
+ },
25
+ {
26
+ "li": "ipsum dolor"
27
+ }
28
+ ]
29
+ },
30
+ {
31
+ "title": "faucibus fringilla",
32
+ "list": [
33
+ {
34
+ "li": "adipiscing elit"
35
+ },
36
+ {
37
+ "li": "adipiscing elit"
38
+ }
39
+ ]
40
+ }
41
+ ]
42
+ }
@@ -1,5 +1,5 @@
1
- <section class="fullscreen_image_and_text">
2
- <div class="container">
1
+ <section class="fullscreen_image_and_text container">
2
+ <div class="content-container">
3
3
  <h2 gh-id="${ghId}.title"> TITLE </h2>
4
4
  <div class="content">
5
5
  ${
@@ -15,7 +15,7 @@
15
15
  ${ lists.reduce((acc, list, index) => {
16
16
  return acc + `
17
17
  <div class="list">
18
- <h3 gh-id="${ghId}.lists.${index}.title"></h3>
18
+ ${list.title ? `<h3 gh-id="${ghId}.lists.${index}.title"></h3>` : ''}
19
19
  <ul>
20
20
  ${
21
21
  list.list.reduce((acc, li, indexLi) => {
@@ -32,11 +32,11 @@
32
32
  ` : ''
33
33
  }
34
34
  ${ json.button ? `
35
- <a href="${json.button.link}" class="btn" gh-id="${ghId}.button.text"></a>
35
+ <button-component data-link="${json.button.link}" ${json.button.popupId && json.button.placement ? `data-popup-id="${json.button.popupId}" data-placement="${json.button.placement}"` : ''}>${json.button.text}</button-component>
36
36
  ` : ''}
37
37
  </div>
38
38
  </div>
39
39
  <div class="image">
40
- <image-component lazyload src="${image.src}" alt="${image.alt}" title="${image.title}"></image-component>
40
+ <image-component lazyload src="${image.src ? image.src : ''}" alt="${image.alt}" title="${image.title}"></image-component>
41
41
  </div>
42
42
  </section>
@@ -1,5 +1,6 @@
1
1
  import html from './fullscreen-image-and-text.html';
2
2
  import './fullscreen-image-and-text.scss';
3
+ import jsonTemplate from './fullscreen-image-and-text-data.json';
3
4
 
4
5
  class FullscreenImageAndText extends GHComponent {
5
6
  /**
@@ -8,6 +9,7 @@ class FullscreenImageAndText extends GHComponent {
8
9
  */
9
10
  constructor() {
10
11
  super();
12
+ super.setDefaultData(jsonTemplate);
11
13
  }
12
14
 
13
15
  async onServerRender() {