From 7bf0152ad9db2ed30806eb9d2afffa05d469f5c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20B=C3=A4hr?= Date: Wed, 7 Nov 2018 13:10:03 +0100 Subject: [PATCH 01/27] Fix link target of drupal installation profile --- modules/custom/d_p_help/src/Controller/SupportController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/custom/d_p_help/src/Controller/SupportController.php b/modules/custom/d_p_help/src/Controller/SupportController.php index 91832be28..832a8ad87 100644 --- a/modules/custom/d_p_help/src/Controller/SupportController.php +++ b/modules/custom/d_p_help/src/Controller/SupportController.php @@ -21,8 +21,8 @@ public function render() { $output .= '

' . t('Support') . '

'; $output .= '

' . t('Do You need support with Droopler? - Droptica.com.', [':link' => 'https://droptica.com']) . '

'; $output .= '

' . t('Github') . '

'; - $output .= '

' . t('https://github.com/droptica/droopler_project - Boilerplate for new projects based on Droopler. If you wish to use Droopler - fork (or download) this repository. It contains a minimum set of code to start your new website.', [':link' => ' https://github.com/droptica/droopler_project']) . '

'; - $output .= '

' . t('https://github.com/droptica/droopler - This is Drupal installation profile.', [':link' => ' https://github.com/droptica/droopler_project']) . '

'; + $output .= '

' . t('https://github.com/droptica/droopler_project - Boilerplate for new projects based on Droopler. If you wish to use Droopler - fork (or download) this repository. It contains a minimum set of code to start your new website.', [':link' => 'https://github.com/droptica/droopler_project']) . '

'; + $output .= '

' . t('https://github.com/droptica/droopler - This is Drupal installation profile.', [':link' => 'https://github.com/droptica/droopler']) . '

'; return [ '#type' => 'markup', '#markup' => '
' . $output . '
', From 817d588e7d8f54fb375a5bc71a78f75ba827f5eb Mon Sep 17 00:00:00 2001 From: pszymanski Date: Fri, 9 Nov 2018 16:25:23 +0100 Subject: [PATCH 02/27] #DROOP-157 change size of p tag in mobile blog. --- .../custom/droopler_theme/scss/components/_d_blog.scss | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/themes/custom/droopler_theme/scss/components/_d_blog.scss b/themes/custom/droopler_theme/scss/components/_d_blog.scss index de194f50f..add91d70b 100644 --- a/themes/custom/droopler_theme/scss/components/_d_blog.scss +++ b/themes/custom/droopler_theme/scss/components/_d_blog.scss @@ -35,6 +35,8 @@ $d-blog-block-category-font-size-mobile: 0.625rem !default; $d-blog-image-margin: 2.1875rem auto !default; $d-blog-paragraph-text-margin: 1.5625rem auto !default; $d-blog-text-font-size-desktop: 1.25rem !default; +$d-blog-text-font-size-mobile: 1.07083125rem !default; + $d-blog-text-width-mobile: 85% !default; $d-blog-header-text-distance-from-bottom: -0.25rem !default; $d-blog-header-text-distance-from-top-mobile: 40% !default; @@ -227,6 +229,8 @@ $d-blog-size-of-large-desktop: 1400px !default; @include media-breakpoint-down(sm) { .field--name-field-d-long-text { width: $d-blog-text-width-mobile; + font-size: $d-blog-text-font-size-mobile; + h2 { font-size: $d-blog-header-h2-font-size-blog-text-mobile; } @@ -239,6 +243,12 @@ $d-blog-size-of-large-desktop: 1400px !default; width: 100%; } } + .field--name-field-blog-sections { + p { + font-size: $d-blog-text-font-size-mobile; + } + + } } @include media-breakpoint-up(lg) { From b212a0756a688b7722fdb63b49ea17a1c0c88b5e Mon Sep 17 00:00:00 2001 From: pszymanski Date: Fri, 9 Nov 2018 16:27:25 +0100 Subject: [PATCH 03/27] Revert "#DROOP-157 change size of p tag in mobile blog." This reverts commit 817d588 --- .../custom/droopler_theme/scss/components/_d_blog.scss | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/themes/custom/droopler_theme/scss/components/_d_blog.scss b/themes/custom/droopler_theme/scss/components/_d_blog.scss index add91d70b..de194f50f 100644 --- a/themes/custom/droopler_theme/scss/components/_d_blog.scss +++ b/themes/custom/droopler_theme/scss/components/_d_blog.scss @@ -35,8 +35,6 @@ $d-blog-block-category-font-size-mobile: 0.625rem !default; $d-blog-image-margin: 2.1875rem auto !default; $d-blog-paragraph-text-margin: 1.5625rem auto !default; $d-blog-text-font-size-desktop: 1.25rem !default; -$d-blog-text-font-size-mobile: 1.07083125rem !default; - $d-blog-text-width-mobile: 85% !default; $d-blog-header-text-distance-from-bottom: -0.25rem !default; $d-blog-header-text-distance-from-top-mobile: 40% !default; @@ -229,8 +227,6 @@ $d-blog-size-of-large-desktop: 1400px !default; @include media-breakpoint-down(sm) { .field--name-field-d-long-text { width: $d-blog-text-width-mobile; - font-size: $d-blog-text-font-size-mobile; - h2 { font-size: $d-blog-header-h2-font-size-blog-text-mobile; } @@ -243,12 +239,6 @@ $d-blog-size-of-large-desktop: 1400px !default; width: 100%; } } - .field--name-field-blog-sections { - p { - font-size: $d-blog-text-font-size-mobile; - } - - } } @include media-breakpoint-up(lg) { From 6e2f33f5377d796728df9025d1e80581f4b601c0 Mon Sep 17 00:00:00 2001 From: pszymanski Date: Fri, 9 Nov 2018 16:25:23 +0100 Subject: [PATCH 04/27] #DROOP-157 change size of p tag in mobile blog. --- .../custom/droopler_theme/scss/components/_d_blog.scss | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/themes/custom/droopler_theme/scss/components/_d_blog.scss b/themes/custom/droopler_theme/scss/components/_d_blog.scss index de194f50f..add91d70b 100644 --- a/themes/custom/droopler_theme/scss/components/_d_blog.scss +++ b/themes/custom/droopler_theme/scss/components/_d_blog.scss @@ -35,6 +35,8 @@ $d-blog-block-category-font-size-mobile: 0.625rem !default; $d-blog-image-margin: 2.1875rem auto !default; $d-blog-paragraph-text-margin: 1.5625rem auto !default; $d-blog-text-font-size-desktop: 1.25rem !default; +$d-blog-text-font-size-mobile: 1.07083125rem !default; + $d-blog-text-width-mobile: 85% !default; $d-blog-header-text-distance-from-bottom: -0.25rem !default; $d-blog-header-text-distance-from-top-mobile: 40% !default; @@ -227,6 +229,8 @@ $d-blog-size-of-large-desktop: 1400px !default; @include media-breakpoint-down(sm) { .field--name-field-d-long-text { width: $d-blog-text-width-mobile; + font-size: $d-blog-text-font-size-mobile; + h2 { font-size: $d-blog-header-h2-font-size-blog-text-mobile; } @@ -239,6 +243,12 @@ $d-blog-size-of-large-desktop: 1400px !default; width: 100%; } } + .field--name-field-blog-sections { + p { + font-size: $d-blog-text-font-size-mobile; + } + + } } @include media-breakpoint-up(lg) { From 7825d156038b0c1b26f9c7a39d2299749dcd0418 Mon Sep 17 00:00:00 2001 From: pszymanski Date: Mon, 12 Nov 2018 15:45:26 +0100 Subject: [PATCH 05/27] #DROOP-155 Add to menu, link to products. --- modules/custom/d_product/d_product.links.menu.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 modules/custom/d_product/d_product.links.menu.yml diff --git a/modules/custom/d_product/d_product.links.menu.yml b/modules/custom/d_product/d_product.links.menu.yml new file mode 100644 index 000000000..1e6e38a95 --- /dev/null +++ b/modules/custom/d_product/d_product.links.menu.yml @@ -0,0 +1,7 @@ +d_product.products: + title: 'Products' + description: 'List of products' + parent: main + route_name: view.products_list.products_list + menu_name: main + weight: -48 From 2633e649b2b94d9eea097b3fcbf8300dacc9bf4e Mon Sep 17 00:00:00 2001 From: pszymanski Date: Tue, 13 Nov 2018 09:27:13 +0100 Subject: [PATCH 06/27] #DROOP-154 Three columns in desktop. --- .../scss/components/_d_products.scss | 14 +++++++++++++- ...views-view-unformatted--products_list.html.twig | 4 ++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/themes/custom/droopler_theme/scss/components/_d_products.scss b/themes/custom/droopler_theme/scss/components/_d_products.scss index 13ee53f96..df1df4f18 100644 --- a/themes/custom/droopler_theme/scss/components/_d_products.scss +++ b/themes/custom/droopler_theme/scss/components/_d_products.scss @@ -265,7 +265,7 @@ $d-product-filters-group-margin: 3rem; transition: 0.3s; } margin-bottom: 1.875rem; - @include media-breakpoint-up(md) { + @include media-breakpoint-between(sm, md) { &:nth-child(odd) { padding-right: 1rem; } @@ -273,6 +273,18 @@ $d-product-filters-group-margin: 3rem; padding-left: 1rem; } } + @include media-breakpoint-up(lg) { + &:nth-child(1) { + padding-right: 1rem; + } + &:nth-child(even) { + padding-left: 1rem; + padding-right: 1rem; + } + &:nth-child(3) { + padding-left: 1rem; + } + } .node--view-mode-teaser { border: $d-product-view-border; diff --git a/themes/custom/droopler_theme/templates/product/views-view-unformatted--products_list.html.twig b/themes/custom/droopler_theme/templates/product/views-view-unformatted--products_list.html.twig index 44c211877..6613dbf73 100644 --- a/themes/custom/droopler_theme/templates/product/views-view-unformatted--products_list.html.twig +++ b/themes/custom/droopler_theme/templates/product/views-view-unformatted--products_list.html.twig @@ -17,11 +17,11 @@ #}
{% for row in rows %} - {% if (loop.index0 % 2 == 0) and not loop.first %} + {% if (loop.index0 % 3 == 0) and not loop.first %}
{% endif %} -
+
{{ row.content }}
{% endfor %} From e54f1061cf029e89e981fcc10dc18aa6e2dedac1 Mon Sep 17 00:00:00 2001 From: pszymanski Date: Tue, 13 Nov 2018 10:38:55 +0100 Subject: [PATCH 07/27] #DROOP-154 Better padding for desktop. Change twig structure. --- .../scss/components/_d_products.scss | 17 +++++++++-------- ...ws-view-unformatted--products_list.html.twig | 8 ++------ 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/themes/custom/droopler_theme/scss/components/_d_products.scss b/themes/custom/droopler_theme/scss/components/_d_products.scss index df1df4f18..22603ca9c 100644 --- a/themes/custom/droopler_theme/scss/components/_d_products.scss +++ b/themes/custom/droopler_theme/scss/components/_d_products.scss @@ -265,7 +265,7 @@ $d-product-filters-group-margin: 3rem; transition: 0.3s; } margin-bottom: 1.875rem; - @include media-breakpoint-between(sm, md) { + @include media-breakpoint-only(md) { &:nth-child(odd) { padding-right: 1rem; } @@ -274,15 +274,16 @@ $d-product-filters-group-margin: 3rem; } } @include media-breakpoint-up(lg) { - &:nth-child(1) { - padding-right: 1rem; + &:nth-child(3n+1) { + padding-right: 0.5rem; } - &:nth-child(even) { - padding-left: 1rem; - padding-right: 1rem; + &:nth-child(3n-1) { + // 30px is the standard bootstrap padding for .col + padding-left: calc(30px/2 + 0.25rem); + padding-right: calc(30px/2 + 0.25rem); } - &:nth-child(3) { - padding-left: 1rem; + &:nth-child(3n) { + padding-left: 0.5rem; } } diff --git a/themes/custom/droopler_theme/templates/product/views-view-unformatted--products_list.html.twig b/themes/custom/droopler_theme/templates/product/views-view-unformatted--products_list.html.twig index 6613dbf73..3d561bff1 100644 --- a/themes/custom/droopler_theme/templates/product/views-view-unformatted--products_list.html.twig +++ b/themes/custom/droopler_theme/templates/product/views-view-unformatted--products_list.html.twig @@ -17,12 +17,8 @@ #}
{% for row in rows %} - {% if (loop.index0 % 3 == 0) and not loop.first %} -
-
- {% endif %} -
+ {{ row.content }} -
+ {% endfor %}
From b734b763b0aea4dd10bbc4e6a1d6ea780b1a2f01 Mon Sep 17 00:00:00 2001 From: pszymanski Date: Tue, 13 Nov 2018 11:23:26 +0100 Subject: [PATCH 08/27] #DROOP-159 Fix bug with revision. --- themes/custom/droopler_theme/droopler_theme.theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/custom/droopler_theme/droopler_theme.theme b/themes/custom/droopler_theme/droopler_theme.theme index 6e734712c..933e10076 100644 --- a/themes/custom/droopler_theme/droopler_theme.theme +++ b/themes/custom/droopler_theme/droopler_theme.theme @@ -56,7 +56,7 @@ function droopler_theme_preprocess_page(&$variables) { // Make some exceptions for nodes with paragraphs or pages of given route. $currentRoute = \Drupal::routeMatch()->getRouteName(); - $nodeCheck = !empty($variables['node']) && in_array($variables['node']->getType(), ['content_page', 'blog_post']); + $nodeCheck = !empty($variables['node']) && method_exists($variables['node'], 'getType') && in_array($variables['node']->getType(), ['content_page', 'blog_post']); $routeCheck = $currentRoute == 'd_p_subscribe_file.downloadfile.checkLink'; if ($nodeCheck || $routeCheck) { $main_attributes['class'] = ['container-fluid']; From fc73baf4d0c56aef5836667097c53997bd1f19b9 Mon Sep 17 00:00:00 2001 From: pszymanski Date: Tue, 13 Nov 2018 13:56:48 +0100 Subject: [PATCH 09/27] #DROOP-161 Add translation of blog elements. --- droopler.install | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/droopler.install b/droopler.install index d90cab9ef..8aa2862f4 100644 --- a/droopler.install +++ b/droopler.install @@ -232,8 +232,20 @@ function droopler_update_8102() { 'd_geysir' ]; $moduleInstaller->install($modules, TRUE); + + try { + d_blog_add_translation('Blog text', 'Blog tekst', 'pl'); + d_blog_add_translation('Blog image', 'obraz do Bloga', 'pl'); + d_blog_add_translation('Image is on the width of the text', 'Obraz jest na szerokość tekstu', 'pl'); + d_blog_add_translation('Image is on the full width of the screen', 'Obraz jest na całą szerokość ekranu', 'pl'); + } + catch (\Exception $e) { + watchdog_exception('d_blog', $e); + } + $values['droopler__droopler_update_8102_5'] = TRUE; $values['droopler__droopler_update_8102_6'] = TRUE; + $values['droopler__droopler_update_8102_7'] = TRUE; $progress = [ 'v1.3' => [], From d9c0b5dde855feaf90f61d35aecda8200a9487df Mon Sep 17 00:00:00 2001 From: pszymanski Date: Tue, 13 Nov 2018 15:05:41 +0100 Subject: [PATCH 10/27] #DROOP-162 Add word-wrapp so it text looks better on mobile. --- .../custom/droopler_theme/scss/components/_d_p_text_paged.scss | 1 + themes/custom/droopler_theme/scss/layout/_global.scss | 1 + 2 files changed, 2 insertions(+) diff --git a/themes/custom/droopler_theme/scss/components/_d_p_text_paged.scss b/themes/custom/droopler_theme/scss/components/_d_p_text_paged.scss index d286b6b98..6958e8462 100644 --- a/themes/custom/droopler_theme/scss/components/_d_p_text_paged.scss +++ b/themes/custom/droopler_theme/scss/components/_d_p_text_paged.scss @@ -39,6 +39,7 @@ $d-p-text-paged-first-margin-top: 2% !default; .field--name-field-d-long-text { p { color: $d-p-text-paged-color; + word-wrap: break-word; } &:before { diff --git a/themes/custom/droopler_theme/scss/layout/_global.scss b/themes/custom/droopler_theme/scss/layout/_global.scss index 206bb31e2..40787976d 100644 --- a/themes/custom/droopler_theme/scss/layout/_global.scss +++ b/themes/custom/droopler_theme/scss/layout/_global.scss @@ -36,6 +36,7 @@ $light-gray-background: $color-hector !default; } a:not(.btn) { @include font-links; + word-wrap: break-word; } } .no-padding { From 8e42578aecf00e794cfff05c3334c75ad80313d5 Mon Sep 17 00:00:00 2001 From: pszymanski Date: Wed, 14 Nov 2018 08:51:34 +0100 Subject: [PATCH 11/27] #DROOP-154 Use boostrap variables. --- .../custom/droopler_theme/scss/components/_d_products.scss | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/themes/custom/droopler_theme/scss/components/_d_products.scss b/themes/custom/droopler_theme/scss/components/_d_products.scss index 22603ca9c..f41edcdd0 100644 --- a/themes/custom/droopler_theme/scss/components/_d_products.scss +++ b/themes/custom/droopler_theme/scss/components/_d_products.scss @@ -278,9 +278,8 @@ $d-product-filters-group-margin: 3rem; padding-right: 0.5rem; } &:nth-child(3n-1) { - // 30px is the standard bootstrap padding for .col - padding-left: calc(30px/2 + 0.25rem); - padding-right: calc(30px/2 + 0.25rem); + padding-left: calc(#{$grid-gutter-width}/4 + 0.25rem); + padding-right: calc(#{$grid-gutter-width}/4 + 0.25rem); } &:nth-child(3n) { padding-left: 0.5rem; From 9312c50af484d4684e1c5aafb404133072c981ed Mon Sep 17 00:00:00 2001 From: pszymanski Date: Wed, 14 Nov 2018 09:15:54 +0100 Subject: [PATCH 12/27] #DROOP-162 Add hyphens to wrapped text. --- .../custom/droopler_theme/scss/components/_d_p_text_paged.scss | 1 + themes/custom/droopler_theme/scss/layout/_global.scss | 1 + 2 files changed, 2 insertions(+) diff --git a/themes/custom/droopler_theme/scss/components/_d_p_text_paged.scss b/themes/custom/droopler_theme/scss/components/_d_p_text_paged.scss index 6958e8462..17c36d9b0 100644 --- a/themes/custom/droopler_theme/scss/components/_d_p_text_paged.scss +++ b/themes/custom/droopler_theme/scss/components/_d_p_text_paged.scss @@ -40,6 +40,7 @@ $d-p-text-paged-first-margin-top: 2% !default; p { color: $d-p-text-paged-color; word-wrap: break-word; + hyphens: auto; } &:before { diff --git a/themes/custom/droopler_theme/scss/layout/_global.scss b/themes/custom/droopler_theme/scss/layout/_global.scss index 40787976d..a1631bffc 100644 --- a/themes/custom/droopler_theme/scss/layout/_global.scss +++ b/themes/custom/droopler_theme/scss/layout/_global.scss @@ -37,6 +37,7 @@ $light-gray-background: $color-hector !default; a:not(.btn) { @include font-links; word-wrap: break-word; + hyphens: auto; } } .no-padding { From c5e6a94f04a7334fbdbbca3d0d785e823eff3ce7 Mon Sep 17 00:00:00 2001 From: pszymanski Date: Wed, 14 Nov 2018 10:53:12 +0100 Subject: [PATCH 13/27] #DROOP-155 Move products to the beginning of menu. --- modules/custom/d_product/d_product.links.menu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/custom/d_product/d_product.links.menu.yml b/modules/custom/d_product/d_product.links.menu.yml index 1e6e38a95..c3ab38254 100644 --- a/modules/custom/d_product/d_product.links.menu.yml +++ b/modules/custom/d_product/d_product.links.menu.yml @@ -4,4 +4,4 @@ d_product.products: parent: main route_name: view.products_list.products_list menu_name: main - weight: -48 + weight: -50 From 8d8128d422c30e0b2c39b71e676dde33a5a41cd0 Mon Sep 17 00:00:00 2001 From: pszymanski Date: Thu, 15 Nov 2018 09:09:03 +0100 Subject: [PATCH 14/27] #DROOP-161 add aditional translations. --- droopler.install | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/droopler.install b/droopler.install index 8aa2862f4..35b5b7cbe 100644 --- a/droopler.install +++ b/droopler.install @@ -235,7 +235,11 @@ function droopler_update_8102() { try { d_blog_add_translation('Blog text', 'Blog tekst', 'pl'); - d_blog_add_translation('Blog image', 'obraz do Bloga', 'pl'); + d_blog_add_translation('Blog image', 'Bloga obraz', 'pl'); + d_blog_add_translation('Blog main image', 'Blog główny obraz', 'pl'); + d_blog_add_translation('Blog sections', 'Sekcje bloga', 'pl'); + d_blog_add_translation('Blog category', 'Kategoria bloga', 'pl'); + d_blog_add_translation('Sample category', 'Przykładowa kategoria', 'pl'); d_blog_add_translation('Image is on the width of the text', 'Obraz jest na szerokość tekstu', 'pl'); d_blog_add_translation('Image is on the full width of the screen', 'Obraz jest na całą szerokość ekranu', 'pl'); } From 4341f59cba3e81a4bcb41bebc5af1a84192fe4e9 Mon Sep 17 00:00:00 2001 From: pszymanski Date: Thu, 15 Nov 2018 09:10:00 +0100 Subject: [PATCH 15/27] #DROOP-161 fix typo --- droopler.install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/droopler.install b/droopler.install index 35b5b7cbe..c31f35e4e 100644 --- a/droopler.install +++ b/droopler.install @@ -235,7 +235,7 @@ function droopler_update_8102() { try { d_blog_add_translation('Blog text', 'Blog tekst', 'pl'); - d_blog_add_translation('Blog image', 'Bloga obraz', 'pl'); + d_blog_add_translation('Blog image', 'Blog obraz', 'pl'); d_blog_add_translation('Blog main image', 'Blog główny obraz', 'pl'); d_blog_add_translation('Blog sections', 'Sekcje bloga', 'pl'); d_blog_add_translation('Blog category', 'Kategoria bloga', 'pl'); From f0fd26c21b9b5c1a46ce82a67cf7b76a3d10ec77 Mon Sep 17 00:00:00 2001 From: pszymanski Date: Thu, 15 Nov 2018 12:37:16 +0100 Subject: [PATCH 16/27] #DROOP-160 Show description tag the same as teaser to blog --- .../install/metatag.metatag_defaults.node__blog_post.yml | 7 +++++++ modules/custom/d_blog/d_blog.features.yml | 1 + modules/custom/d_blog/d_blog.info.yml | 1 + 3 files changed, 9 insertions(+) create mode 100644 modules/custom/d_blog/config/install/metatag.metatag_defaults.node__blog_post.yml diff --git a/modules/custom/d_blog/config/install/metatag.metatag_defaults.node__blog_post.yml b/modules/custom/d_blog/config/install/metatag.metatag_defaults.node__blog_post.yml new file mode 100644 index 000000000..6b01c7f44 --- /dev/null +++ b/modules/custom/d_blog/config/install/metatag.metatag_defaults.node__blog_post.yml @@ -0,0 +1,7 @@ +langcode: en +status: true +dependencies: { } +id: node__blog_post +label: 'Content: Blog post' +tags: + description: '[node:field_blog_teaser]' diff --git a/modules/custom/d_blog/d_blog.features.yml b/modules/custom/d_blog/d_blog.features.yml index 060a98e7a..754373ea4 100644 --- a/modules/custom/d_blog/d_blog.features.yml +++ b/modules/custom/d_blog/d_blog.features.yml @@ -1 +1,2 @@ +bundle: d required: true diff --git a/modules/custom/d_blog/d_blog.info.yml b/modules/custom/d_blog/d_blog.info.yml index dac567d7d..c7a4464e5 100644 --- a/modules/custom/d_blog/d_blog.info.yml +++ b/modules/custom/d_blog/d_blog.info.yml @@ -13,6 +13,7 @@ dependencies: - image - language - menu_ui + - metatag - node - paragraphs - path From 43ae75a85f568dad0af29f09d025122a5b5b8116 Mon Sep 17 00:00:00 2001 From: pszymanski Date: Thu, 15 Nov 2018 15:57:11 +0100 Subject: [PATCH 17/27] #DROOP-161 Blog teaser languages translation. --- droopler.install | 1 + 1 file changed, 1 insertion(+) diff --git a/droopler.install b/droopler.install index c31f35e4e..326561708 100644 --- a/droopler.install +++ b/droopler.install @@ -240,6 +240,7 @@ function droopler_update_8102() { d_blog_add_translation('Blog sections', 'Sekcje bloga', 'pl'); d_blog_add_translation('Blog category', 'Kategoria bloga', 'pl'); d_blog_add_translation('Sample category', 'Przykładowa kategoria', 'pl'); + d_blog_add_translation('Blog teaser', 'Krótki opis wpisu bloga', 'pl'); d_blog_add_translation('Image is on the width of the text', 'Obraz jest na szerokość tekstu', 'pl'); d_blog_add_translation('Image is on the full width of the screen', 'Obraz jest na całą szerokość ekranu', 'pl'); } From 01179e6d5c70ae754d56383864362dbd17b9821b Mon Sep 17 00:00:00 2001 From: pszymanski Date: Fri, 16 Nov 2018 14:39:09 +0100 Subject: [PATCH 18/27] #DROOP-155 Delete home link. --- .../d_content/modules/d_content_init/d_content_init.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/custom/d_content/modules/d_content_init/d_content_init.module b/modules/custom/d_content/modules/d_content_init/d_content_init.module index 182e2c0fd..07c40cf30 100644 --- a/modules/custom/d_content/modules/d_content_init/d_content_init.module +++ b/modules/custom/d_content/modules/d_content_init/d_content_init.module @@ -303,7 +303,7 @@ function d_content_init_create_all() { // Set default structure. $path = drupal_get_path('module', 'd_content_init') . '/pages'; $structure = [ - 'homepage' => ['file' => "$path/homepage.yml", 'link' => 'Home', 'weight' => 10], + 'homepage' => ['file' => "$path/homepage.yml"], 'examples' => ['file' => "$path/examples.yml", 'link' => 'Examples', 'weight' => 20, 'children' => [ 'business' => ['file' => "$path/business.yml", 'link' => 'Local Business Website', 'weight' => 10], 'event' => ['file' => "$path/event.yml", 'link' => 'Event Website', 'weight' => 20], From 3c995a216bd4f57bc519539b82fc14cc254af751 Mon Sep 17 00:00:00 2001 From: Grzegorz Pietrzak Date: Sat, 17 Nov 2018 12:34:47 +0100 Subject: [PATCH 19/27] DROOP-161 Moved adding translations to d_blog --- modules/custom/d_blog/d_blog.install | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/modules/custom/d_blog/d_blog.install b/modules/custom/d_blog/d_blog.install index d111cee77..13d8288c3 100644 --- a/modules/custom/d_blog/d_blog.install +++ b/modules/custom/d_blog/d_blog.install @@ -40,3 +40,23 @@ function d_blog_install() { ->addCustomLink('/some/view/page', ['priority' => 0.5]) ->generateSitemap(); } + +/** + * Droopler 1.4 Updates. + */ +function d_blog_droopler_update_8101() { + // We do not put this into standard Droopler update flow. + try { + d_blog_add_translation('Blog text', 'Blog tekst', 'pl'); + d_blog_add_translation('Blog image', 'Blog obraz', 'pl'); + d_blog_add_translation('Blog main image', 'Blog główny obraz', 'pl'); + d_blog_add_translation('Blog sections', 'Sekcje bloga', 'pl'); + d_blog_add_translation('Blog category', 'Kategoria bloga', 'pl'); + d_blog_add_translation('Sample category', 'Przykładowa kategoria', 'pl'); + d_blog_add_translation('Blog teaser', 'Krótki opis wpisu bloga', 'pl'); + d_blog_add_translation('Image is on the width of the text', 'Obraz jest na szerokość tekstu', 'pl'); + d_blog_add_translation('Image is on the full width of the screen', 'Obraz jest na całą szerokość ekranu', 'pl'); + } catch (\Exception $e) { + watchdog_exception('d_blog', $e); + } +} From d0576979684d10e6b8348d37186cdfa6c1c83724 Mon Sep 17 00:00:00 2001 From: Grzegorz Pietrzak Date: Sat, 17 Nov 2018 12:35:44 +0100 Subject: [PATCH 20/27] DROOP-161 Moved adding translations to d_blog --- droopler.install | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/droopler.install b/droopler.install index 326561708..93cb55c67 100644 --- a/droopler.install +++ b/droopler.install @@ -233,21 +233,6 @@ function droopler_update_8102() { ]; $moduleInstaller->install($modules, TRUE); - try { - d_blog_add_translation('Blog text', 'Blog tekst', 'pl'); - d_blog_add_translation('Blog image', 'Blog obraz', 'pl'); - d_blog_add_translation('Blog main image', 'Blog główny obraz', 'pl'); - d_blog_add_translation('Blog sections', 'Sekcje bloga', 'pl'); - d_blog_add_translation('Blog category', 'Kategoria bloga', 'pl'); - d_blog_add_translation('Sample category', 'Przykładowa kategoria', 'pl'); - d_blog_add_translation('Blog teaser', 'Krótki opis wpisu bloga', 'pl'); - d_blog_add_translation('Image is on the width of the text', 'Obraz jest na szerokość tekstu', 'pl'); - d_blog_add_translation('Image is on the full width of the screen', 'Obraz jest na całą szerokość ekranu', 'pl'); - } - catch (\Exception $e) { - watchdog_exception('d_blog', $e); - } - $values['droopler__droopler_update_8102_5'] = TRUE; $values['droopler__droopler_update_8102_6'] = TRUE; $values['droopler__droopler_update_8102_7'] = TRUE; From afb4ce2a5fefe29ac66ab160c10f83dbeb7186bd Mon Sep 17 00:00:00 2001 From: Grzegorz Pietrzak Date: Sat, 17 Nov 2018 12:36:42 +0100 Subject: [PATCH 21/27] DROOP-161 Moved adding translations to d_blog --- droopler.install | 2 -- 1 file changed, 2 deletions(-) diff --git a/droopler.install b/droopler.install index 93cb55c67..d90cab9ef 100644 --- a/droopler.install +++ b/droopler.install @@ -232,10 +232,8 @@ function droopler_update_8102() { 'd_geysir' ]; $moduleInstaller->install($modules, TRUE); - $values['droopler__droopler_update_8102_5'] = TRUE; $values['droopler__droopler_update_8102_6'] = TRUE; - $values['droopler__droopler_update_8102_7'] = TRUE; $progress = [ 'v1.3' => [], From b40d13bba6b1b41da0110a1406a24700280581e9 Mon Sep 17 00:00:00 2001 From: Grzegorz Pietrzak Date: Sat, 17 Nov 2018 12:37:40 +0100 Subject: [PATCH 22/27] DROOP-161 Moved adding translations to d_blog --- modules/custom/d_blog/d_blog.install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/custom/d_blog/d_blog.install b/modules/custom/d_blog/d_blog.install index 13d8288c3..96cdbf4e6 100644 --- a/modules/custom/d_blog/d_blog.install +++ b/modules/custom/d_blog/d_blog.install @@ -44,7 +44,7 @@ function d_blog_install() { /** * Droopler 1.4 Updates. */ -function d_blog_droopler_update_8101() { +function d_blog_update_8101() { // We do not put this into standard Droopler update flow. try { d_blog_add_translation('Blog text', 'Blog tekst', 'pl'); From ef34ee18c064b76d1e245c325d9b8e8893266c2f Mon Sep 17 00:00:00 2001 From: Grzegorz Pietrzak Date: Sat, 17 Nov 2018 13:01:36 +0100 Subject: [PATCH 23/27] DROOP-161 Fixed 1.4 update --- droopler.install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/droopler.install b/droopler.install index d90cab9ef..e559d69da 100644 --- a/droopler.install +++ b/droopler.install @@ -162,7 +162,7 @@ function droopler_update_8102() { // Update blog post config. $configs = [ 'd_blog' => [ - 'core.entity_view_display.node.blog_post.thumbnail' => '3bda6b387de39f3e2acb1ecae6caa4aa', + 'core.entity_view_display.node.blog_post.thumbnail' => '', ], ]; $values['droopler__droopler_update_8102_3'] = $updater->importConfigs($configs); From 3aa310dab471ba12410c143e72f5e84b1e34512b Mon Sep 17 00:00:00 2001 From: Grzegorz Pietrzak Date: Sat, 17 Nov 2018 13:22:54 +0100 Subject: [PATCH 24/27] DROOP-160 Fixed 1.4 update --- droopler.install | 52 +++++++++++++++++++++-------- modules/custom/d_update/updates.yml | 10 ++++-- 2 files changed, 45 insertions(+), 17 deletions(-) diff --git a/droopler.install b/droopler.install index e559d69da..0fd390519 100644 --- a/droopler.install +++ b/droopler.install @@ -5,6 +5,7 @@ */ use Drupal\Core\Config\FileStorage; +use Drupal\Core\Extension\MissingDependencyException; /** * Implements hook_install(). @@ -139,17 +140,26 @@ function droopler_update_8101() { function droopler_update_8102() { $values = []; - // Install checklistapi and d_update modules. + /** @var Drupal\Core\Extension\ModuleInstallerInterface $moduleInstaller */ $moduleInstaller = \Drupal::service('module_installer'); - $modules = [ - 'checklistapi', - 'd_update' - ]; - $moduleInstaller->install($modules, TRUE); + /** @var Drupal\d_update\Updater $updater */ $updater = \Drupal::service('d_update'); - $values['droopler__droopler_update_8102_0'] = TRUE; - $values['droopler__droopler_update_8102_1'] = TRUE; + + // Install checklistapi and d_update modules. + try { + $modules = [ + 'checklistapi', + 'd_update' + ]; + $result = $moduleInstaller->install($modules, TRUE); + $values['droopler__droopler_update_8102_0'] = $result; + $values['droopler__droopler_update_8102_1'] = $result; + } + catch (MissingDependencyException $e) { + $values['droopler__droopler_update_8102_0'] = FALSE; + $values['droopler__droopler_update_8102_1'] = FALSE; + } // Install editor role. $configs = [ @@ -227,13 +237,27 @@ function droopler_update_8102() { $values['droopler__droopler_update_8102_4'] = $updater->importConfigs($configs); // Install geysir and d_geysir modules. - $modules = [ - 'geysir', - 'd_geysir' + try { + $modules = [ + 'geysir', + 'd_geysir' + ]; + $result = $moduleInstaller->install($modules, TRUE); + $values['droopler__droopler_update_8102_5'] = $result; + $values['droopler__droopler_update_8102_6'] = $result; + } + catch (MissingDependencyException $e) { + $values['droopler__droopler_update_8102_5'] = FALSE; + $values['droopler__droopler_update_8102_6'] = FALSE; + } + + // Update blog post metatags. + $configs = [ + 'd_blog' => [ + 'metatag.metatag_defaults.node__blog_post' => '', + ], ]; - $moduleInstaller->install($modules, TRUE); - $values['droopler__droopler_update_8102_5'] = TRUE; - $values['droopler__droopler_update_8102_6'] = TRUE; + $values['droopler__droopler_update_8102_7'] = $updater->importConfigs($configs); $progress = [ 'v1.3' => [], diff --git a/modules/custom/d_update/updates.yml b/modules/custom/d_update/updates.yml index 812b9166e..b341910a5 100644 --- a/modules/custom/d_update/updates.yml +++ b/modules/custom/d_update/updates.yml @@ -56,15 +56,15 @@ v1.4: droopler__droopler_update_8102_2: '#title': 'Create Editor role.' '#description': '

New role that allows to manage content on the site.

' - '#description_failed': '

Installation failed, please try to run database update manually.

' + '#description_failed': '

Installation failed, please try to import the feature manually.

' droopler__droopler_update_8102_3: '#title': 'Update blog post display.' '#description': '

Enchantments to blog post display.

' - '#description_failed': '

Installation failed, please try to run database update manually.

' + '#description_failed': '

Installation failed, please try to import the feature manually.

' droopler__droopler_update_8102_4: '#title': 'Update fields configuration.' '#description': '

Various improvements to the fields.

' - '#description_failed': '

Installation failed, please try to run database update manually.

' + '#description_failed': '

Installation failed, please try to import the feature manually.

' droopler__droopler_update_8102_5: '#title': 'Install "geysir" module.' '#description': '

Adds a nice overlay for editing Paragraphs.

' @@ -75,3 +75,7 @@ v1.4: '#description': '

Modifies Geysir to work with Droopler.

' '#description_failed': '

Installation failed, visit the extension page and try to enable the module manually.

' extension_page: { '#text': 'Enable "d_geysir" module', '#url': 'internal:/admin/modules' } + droopler__droopler_update_8102_7: + '#title': 'Update blog post metatags.' + '#description': '

Now the blog teaser is also a default meta description.

' + '#description_failed': '

Installation failed, please try to import the feature manually.

' From f96ef9aece801ede428bf27442b2f5312b917a86 Mon Sep 17 00:00:00 2001 From: Grzegorz Pietrzak Date: Sat, 17 Nov 2018 13:42:02 +0100 Subject: [PATCH 25/27] DROOP-160 Fixed 1.4 update --- droopler.install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/droopler.install b/droopler.install index 0fd390519..f1bd16b6d 100644 --- a/droopler.install +++ b/droopler.install @@ -143,9 +143,6 @@ function droopler_update_8102() { /** @var Drupal\Core\Extension\ModuleInstallerInterface $moduleInstaller */ $moduleInstaller = \Drupal::service('module_installer'); - /** @var Drupal\d_update\Updater $updater */ - $updater = \Drupal::service('d_update'); - // Install checklistapi and d_update modules. try { $modules = [ @@ -161,6 +158,9 @@ function droopler_update_8102() { $values['droopler__droopler_update_8102_1'] = FALSE; } + /** @var Drupal\d_update\Updater $updater */ + $updater = \Drupal::service('d_update'); + // Install editor role. $configs = [ 'd_content' => [ From dd6ab27a5990304e7fe3847d0e12dccd12bf0467 Mon Sep 17 00:00:00 2001 From: Adrian Liegmann Date: Sun, 18 Nov 2018 00:36:35 +0100 Subject: [PATCH 26/27] Add Blog post author --- modules/custom/d_blog/modules/d_blog_init/pages/post_1.yml | 3 +++ modules/custom/d_blog/modules/d_blog_init/pages/post_2.yml | 3 +++ modules/custom/d_blog/modules/d_blog_init/pages/post_3.yml | 3 +++ modules/custom/d_blog/modules/d_blog_init/pages/post_4.yml | 3 +++ modules/custom/d_blog/modules/d_blog_init/pages/post_5.yml | 3 +++ 5 files changed, 15 insertions(+) diff --git a/modules/custom/d_blog/modules/d_blog_init/pages/post_1.yml b/modules/custom/d_blog/modules/d_blog_init/pages/post_1.yml index a621130a7..6d9aa122a 100644 --- a/modules/custom/d_blog/modules/d_blog_init/pages/post_1.yml +++ b/modules/custom/d_blog/modules/d_blog_init/pages/post_1.yml @@ -1,6 +1,9 @@ info: type: blog_post title: Example Blog Post 1 +uid: + type: number + data: 1 field_blog_main_image: type: image data: demo_faces.jpg diff --git a/modules/custom/d_blog/modules/d_blog_init/pages/post_2.yml b/modules/custom/d_blog/modules/d_blog_init/pages/post_2.yml index 4705200d5..2077bff98 100644 --- a/modules/custom/d_blog/modules/d_blog_init/pages/post_2.yml +++ b/modules/custom/d_blog/modules/d_blog_init/pages/post_2.yml @@ -1,6 +1,9 @@ info: type: blog_post title: Example Blog Post 2 +uid: + type: number + data: 1 field_blog_main_image: type: image data: demo_car_1.jpg diff --git a/modules/custom/d_blog/modules/d_blog_init/pages/post_3.yml b/modules/custom/d_blog/modules/d_blog_init/pages/post_3.yml index 9d7494b2f..3761abc2d 100644 --- a/modules/custom/d_blog/modules/d_blog_init/pages/post_3.yml +++ b/modules/custom/d_blog/modules/d_blog_init/pages/post_3.yml @@ -1,6 +1,9 @@ info: type: blog_post title: Example Blog Post 3 +uid: + type: number + data: 1 field_blog_main_image: type: image data: demo_event_1.jpg diff --git a/modules/custom/d_blog/modules/d_blog_init/pages/post_4.yml b/modules/custom/d_blog/modules/d_blog_init/pages/post_4.yml index 3e5230777..a334a42c2 100644 --- a/modules/custom/d_blog/modules/d_blog_init/pages/post_4.yml +++ b/modules/custom/d_blog/modules/d_blog_init/pages/post_4.yml @@ -1,6 +1,9 @@ info: type: blog_post title: Example Blog Post 4 +uid: + type: number + data: 1 field_blog_main_image: type: image data: demo_portfolio_1.jpg diff --git a/modules/custom/d_blog/modules/d_blog_init/pages/post_5.yml b/modules/custom/d_blog/modules/d_blog_init/pages/post_5.yml index 84fb1a535..38f32f93f 100644 --- a/modules/custom/d_blog/modules/d_blog_init/pages/post_5.yml +++ b/modules/custom/d_blog/modules/d_blog_init/pages/post_5.yml @@ -1,6 +1,9 @@ info: type: blog_post title: Example Blog Post 5 +uid: + type: number + data: 1 field_blog_main_image: type: image data: demo_business_4.jpg From 09b4444dce76e1d729cfbe7147437b7b4c9dab67 Mon Sep 17 00:00:00 2001 From: pszymanski Date: Tue, 27 Nov 2018 15:04:15 +0100 Subject: [PATCH 27/27] #DROOP-173 fix bug in droopler install after Drupal core actualization. --- droopler.install | 1 + 1 file changed, 1 insertion(+) diff --git a/droopler.install b/droopler.install index f1bd16b6d..3020ae8fd 100644 --- a/droopler.install +++ b/droopler.install @@ -173,6 +173,7 @@ function droopler_update_8102() { $configs = [ 'd_blog' => [ 'core.entity_view_display.node.blog_post.thumbnail' => '', + 'core.entity_view_mode.node.thumbnail' => '', ], ]; $values['droopler__droopler_update_8102_3'] = $updater->importConfigs($configs);