@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,63 @@
|
|
|
1
|
+
import html from './contents.html';
|
|
2
|
+
import './contents.scss';
|
|
3
|
+
|
|
4
|
+
class ContentsComponent extends GHComponent {
|
|
5
|
+
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
async onServerRender() {
|
|
11
|
+
|
|
12
|
+
this.headings = JSON.parse(this.getAttribute('data-headings'));
|
|
13
|
+
this.newHeadings = [];
|
|
14
|
+
const fullUrl = new URL('http://website.com' + window.location.search);
|
|
15
|
+
const url = fullUrl.searchParams.get('path');
|
|
16
|
+
for (let h in this.headings) {
|
|
17
|
+
let div = document.createElement('div');
|
|
18
|
+
div.innerHTML = this.headings[h].text;
|
|
19
|
+
let text = div.querySelector('a') ? div.querySelector('a').innerText : this.headings[h].text;
|
|
20
|
+
let iterationH = {
|
|
21
|
+
"text": text,
|
|
22
|
+
"level": this.headings[h].level,
|
|
23
|
+
"link": `${url}#${text.toLowerCase().replace(/[^\w\s]/g, '-').replace(/ /g, '-').replace(/-$/, '').replace(/^-/, '')}`,
|
|
24
|
+
};
|
|
25
|
+
this.newHeadings.push(iterationH)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
super.render(html);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
onClientReady() {
|
|
32
|
+
this.scrollContent()
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
openContents (item) {
|
|
36
|
+
item.parentElement.classList.toggle('active');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
scrollContent(){
|
|
40
|
+
let anchorSections = document.querySelectorAll('article h2, article h3');
|
|
41
|
+
|
|
42
|
+
let anchors = document.querySelectorAll('.aside_wrapper contents-component .h_list li a');
|
|
43
|
+
|
|
44
|
+
function changeLinkState() {
|
|
45
|
+
|
|
46
|
+
let index = anchorSections.length;
|
|
47
|
+
|
|
48
|
+
while (--index && window.scrollY + 110 < anchorSections[index].offsetTop) { }
|
|
49
|
+
|
|
50
|
+
window.anchor = anchorSections[index];
|
|
51
|
+
for (let anchor = 0; anchor < anchors.length; anchor++) {
|
|
52
|
+
anchors[anchor].parentElement.classList.remove('active-anchor');
|
|
53
|
+
}
|
|
54
|
+
anchors[index] ? anchors[index].parentElement.classList.add('active-anchor') : null;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
changeLinkState();
|
|
58
|
+
window.addEventListener('scroll', changeLinkState);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
window.customElements.define('contents-component', ContentsComponent);
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
contents-component {
|
|
2
|
+
.contents {
|
|
3
|
+
border: 1px solid #DBE2E7;
|
|
4
|
+
padding: 30px;
|
|
5
|
+
}
|
|
6
|
+
.contents_title {
|
|
7
|
+
font-weight: 400;
|
|
8
|
+
font-size: 20px;
|
|
9
|
+
line-height: 30px;
|
|
10
|
+
text-transform: uppercase;
|
|
11
|
+
color: #878787;
|
|
12
|
+
margin-bottom: 22px;
|
|
13
|
+
}
|
|
14
|
+
ul {
|
|
15
|
+
list-style: none;
|
|
16
|
+
}
|
|
17
|
+
.active-anchor a {
|
|
18
|
+
color: #00BFD6 !important;
|
|
19
|
+
}
|
|
20
|
+
li {
|
|
21
|
+
margin-top: 8px;
|
|
22
|
+
a {
|
|
23
|
+
font-size: 16px;
|
|
24
|
+
line-height: 25px;
|
|
25
|
+
color: #4D555B;
|
|
26
|
+
transition: all .2s ease;
|
|
27
|
+
}
|
|
28
|
+
&:hover {
|
|
29
|
+
a {
|
|
30
|
+
color: #141616;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
&.child {
|
|
34
|
+
padding-left: 20px;
|
|
35
|
+
margin-top: 2px;
|
|
36
|
+
a {
|
|
37
|
+
font-size: 14px;
|
|
38
|
+
line-height: 25px;
|
|
39
|
+
color: #4D555B;
|
|
40
|
+
transition: all .2s ease;
|
|
41
|
+
}
|
|
42
|
+
&:hover {
|
|
43
|
+
a {
|
|
44
|
+
color: #141616;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@media screen and (max-width: 992px) {
|
|
52
|
+
article-component {
|
|
53
|
+
aside .aside_wrapper {
|
|
54
|
+
position: static;
|
|
55
|
+
}
|
|
56
|
+
contents-component {
|
|
57
|
+
position: fixed;
|
|
58
|
+
background: #fff;
|
|
59
|
+
z-index: 2;
|
|
60
|
+
width: 100%;
|
|
61
|
+
top: 96px;
|
|
62
|
+
left: 0;
|
|
63
|
+
transition: all .5s ease;
|
|
64
|
+
.contents {
|
|
65
|
+
padding: 0;
|
|
66
|
+
}
|
|
67
|
+
.h_list {
|
|
68
|
+
height: 100%;
|
|
69
|
+
max-height: 0;
|
|
70
|
+
overflow: hidden;
|
|
71
|
+
transition: all .5s ease;
|
|
72
|
+
}
|
|
73
|
+
.contents_title {
|
|
74
|
+
margin-bottom: 0;
|
|
75
|
+
padding: 10px;
|
|
76
|
+
padding-left: 40px;
|
|
77
|
+
cursor: pointer;
|
|
78
|
+
position: relative;
|
|
79
|
+
text-transform: capitalize;
|
|
80
|
+
&::before {
|
|
81
|
+
content: "";
|
|
82
|
+
position: absolute;
|
|
83
|
+
top: 20px;
|
|
84
|
+
right: 40px;
|
|
85
|
+
width: 16px;
|
|
86
|
+
height: 16px;
|
|
87
|
+
transition: all .5s ease;
|
|
88
|
+
background-repeat: no-repeat;
|
|
89
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M13 1.5L7 7.5L1 1.5' stroke='%2300BFD6' stroke-width='2'/%3E%3C/svg%3E");
|
|
90
|
+
background-size: contain;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
li a {
|
|
94
|
+
padding-left: 40px;
|
|
95
|
+
}
|
|
96
|
+
.contents.active {
|
|
97
|
+
.contents_title {
|
|
98
|
+
padding-bottom: 5px;
|
|
99
|
+
&::before {
|
|
100
|
+
top: 14px;
|
|
101
|
+
transform: rotate(180deg);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
.h_list {
|
|
105
|
+
max-height: 1000px;
|
|
106
|
+
padding: 0;
|
|
107
|
+
padding-top: 0;
|
|
108
|
+
}
|
|
109
|
+
li {
|
|
110
|
+
&:hover a {
|
|
111
|
+
background-color: #efefef;
|
|
112
|
+
}
|
|
113
|
+
&.child {
|
|
114
|
+
a {
|
|
115
|
+
padding-top: 2px;
|
|
116
|
+
padding-bottom: 2px;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
a {
|
|
120
|
+
padding-top: 4px;
|
|
121
|
+
padding-bottom: 4px;
|
|
122
|
+
display: block;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
li {
|
|
127
|
+
margin-top: 0;
|
|
128
|
+
a {
|
|
129
|
+
transition: padding-left .5s ease, background-color .2s ease;
|
|
130
|
+
}
|
|
131
|
+
&.child {
|
|
132
|
+
margin-top: 0;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
@media screen and (max-width: 600px) {
|
|
139
|
+
article-component {
|
|
140
|
+
contents-component {
|
|
141
|
+
.contents_title {
|
|
142
|
+
padding-left: 15px;
|
|
143
|
+
&::before {
|
|
144
|
+
right: 15px;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
li a {
|
|
148
|
+
padding-left: 15px;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
@media screen and (max-width: 450px) {
|
|
154
|
+
contents-component .contents {
|
|
155
|
+
padding: 15px;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "property",
|
|
4
|
+
"id": 3,
|
|
5
|
+
"property_name": "title",
|
|
6
|
+
"property_type": "field_value",
|
|
7
|
+
"field_id": "794783",
|
|
8
|
+
"interpretation": 1
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"type": "property",
|
|
12
|
+
"id": 3,
|
|
13
|
+
"property_name": "intro",
|
|
14
|
+
"property_type": "field_value",
|
|
15
|
+
"field_id": "794786",
|
|
16
|
+
"interpretation": 1
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"type": "property",
|
|
20
|
+
"id": 21,
|
|
21
|
+
"property_name": "categories",
|
|
22
|
+
"property_type": "function",
|
|
23
|
+
"function": "function(item, appId) {\n const app = await gudhub.getApp(appId);\n const categoryField = item.fields.find(field => field.field_id == 794788);\n if(categoryField) {\n const categoryItems = categoryField.field_value.split(',');\n const categoryItemsIds = categoryItems.map(item => Number(item.split('.')[1]));\n return app.items_list.filter(item => categoryItemsIds.includes(Number(item.item_id)));\n }\n return null;\n}"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"type": "property",
|
|
27
|
+
"id": 18,
|
|
28
|
+
"property_name": "updated_at",
|
|
29
|
+
"property_type": "field_value",
|
|
30
|
+
"field_id": "794790"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"type": "property",
|
|
34
|
+
"id": 20,
|
|
35
|
+
"property_name": "rating",
|
|
36
|
+
"property_type": "function",
|
|
37
|
+
"function": "function(item, appId, gudhub) {\n const app = await gudhub.getApp(appId);\n let ratings = item.fields.find(field => field.field_id == 794801);\n let summ = 0;\n if(ratings) {\n ratings = ratings.field_value.split(',');\n ratings.forEach(item => summ += Number(item));\n }\n return {\n count: ratings.length || 0,\n avg: summ / ratings.length\n };\n}"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"type": "property",
|
|
41
|
+
"id": 19,
|
|
42
|
+
"property_name": "views",
|
|
43
|
+
"property_type": "field_value",
|
|
44
|
+
"field_id": "794802",
|
|
45
|
+
"interpretation": 1
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"type": "property",
|
|
49
|
+
"id": 13,
|
|
50
|
+
"property_name": "thumbnail_src",
|
|
51
|
+
"property_type": "field_value",
|
|
52
|
+
"field_id": "794800",
|
|
53
|
+
"interpretation": 1
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"type": "property",
|
|
57
|
+
"id": 15,
|
|
58
|
+
"property_name": "thumbnail_alt",
|
|
59
|
+
"property_type": "field_value",
|
|
60
|
+
"field_id": "794799",
|
|
61
|
+
"interpretation": 1
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"type": "property",
|
|
65
|
+
"id": 16,
|
|
66
|
+
"property_name": "thumbnail_title",
|
|
67
|
+
"property_type": "field_value",
|
|
68
|
+
"field_id": "794798",
|
|
69
|
+
"interpretation": 1
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"type": "property",
|
|
73
|
+
"id": 14,
|
|
74
|
+
"property_name": "thumbnail",
|
|
75
|
+
"property_type": "field_value",
|
|
76
|
+
"field_id": "794797",
|
|
77
|
+
"interpretation": 1
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"type": "property",
|
|
81
|
+
"id": 17,
|
|
82
|
+
"property_name": "posted_at",
|
|
83
|
+
"property_type": "field_value",
|
|
84
|
+
"field_id": "794791"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"type": "property",
|
|
88
|
+
"id": 4,
|
|
89
|
+
"property_name": "slug",
|
|
90
|
+
"property_type": "field_value",
|
|
91
|
+
"field_id": "794804",
|
|
92
|
+
"interpretation": 1
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"type": "property",
|
|
96
|
+
"id": 12,
|
|
97
|
+
"property_name": "h1",
|
|
98
|
+
"property_type": "field_value",
|
|
99
|
+
"field_id": "794783",
|
|
100
|
+
"interpretation": 1
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"type": "property",
|
|
104
|
+
"id": 10,
|
|
105
|
+
"property_name": "author_id",
|
|
106
|
+
"property_type": "field_value",
|
|
107
|
+
"field_id": "794789"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"type": "property",
|
|
111
|
+
"id": 11,
|
|
112
|
+
"property_name": "intro_id",
|
|
113
|
+
"property_type": "field_id",
|
|
114
|
+
"field_id": "794786"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"type": "property",
|
|
118
|
+
"id": 9,
|
|
119
|
+
"property_name": "time_to_read",
|
|
120
|
+
"property_type": "field_value",
|
|
121
|
+
"field_id": "794795",
|
|
122
|
+
"interpretation": 1
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"type": "property",
|
|
126
|
+
"id": 8,
|
|
127
|
+
"property_name": "author",
|
|
128
|
+
"property_type": "field_value",
|
|
129
|
+
"field_id": "794789",
|
|
130
|
+
"interpretation": 1
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"type": "property",
|
|
134
|
+
"id": 5,
|
|
135
|
+
"property_name": "id",
|
|
136
|
+
"property_type": "variable",
|
|
137
|
+
"variable_type": "current_item"
|
|
138
|
+
}
|
|
139
|
+
]
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "array",
|
|
3
|
+
"id": 1,
|
|
4
|
+
"childs": [
|
|
5
|
+
{
|
|
6
|
+
"type": "property",
|
|
7
|
+
"id": 3,
|
|
8
|
+
"property_name": "name",
|
|
9
|
+
"property_type": "field_value",
|
|
10
|
+
"name_space": "title",
|
|
11
|
+
"interpretation": 1
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"type": "property",
|
|
15
|
+
"id": 4,
|
|
16
|
+
"property_name": "h1",
|
|
17
|
+
"property_type": "field_value",
|
|
18
|
+
"name_space": "h1",
|
|
19
|
+
"interpretation": 1
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "property",
|
|
23
|
+
"id": 5,
|
|
24
|
+
"property_name": "author_id",
|
|
25
|
+
"property_type": "variable",
|
|
26
|
+
"variable_type": "current_item"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"type": "property",
|
|
30
|
+
"id": 6,
|
|
31
|
+
"property_name": "slug",
|
|
32
|
+
"property_type": "field_value",
|
|
33
|
+
"name_space": "slug",
|
|
34
|
+
"interpretation": 1
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"property_name": "authors",
|
|
38
|
+
"app_id": "33453",
|
|
39
|
+
"filter": [
|
|
40
|
+
{
|
|
41
|
+
"field_id": 796213,
|
|
42
|
+
"data_type": "radio_button",
|
|
43
|
+
"valuesArray": [
|
|
44
|
+
"1"
|
|
45
|
+
],
|
|
46
|
+
"search_type": "equal_or",
|
|
47
|
+
"$$hashKey": "object:10830",
|
|
48
|
+
"selected_search_option_variable": "Value"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"field_id": 796222,
|
|
52
|
+
"data_type": "radio_button",
|
|
53
|
+
"valuesArray": [
|
|
54
|
+
"1"
|
|
55
|
+
],
|
|
56
|
+
"search_type": "equal_or",
|
|
57
|
+
"$$hashKey": "object:10872",
|
|
58
|
+
"selected_search_option_variable": "Value"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "array",
|
|
3
|
+
"id": 1,
|
|
4
|
+
"childs": [
|
|
5
|
+
{
|
|
6
|
+
"type": "property",
|
|
7
|
+
"id": 6,
|
|
8
|
+
"property_name": "slug",
|
|
9
|
+
"property_type": "field_value",
|
|
10
|
+
"name_space": "slug",
|
|
11
|
+
"interpretation": 1
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"type": "property",
|
|
15
|
+
"id": 3,
|
|
16
|
+
"property_name": "title",
|
|
17
|
+
"property_type": "field_value",
|
|
18
|
+
"name_space": "title",
|
|
19
|
+
"interpretation": 1
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "property",
|
|
23
|
+
"id": 4,
|
|
24
|
+
"property_name": "h1",
|
|
25
|
+
"property_type": "field_value",
|
|
26
|
+
"name_space": "h1",
|
|
27
|
+
"interpretation": 1
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"type": "property",
|
|
31
|
+
"id": 5,
|
|
32
|
+
"property_name": "category_id",
|
|
33
|
+
"property_type": "variable",
|
|
34
|
+
"variable_type": "current_item"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"property_name": "categories",
|
|
38
|
+
"app_id": "33453",
|
|
39
|
+
"filter": [
|
|
40
|
+
{
|
|
41
|
+
"field_id": 796213,
|
|
42
|
+
"data_type": "radio_button",
|
|
43
|
+
"valuesArray": [
|
|
44
|
+
"2"
|
|
45
|
+
],
|
|
46
|
+
"search_type": "equal_or",
|
|
47
|
+
"$$hashKey": "object:10830",
|
|
48
|
+
"selected_search_option_variable": "Value"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"field_id": 796222,
|
|
52
|
+
"data_type": "radio_button",
|
|
53
|
+
"valuesArray": [
|
|
54
|
+
"1"
|
|
55
|
+
],
|
|
56
|
+
"search_type": "equal_or",
|
|
57
|
+
"$$hashKey": "object:10872",
|
|
58
|
+
"selected_search_option_variable": "Value"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|