diff --git a/composer.json b/composer.json
index f4765b5..3c7062e 100644
--- a/composer.json
+++ b/composer.json
@@ -12,8 +12,8 @@
"require": {
"cweagans/composer-patches": "^1.6.0",
"oomphinc/composer-installers-extender": "^1.1 || ^2",
- "drupal/core": "8.* || 9.*",
- "drupal/bootstrap": "3.25"
+ "drupal/core": "9.* || 10.*",
+ "drupal/bootstrap": "3.29"
},
"minimum-stability": "dev",
"prefer-stable": true,
diff --git a/config/optional/block.block.sidebar.yml b/config/optional/block.block.sidebar.yml
index 2fa65a7..a5d681e 100644
--- a/config/optional/block.block.sidebar.yml
+++ b/config/optional/block.block.sidebar.yml
@@ -33,7 +33,7 @@ settings:
render_parent: false
visibility:
node_type:
- id: node_type
+ id: 'entity_bundle:node'
bundles:
page: page
negate: false
diff --git a/config/optional/block.block.sidebar_fr.yml b/config/optional/block.block.sidebar_fr.yml
index 166dc76..aa53165 100644
--- a/config/optional/block.block.sidebar_fr.yml
+++ b/config/optional/block.block.sidebar_fr.yml
@@ -29,7 +29,7 @@ settings:
suggestion: sidebar_fr
visibility:
node_type:
- id: node_type
+ id: 'entity_bundle:node'
bundles:
page: page
negate: false
diff --git a/css/ckeditor.css b/css/ckeditor.css
deleted file mode 100644
index 4fe412e..0000000
--- a/css/ckeditor.css
+++ /dev/null
@@ -1,17 +0,0 @@
-@charset "UTF-8";
-/**
- * CKEditor styles.
- */
-table {
- width: 100%; }
-
-table th {
- padding: 8px;
- line-height: 1.4375;
- font-weight: 700;
- border-color: #8d8d8d !important; }
-
-table td {
- padding: 8px;
- line-height: 1.4375;
- border-color: #8d8d8d !important; }
diff --git a/css/ckeditor5.css b/css/ckeditor5.css
new file mode 100644
index 0000000..0b5ba19
--- /dev/null
+++ b/css/ckeditor5.css
@@ -0,0 +1,6 @@
+/**
+ * CKEditor5 styles.
+ */
+
+.ck-content {
+ min-height: 250px; }
diff --git a/sass/ckeditor.scss b/sass/ckeditor.scss
deleted file mode 100644
index 6281639..0000000
--- a/sass/ckeditor.scss
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * CKEditor styles.
- */
-table {
- width: 100%;
-
- th {
- padding: 8px;
- line-height: 1.4375;
- font-weight: 700;
- border-color: #8d8d8d !important;
- }
-
- td {
- padding: 8px;
- line-height: 1.4375;
- border-color: #8d8d8d !important;
- }
-}
diff --git a/sass/ckeditor5.scss b/sass/ckeditor5.scss
new file mode 100644
index 0000000..330e296
--- /dev/null
+++ b/sass/ckeditor5.scss
@@ -0,0 +1,7 @@
+/**
+ * CKEditor5 styles.
+ */
+
+.ck-content {
+ min-height: 250px;
+}
diff --git a/src/Plugin/Preprocess/Comment.php b/src/Plugin/Preprocess/Comment.php
index d8b36a6..a6ece26 100644
--- a/src/Plugin/Preprocess/Comment.php
+++ b/src/Plugin/Preprocess/Comment.php
@@ -19,6 +19,22 @@ class Comment extends PreprocessBase {
*/
public function preprocessVariables(Variables $variables) {
$variables['author'] = \Drupal::service('renderer')->render($elements);
+ $owner = $variables['comment']->getOwner();
+ if (empty($variables['author']) && $owner->id() === 0) {
+ $variables['author'] = $this->t('Anonymous');
+ }
+ if (empty($variables['author']) && $owner->isAuthenticated()) {
+ if ($owner->hasField('field_first_name') && $owner->hasField('field_last_name')) {
+ $first_name = $owner->get('field_first_name')->getString();
+ $last_name = $owner->get('field_last_name')->getString();
+ if (!empty($first_name) && !empty($last_name)) {
+ $variables['author'] = $first_name . ' ' . $last_name;
+ }
+ }
+ }
+ if (empty($variables['author'])) {
+ $variables['author'] = $variables['comment']->getAuthorName();
+ }
// Getting the node creation time stamp from the comment object.
$date = $variables['comment']->getCreatedTime();
diff --git a/templates/block/block--footer--gcweb--wxt-bootstrap-footer-contextual-fr.html.twig b/templates/block/block--footer--gcweb--wxt-bootstrap-footer-contextual-fr.html.twig
index 4cfb224..735f24e 100644
--- a/templates/block/block--footer--gcweb--wxt-bootstrap-footer-contextual-fr.html.twig
+++ b/templates/block/block--footer--gcweb--wxt-bootstrap-footer-contextual-fr.html.twig
@@ -40,16 +40,16 @@
]
%}
-
-
+ {% endif %}
+ {{ title_suffix }}
+ {% block content %}
+
+ {% endblock %}
+
diff --git a/templates/block/block--footer--gcweb--wxt-bootstrap-footer-contextual.html.twig b/templates/block/block--footer--gcweb--wxt-bootstrap-footer-contextual.html.twig
index 4cfb224..735f24e 100644
--- a/templates/block/block--footer--gcweb--wxt-bootstrap-footer-contextual.html.twig
+++ b/templates/block/block--footer--gcweb--wxt-bootstrap-footer-contextual.html.twig
@@ -40,16 +40,16 @@
]
%}
-
-
- {{ title_prefix }}
+
+ {{ title_prefix }}
+ {% if label %}
{{ label }}
- {{ title_suffix }}
- {% block content %}
-
- {% endblock %}
-
-
+ {% endif %}
+ {{ title_suffix }}
+ {% block content %}
+
+ {% endblock %}
+
diff --git a/templates/block/block--footer--gcweb--wxt-bootstrap-footer-top-fr.html.twig b/templates/block/block--footer--gcweb--wxt-bootstrap-footer-top-fr.html.twig
index d8f2ea3..8f700cc 100644
--- a/templates/block/block--footer--gcweb--wxt-bootstrap-footer-top-fr.html.twig
+++ b/templates/block/block--footer--gcweb--wxt-bootstrap-footer-top-fr.html.twig
@@ -40,16 +40,14 @@
]
%}
-
-
- {{ title_prefix }}
- {{ 'Government of Canada'|t }}
- {{ title_suffix }}
- {% block content %}
-
- {% endblock %}
-
-
+
+ {{ title_prefix }}
+ {{ 'Government of Canada'|t }}
+ {{ title_suffix }}
+ {% block content %}
+
+ {% endblock %}
+
diff --git a/templates/block/block--footer--gcweb--wxt-bootstrap-footer-top.html.twig b/templates/block/block--footer--gcweb--wxt-bootstrap-footer-top.html.twig
index d8f2ea3..8f700cc 100644
--- a/templates/block/block--footer--gcweb--wxt-bootstrap-footer-top.html.twig
+++ b/templates/block/block--footer--gcweb--wxt-bootstrap-footer-top.html.twig
@@ -40,16 +40,14 @@
]
%}
-
-
- {{ title_prefix }}
- {{ 'Government of Canada'|t }}
- {{ title_suffix }}
- {% block content %}
-
- {% endblock %}
-
-
+
+ {{ title_prefix }}
+ {{ 'Government of Canada'|t }}
+ {{ title_suffix }}
+ {% block content %}
+
+ {% endblock %}
+
diff --git a/templates/file/file-link.html.twig b/templates/file/file-link.html.twig
index 54ae38b..e5c87aa 100644
--- a/templates/file/file-link.html.twig
+++ b/templates/file/file-link.html.twig
@@ -15,7 +15,7 @@
* @see \Drupal\bootstrap\Plugin\Preprocess\FileLink::preprocessVariables
*/
#}
-{% spaceless %}
+{% apply spaceless %}
{%
set classes = [
icon_only ? 'icon-only',
@@ -37,4 +37,4 @@
{% endif %}
{% endif %}
-{% endspaceless %}
+{% endapply %}
diff --git a/templates/input/input--button--split.html.twig b/templates/input/input--button--split.html.twig
index c7d6f01..dfef5f5 100644
--- a/templates/input/input--button--split.html.twig
+++ b/templates/input/input--button--split.html.twig
@@ -22,15 +22,15 @@
* @see template_preprocess_input()
*/
#}
-{% spaceless %}
- {%
- set classes = [
+
+ {% block input %}{% apply spaceless %}
+ {%
+ set classes = [
'btn',
type == 'submit' ? 'js-form-submit',
icon and icon_position and not icon_only ? 'icon-' ~ icon_position,
]
- %}
- {% block input %}
+ %}
{% if icon_only %}
{{ children }}
- {% endblock %}
-{% endspaceless %}
+ {% endapply %}{% endblock %}
+
diff --git a/templates/input/input--button--submit.html.twig b/templates/input/input--button--submit.html.twig
index b339f48..82fc345 100644
--- a/templates/input/input--button--submit.html.twig
+++ b/templates/input/input--button--submit.html.twig
@@ -22,15 +22,14 @@
* @see template_preprocess_input()
*/
#}
-{% spaceless %}
- {%
- set classes = [
+ {% block input %}{% apply spaceless %}
+ {%
+ set classes = [
'btn',
type == 'submit' ? 'js-form-submit',
icon and icon_position and not icon_only ? 'icon-' ~ icon_position,
]
- %}
- {% block input %}
+ %}
{% if search_submit == 'true' %}
{% if wxt_theme == 'gcweb' %}
{{ children }}
@@ -52,5 +51,4 @@
{% endif %}
{% endif %}
{{ children }}
- {% endblock %}
-{% endspaceless %}
+ {% endapply %}{% endblock %}
diff --git a/templates/input/input--button.html.twig b/templates/input/input--button.html.twig
index 7166b1a..dd86adb 100644
--- a/templates/input/input--button.html.twig
+++ b/templates/input/input--button.html.twig
@@ -22,15 +22,14 @@
* @see template_preprocess_input()
*/
#}
-{% spaceless %}
- {%
- set classes = [
+ {% block input %}{% apply spaceless %}
+ {%
+ set classes = [
'btn',
type == 'submit' ? 'js-form-submit',
icon and icon_position and not icon_only ? 'icon-' ~ icon_position,
]
- %}
- {% block input %}
+ %}
{% if icon and icon_only %}