@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,89 @@
|
|
|
1
|
+
import html from './recent-posts.html';
|
|
2
|
+
import { generateArticlesAndCommentsObject } from '../../generate-articles-and-comments-object.js';
|
|
3
|
+
import authorObject from './author-object.json';
|
|
4
|
+
import './recent-posts.scss';
|
|
5
|
+
|
|
6
|
+
class RecentPosts extends GHComponent {
|
|
7
|
+
constructor() {
|
|
8
|
+
super();
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
async onServerRender() {
|
|
12
|
+
let articlesAndComments = await gudhub.jsonConstructor(await generateArticlesAndCommentsObject());
|
|
13
|
+
console.log('articlesAndComments',articlesAndComments)
|
|
14
|
+
let articles = articlesAndComments.articlesAndComments.articles;
|
|
15
|
+
console.log('articles',articles)
|
|
16
|
+
let comments = articlesAndComments.articlesAndComments.comments;
|
|
17
|
+
let categories = articlesAndComments.articlesAndComments.categories;
|
|
18
|
+
|
|
19
|
+
const authors = await gudhub.jsonConstructor(authorObject);
|
|
20
|
+
this.authors = authors.authors;
|
|
21
|
+
|
|
22
|
+
this.articles = articles.slice(0, 3);
|
|
23
|
+
for (let article in this.articles) {
|
|
24
|
+
let commentsQuantity = 0;
|
|
25
|
+
for (let comment in comments) {
|
|
26
|
+
if (comments[comment].article_id == this.articles[article].id) {
|
|
27
|
+
commentsQuantity++;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
this.articles[article].commentsQuantity = commentsQuantity;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
for (let article = 0; article < this.articles.length; article++) {
|
|
34
|
+
// CATEGORIES
|
|
35
|
+
this.articles[article].rating.avg = Number(this.articles[article].rating.avg.toFixed(1));
|
|
36
|
+
const post = this.articles[article];
|
|
37
|
+
post.category = [];
|
|
38
|
+
|
|
39
|
+
for (let category in post.categories) {
|
|
40
|
+
let categoryName = this.articles[article].categories[category].fields.find(field => field.field_id == window.constants.chapters.blog.heading_field_id).field_value;
|
|
41
|
+
let categorySlug = this.articles[article].categories[category].fields.find(field => field.field_id == window.constants.chapters.blog.slug_field_id).field_value;
|
|
42
|
+
let categoryObject = {
|
|
43
|
+
"name": categoryName,
|
|
44
|
+
"slug": categorySlug
|
|
45
|
+
}
|
|
46
|
+
post.category.push(categoryObject)
|
|
47
|
+
}
|
|
48
|
+
this.articles[article].categories = post.category;
|
|
49
|
+
delete this.articles[article].category;
|
|
50
|
+
|
|
51
|
+
// AUTHORS
|
|
52
|
+
console.log(this.authors)
|
|
53
|
+
let authorSlug = this.authors.find(author => {
|
|
54
|
+
if (author.author_id == this.articles[article].author_id) {
|
|
55
|
+
return author
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
console.log(authorSlug)
|
|
59
|
+
this.articles[article].author_slug = authorSlug.slug
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// INTRO
|
|
63
|
+
const promises = [];
|
|
64
|
+
this.articles.forEach((article, index) => {
|
|
65
|
+
promises.push(new Promise(async (resolve) => {
|
|
66
|
+
let content = await gudhub.getInterpretationById(window.constants.chapters.blog.app_id, article.id.split('.')[1], article.intro_id, 'html');
|
|
67
|
+
this.articles[index].intro = content;
|
|
68
|
+
resolve();
|
|
69
|
+
}));
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
await new Promise(resolve => {
|
|
73
|
+
Promise.all(promises).then(() => {
|
|
74
|
+
resolve();
|
|
75
|
+
})
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
super.render(html);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
openArticle(post) {
|
|
82
|
+
if (event.target.tagName != 'A' ) {
|
|
83
|
+
let href = post.querySelector('.post_left a').href;
|
|
84
|
+
window.location.href = href;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
window.customElements.define('recent-posts', RecentPosts);
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"id": 3,
|
|
4
|
+
"childs": [
|
|
5
|
+
{
|
|
6
|
+
"type": "array",
|
|
7
|
+
"id": 1,
|
|
8
|
+
"childs": [
|
|
9
|
+
{
|
|
10
|
+
"type": "property",
|
|
11
|
+
"id": 3,
|
|
12
|
+
"property_name": "article_id",
|
|
13
|
+
"property_type": "field_value",
|
|
14
|
+
"name_space": "article"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"property_name": "comments",
|
|
18
|
+
"app_id": "33454",
|
|
19
|
+
"filter": [
|
|
20
|
+
{
|
|
21
|
+
"field_id": 796249,
|
|
22
|
+
"data_type": "radio_button",
|
|
23
|
+
"valuesArray": [
|
|
24
|
+
"1"
|
|
25
|
+
],
|
|
26
|
+
"search_type": "equal_or",
|
|
27
|
+
"selected_search_option_variable": "Value"
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"type": "array",
|
|
33
|
+
"id": 1,
|
|
34
|
+
"childs": [
|
|
35
|
+
{
|
|
36
|
+
"type": "property",
|
|
37
|
+
"id": 3,
|
|
38
|
+
"property_name": "h1",
|
|
39
|
+
"property_type": "field_value",
|
|
40
|
+
"name_space": "h1",
|
|
41
|
+
"interpretation": 1
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"type": "property",
|
|
45
|
+
"id": 4,
|
|
46
|
+
"property_name": "slug",
|
|
47
|
+
"property_type": "field_value",
|
|
48
|
+
"name_space": "slug",
|
|
49
|
+
"interpretation": 1
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"type": "property",
|
|
53
|
+
"id": 5,
|
|
54
|
+
"property_name": "id",
|
|
55
|
+
"property_type": "variable",
|
|
56
|
+
"variable_type": "current_item"
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"property_name": "categories",
|
|
60
|
+
"app_id": "33453",
|
|
61
|
+
"filter": [
|
|
62
|
+
{
|
|
63
|
+
"field_id": 796213,
|
|
64
|
+
"data_type": "radio_button",
|
|
65
|
+
"boolean_strategy": "and",
|
|
66
|
+
"valuesArray": [
|
|
67
|
+
"2"
|
|
68
|
+
],
|
|
69
|
+
"search_type": "equal_or",
|
|
70
|
+
"$$hashKey": "object:9190",
|
|
71
|
+
"selected_search_option_variable": "Value"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"field_id": 796222,
|
|
75
|
+
"data_type": "radio_button",
|
|
76
|
+
"boolean_strategy": "and",
|
|
77
|
+
"valuesArray": [
|
|
78
|
+
"1"
|
|
79
|
+
],
|
|
80
|
+
"search_type": "equal_or",
|
|
81
|
+
"$$hashKey": "object:9236",
|
|
82
|
+
"selected_search_option_variable": "Value"
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"isSortable": 0
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"type": "array",
|
|
89
|
+
"id": 1,
|
|
90
|
+
"childs": [
|
|
91
|
+
{
|
|
92
|
+
"type": "property",
|
|
93
|
+
"id": 3,
|
|
94
|
+
"property_name": "title",
|
|
95
|
+
"property_type": "field_value",
|
|
96
|
+
"name_space": "title",
|
|
97
|
+
"interpretation": 1
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"type": "property",
|
|
101
|
+
"id": 7,
|
|
102
|
+
"property_name": "intro",
|
|
103
|
+
"property_type": "field_value",
|
|
104
|
+
"name_space": "intro"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"type": "property",
|
|
108
|
+
"id": 21,
|
|
109
|
+
"property_name": "categories",
|
|
110
|
+
"property_type": "function",
|
|
111
|
+
"function": "function(item, appId) {\n const app = await gudhub.getApp(appId);\n const categoryField = item.fields.find(field => field.field_id == 796231);\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}"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"type": "property",
|
|
115
|
+
"id": 18,
|
|
116
|
+
"property_name": "updated_at",
|
|
117
|
+
"property_type": "field_value",
|
|
118
|
+
"name_space": "updated_at"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"type": "property",
|
|
122
|
+
"id": 20,
|
|
123
|
+
"property_name": "rating",
|
|
124
|
+
"property_type": "function",
|
|
125
|
+
"function": "function(item, appId, gudhub) {\n const app = await gudhub.getApp(appId);\n let ratings = item.fields.find(field => field.field_id == 796224);\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}"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"type": "property",
|
|
129
|
+
"id": 19,
|
|
130
|
+
"property_name": "views",
|
|
131
|
+
"property_type": "field_value",
|
|
132
|
+
"name_space": "views",
|
|
133
|
+
"interpretation": 1
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"type": "property",
|
|
137
|
+
"id": 13,
|
|
138
|
+
"property_name": "thumbnail_src",
|
|
139
|
+
"property_type": "field_value",
|
|
140
|
+
"name_space": "thumbnail_src",
|
|
141
|
+
"interpretation": 1
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"type": "property",
|
|
145
|
+
"id": 15,
|
|
146
|
+
"property_name": "thumbnail_alt",
|
|
147
|
+
"property_type": "field_value",
|
|
148
|
+
"name_space": "thumbnail_alt",
|
|
149
|
+
"interpretation": 1
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"type": "property",
|
|
153
|
+
"id": 16,
|
|
154
|
+
"property_name": "thumbnail_title",
|
|
155
|
+
"property_type": "field_value",
|
|
156
|
+
"name_space": "thumbnail_title",
|
|
157
|
+
"interpretation": 1
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"type": "property",
|
|
161
|
+
"id": 14,
|
|
162
|
+
"property_name": "thumbnail",
|
|
163
|
+
"property_type": "field_value",
|
|
164
|
+
"name_space": "thumbnail",
|
|
165
|
+
"interpretation": 1
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"type": "property",
|
|
169
|
+
"id": 17,
|
|
170
|
+
"property_name": "posted_at",
|
|
171
|
+
"property_type": "field_value",
|
|
172
|
+
"name_space": "posted_at"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"type": "property",
|
|
176
|
+
"id": 4,
|
|
177
|
+
"property_name": "slug",
|
|
178
|
+
"property_type": "field_value",
|
|
179
|
+
"name_space": "slug",
|
|
180
|
+
"interpretation": 1
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"type": "property",
|
|
184
|
+
"id": 12,
|
|
185
|
+
"property_name": "h1",
|
|
186
|
+
"property_type": "field_value",
|
|
187
|
+
"name_space": "h1",
|
|
188
|
+
"interpretation": 1
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"type": "property",
|
|
192
|
+
"id": 10,
|
|
193
|
+
"property_name": "author_id",
|
|
194
|
+
"property_type": "field_value",
|
|
195
|
+
"name_space": "author"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"type": "property",
|
|
199
|
+
"id": 11,
|
|
200
|
+
"property_name": "intro_id",
|
|
201
|
+
"property_type": "field_id",
|
|
202
|
+
"name_space": "intro"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"type": "property",
|
|
206
|
+
"id": 9,
|
|
207
|
+
"property_name": "time_to_read",
|
|
208
|
+
"property_type": "field_value",
|
|
209
|
+
"name_space": "time_to_read",
|
|
210
|
+
"interpretation": 1
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"type": "property",
|
|
214
|
+
"id": 8,
|
|
215
|
+
"property_name": "author",
|
|
216
|
+
"property_type": "field_value",
|
|
217
|
+
"name_space": "author",
|
|
218
|
+
"interpretation": 1
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"type": "property",
|
|
222
|
+
"id": 5,
|
|
223
|
+
"property_name": "id",
|
|
224
|
+
"property_type": "variable",
|
|
225
|
+
"variable_type": "current_item"
|
|
226
|
+
}
|
|
227
|
+
],
|
|
228
|
+
"property_name": "articles",
|
|
229
|
+
"app_id": "33453",
|
|
230
|
+
"filter": [
|
|
231
|
+
{
|
|
232
|
+
"field_id": 796213,
|
|
233
|
+
"data_type": "radio_button",
|
|
234
|
+
"valuesArray": [
|
|
235
|
+
"0"
|
|
236
|
+
],
|
|
237
|
+
"search_type": "equal_or",
|
|
238
|
+
"$$hashKey": "object:17515",
|
|
239
|
+
"selected_search_option_variable": "Value"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"field_id": 796222,
|
|
243
|
+
"data_type": "radio_button",
|
|
244
|
+
"valuesArray": [
|
|
245
|
+
"1"
|
|
246
|
+
],
|
|
247
|
+
"search_type": "equal_or",
|
|
248
|
+
"$$hashKey": "object:17557",
|
|
249
|
+
"selected_search_option_variable": "Value"
|
|
250
|
+
}
|
|
251
|
+
],
|
|
252
|
+
"isSortable": 1,
|
|
253
|
+
"field_id_to_sort": "796229",
|
|
254
|
+
"sortType": "desc"
|
|
255
|
+
}
|
|
256
|
+
],
|
|
257
|
+
"property_name": "articlesAndComments"
|
|
258
|
+
}
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
recent-posts {
|
|
2
|
+
background: #f0f2f3;
|
|
3
|
+
h2 {
|
|
4
|
+
text-align: center;
|
|
5
|
+
margin-bottom: 45px;
|
|
6
|
+
font-size: 36px;
|
|
7
|
+
}
|
|
8
|
+
.button {
|
|
9
|
+
margin: 0 auto;
|
|
10
|
+
background-color: #00BFD6;
|
|
11
|
+
}
|
|
12
|
+
.recent_posts {
|
|
13
|
+
.posts_wrapper {
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-wrap: wrap;
|
|
16
|
+
}
|
|
17
|
+
.post {
|
|
18
|
+
background-color: #fff;
|
|
19
|
+
background: #ffffff;
|
|
20
|
+
border: 1px solid #dbe2e7;
|
|
21
|
+
transition: all .2s ease;
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
&:hover {
|
|
24
|
+
box-shadow: 3px 3px 15px rgb(174 174 192 / 30%);
|
|
25
|
+
.read_more {
|
|
26
|
+
a {
|
|
27
|
+
color: #00BFD6;
|
|
28
|
+
svg path {
|
|
29
|
+
stroke: #00BFD6;
|
|
30
|
+
}
|
|
31
|
+
&::before {
|
|
32
|
+
width: 100%;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
.post_right {
|
|
38
|
+
padding: 24px;
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
justify-content: space-between;
|
|
42
|
+
height: calc(100% - 200px);
|
|
43
|
+
}
|
|
44
|
+
.author_date {
|
|
45
|
+
display: flex;
|
|
46
|
+
margin-bottom: 16px;
|
|
47
|
+
& > * {
|
|
48
|
+
margin-right: 4px;
|
|
49
|
+
font-size: 14px;
|
|
50
|
+
line-height: 17px;
|
|
51
|
+
color: #141616;
|
|
52
|
+
&:last-child {
|
|
53
|
+
margin-right: 0;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
& > a {
|
|
57
|
+
font-size: 14px;
|
|
58
|
+
line-height: 17px;
|
|
59
|
+
color: #0c6980;
|
|
60
|
+
display: block;
|
|
61
|
+
position: relative;
|
|
62
|
+
transition: all .2s ease;
|
|
63
|
+
&::after {
|
|
64
|
+
content: '';
|
|
65
|
+
position: absolute;
|
|
66
|
+
bottom: -5px;
|
|
67
|
+
left: 0;
|
|
68
|
+
width: 0;
|
|
69
|
+
height: 1px;
|
|
70
|
+
background-color: #00BFD6;
|
|
71
|
+
transition: all .2s ease;
|
|
72
|
+
}
|
|
73
|
+
&:hover {
|
|
74
|
+
color: #00BFD6;
|
|
75
|
+
&::after {
|
|
76
|
+
width: 100%;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
.intro {
|
|
82
|
+
font-size: 16px;
|
|
83
|
+
line-height: 24px;
|
|
84
|
+
color: #4d555b;
|
|
85
|
+
margin-bottom: 24px;
|
|
86
|
+
p {
|
|
87
|
+
-webkit-line-clamp: 3;
|
|
88
|
+
-webkit-box-orient: vertical;
|
|
89
|
+
display: -webkit-box;
|
|
90
|
+
overflow: hidden;
|
|
91
|
+
text-overflow: ellipsis;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
.read_more {
|
|
95
|
+
display: flex;
|
|
96
|
+
a {
|
|
97
|
+
display: flex;
|
|
98
|
+
align-items: center;
|
|
99
|
+
font-size: 18px;
|
|
100
|
+
line-height: 25px;
|
|
101
|
+
color: #141616;
|
|
102
|
+
padding: 10px 20px;
|
|
103
|
+
padding-left: 0;
|
|
104
|
+
position: relative;
|
|
105
|
+
transition: all .2s ease;
|
|
106
|
+
svg path {
|
|
107
|
+
transition: all .2s ease;
|
|
108
|
+
}
|
|
109
|
+
&::after {
|
|
110
|
+
content: '';
|
|
111
|
+
position: absolute;
|
|
112
|
+
width: 100%;
|
|
113
|
+
height: 1px;
|
|
114
|
+
background-color: #141616;
|
|
115
|
+
bottom: 0;
|
|
116
|
+
left: 0;
|
|
117
|
+
}
|
|
118
|
+
&::before {
|
|
119
|
+
content: '';
|
|
120
|
+
position: absolute;
|
|
121
|
+
width: 0;
|
|
122
|
+
height: 1px;
|
|
123
|
+
background-color: #00BFD6;
|
|
124
|
+
bottom: 0;
|
|
125
|
+
left: 0;
|
|
126
|
+
z-index: 2;
|
|
127
|
+
transition: all .2s ease;
|
|
128
|
+
}
|
|
129
|
+
svg {
|
|
130
|
+
margin-left: 10px;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
h3 {
|
|
135
|
+
font-size: 24px;
|
|
136
|
+
line-height: 33px;
|
|
137
|
+
color: #141616;
|
|
138
|
+
margin-bottom: 8px;
|
|
139
|
+
}
|
|
140
|
+
.top_flex {
|
|
141
|
+
display: flex;
|
|
142
|
+
align-items: flex-start;
|
|
143
|
+
margin-bottom: 16px;
|
|
144
|
+
flex-direction: column;
|
|
145
|
+
& > * {
|
|
146
|
+
margin-right: 16px;
|
|
147
|
+
font-size: 14px;
|
|
148
|
+
line-height: 17px;
|
|
149
|
+
color: #111111;
|
|
150
|
+
display: flex;
|
|
151
|
+
align-items: center;
|
|
152
|
+
& > div {
|
|
153
|
+
margin-right: 16px;
|
|
154
|
+
&:last-child {
|
|
155
|
+
margin-right: 0;
|
|
156
|
+
white-space: nowrap;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
&:last-child {
|
|
160
|
+
margin-right: 0;
|
|
161
|
+
margin-top: 5px;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
.views,
|
|
165
|
+
.rating,
|
|
166
|
+
.comments {
|
|
167
|
+
display: flex;
|
|
168
|
+
align-items: center;
|
|
169
|
+
svg {
|
|
170
|
+
margin-right: 10px;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
.categories {
|
|
175
|
+
display: flex;
|
|
176
|
+
a {
|
|
177
|
+
background-color: #141616;
|
|
178
|
+
padding: 4px 8px;
|
|
179
|
+
font-size: 14px;
|
|
180
|
+
white-space: nowrap;
|
|
181
|
+
line-height: 17px;
|
|
182
|
+
color: #fff;
|
|
183
|
+
display: block;
|
|
184
|
+
transition: all .2s ease;
|
|
185
|
+
&:hover {
|
|
186
|
+
background-color: #00BFD6;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
@media screen and (min-width: 1200px) {
|
|
195
|
+
recent-posts {
|
|
196
|
+
.post {
|
|
197
|
+
width: 32.27%;
|
|
198
|
+
margin-right: 1.5%;
|
|
199
|
+
margin-bottom: 1.5%;
|
|
200
|
+
max-width: 464px;
|
|
201
|
+
img {
|
|
202
|
+
height: 200px;
|
|
203
|
+
object-fit: cover;
|
|
204
|
+
width: 100%;
|
|
205
|
+
}
|
|
206
|
+
&:nth-child(3n) {
|
|
207
|
+
margin-right: 0;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
@media screen and (max-width: 1200px) and (min-width: 770px) {
|
|
213
|
+
recent-posts {
|
|
214
|
+
.post {
|
|
215
|
+
width: 49%;
|
|
216
|
+
margin-right: 2%;
|
|
217
|
+
margin-bottom: 2%;
|
|
218
|
+
img {
|
|
219
|
+
width: 100%;
|
|
220
|
+
height: 200px;
|
|
221
|
+
object-fit: cover;
|
|
222
|
+
}
|
|
223
|
+
&:nth-child(2n) {
|
|
224
|
+
margin-right: 0;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
@media screen and (max-width: 920px) {
|
|
231
|
+
recent-posts .recent_posts .post .top_flex {
|
|
232
|
+
align-items: flex-start;
|
|
233
|
+
flex-direction: column;
|
|
234
|
+
& > div:first-child {
|
|
235
|
+
margin-bottom: 10px;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
@media screen and (max-width: 770px) {
|
|
240
|
+
recent-posts .recent_posts .post {
|
|
241
|
+
width: 100%;
|
|
242
|
+
margin-bottom: 15px;
|
|
243
|
+
.post_left {
|
|
244
|
+
img {
|
|
245
|
+
width: 100%;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
.post_right {
|
|
249
|
+
height: auto;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
@media screen and (max-width: 500px) {
|
|
254
|
+
recent-posts .recent_posts .post h3 {
|
|
255
|
+
font-size: 18px;
|
|
256
|
+
line-height: 24px;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
@media screen and (max-width: 400px) {
|
|
260
|
+
recent-posts {
|
|
261
|
+
h2 {
|
|
262
|
+
font-size: 28px;
|
|
263
|
+
margin-bottom: 30px;
|
|
264
|
+
}
|
|
265
|
+
.recent_posts .post {
|
|
266
|
+
.post_right {
|
|
267
|
+
padding: 10px;
|
|
268
|
+
}
|
|
269
|
+
.top_flex > * > div {
|
|
270
|
+
margin-right: 6px;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Відгуки про GudHub CRM",
|
|
3
|
+
"items": [
|
|
4
|
+
{
|
|
5
|
+
"author": "Сиченко Марія",
|
|
6
|
+
"position": "Проект-менеджер",
|
|
7
|
+
"review": "За допомогою CRM для бізнесу, я структурую дані та керую робочими процесами та задачами всього в кілька кліків! Це надзвичайна економія часу і зусиль! 100% рекомендую!))"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"author": "Делькевич Ілля",
|
|
11
|
+
"position": "Керівник департаменту",
|
|
12
|
+
"review": "Раджу всім купити CRM систему для бізнесу і полегшити робочі процеси у вашій компанії. Я вже зробила це, і GudHub платформа дійсно стала для мене знахідкою!"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"author": "Федорицкий Матвій",
|
|
16
|
+
"position": "IT BSD",
|
|
17
|
+
"review": "Для мене великим плюсом є універсальність цієї CRM для великого бізнесу. Тепер я можу керувати всіма робочими процесами без зайвих зусиль.)"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"author": "Сиченко Марія",
|
|
21
|
+
"position": "Проект-менеджер",
|
|
22
|
+
"review": "За допомогою CRM для бізнесу, я структурую дані та керую робочими процесами та задачами всього в кілька кліків! Це надзвичайна економія часу і зусиль! 100% рекомендую!))"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"author": "Федорицкий Матвій",
|
|
26
|
+
"position": "IT BSD",
|
|
27
|
+
"review": "Для мене великим плюсом є універсальність цієї CRM для великого бізнесу. Тепер я можу керувати всіма робочими процесами без зайвих зусиль.)"
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
}
|