Skip to content

Commit 5945b85

Browse files
committed
feat: add mock blog
1 parent 9f35eb1 commit 5945b85

22 files changed

+2279
-0
lines changed

next.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const {patchWebpackConfig} = require('next-global-css');
88
const withTM = require('next-transpile-modules')([
99
'@gravity-ui/uikit',
1010
'@gravity-ui/page-constructor',
11+
'@gravity-ui/blog-constructor',
1112
'@gravity-ui/components',
1213
'@gravity-ui/date-components',
1314
'@gravity-ui/navigation',

public/locales/en/blog.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"meta_title": "Blog",
3+
"meta_description": "Articles, news and updates from Gravity UI team",
4+
"page_title": "Blog",
5+
"page_description": "Latest articles and updates",
6+
"post_readingTime": "{{minutes}} min read",
7+
"post_publishedAt": "Published on",
8+
"post_updatedAt": "Updated on",
9+
"post_backToBlog": "Back to Blog",
10+
"post_share": "Share",
11+
"post_tags": "Tags",
12+
"post_relatedPosts": "Related posts",
13+
"post_notFound": "Post not found",
14+
"post_notFoundDescription": "The article you are looking for doesn't exist or has been removed.",
15+
"filter_search": "Search",
16+
"filter_searchPlaceholder": "Search articles...",
17+
"filter_tags": "Tags",
18+
"filter_services": "Services",
19+
"filter_allTags": "All tags",
20+
"filter_allServices": "All services",
21+
"filter_clearFilters": "Clear filters",
22+
"filter_noResults": "No articles found",
23+
"filter_noResultsDescription": "Try changing your search query or filters",
24+
"pagination_previous": "Previous",
25+
"pagination_next": "Next",
26+
"pagination_page": "Page {{page}} of {{total}}",
27+
"error_loadFailed": "Failed to load content",
28+
"error_tryAgain": "Try again",
29+
"author_by": "By",
30+
"author_authors": "Authors",
31+
"pinnedPost": "Pinned"
32+
}
33+

public/locales/en/common.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"menu_icons": "Icons",
1313
"menu_themer": "Themer",
1414
"menu_media": "Media",
15+
"menu_blog": "Blog",
1516
"roadmap_inProgress": "In progress",
1617
"navigation_previous": "Previous",
1718
"navigation_next": "Next",

public/locales/ru/blog.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"meta_title": "Блог",
3+
"meta_description": "Статьи, новости и обновления от команды Gravity UI",
4+
"page_title": "Блог",
5+
"page_description": "Последние статьи и обновления",
6+
"post_readingTime": "{{minutes}} мин",
7+
"post_publishedAt": "Опубликовано",
8+
"post_updatedAt": "Обновлено",
9+
"post_backToBlog": "Вернуться в блог",
10+
"post_share": "Поделиться",
11+
"post_tags": "Теги",
12+
"post_relatedPosts": "Похожие статьи",
13+
"post_notFound": "Статья не найдена",
14+
"post_notFoundDescription": "Статья, которую вы ищете, не существует или была удалена.",
15+
"filter_search": "Поиск",
16+
"filter_searchPlaceholder": "Поиск статей...",
17+
"filter_tags": "Теги",
18+
"filter_services": "Сервисы",
19+
"filter_allTags": "Все теги",
20+
"filter_allServices": "Все сервисы",
21+
"filter_clearFilters": "Очистить фильтры",
22+
"filter_noResults": "Статьи не найдены",
23+
"filter_noResultsDescription": "Попробуйте изменить запрос или фильтры",
24+
"pagination_previous": "Назад",
25+
"pagination_next": "Далее",
26+
"pagination_page": "Страница {{page}} из {{total}}",
27+
"error_loadFailed": "Не удалось загрузить контент",
28+
"error_tryAgain": "Попробовать снова",
29+
"author_by": "Автор",
30+
"author_authors": "Авторы",
31+
"pinnedPost": "Закреплено"
32+
}
33+

public/locales/ru/common.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"menu_icons": "Иконки",
1616
"menu_themer": "Темизатор",
1717
"menu_media": "Медиа",
18+
"menu_blog": "Блог",
1819
"roadmap_inProgress": "В работе",
1920
"navigation_previous": "Назад",
2021
"navigation_next": "Далее",

src/api/.mocks/blogPage.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"id": 969,
3+
"name": "blog",
4+
"createdAt": "2022-08-24T15:40:07.513Z",
5+
"updatedAt": "2022-08-24T15:40:07.513Z",
6+
"type": "default",
7+
"isDeleted": false,
8+
"pageId": 969,
9+
"locale": "ru",
10+
"publishedVersionId": 17498,
11+
"lastVersionId": 17498,
12+
"content": {
13+
"blocks": [
14+
{
15+
"type": "blog-feed-block",
16+
"resetPaddings": true,
17+
"image": "https://storage.yandexcloud.net/cloud-www-assets/constructor/storybook/images/img_8-12_light.png",
18+
"title": "Blog"
19+
}
20+
]
21+
},
22+
"title": "Blog",
23+
"noIndex": false,
24+
"shareTitle": null,
25+
"shareDescription": null,
26+
"shareImage": null,
27+
"pageLocaleId": 1261,
28+
"author": "author",
29+
"metaDescription": null,
30+
"keywords": [],
31+
"shareGenImage": null,
32+
"shareGenTitle": null,
33+
"tempShareGenTitle": null,
34+
"solution": null,
35+
"service": null,
36+
"regions": [],
37+
"locales": [
38+
{
39+
"locale": "en",
40+
"publishedVersionId": null
41+
},
42+
{
43+
"locale": "ru",
44+
"publishedVersionId": 17498
45+
}
46+
]
47+
}

src/api/.mocks/contentBlocks.json

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
[
2+
{
3+
"type": "blog-media-block",
4+
"column": "left",
5+
"resetPaddings": true,
6+
"text": "<p><strong>Lorem ipsum dolor sit amet</strong> <a href=\"https://example.com\">consectetur adipiscing elit</a> sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>",
7+
"image": "https://storage.yandexcloud.net/cloud-www-assets/constructor/storybook/images/img_8-12_dark.png",
8+
"fullWidth": false
9+
},
10+
{
11+
"type": "blog-yfm-block",
12+
"column": "right",
13+
"resetPaddings": true,
14+
"text": "<p><strong>Lorem ipsum dolor sit amet</strong> <a href=\"https://example.com\">consectetur adipiscing elit</a> sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>",
15+
"buttons": [
16+
{
17+
"text": "Get",
18+
"url": "http://example.com/",
19+
"theme": "action"
20+
}
21+
]
22+
},
23+
{
24+
"type": "blog-yfm-block",
25+
"column": "left",
26+
"resetPaddings": true,
27+
"text": "<p><strong>Lorem ipsum dolor sit amet</strong> <a href=\"https://example.com\">consectetur adipiscing elit</a> sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>",
28+
"buttons": [
29+
{
30+
"text": "Get",
31+
"url": "http://example.com/",
32+
"theme": "outlined-info",
33+
"size": "xl"
34+
}
35+
],
36+
"additionalInfo": "Lorem ipsum dolor sit amet. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
37+
},
38+
{
39+
"type": "blog-yfm-block",
40+
"column": "left",
41+
"resetPaddings": true,
42+
"text": "<p><strong>Lorem ipsum dolor sit amet</strong> <a href=\"https://example.com\">consectetur adipiscing elit</a> sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>",
43+
"links": [
44+
{
45+
"text": "sed do",
46+
"url": "http://example.com/",
47+
"arrow": true,
48+
"theme": "normal"
49+
}
50+
]
51+
},
52+
{
53+
"type": "blog-yfm-block",
54+
"column": "left",
55+
"resetPaddings": true,
56+
"text": "<p><strong>Lorem ipsum dolor sit amet</strong> <a href=\"https://example.com\">consectetur adipiscing elit</a> sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>"
57+
},
58+
{
59+
"type": "blog-media-block",
60+
"column": "left",
61+
"resetPaddings": true,
62+
"text": "<p><strong>Lorem ipsum dolor sit amet</strong> <a href=\"https://example.com\">consectetur adipiscing elit</a> sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>",
63+
"youtube": "https://youtu.be/bxZRUtMAlFI",
64+
"fullWidth": false
65+
},
66+
{
67+
"type": "blog-yfm-block",
68+
"column": "left",
69+
"resetPaddings": true,
70+
"text": "<p><strong>Lorem ipsum dolor sit amet</strong> <a href=\"https://example.com\">consectetur adipiscing elit</a> sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>"
71+
},
72+
{
73+
"type": "blog-colored-text-block",
74+
"column": "left",
75+
"resetPaddings": true,
76+
"background": {
77+
"color": "#EFF2F8"
78+
},
79+
"text": "<p><strong>Lorem ipsum dolor sit amet</strong> <a href=\"https://example.com\">consectetur adipiscing elit</a> sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>"
80+
},
81+
{
82+
"type": "blog-yfm-block",
83+
"column": "left",
84+
"resetPaddings": true,
85+
"text": "<p><strong>Lorem ipsum dolor sit amet</strong> <a href=\"https://example.com\">consectetur adipiscing elit</a> sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>"
86+
},
87+
{
88+
"type": "blog-colored-text-block",
89+
"column": "left",
90+
"resetPaddings": true,
91+
"background": {
92+
"image": "https://storage.yandexcloud.net/cloud-www-assets/constructor/storybook/images/img_8-12_light.png",
93+
"altText": "alt text from bo"
94+
},
95+
"title": "Lorem ipsum ",
96+
"text": "<p><strong>Lorem ipsum dolor sit amet</strong> <a href=\"https://example.com\">consectetur adipiscing elit</a> sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>"
97+
},
98+
{
99+
"type": "blog-yfm-block",
100+
"column": "left",
101+
"resetPaddings": true,
102+
"text": "<p><strong>Lorem ipsum dolor sit amet</strong> <a href=\"https://example.com\">consectetur adipiscing elit</a> sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>"
103+
}
104+
]

src/api/.mocks/forms.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"default": {
3+
"type": "blog-form-block",
4+
"paddingTop": "xl",
5+
"formData": {
6+
"hubspot": {
7+
"region": "eu1",
8+
"portalId": "25764979",
9+
"formId": "a3eb06a6-e8ce-45d4-81bd-7fadb7dab313"
10+
}
11+
}
12+
},
13+
"yandexForm": {
14+
"formData": {
15+
"yandex": {
16+
"theme": "default",
17+
"id": "61a4e639d4d24e0dbba36f5c",
18+
"customFormSection": "cloud"
19+
}
20+
}
21+
}
22+
}

src/api/.mocks/layoutBlock.json

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"type": "blog-layout-block",
3+
"resetPaddings": true,
4+
"mobileOrder": "reverse",
5+
"children": [
6+
{
7+
"type": "blog-author-block",
8+
"column": "right",
9+
"resetPaddings": true,
10+
"authorId": 386
11+
},
12+
{
13+
"type": "blog-author-block",
14+
"column": "right",
15+
"resetPaddings": true,
16+
"authorId": 292
17+
},
18+
{
19+
"type": "blog-author-block",
20+
"column": "right",
21+
"resetPaddings": true,
22+
"authorId": 290
23+
},
24+
{
25+
"type": "blog-author-block",
26+
"column": "right",
27+
"resetPaddings": true,
28+
"authorId": 396
29+
},
30+
{
31+
"type": "blog-author-block",
32+
"column": "right",
33+
"resetPaddings": true,
34+
"authorId": 392
35+
},
36+
{
37+
"type": "blog-yfm-block",
38+
"column": "left",
39+
"resetPaddings": true,
40+
"text": "<p><strong>Lorem ipsum dolor sit amet</strong> <a href=\"https://example.com\">consectetur adipiscing elit</a> sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>"
41+
},
42+
{
43+
"type": "blog-banner-block",
44+
"resetPaddings": true,
45+
"title": "Lorem ipsum dolor sit amet, consectetur adipiscing elit",
46+
"text": "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
47+
"color": "#5282FF",
48+
"theme": "dark",
49+
"image": "https://storage.yandexcloud.net/cloud-www-assets/constructor/storybook/images/img_8-12_light.png",
50+
"buttons": [
51+
{
52+
"text": "Get",
53+
"url": "http://example.com/",
54+
"theme": "normal-contrast"
55+
}
56+
],
57+
"fullWidth": false,
58+
"column": "left"
59+
},
60+
{
61+
"type": "card-with-image",
62+
"image": "https://storage.yandexcloud.net/cloud-www-assets/constructor/storybook/images/img_8-12_light.png",
63+
"title": "Lorem ipsum",
64+
"description": "Ut enim ad minim veniam, quis nostrud exercitation",
65+
"column": "left"
66+
}
67+
]
68+
}

0 commit comments

Comments
 (0)