@gudhub/ssg-web-components-library 1.0.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.
- package/index.js +3 -0
- package/package.json +20 -0
- package/src/components/about-us-banner/about-us-banner-data.json +9 -0
- package/src/components/about-us-banner/about-us-banner.html +19 -0
- package/src/components/about-us-banner/about-us-banner.js +23 -0
- package/src/components/about-us-banner/about-us-banner.scss +59 -0
- package/src/components/about-us-banner/config.js +5 -0
- package/src/components/about-us-image-counter/about-us-image-counter-data.json +35 -0
- package/src/components/about-us-image-counter/about-us-image-counter.html +22 -0
- package/src/components/about-us-image-counter/about-us-image-counter.js +23 -0
- package/src/components/about-us-image-counter/about-us-image-counter.scss +44 -0
- package/src/components/about-us-image-counter/config.js +5 -0
- package/src/components/about-us-team-members/about-us-team-members-data.json +99 -0
- package/src/components/about-us-team-members/about-us-team-members.html +25 -0
- package/src/components/about-us-team-members/about-us-team-members.js +22 -0
- package/src/components/about-us-team-members/about-us-team-members.scss +71 -0
- package/src/components/about-us-team-members/config.js +5 -0
- package/src/components/animation-block/animation-block-data.json +40 -0
- package/src/components/animation-block/animation-block.html +37 -0
- package/src/components/animation-block/animation-block.js +23 -0
- package/src/components/animation-block/animation-block.scss +337 -0
- package/src/components/animation-block/config.js +5 -0
- package/src/components/banner-and-text/banner-and-text-data.json +24 -0
- package/src/components/banner-and-text/banner-and-text.html +30 -0
- package/src/components/banner-and-text/banner-and-text.js +25 -0
- package/src/components/banner-and-text/banner-and-text.scss +85 -0
- package/src/components/banner-and-text/config.js +5 -0
- package/src/components/blog/article/allArticles.json +96 -0
- package/src/components/blog/article/article-component.html +189 -0
- package/src/components/blog/article/article-component.js +340 -0
- package/src/components/blog/article/article-component.scss +776 -0
- package/src/components/blog/article/authors-object.json +125 -0
- package/src/components/blog/article/categories-object.json +47 -0
- package/src/components/blog/author-page/author-page.html +37 -0
- package/src/components/blog/author-page/author-page.js +113 -0
- package/src/components/blog/author-page/author-page.json +111 -0
- package/src/components/blog/author-page/author-page.scss +107 -0
- package/src/components/blog/authors-list/authors-list.html +40 -0
- package/src/components/blog/authors-list/authors-list.js +60 -0
- package/src/components/blog/authors-list/authors-list.json +132 -0
- package/src/components/blog/authors-list/authors-list.scss +171 -0
- package/src/components/blog/categories-list/categories-list.html +21 -0
- package/src/components/blog/categories-list/categories-list.js +26 -0
- package/src/components/blog/categories-list/categories-list.json +53 -0
- package/src/components/blog/categories-list/categories-list.scss +125 -0
- package/src/components/blog/comments/comments.html +89 -0
- package/src/components/blog/comments/comments.js +181 -0
- package/src/components/blog/comments/comments.json +130 -0
- package/src/components/blog/comments/comments.scss +324 -0
- package/src/components/blog/contents/contents.html +14 -0
- package/src/components/blog/contents/contents.js +63 -0
- package/src/components/blog/contents/contents.scss +157 -0
- package/src/components/blog/posts-template/articles.json +139 -0
- package/src/components/blog/posts-template/authors-object.json +61 -0
- package/src/components/blog/posts-template/categories.json +61 -0
- package/src/components/blog/posts-template/posts-template.html +239 -0
- package/src/components/blog/posts-template/posts-template.js +532 -0
- package/src/components/blog/posts-template/posts-template.scss +566 -0
- package/src/components/breadcrumbs/breadcrumbs-component.js +65 -0
- package/src/components/breadcrumbs/breadcrumbs.html +21 -0
- package/src/components/breadcrumbs/breadcrumbs.scss +118 -0
- package/src/components/breadcrumbs/config.js +5 -0
- package/src/components/button-component/button-component.html +3 -0
- package/src/components/button-component/button-component.js +39 -0
- package/src/components/button-component/button-component.readme.md +11 -0
- package/src/components/button-component/button-component.scss +34 -0
- package/src/components/button-component/config.js +5 -0
- package/src/components/category-banner/category-banner.html +7 -0
- package/src/components/category-banner/category-banner.js +44 -0
- package/src/components/category-banner/category-banner.scss +22 -0
- package/src/components/category-banner/config.js +5 -0
- package/src/components/contact-us-block/config.js +5 -0
- package/src/components/contact-us-block/contact-us-block.html +41 -0
- package/src/components/contact-us-block/contact-us-block.js +22 -0
- package/src/components/contact-us-block/contact-us-block.scss +59 -0
- package/src/components/cookies-popup/config.js +5 -0
- package/src/components/cookies-popup/cookies-popup.html +8 -0
- package/src/components/cookies-popup/cookies-popup.js +27 -0
- package/src/components/cookies-popup/cookies-popup.scss +68 -0
- package/src/components/counter-section/config.js +5 -0
- package/src/components/counter-section/counter-section-data.json +21 -0
- package/src/components/counter-section/counter-section.html +38 -0
- package/src/components/counter-section/counter-section.js +23 -0
- package/src/components/counter-section/counter-section.readme.md +19 -0
- package/src/components/counter-section/counter-section.scss +204 -0
- package/src/components/counter-section-with-text/config.js +5 -0
- package/src/components/counter-section-with-text/counter-section-with-text-data.json +21 -0
- package/src/components/counter-section-with-text/counter-section-with-text.html +46 -0
- package/src/components/counter-section-with-text/counter-section-with-text.js +23 -0
- package/src/components/counter-section-with-text/counter-section-with-text.readme.md +19 -0
- package/src/components/counter-section-with-text/counter-section-with-text.scss +164 -0
- package/src/components/crm-services-banner/config.js +5 -0
- package/src/components/crm-services-banner/crm-services-banner-data.json +20 -0
- package/src/components/crm-services-banner/crm-services-banner.html +28 -0
- package/src/components/crm-services-banner/crm-services-banner.js +25 -0
- package/src/components/crm-services-banner/crm-services-banner.scss +57 -0
- package/src/components/edit-mode/config.js +5 -0
- package/src/components/edit-mode/edit-mode.html +4 -0
- package/src/components/edit-mode/edit-mode.js +23 -0
- package/src/components/edit-mode/edit-mode.scss +69 -0
- package/src/components/faq/config.js +5 -0
- package/src/components/faq/faq.html +20 -0
- package/src/components/faq/faq.js +40 -0
- package/src/components/faq/faq.scss +80 -0
- package/src/components/footer/config.js +5 -0
- package/src/components/footer/footer.html +74 -0
- package/src/components/footer/footer.js +21 -0
- package/src/components/footer/footer.scss +356 -0
- package/src/components/footer/pages-object.json +58 -0
- package/src/components/fullscreen-image-and-text/config.js +5 -0
- package/src/components/fullscreen-image-and-text/fullscreen-image-and-text.html +42 -0
- package/src/components/fullscreen-image-and-text/fullscreen-image-and-text.js +29 -0
- package/src/components/fullscreen-image-and-text/fullscreen-image-and-text.scss +192 -0
- package/src/components/get-in-touch-block/config.js +5 -0
- package/src/components/get-in-touch-block/get-in-touch-block-data.json +4 -0
- package/src/components/get-in-touch-block/get-in-touch-block.html +11 -0
- package/src/components/get-in-touch-block/get-in-touch-block.js +22 -0
- package/src/components/get-in-touch-block/get-in-touch-block.scss +12 -0
- package/src/components/get-in-touch-form/config.js +5 -0
- package/src/components/get-in-touch-form/get-in-touch-form-data.json +114 -0
- package/src/components/get-in-touch-form/get-in-touch-form.html +35 -0
- package/src/components/get-in-touch-form/get-in-touch-form.js +115 -0
- package/src/components/get-in-touch-form/get-in-touch-form.readme.md +45 -0
- package/src/components/get-in-touch-form/get-in-touch-form.scss +334 -0
- package/src/components/get-in-touch-form/sendEmail.js +161 -0
- package/src/components/grid/config.js +5 -0
- package/src/components/grid/grid.html +51 -0
- package/src/components/grid/grid.js +115 -0
- package/src/components/grid/grid.scss +566 -0
- package/src/components/grid-component/config.js +5 -0
- package/src/components/grid-component/grid-component-data.json +115 -0
- package/src/components/grid-component/grid-component.html +52 -0
- package/src/components/grid-component/grid-component.js +40 -0
- package/src/components/grid-component/grid-component.readme.md +32 -0
- package/src/components/grid-component/grid-component.scss +199 -0
- package/src/components/header/config.js +5 -0
- package/src/components/header/header.html +60 -0
- package/src/components/header/header.js +55 -0
- package/src/components/header/header.scss +556 -0
- package/src/components/homepage-banner/config.js +5 -0
- package/src/components/homepage-banner/homepage-banner.html +1443 -0
- package/src/components/homepage-banner/homepage-banner.js +23 -0
- package/src/components/homepage-banner/homepage-banner.scss +147 -0
- package/src/components/image-component/config.js +5 -0
- package/src/components/image-component/image-component.html +25 -0
- package/src/components/image-component/image-component.js +107 -0
- package/src/components/list-text-and-media/config.js +5 -0
- package/src/components/list-text-and-media/list-text-and-media-data.json +70 -0
- package/src/components/list-text-and-media/list-text-and-media.html +38 -0
- package/src/components/list-text-and-media/list-text-and-media.js +22 -0
- package/src/components/list-text-and-media/list-text-and-media.readme.md +30 -0
- package/src/components/list-text-and-media/list-text-and-media.scss +156 -0
- package/src/components/media-and-accordion/config.js +5 -0
- package/src/components/media-and-accordion/media-and-accordion-data.json +84 -0
- package/src/components/media-and-accordion/media-and-accordion.html +37 -0
- package/src/components/media-and-accordion/media-and-accordion.js +55 -0
- package/src/components/media-and-accordion/media-and-accordion.scss +170 -0
- package/src/components/media-and-list-of-text/config.js +5 -0
- package/src/components/media-and-list-of-text/media-and-list-of-text-data.json +16 -0
- package/src/components/media-and-list-of-text/media-and-list-of-text.html +32 -0
- package/src/components/media-and-list-of-text/media-and-list-of-text.js +24 -0
- package/src/components/media-and-list-of-text/media-and-list-of-text.readme.md +26 -0
- package/src/components/media-and-list-of-text/media-and-list-of-text.scss +102 -0
- package/src/components/media-and-text/config.js +5 -0
- package/src/components/media-and-text/media-and-text-data.json +20 -0
- package/src/components/media-and-text/media-and-text.html +26 -0
- package/src/components/media-and-text/media-and-text.js +26 -0
- package/src/components/media-and-text/media-and-text.scss +51 -0
- package/src/components/meta/articles.json +95 -0
- package/src/components/meta/author-schema.js +71 -0
- package/src/components/meta/authors.json +108 -0
- package/src/components/meta/blog-schema.js +93 -0
- package/src/components/meta/canonical.js +74 -0
- package/src/components/meta/config.js +40 -0
- package/src/components/meta/meta-index.js +14 -0
- package/src/components/meta/meta-tag.js +168 -0
- package/src/components/meta/organization-schema.js +50 -0
- package/src/components/meta/service-schema.js +76 -0
- package/src/components/meta/title-tag.js +64 -0
- package/src/components/overflow-cards/config.js +5 -0
- package/src/components/overflow-cards/overflow-cards-data.json +33 -0
- package/src/components/overflow-cards/overflow-cards.html +33 -0
- package/src/components/overflow-cards/overflow-cards.js +28 -0
- package/src/components/overflow-cards/overflow-cards.scss +112 -0
- package/src/components/popup/config.js +5 -0
- package/src/components/popup/popup.html +10 -0
- package/src/components/popup/popup.js +66 -0
- package/src/components/popup/popup.readme.md +13 -0
- package/src/components/popup/popup.scss +76 -0
- package/src/components/prices-cards/config.js +5 -0
- package/src/components/prices-cards/prices-cards-data.json +90 -0
- package/src/components/prices-cards/prices-cards.html +35 -0
- package/src/components/prices-cards/prices-cards.js +23 -0
- package/src/components/prices-cards/prices-cards.readme.md +48 -0
- package/src/components/prices-cards/prices-cards.scss +206 -0
- package/src/components/recent-posts/author-object.json +53 -0
- package/src/components/recent-posts/config.js +5 -0
- package/src/components/recent-posts/recent-posts.html +85 -0
- package/src/components/recent-posts/recent-posts.js +89 -0
- package/src/components/recent-posts/recent-posts.json +258 -0
- package/src/components/recent-posts/recent-posts.scss +274 -0
- package/src/components/reviews-slider/config.js +5 -0
- package/src/components/reviews-slider/reviews-slider-data.json +30 -0
- package/src/components/reviews-slider/reviews-slider.html +48 -0
- package/src/components/reviews-slider/reviews-slider.js +86 -0
- package/src/components/reviews-slider/reviews-slider.scss +92 -0
- package/src/components/service-counter/config.js +5 -0
- package/src/components/service-counter/service-counter-data.json +24 -0
- package/src/components/service-counter/service-counter.html +19 -0
- package/src/components/service-counter/service-counter.js +23 -0
- package/src/components/service-counter/service-counter.scss +171 -0
- package/src/components/service-image-counter/config.js +5 -0
- package/src/components/service-image-counter/service-image-counter-data.json +52 -0
- package/src/components/service-image-counter/service-image-counter.html +30 -0
- package/src/components/service-image-counter/service-image-counter.js +23 -0
- package/src/components/service-image-counter/service-image-counter.scss +114 -0
- package/src/components/tabs/config.js +5 -0
- package/src/components/tabs/tabs-component.js +45 -0
- package/src/components/tabs/tabs.html +28 -0
- package/src/components/tabs/tabs.scss +399 -0
- package/src/components/text-only/config.js +5 -0
- package/src/components/text-only/text-only-data.json +4 -0
- package/src/components/text-only/text-only.html +8 -0
- package/src/components/text-only/text-only.js +20 -0
- package/src/components/text-only/text-only.scss +21 -0
- package/src/components/top-banner/config.js +5 -0
- package/src/components/top-banner/top-banner.html +22 -0
- package/src/components/top-banner/top-banner.js +50 -0
- package/src/components/top-banner/top-banner.scss +132 -0
- package/src/config.js +38 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Config:
|
|
2
|
+
The form field settings are defined in the site's config.mjs, when rendered on the server it is stored in "window.constants.form_config", and this config is also defined in the client's "window.website_config.form" and is used when rendering the form on the client. If the config in "window" is not available, then the config is taken from "get-in-touch-form-data.json". There can be several settings for forms, the form selects it by id (it is defined in the "data-form-id" attribute of the form component), this allows you to customize the fields of several forms in different ways (for example, on the page the form has all the fields, and in the popup the form has other types of fields)
|
|
3
|
+
|
|
4
|
+
# Form in popup:
|
|
5
|
+
if form will be rendered in popup we need to define attribute "data-in-popup", that will change some styles of form to fit the popup styles.
|
|
6
|
+
|
|
7
|
+
# Placement:
|
|
8
|
+
The "placement" variable is needed to track conversions. If the form is in a popup, then "placement" determined by the button that opened the popup with the form. If the form is already on the page, this value is defined in the form constructor (currently "this.placement = 'main' ").
|
|
9
|
+
|
|
10
|
+
# Data-attributes:
|
|
11
|
+
data-in-popup: if form is on popup
|
|
12
|
+
data-form-id="form-id": determine id of config that will be applyed to form
|
|
13
|
+
|
|
14
|
+
# Config object:
|
|
15
|
+
("?" means "unnecessary")
|
|
16
|
+
```json
|
|
17
|
+
{
|
|
18
|
+
"id": "string",
|
|
19
|
+
"title?": "string",
|
|
20
|
+
"subtitle?": "string",
|
|
21
|
+
"mailConfig": {
|
|
22
|
+
"to": "string",
|
|
23
|
+
"from": "string",
|
|
24
|
+
"subject": "string"
|
|
25
|
+
},
|
|
26
|
+
"inputs": [
|
|
27
|
+
{
|
|
28
|
+
"name": "string",
|
|
29
|
+
"type": "type",
|
|
30
|
+
"required": "boolean",
|
|
31
|
+
"placeholder": "Ім'я *",
|
|
32
|
+
"width": "number from 1 to 12"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
```
|
|
37
|
+
## Types description:
|
|
38
|
+
email: will be checked by email rules;
|
|
39
|
+
phone: will be checked by phone number rules;
|
|
40
|
+
short: max length 64 symbols;
|
|
41
|
+
long: max length 128 symbols;
|
|
42
|
+
textarea: tag "<textarea>";
|
|
43
|
+
|
|
44
|
+
## Width:
|
|
45
|
+
defines the width of the field in the row. The total width of the row is 12. That is, if 2 fields have a width of 6, then they will take up half of the line each
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
get-in-touch-popup {
|
|
2
|
+
get-in-touch-form {
|
|
3
|
+
background-color: transparent;
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@keyframes loading {
|
|
8
|
+
0% { transform: rotate(0deg); }
|
|
9
|
+
100% { transform: rotate(360deg); }
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
get-in-touch-form {
|
|
13
|
+
.get-in-touch-form {
|
|
14
|
+
position: relative;
|
|
15
|
+
width: 100%;
|
|
16
|
+
max-width: 600px;
|
|
17
|
+
background-color: var(--primary-bg-color);
|
|
18
|
+
display: block;
|
|
19
|
+
padding: 30px;
|
|
20
|
+
border-radius: var(--block-primary-border-radius);
|
|
21
|
+
|
|
22
|
+
.like_title {
|
|
23
|
+
font-size: var(--h3-font-size);
|
|
24
|
+
font-weight: 700;
|
|
25
|
+
line-height: 120%;
|
|
26
|
+
letter-spacing: 0em;
|
|
27
|
+
text-align: center;
|
|
28
|
+
color: var(--h-color);
|
|
29
|
+
margin-bottom: 20px;
|
|
30
|
+
}
|
|
31
|
+
.subtitle {
|
|
32
|
+
font-size: var(--text-font-size);
|
|
33
|
+
font-weight: var(--text-font-weight);
|
|
34
|
+
line-height: 120%;
|
|
35
|
+
letter-spacing: 0em;
|
|
36
|
+
text-align: center;
|
|
37
|
+
color: var(--subtitle-color);
|
|
38
|
+
margin-bottom: 20px;
|
|
39
|
+
}
|
|
40
|
+
$grid-columns: 12;
|
|
41
|
+
@for $i from 1 through $grid-columns {
|
|
42
|
+
.col-#{$i} {
|
|
43
|
+
width: percentage($i / $grid-columns);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
form {
|
|
47
|
+
width: 100%;
|
|
48
|
+
max-width: 950px;
|
|
49
|
+
margin-right: 24px;
|
|
50
|
+
.btn_wrapper {
|
|
51
|
+
width: 100%;
|
|
52
|
+
padding-left: 8px;
|
|
53
|
+
padding-right: 8px;
|
|
54
|
+
padding-top: 4px;
|
|
55
|
+
display: flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
justify-content: center;
|
|
58
|
+
.btn {
|
|
59
|
+
font-size: 16px;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
.form_wrap {
|
|
63
|
+
display: flex;
|
|
64
|
+
flex-wrap: wrap;
|
|
65
|
+
}
|
|
66
|
+
.input-wrap {
|
|
67
|
+
position: relative;
|
|
68
|
+
padding: 8px;
|
|
69
|
+
flex: 0 0 auto;
|
|
70
|
+
}
|
|
71
|
+
input {
|
|
72
|
+
font-family: Roboto, sans-serif;
|
|
73
|
+
outline: none;
|
|
74
|
+
border-radius: 10px;
|
|
75
|
+
font-size: 14px;
|
|
76
|
+
width: 100%;
|
|
77
|
+
height: 100%;
|
|
78
|
+
background-color: var(--input-bg-color);
|
|
79
|
+
border: 1px solid var(--input-border-color);
|
|
80
|
+
padding: 7px 17px;
|
|
81
|
+
color: var(--input-text-color);
|
|
82
|
+
height: 50px;
|
|
83
|
+
margin-bottom: 8px;
|
|
84
|
+
transition: all .2s ease;
|
|
85
|
+
&:hover, &:focus {
|
|
86
|
+
border-color: var(--input-active-border-color);
|
|
87
|
+
}
|
|
88
|
+
&::placeholder {
|
|
89
|
+
color: var(--input-placeholder-color);
|
|
90
|
+
}
|
|
91
|
+
&:-webkit-autofill,
|
|
92
|
+
&:-webkit-autofill:hover,
|
|
93
|
+
&:-webkit-autofill:focus,
|
|
94
|
+
&:-webkit-autofill:active {
|
|
95
|
+
background-color: transparent;
|
|
96
|
+
-webkit-box-shadow: 0 0 0 30px transparent inset !important;
|
|
97
|
+
-webkit-text-fill-color: var(--input-text-color);
|
|
98
|
+
// background-color: var(--input-bg-color);
|
|
99
|
+
// -webkit-box-shadow: 0 0 0 30px var(--input-bg-color) inset !important;
|
|
100
|
+
// -webkit-text-fill-color: var(--input-text-color);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
input.error {
|
|
104
|
+
& + .email-error, & + .phone-error {
|
|
105
|
+
color: #FF7D7D;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
.email-error, .phone-error {
|
|
109
|
+
font-size: 12px;
|
|
110
|
+
font-weight: 400;
|
|
111
|
+
line-height: 120%;
|
|
112
|
+
}
|
|
113
|
+
span {
|
|
114
|
+
display: block;
|
|
115
|
+
position: absolute;
|
|
116
|
+
left: 10px;
|
|
117
|
+
bottom: -2px;
|
|
118
|
+
color: transparent;
|
|
119
|
+
transition: all .2s ease;
|
|
120
|
+
}
|
|
121
|
+
textarea {
|
|
122
|
+
width: 100%;
|
|
123
|
+
font-family: Roboto, sans-serif;
|
|
124
|
+
height: 145px;
|
|
125
|
+
background-color: var(--input-bg-color);
|
|
126
|
+
border: 1px solid var(--input-border-color);
|
|
127
|
+
padding: 7px 17px;
|
|
128
|
+
color: var(--input-text-color);
|
|
129
|
+
outline: none;
|
|
130
|
+
border-radius: 10px;
|
|
131
|
+
margin-bottom: 10px;
|
|
132
|
+
resize: none;
|
|
133
|
+
font-weight: 300;
|
|
134
|
+
font-size: 14px;
|
|
135
|
+
line-height: 36px;
|
|
136
|
+
&::placeholder {
|
|
137
|
+
font-weight: 300;
|
|
138
|
+
font-size: 14px;
|
|
139
|
+
line-height: 36px;
|
|
140
|
+
color: var(--input-placeholder-color);
|
|
141
|
+
}
|
|
142
|
+
transition: all .2s ease;
|
|
143
|
+
&:hover {
|
|
144
|
+
border-color: var(--input-active-border-color);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
.success_text {
|
|
148
|
+
position: relative;
|
|
149
|
+
top: -50px;
|
|
150
|
+
color: transparent;
|
|
151
|
+
transition: all .2s ease;
|
|
152
|
+
display: none;
|
|
153
|
+
}
|
|
154
|
+
&.success .success_text {
|
|
155
|
+
display: block;
|
|
156
|
+
top: -12px;
|
|
157
|
+
color: green;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
.success-overflow {
|
|
161
|
+
opacity: 0;
|
|
162
|
+
z-index: -1;
|
|
163
|
+
|
|
164
|
+
display: flex;
|
|
165
|
+
flex-direction: column;
|
|
166
|
+
justify-content: center;
|
|
167
|
+
align-items: center;
|
|
168
|
+
|
|
169
|
+
position: absolute;
|
|
170
|
+
top: 0;
|
|
171
|
+
left: 0;
|
|
172
|
+
width: 100%;
|
|
173
|
+
height: 100%;
|
|
174
|
+
|
|
175
|
+
background-color: #fff;
|
|
176
|
+
border-radius: calc(var(--block-primary-border-radius) - 5px);
|
|
177
|
+
box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
|
|
178
|
+
|
|
179
|
+
transition: opacity .5s ease;
|
|
180
|
+
.icon_wrapper {
|
|
181
|
+
width: 100%;
|
|
182
|
+
padding-bottom: 10px;
|
|
183
|
+
margin-bottom: 15px;
|
|
184
|
+
|
|
185
|
+
display: flex;
|
|
186
|
+
justify-content: center;
|
|
187
|
+
|
|
188
|
+
border-bottom: solid 4px var(--primary-color);
|
|
189
|
+
.icon {
|
|
190
|
+
margin-left: 10px;
|
|
191
|
+
width: 150px;
|
|
192
|
+
svg {
|
|
193
|
+
width: 100%;
|
|
194
|
+
height: auto;
|
|
195
|
+
path {
|
|
196
|
+
fill: var(--primary-color);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
.success_middle {
|
|
202
|
+
max-width: 340px;
|
|
203
|
+
text-align: center;
|
|
204
|
+
padding-left: 10px;
|
|
205
|
+
padding-right: 10px;
|
|
206
|
+
|
|
207
|
+
display: flex;
|
|
208
|
+
flex-direction: column;
|
|
209
|
+
justify-content: center;
|
|
210
|
+
align-items: center;
|
|
211
|
+
|
|
212
|
+
gap: 20px;
|
|
213
|
+
margin-bottom: 35px;
|
|
214
|
+
|
|
215
|
+
.bold {
|
|
216
|
+
font-size: var(--h1-font-size);
|
|
217
|
+
}
|
|
218
|
+
.check_entity {
|
|
219
|
+
span:first-child {
|
|
220
|
+
color: var(--primary-color);
|
|
221
|
+
}
|
|
222
|
+
&.phone_entity {
|
|
223
|
+
display: none;
|
|
224
|
+
&.provided {
|
|
225
|
+
display: block;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
&[data-in-popup] {
|
|
233
|
+
.get-in-touch-form {
|
|
234
|
+
padding-top: 0;
|
|
235
|
+
padding-bottom: 10px;
|
|
236
|
+
margin-bottom: 10px;
|
|
237
|
+
}
|
|
238
|
+
.success-overflow {
|
|
239
|
+
box-shadow: none;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
&.loading {
|
|
243
|
+
.btn_wrapper {
|
|
244
|
+
position: relative;
|
|
245
|
+
button[type="submit"] {
|
|
246
|
+
opacity: 0;
|
|
247
|
+
transition: none;
|
|
248
|
+
cursor: none;
|
|
249
|
+
}
|
|
250
|
+
.loader {
|
|
251
|
+
position: absolute;
|
|
252
|
+
top: calc(50% - 25px);
|
|
253
|
+
left: calc(50% - 25px);
|
|
254
|
+
width: 50px;
|
|
255
|
+
height: 50px;
|
|
256
|
+
border: 10px solid var(--primary-color);
|
|
257
|
+
border-bottom-color: #fff;
|
|
258
|
+
border-radius: 50%;
|
|
259
|
+
z-index: 11;
|
|
260
|
+
animation: loading 2s linear infinite;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
&.success {
|
|
265
|
+
button[type="submit"] {
|
|
266
|
+
opacity: 0;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.success-overflow {
|
|
270
|
+
opacity: 1;
|
|
271
|
+
z-index: 1;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
@media screen and (max-width: 650px) {
|
|
276
|
+
.get-in-touch-form {
|
|
277
|
+
form {
|
|
278
|
+
.input-wrap {
|
|
279
|
+
width: 100%;
|
|
280
|
+
padding: 4px;
|
|
281
|
+
}
|
|
282
|
+
.btn_wrapper {
|
|
283
|
+
.btn {
|
|
284
|
+
width: 100%
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
popup-container[data-position="bottom-right"] {
|
|
292
|
+
.popup_top {
|
|
293
|
+
margin-bottom: 10px;
|
|
294
|
+
}
|
|
295
|
+
get-in-touch-form .get-in-touch-form {
|
|
296
|
+
padding-left: 15px;
|
|
297
|
+
padding-right: 15px;
|
|
298
|
+
padding-bottom: 10px;
|
|
299
|
+
.popup_text {
|
|
300
|
+
margin-bottom: 5px;
|
|
301
|
+
}
|
|
302
|
+
.btn {
|
|
303
|
+
width: 100%;
|
|
304
|
+
padding-top: 15px;
|
|
305
|
+
padding-bottom: 15px;
|
|
306
|
+
}
|
|
307
|
+
.success-overflow {
|
|
308
|
+
.bold {
|
|
309
|
+
font-size: 42px;
|
|
310
|
+
}
|
|
311
|
+
.icon {
|
|
312
|
+
width: 100px;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
@media screen and (max-width: 400px) {
|
|
316
|
+
padding: 15px;
|
|
317
|
+
.btn {
|
|
318
|
+
padding: 15px 20px;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
get-in-touch-form[data-theme="dark"] {
|
|
325
|
+
.get-in-touch-form form {
|
|
326
|
+
.form_flex input, textarea {
|
|
327
|
+
color: var(--input-text-color);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
.get-in-touch-form form .form_flex input:-webkit-autofill, .get-in-touch-form form .form_flex input:-webkit-autofill:hover, .get-in-touch-form form .form_flex input:-webkit-autofill:focus, .get-in-touch-form form .form_flex input:-webkit-autofill:active {
|
|
331
|
+
-webkit-box-shadow: initial !important;
|
|
332
|
+
-webkit-text-fill-color: initial !important;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
export async function sendEmail(form, formConfig, placement) {
|
|
2
|
+
if (validate(form)) {
|
|
3
|
+
|
|
4
|
+
const response = await sendRequest(form, formConfig.mailConfig, formConfig.id, placement);
|
|
5
|
+
if (response.status == 'success') {
|
|
6
|
+
return true;
|
|
7
|
+
} else {
|
|
8
|
+
if (response.error) {
|
|
9
|
+
console.error(response.error)
|
|
10
|
+
}
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
async function sendRequest(form, mailConfig, formId, placement) {
|
|
17
|
+
const formData = {};
|
|
18
|
+
for (const [name, value] of (new FormData(form)).entries()) {
|
|
19
|
+
formData[name] = value;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const searchParams = getQueryParams();
|
|
23
|
+
|
|
24
|
+
const formDataObj = {
|
|
25
|
+
Name: formData.name,
|
|
26
|
+
Phone: formData.phone,
|
|
27
|
+
Email: formData.email,
|
|
28
|
+
Companty: formData.company,
|
|
29
|
+
Message: formData.message,
|
|
30
|
+
Website: window.location.hostname,
|
|
31
|
+
Url: window.location.pathname,
|
|
32
|
+
FormId: formId,
|
|
33
|
+
FormPlacement: 'Body',
|
|
34
|
+
SearchParams: {
|
|
35
|
+
...searchParams
|
|
36
|
+
},
|
|
37
|
+
Referrer: localStorage.getItem('referrer'),
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
window.dispatchEvent(new CustomEvent('submitForm', {detail: {formDataObj}}));
|
|
41
|
+
|
|
42
|
+
const template = {
|
|
43
|
+
...mailConfig,
|
|
44
|
+
replyTo: formData.email ? formData.email : 'none',
|
|
45
|
+
html: "<!DOCTYPE html>" +
|
|
46
|
+
"<html>" +
|
|
47
|
+
"<head>" +
|
|
48
|
+
`<title>${mailConfig.subject}</title>` +
|
|
49
|
+
"</head>" +
|
|
50
|
+
"<body>" +
|
|
51
|
+
"<ul>" +
|
|
52
|
+
"<li><strong>" +
|
|
53
|
+
"subject: </strong>" + `${mailConfig.subject}` +
|
|
54
|
+
"</li>" +
|
|
55
|
+
"<li><strong>" +
|
|
56
|
+
"formId: </strong>" + `${formId}` +
|
|
57
|
+
"</li>" +
|
|
58
|
+
"<li><strong>" +
|
|
59
|
+
"placement: </strong>" + `${placement}` +
|
|
60
|
+
"</li>" +
|
|
61
|
+
`${Object.entries(formData).reduce((acc, [name, value]) => acc + `<li><strong>${name}: </strong>${value}</li>`, '')}` +
|
|
62
|
+
"<li> <strong>" +
|
|
63
|
+
"Url: </strong>" + window.location.pathname +
|
|
64
|
+
"</li>" +
|
|
65
|
+
"</ul>" +
|
|
66
|
+
"</body>" +
|
|
67
|
+
"</html>"
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
console.log(formDataObj);
|
|
71
|
+
console.log(template);
|
|
72
|
+
|
|
73
|
+
return new Promise(res => {
|
|
74
|
+
setTimeout(() => {
|
|
75
|
+
res({status: 'success'});
|
|
76
|
+
}, 1000)
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
// try {
|
|
80
|
+
// const response = await fetch('https://development.gudhub.com/api/services/send-email', {
|
|
81
|
+
// method: 'POST',
|
|
82
|
+
// body: JSON.stringify(template),
|
|
83
|
+
// headers: {
|
|
84
|
+
// 'Content-Type': 'application/json'
|
|
85
|
+
// },
|
|
86
|
+
// })
|
|
87
|
+
// if (response.status == 200) {
|
|
88
|
+
// return {
|
|
89
|
+
// status: 'success'
|
|
90
|
+
// }
|
|
91
|
+
// } else {
|
|
92
|
+
// return {
|
|
93
|
+
// status: 'error'
|
|
94
|
+
// }
|
|
95
|
+
// }
|
|
96
|
+
// } catch (error) {
|
|
97
|
+
// return {
|
|
98
|
+
// status: 'error',
|
|
99
|
+
// error
|
|
100
|
+
// }
|
|
101
|
+
// }
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function getQueryParams() {
|
|
105
|
+
var url = window.location.search.substring(1);
|
|
106
|
+
var queryParamsArray = url.split("&");
|
|
107
|
+
if (queryParamsArray.length <= 1) {
|
|
108
|
+
return {};
|
|
109
|
+
}
|
|
110
|
+
var queryParams = {};
|
|
111
|
+
for (var i = 0; i < queryParamsArray.length; i++) {
|
|
112
|
+
var param = queryParamsArray[i].split("=");
|
|
113
|
+
queryParams[param[0]] = param[1];
|
|
114
|
+
}
|
|
115
|
+
return queryParams;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function validate(form) {
|
|
119
|
+
const emailInput = form.querySelector('input[name="email"]');
|
|
120
|
+
const email = emailInput.value;
|
|
121
|
+
const phoneInput = form.querySelector('input[name="phone"]');
|
|
122
|
+
let errorEmail = false;
|
|
123
|
+
let errorPhone = false;
|
|
124
|
+
|
|
125
|
+
let emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/
|
|
126
|
+
if (!email.match(emailRegex)) {
|
|
127
|
+
emailInput.classList.add('error');
|
|
128
|
+
emailInput.parentElement.classList.add('error-input');
|
|
129
|
+
errorEmail = true;
|
|
130
|
+
} else {
|
|
131
|
+
emailInput.classList.remove('error');
|
|
132
|
+
emailInput.parentElement.classList.remove('error-input');
|
|
133
|
+
errorEmail = false;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
if (phoneInput && phoneInput.value) {
|
|
137
|
+
const phone = phoneInput.value;
|
|
138
|
+
let phoneRegex = /^[0-9 ()+-]+$/;
|
|
139
|
+
if (!phone.match(phoneRegex)) {
|
|
140
|
+
phoneInput.classList.add('error');
|
|
141
|
+
phoneInput.parentElement.classList.add('error-input');
|
|
142
|
+
errorPhone = true;
|
|
143
|
+
} else {
|
|
144
|
+
phoneInput.classList.remove('error');
|
|
145
|
+
phoneInput.parentElement.classList.remove('error-input');
|
|
146
|
+
errorPhone = false;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
if (errorPhone || errorEmail) {
|
|
150
|
+
return false;
|
|
151
|
+
} else {
|
|
152
|
+
let errors = document.querySelectorAll('.error-input');
|
|
153
|
+
if (errors.length) {
|
|
154
|
+
for (let error in errors) {
|
|
155
|
+
errors[error].classList.remove('error-input');
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
return true;
|
|
161
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<section class="grid ${backgroundImage != 'none' ? 'transparentBackground' : ''}">
|
|
2
|
+
<div class="container">
|
|
3
|
+
<h2 gh-id="${ghId}.title"> TITLE </h2>
|
|
4
|
+
|
|
5
|
+
${jsonData.subtitle ? `
|
|
6
|
+
<p class="subtitle" gh-id="${ghId}.subtitle">
|
|
7
|
+
SUBTITLE
|
|
8
|
+
</p>
|
|
9
|
+
` : ''}
|
|
10
|
+
<div class="grid_slider ${beSlider ? 'swiper' : ''}">
|
|
11
|
+
<div class="${beSlider ? 'swiper-wrapper' : ''} grid_wrapper">
|
|
12
|
+
${
|
|
13
|
+
items.reduce((acc, item, index) => {
|
|
14
|
+
return acc + `
|
|
15
|
+
<div class="grid_item ${backgroundImage != 'none' ? 'transparentBackground' : ''}" onclick="openItem()">
|
|
16
|
+
<div class="absolute_wrap">
|
|
17
|
+
<div class="absolute_wrap_top">
|
|
18
|
+
${ type.includes('number') ? `
|
|
19
|
+
<div class="number">${index + 1}</div>
|
|
20
|
+
` : '' }
|
|
21
|
+
${ items[index].title ? `
|
|
22
|
+
<h3 gh-id="${ghId}.items.${index}.title"> ITEM TITLE </h3>
|
|
23
|
+
` : ''}
|
|
24
|
+
${ item.text != undefined? `
|
|
25
|
+
<div class="grid_item_text" gh-id="${ghId}.items.${index}.text">
|
|
26
|
+
ITEM TEXT
|
|
27
|
+
</div>
|
|
28
|
+
` : ''}
|
|
29
|
+
</div>
|
|
30
|
+
${ collapse ? `
|
|
31
|
+
<div class="collapse_icon">
|
|
32
|
+
<div class="plus"></div>
|
|
33
|
+
</div>
|
|
34
|
+
` : ''}
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
`
|
|
38
|
+
}, '')
|
|
39
|
+
}
|
|
40
|
+
</div>
|
|
41
|
+
<div class="navigation_wrapper">
|
|
42
|
+
<div class="grids_slider_prev swiper-button-prev">
|
|
43
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="14" viewBox="0 0 18 14" fill="none"><path d="M8 13L2 7M2 7L8 0.999999M2 7L18 7" stroke="#B3BABF" stroke-width="2"/></svg>
|
|
44
|
+
</div>
|
|
45
|
+
<div class="grids_slider_next swiper-button-next">
|
|
46
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="14" viewBox="0 0 18 14" fill="none"><path d="M8 13L2 7M2 7L8 0.999999M2 7L18 7" stroke="#B3BABF" stroke-width="2"/></svg>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
</section>
|