diff --git a/.ddev/commands/host/save b/.ddev/commands/host/save index ff06962..9a31de2 100755 --- a/.ddev/commands/host/save +++ b/.ddev/commands/host/save @@ -1,5 +1,9 @@ #!/bin/bash +# Any site building changes should be captured. +ddev drush cex -y + +# Trim unneeded table data. echo "Removing cache data." ddev drush sqlq " \ TRUNCATE cache_access_policy; \ @@ -17,6 +21,7 @@ ddev drush sqlq " \ TRUNCATE sessions; \ " +# Store the database on disc while it is small. ddev export-db --file=_db_main.sql.gz # So we can keep working. diff --git a/.ddev/commands/host/cypress b/.ddev/commands/host/test-cypress similarity index 100% rename from .ddev/commands/host/cypress rename to .ddev/commands/host/test-cypress diff --git a/.ddev/commands/host/phpunit b/.ddev/commands/host/test-phpunit similarity index 100% rename from .ddev/commands/host/phpunit rename to .ddev/commands/host/test-phpunit diff --git a/.ddev/commands/host/static b/.ddev/commands/host/test-static similarity index 100% rename from .ddev/commands/host/static rename to .ddev/commands/host/test-static diff --git a/_db_main.sql.gz b/_db_main.sql.gz index 8907568..23329c2 100644 Binary files a/_db_main.sql.gz and b/_db_main.sql.gz differ diff --git a/config/sync/admin_toolbar.settings.yml b/config/sync/admin_toolbar.settings.yml deleted file mode 100644 index 93a6695..0000000 --- a/config/sync/admin_toolbar.settings.yml +++ /dev/null @@ -1,3 +0,0 @@ -_core: - default_config_hash: jvTSppzcgH5wnzBhX5xnAExcp2I1CzkQ_aky65XNfYI -menu_depth: 4 diff --git a/config/sync/admin_toolbar_search.settings.yml b/config/sync/admin_toolbar_search.settings.yml deleted file mode 100644 index 4ae9775..0000000 --- a/config/sync/admin_toolbar_search.settings.yml +++ /dev/null @@ -1,3 +0,0 @@ -_core: - default_config_hash: AAmWcgwzGYbXfR6wfEfMyoi3r5QZwlpxvq5dHbupnJo -display_menu_item: 0 diff --git a/config/sync/admin_toolbar_tools.settings.yml b/config/sync/admin_toolbar_tools.settings.yml deleted file mode 100644 index 68157c1..0000000 --- a/config/sync/admin_toolbar_tools.settings.yml +++ /dev/null @@ -1,5 +0,0 @@ -_core: - default_config_hash: WgdZsrd_5w9jlmcHV4R9dD2tG9OZEkYo4I_O8h7Gq8Q -max_bundle_number: 20 -hoverintent_functionality: true -show_local_tasks: true diff --git a/config/sync/core.entity_form_display.node.article.default.yml b/config/sync/core.entity_form_display.node.article.default.yml index 254f6ef..1e9a076 100644 --- a/config/sync/core.entity_form_display.node.article.default.yml +++ b/config/sync/core.entity_form_display.node.article.default.yml @@ -3,13 +3,12 @@ langcode: en status: true dependencies: config: - - field.field.node.article.article_type - field.field.node.article.duration - field.field.node.article.hero - field.field.node.article.lead - field.field.node.article.markup - - field.field.node.article.media_video - field.field.node.article.tags + - field.field.node.article.youtube - node.type.article module: - field_group @@ -22,6 +21,7 @@ third_party_settings: children: - group_content - group_media + - group_meta label: 'Form tabs' region: content parent_name: '' @@ -35,6 +35,7 @@ third_party_settings: width_breakpoint: 640 group_media: children: + - youtube - hero label: Media region: content @@ -52,7 +53,6 @@ third_party_settings: children: - lead - markup - - tags label: Content region: content parent_name: group_tabs @@ -65,6 +65,23 @@ third_party_settings: formatter: open description: '' required_fields: true + group_meta: + children: + - tags + - duration + label: Meta + region: hidden + parent_name: group_tabs + weight: 11 + format_type: tab + format_settings: + classes: '' + show_empty_fields: false + id: '' + label_as_html: false + formatter: closed + description: '' + required_fields: false _core: default_config_hash: ewbd6G2uX456-bgwseM2Q-KQG3RkASoyHmTh-XR3oLU id: node.article.default @@ -72,21 +89,15 @@ targetEntityType: node bundle: article mode: default content: - article_type: - type: options_select - weight: 51 - region: content - settings: { } - third_party_settings: { } created: type: datetime_timestamp - weight: 5 + weight: 3 region: content settings: { } third_party_settings: { } duration: type: string_textfield - weight: 53 + weight: 6 region: content settings: size: 60 @@ -94,7 +105,7 @@ content: third_party_settings: { } hero: type: media_library_widget - weight: 2 + weight: 6 region: content settings: media_types: { } @@ -104,7 +115,7 @@ content: weight: 3 region: content settings: - rows: 5 + rows: 3 placeholder: '' third_party_settings: { } markup: @@ -115,41 +126,34 @@ content: rows: 5 placeholder: '' third_party_settings: { } - media_video: - type: media_library_widget - weight: 52 - region: content - settings: - media_types: { } - third_party_settings: { } path: type: path - weight: 9 + weight: 8 region: content settings: { } third_party_settings: { } promote: type: boolean_checkbox - weight: 7 + weight: 6 region: content settings: display_label: true third_party_settings: { } simple_sitemap: - weight: 6 + weight: 4 region: content settings: { } third_party_settings: { } status: type: boolean_checkbox - weight: 10 + weight: 9 region: content settings: display_label: true third_party_settings: { } sticky: type: boolean_checkbox - weight: 8 + weight: 7 region: content settings: display_label: true @@ -174,7 +178,7 @@ content: third_party_settings: { } uid: type: entity_reference_autocomplete - weight: 4 + weight: 2 region: content settings: match_operator: CONTAINS @@ -183,8 +187,15 @@ content: placeholder: '' third_party_settings: { } url_redirects: - weight: 50 + weight: 10 region: content settings: { } third_party_settings: { } + youtube: + type: media_library_widget + weight: 5 + region: content + settings: + media_types: { } + third_party_settings: { } hidden: { } diff --git a/config/sync/core.entity_view_display.node.article.default.yml b/config/sync/core.entity_view_display.node.article.default.yml index 16194fd..261bea4 100644 --- a/config/sync/core.entity_view_display.node.article.default.yml +++ b/config/sync/core.entity_view_display.node.article.default.yml @@ -3,16 +3,14 @@ langcode: en status: true dependencies: config: - - field.field.node.article.article_type - field.field.node.article.duration - field.field.node.article.hero - field.field.node.article.lead - field.field.node.article.markup - - field.field.node.article.media_video - field.field.node.article.tags + - field.field.node.article.youtube - node.type.article module: - - options - text - user _core: @@ -22,13 +20,6 @@ targetEntityType: node bundle: article mode: default content: - article_type: - type: list_default - label: above - settings: { } - third_party_settings: { } - weight: 3 - region: content duration: type: string label: above @@ -51,15 +42,6 @@ content: third_party_settings: { } weight: 1 region: content - media_video: - type: entity_reference_entity_view - label: above - settings: - view_mode: default - link: false - third_party_settings: { } - weight: 4 - region: content tags: type: entity_reference_label label: above @@ -68,6 +50,15 @@ content: third_party_settings: { } weight: 2 region: content + youtube: + type: entity_reference_entity_view + label: above + settings: + view_mode: default + link: false + third_party_settings: { } + weight: 6 + region: content hidden: hero: true links: true diff --git a/config/sync/core.entity_view_display.node.article.rss.yml b/config/sync/core.entity_view_display.node.article.rss.yml index 939956d..b78a349 100644 --- a/config/sync/core.entity_view_display.node.article.rss.yml +++ b/config/sync/core.entity_view_display.node.article.rss.yml @@ -4,13 +4,12 @@ status: false dependencies: config: - core.entity_view_mode.node.rss - - field.field.node.article.article_type - field.field.node.article.duration - field.field.node.article.hero - field.field.node.article.lead - field.field.node.article.markup - - field.field.node.article.media_video - field.field.node.article.tags + - field.field.node.article.youtube - node.type.article module: - user @@ -25,11 +24,10 @@ content: weight: 100 region: content hidden: - article_type: true duration: true hero: true lead: true markup: true - media_video: true search_api_excerpt: true tags: true + youtube: true diff --git a/config/sync/core.entity_view_display.node.article.teaser.yml b/config/sync/core.entity_view_display.node.article.teaser.yml index 8d9c81d..a63162b 100644 --- a/config/sync/core.entity_view_display.node.article.teaser.yml +++ b/config/sync/core.entity_view_display.node.article.teaser.yml @@ -4,13 +4,12 @@ status: true dependencies: config: - core.entity_view_mode.node.teaser - - field.field.node.article.article_type - field.field.node.article.duration - field.field.node.article.hero - field.field.node.article.lead - field.field.node.article.markup - - field.field.node.article.media_video - field.field.node.article.tags + - field.field.node.article.youtube - node.type.article module: - field_label @@ -42,10 +41,9 @@ content: weight: 0 region: content hidden: - article_type: true duration: true links: true markup: true - media_video: true search_api_excerpt: true tags: true + youtube: true diff --git a/config/sync/core.extension.yml b/config/sync/core.extension.yml index bf3540f..ee9cbd5 100644 --- a/config/sync/core.extension.yml +++ b/config/sync/core.extension.yml @@ -1,11 +1,6 @@ _core: default_config_hash: R4IF-ClDHXxblLcG0L7MgsLvfBIMAvi_skumNFQwkDc module: - admin_toolbar: 0 - admin_toolbar_links_access_filter: 0 - admin_toolbar_search: 0 - admin_toolbar_tools: 0 - big_pipe: 0 block: 0 block_content: 0 breakpoint: 0 diff --git a/config/sync/field.field.node.article.article_type.yml b/config/sync/field.field.node.article.article_type.yml deleted file mode 100644 index 0cb7793..0000000 --- a/config/sync/field.field.node.article.article_type.yml +++ /dev/null @@ -1,23 +0,0 @@ -uuid: 08b66a5e-e871-4d9a-9d13-36d9454a4a5c -langcode: en -status: true -dependencies: - config: - - field.storage.node.article_type - - node.type.article - module: - - options -id: node.article.article_type -field_name: article_type -entity_type: node -bundle: article -label: Type -description: '' -required: true -translatable: false -default_value: - - - value: blog -default_value_callback: '' -settings: { } -field_type: list_string diff --git a/config/sync/field.field.node.article.media_video.yml b/config/sync/field.field.node.article.youtube.yml similarity index 74% rename from config/sync/field.field.node.article.media_video.yml rename to config/sync/field.field.node.article.youtube.yml index bdd1df4..57cffe2 100644 --- a/config/sync/field.field.node.article.media_video.yml +++ b/config/sync/field.field.node.article.youtube.yml @@ -1,16 +1,16 @@ -uuid: 77876924-48e7-48db-b0fc-c2ffd95dccb6 +uuid: 575c41f7-8d8e-4334-b9cc-5a3fce03b019 langcode: en status: true dependencies: config: - - field.storage.node.media_video + - field.storage.node.youtube - media.type.stream - node.type.article -id: node.article.media_video -field_name: media_video +id: node.article.youtube +field_name: youtube entity_type: node bundle: article -label: 'Media video' +label: Youtube description: '' required: false translatable: false diff --git a/config/sync/field.storage.node.article_type.yml b/config/sync/field.storage.node.article_type.yml deleted file mode 100644 index 456cd58..0000000 --- a/config/sync/field.storage.node.article_type.yml +++ /dev/null @@ -1,27 +0,0 @@ -uuid: 8dea1a6c-8142-4927-8d2f-a27940a666fc -langcode: en -status: true -dependencies: - module: - - node - - options -id: node.article_type -field_name: article_type -entity_type: node -type: list_string -settings: - allowed_values: - - - value: blog - label: Blog - - - value: video - label: Video - allowed_values_function: '' -module: options -locked: false -cardinality: 1 -translatable: true -indexes: { } -persist_with_no_fields: false -custom_storage: false diff --git a/config/sync/field.storage.node.media_video.yml b/config/sync/field.storage.node.youtube.yml similarity index 75% rename from config/sync/field.storage.node.media_video.yml rename to config/sync/field.storage.node.youtube.yml index 104038f..93aa9be 100644 --- a/config/sync/field.storage.node.media_video.yml +++ b/config/sync/field.storage.node.youtube.yml @@ -1,12 +1,12 @@ -uuid: d84289d8-aa0e-45d1-8b48-fc50a5954510 +uuid: a520c464-09c1-429c-bac4-b72c9c1c0e00 langcode: en status: true dependencies: module: - media - node -id: node.media_video -field_name: media_video +id: node.youtube +field_name: youtube entity_type: node type: entity_reference settings: diff --git a/config/sync/metatag.settings.yml b/config/sync/metatag.settings.yml index 3f1fe5f..4b4c9a4 100644 --- a/config/sync/metatag.settings.yml +++ b/config/sync/metatag.settings.yml @@ -3,6 +3,7 @@ _core: entity_type_groups: { } separator: '' tag_trim_method: beforeValue +use_maxlength: true tag_trim_maxlength: { } tag_scroll_max_height: '' -use_maxlength: true +tag_trim_end: '|.,-:;/+&([{"''' diff --git a/config/sync/views.view.content.yml b/config/sync/views.view.content.yml index fde7200..b94460c 100644 --- a/config/sync/views.view.content.yml +++ b/config/sync/views.view.content.yml @@ -165,10 +165,90 @@ display: format: custom format_custom_false: Unpublished format_custom_true: Published + created: + id: created + table: node_field_data + field: created + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: created + plugin_id: field + label: Created + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: timestamp + settings: + date_format: html_date + custom_date_format: '' + timezone: '' + tooltip: + date_format: long + custom_date_format: '' + time_diff: + enabled: false + future_format: '@interval hence' + past_format: '@interval ago' + granularity: 2 + refresh: 60 + description: '' + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false changed: id: changed table: node_field_data field: changed + relationship: none + group_type: group + admin_label: '' entity_type: node entity_field: changed plugin_id: field @@ -176,15 +256,47 @@ display: exclude: false alter: alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' element_default_classes: true empty: '' hide_empty: false empty_zero: false hide_alter_empty: true + click_sort_column: value type: timestamp settings: - date_format: short + date_format: html_date custom_date_format: '' timezone: '' tooltip: @@ -196,6 +308,17 @@ display: past_format: '@interval ago' granularity: 2 refresh: 60 + description: '' + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false operations: id: operations table: node @@ -593,8 +716,8 @@ display: - 'user.node_grants:view' - user.permissions tags: { } - page_1: - id: page_1 + main: + id: main display_title: Page display_plugin: page position: 1 diff --git a/web/themes/custom/fstheme/fstheme.theme b/web/themes/custom/fstheme/fstheme.theme index 16bb9d9..c963ae4 100755 --- a/web/themes/custom/fstheme/fstheme.theme +++ b/web/themes/custom/fstheme/fstheme.theme @@ -38,13 +38,12 @@ function fstheme_theme_suggestions_field_alter(array &$hooks, array $vars): void function fstheme_preprocess_node(&$vars) { $node = $vars['node']; if ($node instanceof NodeInterface && $node->bundle() === 'article') { - $article_type = $node->article_type->value; - if ($article_type == 'video') { - $media_video = $node->media_video->entity; + if ($node->hasField('youtube') && !$node->get('youtube')->isEmpty()) { + $vars['article_type'] = 'video'; + $media_video = $node->get('youtube')->entity; if ($media_video instanceof MediaInterface) { $vars['url'] = $media_video->media_oembed_video->value; } } - $vars['article_type'] = $article_type; } }