@gudhub/ssg-web-components-library 1.0.9 → 1.0.11

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 (69) hide show
  1. package/package.json +1 -1
  2. package/src/components/about-us-image-counter/about-us-image-counter.scss +4 -0
  3. package/src/components/accordion-only/accordion-only-data.json +30 -0
  4. package/src/components/accordion-only/accordion-only.html +37 -0
  5. package/src/components/accordion-only/accordion-only.js +44 -0
  6. package/src/components/accordion-only/accordion-only.readme.md +32 -0
  7. package/src/components/accordion-only/accordion-only.scss +106 -0
  8. package/src/components/accordion-only/config.js +6 -0
  9. package/src/components/edit-mode/edit-mode.js +4 -0
  10. package/src/components/get-in-touch-form/get-in-touch-form.scss +1 -1
  11. package/src/components/grid-component/grid-component.html +6 -38
  12. package/src/components/grid-component/grid-component.js +6 -19
  13. package/src/components/grid-component/grid-component.scss +5 -138
  14. package/src/components/grid-component/grid-items/config.js +15 -0
  15. package/src/components/grid-component/grid-items/grid-item-default/grid-item-default-data.json +20 -0
  16. package/src/components/grid-component/grid-items/grid-item-default/grid-item-default.html +35 -0
  17. package/src/components/grid-component/grid-items/grid-item-default/grid-item-default.js +54 -0
  18. package/src/components/grid-component/grid-items/grid-item-default/grid-item-default.readme.md +32 -0
  19. package/src/components/grid-component/grid-items/grid-item-default/grid-item-default.scss +141 -0
  20. package/src/components/grid-component/grid-items/grid-item-expandable-vertical/grid-item-expandable-vertical-data.json +4 -0
  21. package/src/components/grid-component/grid-items/grid-item-expandable-vertical/grid-item-expandable-vertical.html +13 -0
  22. package/src/components/grid-component/grid-items/grid-item-expandable-vertical/grid-item-expandable-vertical.js +106 -0
  23. package/src/components/grid-component/grid-items/grid-item-expandable-vertical/grid-item-expandable-vertical.readme.md +32 -0
  24. package/src/components/grid-component/grid-items/grid-item-expandable-vertical/grid-item-expandable-vertical.scss +126 -0
  25. package/src/components/grid-component/grid-items/grid-item-numbered/grid-item-numbered-data.json +4 -0
  26. package/src/components/grid-component/grid-items/grid-item-numbered/grid-item-numbered.html +9 -0
  27. package/src/components/grid-component/grid-items/grid-item-numbered/grid-item-numbered.js +39 -0
  28. package/src/components/grid-component/grid-items/grid-item-numbered/grid-item-numbered.readme.md +32 -0
  29. package/src/components/grid-component/grid-items/grid-item-numbered/grid-item-numbered.scss +43 -0
  30. package/src/components/homepage-banner/homepage-banner-data.json +27 -0
  31. package/src/components/homepage-banner/homepage-banner.js +2 -0
  32. package/src/components/list-text-and-media/list-text-and-media.scss +1 -2
  33. package/src/components/meta/meta-tag.js +1 -1
  34. package/src/config.js +6 -3
  35. package/src/components/blog/article/allArticles.json +0 -96
  36. package/src/components/blog/article/article-component.html +0 -189
  37. package/src/components/blog/article/article-component.js +0 -340
  38. package/src/components/blog/article/article-component.scss +0 -776
  39. package/src/components/blog/article/authors-object.json +0 -125
  40. package/src/components/blog/article/categories-object.json +0 -47
  41. package/src/components/blog/author-page/author-page.html +0 -37
  42. package/src/components/blog/author-page/author-page.js +0 -113
  43. package/src/components/blog/author-page/author-page.json +0 -111
  44. package/src/components/blog/author-page/author-page.scss +0 -107
  45. package/src/components/blog/authors-list/authors-list.html +0 -40
  46. package/src/components/blog/authors-list/authors-list.js +0 -60
  47. package/src/components/blog/authors-list/authors-list.json +0 -132
  48. package/src/components/blog/authors-list/authors-list.scss +0 -171
  49. package/src/components/blog/categories-list/categories-list.html +0 -21
  50. package/src/components/blog/categories-list/categories-list.js +0 -26
  51. package/src/components/blog/categories-list/categories-list.json +0 -53
  52. package/src/components/blog/categories-list/categories-list.scss +0 -125
  53. package/src/components/blog/comments/comments.html +0 -89
  54. package/src/components/blog/comments/comments.js +0 -181
  55. package/src/components/blog/comments/comments.json +0 -130
  56. package/src/components/blog/comments/comments.scss +0 -324
  57. package/src/components/blog/contents/contents.html +0 -14
  58. package/src/components/blog/contents/contents.js +0 -63
  59. package/src/components/blog/contents/contents.scss +0 -157
  60. package/src/components/blog/posts-template/articles.json +0 -139
  61. package/src/components/blog/posts-template/authors-object.json +0 -61
  62. package/src/components/blog/posts-template/categories.json +0 -61
  63. package/src/components/blog/posts-template/posts-template.html +0 -239
  64. package/src/components/blog/posts-template/posts-template.js +0 -532
  65. package/src/components/blog/posts-template/posts-template.scss +0 -566
  66. package/src/components/category-banner/category-banner.html +0 -7
  67. package/src/components/category-banner/category-banner.js +0 -44
  68. package/src/components/category-banner/category-banner.scss +0 -22
  69. package/src/components/category-banner/config.js +0 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gudhub/ssg-web-components-library",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -32,6 +32,10 @@ about-us-image-counter {
32
32
  display: flex;
33
33
  justify-content: center;
34
34
  align-items: center;
35
+
36
+ img {
37
+ height: 100%;
38
+ }
35
39
  }
36
40
  }
37
41
 
@@ -0,0 +1,30 @@
1
+ {
2
+ "title": "accordion-only",
3
+ "subtitle": "subtitle",
4
+ "items": [
5
+ {
6
+ "title": "Expandable-vertical",
7
+ "text": "Be certain that our website development agency will provide only first-rate web-based software and website programming. With constantly advancing progress and great competition in the web development field Quality Assurance (QA) became one of the important traits that clients seek in web development firms, and Atlasiko Inc. enables this feature. We also offer you our testing services to ensure that all developed solutions have functionalities adequate to your initial request. Be certain that our website development agency will provide only first-rate web-based software and website programming. With constantly advancing progress and great competition in the web development field Quality Assurance (QA) became one of the important traits that clients seek in web development firms, and Atlasiko Inc. enables this feature. We also offer you our testing services to ensure that all developed solutions have functionalities adequate to your initial request."
8
+ },
9
+ {
10
+ "title": "Expandable-vertical",
11
+ "text": "Be certain that our website development agency will provide only first-rate web-based software and website programming. With constantly advancing progress and great competition in the web development field Quality Assurance (QA) became one of the important traits that clients seek in web development firms, and Atlasiko Inc. enables this feature. We also offer you our testing services to ensure that all developed solutions have functionalities adequate to your initial request. Be certain that our website development agency will provide only first-rate web-based software and website programming. With constantly advancing progress and great competition in the web development field Quality Assurance (QA) became one of the important traits that clients seek in web development firms, and Atlasiko Inc. enables this feature. We also offer you our testing services to ensure that all developed solutions have functionalities adequate to your initial request."
12
+ },
13
+ {
14
+ "title": "Expandable-vertical",
15
+ "text": "Be certain that our website development agency will provide only first-rate web-based software and website programming. With constantly advancing progress and great competition in the web development field Quality Assurance (QA) became one of the important traits that clients seek in web development firms, and Atlasiko Inc. enables this feature. We also offer you our testing services to ensure that all developed solutions have functionalities adequate to your initial request. Be certain that our website development agency will provide only first-rate web-based software and website programming. With constantly advancing progress and great competition in the web development field Quality Assurance (QA) became one of the important traits that clients seek in web development firms, and Atlasiko Inc. enables this feature. We also offer you our testing services to ensure that all developed solutions have functionalities adequate to your initial request."
16
+ },
17
+ {
18
+ "title": "Expandable-vertical",
19
+ "text": "Be certain that our website development agency will provide only first-rate web-based software and website programming. With constantly advancing progress and great competition in the web development field Quality Assurance (QA) became one of the important traits that clients seek in web development firms, and Atlasiko Inc. enables this feature. We also offer you our testing services to ensure that all developed solutions have functionalities adequate to your initial request. Be certain that our website development agency will provide only first-rate web-based software and website programming. With constantly advancing progress and great competition in the web development field Quality Assurance (QA) became one of the important traits that clients seek in web development firms, and Atlasiko Inc. enables this feature. We also offer you our testing services to ensure that all developed solutions have functionalities adequate to your initial request."
20
+ },
21
+ {
22
+ "title": "Expandable-vertical",
23
+ "text": "Be certain that our website development agency will provide only first-rate web-based software and website programming. With constantly advancing progress and great competition in the web development field Quality Assurance (QA) became one of the important traits that clients seek in web development firms, and Atlasiko Inc. enables this feature. We also offer you our testing services to ensure that all developed solutions have functionalities adequate to your initial request. Be certain that our website development agency will provide only first-rate web-based software and website programming. With constantly advancing progress and great competition in the web development field Quality Assurance (QA) became one of the important traits that clients seek in web development firms, and Atlasiko Inc. enables this feature. We also offer you our testing services to ensure that all developed solutions have functionalities adequate to your initial request."
24
+ },
25
+ {
26
+ "title": "Expandable-vertical",
27
+ "text": "Be certain that our website development agency will provide only first-rate web-based software and website programming. With constantly advancing progress and great competition in the web development field Quality Assurance (QA) became one of the important traits that clients seek in web development firms, and Atlasiko Inc. enables this feature. We also offer you our testing services to ensure that all developed solutions have functionalities adequate to your initial request. Be certain that our website development agency will provide only first-rate web-based software and website programming. With constantly advancing progress and great competition in the web development field Quality Assurance (QA) became one of the important traits that clients seek in web development firms, and Atlasiko Inc. enables this feature. We also offer you our testing services to ensure that all developed solutions have functionalities adequate to your initial request."
28
+ }
29
+ ]
30
+ }
@@ -0,0 +1,37 @@
1
+ <section>
2
+ <div class="container">
3
+ <div class="flex-wrapper">
4
+ ${(() => {
5
+ const halfLength = Math.ceil(json.items.length / 2);
6
+ const firstColumnItems = json.items.slice(0, halfLength);
7
+ const secondColumnItems = json.items.slice(halfLength);
8
+
9
+ const reduceItems = (items) => {
10
+ return items.reduce((acc, item, index) => acc + `
11
+ <div class="primary-block" onclick="toggleExpand()">
12
+ <div class="visible-content">
13
+ ${item.title ? `<h3 class="title" gh-id="${ghId}.items.${index}.title"></h3>` : ''}
14
+ <div class="icon">
15
+ <svg xmlns="http://www.w3.org/2000/svg" width="17" height="17" viewBox="0 0 17 17" fill="none"><path d="M1 8.33333L8.5 14.8148L16 8.33333M8.5 15L8.5 0" stroke="none" stroke-width="2"></path></svg>
16
+ </div>
17
+ </div>
18
+ <div class="expandable-wrapper">
19
+ <div class="content">
20
+ ${item.title ? `<p class="text" gh-id="${ghId}.items.${index}.text"></p>` : ''}
21
+ </div>
22
+ </div>
23
+ </div>
24
+ `, '')
25
+ }
26
+ return `
27
+ <div class="accordion-column">
28
+ ${reduceItems(firstColumnItems)}
29
+ </div>
30
+ <div class="accordion-column">
31
+ ${reduceItems(secondColumnItems)}
32
+ </div>
33
+ `;
34
+ })()}
35
+ </div>
36
+ </div>
37
+ </section>
@@ -0,0 +1,44 @@
1
+ import html from './accordion-only.html';
2
+ import './accordion-only.scss';
3
+ import jsonTemplate from './accordion-only-data.json';
4
+
5
+ class AccordionOnly extends GHComponent {
6
+ constructor() {
7
+ super();
8
+ super.setDefaultData(jsonTemplate);
9
+ this.openedElement;
10
+ }
11
+
12
+ async onServerRender() {
13
+ this.ghId = this.getAttribute('data-gh-id') || null;
14
+ this.json = await super.getGhData(this.ghId);
15
+
16
+ if (this.ghId) {
17
+ super.render(html);
18
+ }
19
+ }
20
+
21
+ onClientReady() {
22
+
23
+ }
24
+
25
+ toggleExpand(element) {
26
+ const isOpening = element.classList.toggle('expand');
27
+ const toggleOverflow = (element, bool) => {
28
+ const action = bool ? 'add' : 'remove';
29
+ element.classList[action]('overflow')
30
+ };
31
+ if (isOpening) {
32
+ setTimeout(() => toggleOverflow(element, true), 0);
33
+ if (this.openedElement && this.openedElement !== element) {
34
+ this.openedElement.classList.remove('expand');
35
+ toggleOverflow(this.openedElement, false);
36
+ }
37
+ this.openedElement = element;
38
+ } else {
39
+ toggleOverflow(element, false);
40
+ }
41
+ }
42
+ }
43
+
44
+ window.customElements.define('accordion-only', AccordionOnly);
@@ -0,0 +1,32 @@
1
+ # Attributes:
2
+
3
+ data-items-in-row=[number]: to calculate item width in flex container;
4
+
5
+ data-items-shadow: to turn on grid_item shadows;
6
+
7
+ data-border-top-on-hover: to add grid_item border top on hover
8
+
9
+
10
+
11
+ # Component data-object:
12
+ ("?" means "unnecessary")
13
+ ```json
14
+ {
15
+ "title?": "string",
16
+ "subtitle?": "string",
17
+ "button_text?": "string",
18
+ "items": [ {
19
+ "title?": "string",
20
+ "link?": "string",
21
+ "letter?": "symbol",
22
+ "marker?": "symbol",
23
+ "icon?": {
24
+ "src": "string",
25
+ "alt": "string",
26
+ "title": "string",
27
+ },
28
+ "text?": "string",
29
+ "list?": ["string"] // in most cases, either text or a list is used
30
+ } ]
31
+ }
32
+ ```
@@ -0,0 +1,106 @@
1
+ accordion-only {
2
+ --hover-transition-duration: .2s;
3
+ --expand-transition-duration: .5s;
4
+ --gap: 20px;
5
+ .flex-wrapper {
6
+ display: flex;
7
+ gap: var(--gap);
8
+ }
9
+ .accordion-column {
10
+ width: calc(50% - (var(--gap) / 2));
11
+ & > *:not(:last-child) {
12
+ margin-bottom: 20px;
13
+ }
14
+ }
15
+ .primary-block {
16
+ width: 100%;
17
+ background: var(--block-primary-bg-color);
18
+ border-radius: var(--block-primary-border-radius);
19
+ box-shadow: var(--block-primary-box-shadow);
20
+ cursor: pointer;
21
+ transition: box-shadow var(--hover-transition-duration) ease;
22
+ &:hover, &.expand {
23
+ box-shadow: 0 3px 18px rgba(18,57,153,.2);
24
+ }
25
+ .visible-content {
26
+ display: flex;
27
+ justify-content: space-between;
28
+ align-items: center;
29
+ padding: 16px;
30
+ .title {
31
+ margin-bottom: 0;
32
+ transition: color var(--hover-transition-duration) ease;
33
+ }
34
+ .icon {
35
+ width: 24px;
36
+ height: 24px;
37
+ display: flex;
38
+ justify-content: center;
39
+ align-items: center;
40
+ svg {
41
+ width: 16px;
42
+ height: auto;
43
+ transition: transform var(--hover-transition-duration) linear;
44
+ path {
45
+ stroke: #000;
46
+ transition: stroke var(--hover-transition-duration) ease;
47
+ }
48
+ }
49
+ }
50
+ }
51
+ .expandable-wrapper {
52
+ max-height: 0;
53
+ display: flex;
54
+ flex-direction: column;
55
+ gap: 12px;
56
+ overflow: hidden;
57
+ transition: max-height var(--expand-transition-duration) ease;
58
+ .content {
59
+ padding: 20px 15px;
60
+ .text {
61
+ font-size: var(--text-font-size);
62
+ font-weight: var(--text-font-weight);
63
+ color: var(--block-primary-text-color);
64
+ line-height: 140%;
65
+ letter-spacing: 0.01em;
66
+ text-align: inherit;
67
+ }
68
+ }
69
+ }
70
+ &.expand {
71
+ .expandable-wrapper {
72
+ max-height: 200px;
73
+ }
74
+ .icon {
75
+ svg {
76
+ transform: rotate(180deg);
77
+ }
78
+ }
79
+ }
80
+ &.overflow {
81
+ .expandable-wrapper {
82
+ overflow: auto;
83
+ }
84
+ }
85
+ &:hover, &.expand {
86
+ .title {
87
+ color: var(--block-primary-accent-color);
88
+ }
89
+ .icon {
90
+ svg {
91
+ path {
92
+ stroke: var(--block-primary-accent-color);
93
+ }
94
+ }
95
+ }
96
+ }
97
+ }
98
+ @media screen and (max-width: 800px) {
99
+ .flex-wrapper {
100
+ flex-direction: column;
101
+ }
102
+ .accordion-column {
103
+ width: 100%;
104
+ }
105
+ }
106
+ }
@@ -0,0 +1,6 @@
1
+
2
+ export const accordionOnly = {
3
+ tag: 'accordion-only',
4
+ src: '@gudhub/ssg-web-components-library/src/components/accordion-only/accordion-only.js',
5
+ serverOnly: false
6
+ }
@@ -40,6 +40,8 @@ class EditMode extends GHComponent {
40
40
  }
41
41
 
42
42
  disableEditors() {
43
+ const body = document.getElementsByTagName('body')[0];
44
+ body.classList.remove('edit-mode-enabled');
43
45
  const elementsToEdit = document.querySelectorAll('[gh-id]');
44
46
  if(elementsToEdit.length) {
45
47
  elementsToEdit.forEach(element => {
@@ -52,6 +54,8 @@ class EditMode extends GHComponent {
52
54
  }
53
55
 
54
56
  initEditors() {
57
+ const body = document.getElementsByTagName('body')[0];
58
+ body.classList.add('edit-mode-enabled');
55
59
  const showLoginPopup = () => this.showLoginPopup();
56
60
  const initGudHub = (auth_key) => this.initGudHub(auth_key);
57
61
  if(!document.querySelector('script[id="tinymce_script"]')) {
@@ -40,7 +40,7 @@ get-in-touch-form {
40
40
  $grid-columns: 12;
41
41
  @for $i from 1 through $grid-columns {
42
42
  .col-#{$i} {
43
- width: percentage($i / $grid-columns);
43
+ width: percentage(calc($i / $grid-columns));
44
44
  }
45
45
  }
46
46
  form {
@@ -3,44 +3,12 @@
3
3
  <h2 gh-id="${ghId}.title"> TITLE </h2>
4
4
  ${json.subtitle ? `<p class="subtitle" gh-id="${ghId}.subtitle">SUBTITLE</p>` : ''}
5
5
  <div class="grid">
6
- ${items.reduce((acc, item, index) => {
7
- return acc + `
8
- <div class="grid_item primary-block ${item.button ? 'clickable bg-hover' : ''}" ${item.button && item.button.popupId ? `data-popup-id="${item.button.popupId}"` : ''}>
9
- ${item.letter ? `<div class="letter">${item.letter}</div>` : ''}
10
- <div class="top">
11
- ${item.marker ? `
12
- <div class="marker">
13
- <span class="marker-symbol">${item.marker}</span>
14
- </div>
15
- ` : ''}
16
- ${item.icon ? `
17
- <div class="icon">
18
- <img src="${item.icon.src ? item.icon.src : svgPlaceholder}" alt="${item.icon.alt}" title="${item.icon.title}" width="80" height="80">
19
- </div>
20
- ` : ''}
21
- ${item.title ? (() => {
22
- const tag = item.button && item.button.link ? `a href="${item.button.link}"` : 'h3';
23
- return `<${tag} class="item-title" gh-id="${ghId}.items.${index}.title">Title</${tag}>`;
24
- })() : ''}
25
- ${item.text ? `<div class="text">${item.text}</div>` : ''}
26
- ${item.list ? `
27
- <ul class="item_list">
28
- ${item.list.reduce((acc, list_item, list_index) => acc + `
29
- <li class="text" gh-id="${ghId}.items.${index}.list.${list_index}"></li>
30
- `, '')}
31
- </ul>
32
- ` : ''}
33
- </div>
34
- ${item.button ? `
35
- <div class="bottom">
36
- <div class="bold_text">
37
- <span class="link" gh-id="${ghId}.items.${index}.button.text"></span>
38
- <svg xmlns="http://www.w3.org/2000/svg" width="20" height="21" viewBox="0 0 20 21" fill="none"><circle cx="10" cy="10.6282" r="10" fill="#0A79FE"/><path d="M8.25 6.62817L12 10.3782L8.25 14.1282" stroke="white"/></svg>
39
- </div>
40
- </div>
41
- ` : ''}
42
- </div>
43
- `}, '')}
6
+ ${items.reduce((acc, item, index) => acc + `
7
+ ${gridItemTag
8
+ ? `<div class="grid-item-wrapper"><${gridItemTag} data-item-index="${index}" data-gh-id="${ghId}"></${gridItemTag}></div>`
9
+ : 'No Grid Item'
10
+ }
11
+ `, '')}
44
12
  </div>
45
13
  ${json.button ? `
46
14
  <div class="bottom_button">
@@ -17,32 +17,19 @@ class GridComponent extends GHComponent {
17
17
 
18
18
  this.items = this.json.items;
19
19
 
20
+ const gridItem = this.children[0];
21
+ if (gridItem) {
22
+ this.gridItemTag = gridItem.tagName.toLowerCase();
23
+ }
24
+
20
25
  if (this.ghId) {
21
26
  super.render(html);
22
27
  }
23
28
  }
24
29
 
25
30
  onClientReady() {
26
- const clickableGridItems = this.getElementsByClassName('grid_item clickable');
27
- for (const el of clickableGridItems) {
28
- el.addEventListener('mouseup', (e) => {
29
- if ("a" !== e.target.tagName.toLowerCase()) {
30
- e.preventDefault();
31
- const item = e.currentTarget.querySelector(".item-title");
32
- const link = item.getAttribute("href");
33
- if (link) {
34
- if (e.button === 0) {
35
- window.location.href = link;
36
- } else if (e.button === 1) {
37
- window.open(link, '_blank');
38
- }
39
- } else {
40
- this.openPopup(e.currentTarget);
41
- }
42
- }
43
- });
44
- }
45
31
  }
32
+
46
33
  openPopup (el) {
47
34
  const popupId = el.getAttribute('data-popup-id');
48
35
  window.dispatchEvent( new CustomEvent('open-popup', {
@@ -13,136 +13,8 @@ grid-component {
13
13
  flex-wrap: wrap;
14
14
  gap: var(--grid-gap);
15
15
  }
16
- .grid_item {
16
+ .grid-item-wrapper {
17
17
  width: 100%;
18
- max-width: 100%;
19
- background: var(--block-primary-bg-color);
20
- border-radius: var(--block-primary-border-radius);
21
- padding: 30px;
22
- display: flex;
23
- flex-direction: column;
24
- justify-content: space-between;
25
- gap: 20px;
26
- color: var(--text-color);
27
- position: relative;
28
- overflow: hidden;
29
- .marker {
30
- width: 50px;
31
- height: 50px;
32
- display: flex;
33
- justify-content: center;
34
- align-items: center;
35
- border-radius: 50%;
36
- background-color: var(--accent-color);
37
- .marker-symbol {
38
- color: #FFF;
39
- font-weight: 700;
40
- font-size: 24px;
41
- }
42
- }
43
- .letter {
44
- position: absolute;
45
- top: -20px;
46
- right: -20px;
47
- color: #E4E4E4;
48
- font-size: 150px;
49
- line-height: 75%;
50
- font-weight: 700;
51
- transition: all .2s ease;
52
- }
53
- .top {
54
- display: flex;
55
- flex-direction: column;
56
- gap: 20px;
57
- text-align: left;
58
- .item-title {
59
- font-size: var(--h3-font-size);
60
- font-weight: var(--h3-font-weight);
61
- line-height: 135%;
62
- color: var(--block-primary-h-color);
63
- margin-bottom: 0px;
64
- }
65
- .icon {
66
- max-width: 80px;
67
- height: 80px;
68
- img {
69
- width: 100%;
70
- height: 80px;
71
- display: block;
72
- }
73
- }
74
- .text {
75
- font-size: var(--text-font-size);
76
- font-weight: var(--text-font-weight);
77
- color: var(--block-primary-text-color);
78
- line-height: 140%;
79
- letter-spacing: 0.01em;
80
- text-align: inherit;
81
- }
82
- .item_list {
83
- font-size: var(--text-font-size);
84
- font-weight: var(--text-font-weight);
85
- line-height: 140%;
86
- letter-spacing: 0.01em;
87
- color: var(--block-primary-text-color);
88
- text-align: left;
89
- list-style: none;
90
- li {
91
- padding-left: 14px;
92
- margin-bottom: 10px;
93
- position: relative;
94
- &:last-child {
95
- margin-bottom: 0;
96
- }
97
- &::before {
98
- content: '';
99
- position: absolute;
100
- top: 9px;
101
- left: 0;
102
- width: 3px;
103
- height: 3px;
104
- border-radius: 50%;
105
- background-color: var(--block-primary-text-color);
106
- }
107
- }
108
- }
109
- }
110
- .bottom {
111
- .bold_text {
112
- display: flex;
113
- align-items: center;
114
- gap: 10px;
115
- color: var(--block-primary-h-color);
116
- span {
117
- font-size: var(--text-font-size);
118
- font-weight: 700;
119
- transition: color .2s ease;
120
- }
121
- svg {
122
- position: relative;
123
- left: 0;
124
- transition: all .2s ease;
125
- }
126
- }
127
- }
128
- }
129
- .grid_item.clickable {
130
- transition: all .3s ease-out;
131
- &:hover {
132
- background-color: var(--block-primary-bg-hover-color);
133
- cursor: pointer;
134
- .letter {
135
- color: #fff;
136
- }
137
- .bold_text {
138
- span {
139
- color: var(--block-primary-link-hover-color);
140
- }
141
- svg {
142
- left: 10px;
143
- }
144
- }
145
- }
146
18
  }
147
19
  .bottom_button {
148
20
  margin-top: 50px;
@@ -153,8 +25,9 @@ grid-component {
153
25
  display: inline-block;
154
26
  }
155
27
  &[data-items-in-row] {
156
- .grid_item {
157
- max-width: calc((100% - (var(--grid-gap) * (var(--items-in-row) - 1))) / var(--items-in-row)); //formula: (100%width - (gap * (items - 1))) / items
28
+ .grid-item-wrapper {
29
+ //formula: (100%width - (gap * (items - 1))) / items
30
+ max-width: calc((100% - (var(--grid-gap) * (var(--items-in-row) - 1))) / var(--items-in-row));
158
31
  }
159
32
  &[data-items-in-row="5"] .grid {
160
33
 
@@ -175,15 +48,9 @@ grid-component {
175
48
  --items-in-row: 2;
176
49
  }
177
50
  }
178
- @media screen and (max-width: 900px) {
179
- .grid_item {
180
- padding: 20px;
181
- padding-left: 30px;
182
- }
183
- }
184
51
  @media screen and (max-width: 650px) {
185
52
  .grid {
186
- .grid_item {
53
+ .grid-item-wrapper {
187
54
  max-width: 100%;
188
55
  }
189
56
  }
@@ -0,0 +1,15 @@
1
+ export const gridItemDefault = {
2
+ tag: 'grid-item-default',
3
+ src: '@gudhub/ssg-web-components-library/src/components/grid-component/grid-items/grid-item-default/grid-item-default.js',
4
+ serverOnly: false
5
+ }
6
+ export const gridItemExpandableVertical = {
7
+ tag: 'grid-item-expandable-vertical',
8
+ src: '@gudhub/ssg-web-components-library/src/components/grid-component/grid-items/grid-item-expandable-vertical/grid-item-expandable-vertical.js',
9
+ serverOnly: false
10
+ }
11
+ export const gridItemNumbered = {
12
+ tag: 'grid-item-numbered',
13
+ src: '@gudhub/ssg-web-components-library/src/components/grid-component/grid-items/grid-item-numbered/grid-item-numbered.js',
14
+ serverOnly: false
15
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "marker": "1",
3
+ "letter": "W",
4
+ "title": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
5
+ "text": "Aliquam ullamcorper nunc tempus molestie venenatis.",
6
+ "list": [
7
+ "Suspendisse enim nulla, lacinia a eros at, ultrices porttitor dolor.",
8
+ "Aenean eu lectus varius, tempor sem sed, maximus quam.",
9
+ "Aenean pulvinar felis ac eros vulputate tristique."
10
+ ],
11
+ "button": {
12
+ "link": "#",
13
+ "text": "Спробувати Безкоштовно"
14
+ },
15
+ "icon": {
16
+ "src": "",
17
+ "alt": "Image Alt",
18
+ "title": "Image Title"
19
+ }
20
+ }
@@ -0,0 +1,35 @@
1
+ <div class="primary-block ${json.button ? 'clickable bg-hover' : ''}" ${json.button && json.button.popupId ? `data-popup-id="${json.button.popupId}"` : ''}>
2
+ ${json.letter ? `<div class="letter">${json.letter}</div>` : ''}
3
+ <div class="top">
4
+ ${json.marker ? `
5
+ <div class="marker">
6
+ <span class="marker-symbol" gh-id="${ghId}.marker">${json.marker}</span>
7
+ </div>
8
+ ` : ''}
9
+ ${json.icon ? `
10
+ <div class="icon">
11
+ <img src="${json.icon.src ? json.icon.src : svgPlaceholder}" alt="${json.icon.alt}" title="${json.icon.title}" width="80" height="80">
12
+ </div>
13
+ ` : ''}
14
+ ${json.title ? (() => {
15
+ const tag = json.button && json.button.link ? `a href="${json.button.link}"` : 'h3';
16
+ return `<${tag} class="item-title" gh-id="${ghId}.title">Title</${tag}>`;
17
+ })() : ''}
18
+ ${json.text ? `<div class="text" gh-id="${ghId}.text"></div>` : ''}
19
+ ${json.list ? `
20
+ <ul class="item_list">
21
+ ${json.list.reduce((acc, list_item, list_index) => acc + `
22
+ <li class="text" gh-id="${ghId}.list.${list_index}"></li>
23
+ `, '')}
24
+ </ul>
25
+ ` : ''}
26
+ </div>
27
+ ${json.button ? `
28
+ <div class="bottom">
29
+ <div class="bold_text">
30
+ <span class="link" gh-id="${ghId}.button.text"></span>
31
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="21" viewBox="0 0 20 21" fill="none"><circle cx="10" cy="10.6282" r="10" fill="#0A79FE"/><path d="M8.25 6.62817L12 10.3782L8.25 14.1282" stroke="white"/></svg>
32
+ </div>
33
+ </div>
34
+ ` : ''}
35
+ </div>