diff --git a/composer.json b/composer.json index b7720fd6..660fc0a8 100644 --- a/composer.json +++ b/composer.json @@ -26,6 +26,7 @@ "drupal/default_content": "^2.0@alpha", "drupal/disable_user_1_edit": "^1.6", "drupal/easy_breadcrumb": "^2.0", + "drupal/edit_media_modal": "^2.0", "drupal/embedded_content": "^2.0", "drupal/field_group": "^3.6", "drupal/field_permissions": "^1.3", @@ -35,6 +36,7 @@ "drupal/mailsystem": "^4.4", "drupal/masquerade": "^2.0", "drupal/maxlength": "^3.1", + "drupal/media_library_edit": "^3.0", "drupal/memcache": "^2.5", "drupal/metatag": "^2.1", "drupal/multivalue_form_element": "@beta", diff --git a/composer.lock b/composer.lock index 7be8c854..1b52c51d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "6b10bde9c99298592c1f384cca84832c", + "content-hash": "8c1295f948d0fda87f7421c78f5ca452", "packages": [ { "name": "asm89/stack-cors", @@ -2279,6 +2279,57 @@ "issues": "https://www.drupal.org/project/issues/easy_breadcrumb" } }, + { + "name": "drupal/edit_media_modal", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/edit_media_modal.git", + "reference": "2.0.0" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/edit_media_modal-2.0.0.zip", + "reference": "2.0.0", + "shasum": "bd99bb6667aff7a94e77b234b78900a510a25941" + }, + "require": { + "drupal/core": "^8.8.0 || ^9.0 || ^10.0" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "2.0.0", + "datestamp": "1718838864", + "security-coverage": { + "status": "not-covered", + "message": "Project has not opted into security advisory coverage!" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "Alex Sharkov", + "homepage": "https://www.drupal.org/u/blade_ukraine", + "role": "Maintainer" + } + ], + "description": "The module provide ability to edit Media entity embedded via CKEditor in a modal window.", + "homepage": "https://www.drupal.org/project/edit_media_modal", + "keywords": [ + "CKEditor", + "Drupal", + "Media" + ], + "support": { + "source": "http://cgit.drupalcode.org/edit_media_modal", + "issues": "https://www.drupal.org/project/issues/edit_media_modal" + } + }, { "name": "drupal/embedded_content", "version": "2.0.2", @@ -3015,6 +3066,54 @@ "issues": "https://www.drupal.org/project/issues/maxlength" } }, + { + "name": "drupal/media_library_edit", + "version": "3.0.4", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/media_library_edit.git", + "reference": "3.0.4" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/media_library_edit-3.0.4.zip", + "reference": "3.0.4", + "shasum": "92f1c1f58b5579363a9f18ffb5632cc368066dfe" + }, + "require": { + "drupal/core": "^9.2 || ^10 || ^11" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "3.0.4", + "datestamp": "1724358009", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "ahebrank", + "homepage": "https://www.drupal.org/user/3190515" + } + ], + "description": "Add an edit button to the Media Library widget when an item is selected.", + "homepage": "https://www.drupal.org/project/media_library_edit", + "keywords": [ + "Drupal" + ], + "support": { + "source": "http://cgit.drupalcode.org/media_library_edit", + "issues": "https://www.drupal.org/project/issues/media_library_edit" + } + }, { "name": "drupal/memcache", "version": "2.7.0", diff --git a/composer.log b/composer.log index d568fd8a..2c9e1bc1 100644 --- a/composer.log +++ b/composer.log @@ -48,3 +48,5 @@ a8e36d32c49aca75de1d6f5efc57a38e|Matt Poole|feature/DIGITAL-195-sso-configuratio 375ea7aa8ac9c84f804100548773e80a|Matt Poole|feature/DIGITAL-195-sso-configuration|Thu Dec 5 13:06:09 EST 2024|./composer.sh require drupal/masquerade:^2.0 242e11a4450398bd561ee3cd44612692|Oscar Merida|feature/DIGITAL-37-resource-paragraphs|Thu Dec 5 15:56:55 EST 2024|./composer.sh require drupal/paragraph_view_mode 6666e18e6102d15f7bb8b271da64f9b8|Matt Poole|feature/DIGITAL-37-resource-paragraphs|Tue Dec 10 14:32:53 EST 2024|./composer.sh require drupal/maxlength:^3.1 +391e94a75931ce58483b7f4992b5ed10|cathybaptista|feature/DIGITAL-119-configure-images|Wed Dec 11 14:44:08 EST 2024|./composer.sh require drupal/media_library_edit +dc6077d55d62f2f46a59b1f9773a45ab|cathybaptista|feature/DIGITAL-119-configure-images|Wed Dec 11 14:44:17 EST 2024|./composer.sh require drupal/edit_media_modal diff --git a/config/sync/core.entity_form_display.media.image.default.yml b/config/sync/core.entity_form_display.media.image.default.yml index 2e7e5e2f..e63f5184 100644 --- a/config/sync/core.entity_form_display.media.image.default.yml +++ b/config/sync/core.entity_form_display.media.image.default.yml @@ -4,10 +4,11 @@ status: true dependencies: config: - field.field.media.image.field_media_image - - image.style.thumbnail + - image.style.responsive_image_set - media.type.image module: - image + - path id: media.image.default targetEntityType: media bundle: image @@ -25,7 +26,7 @@ content: region: content settings: progress_indicator: throbber - preview_image_style: thumbnail + preview_image_style: responsive_image_set third_party_settings: { } name: type: string_textfield diff --git a/config/sync/core.entity_form_display.node.basic_page.default.yml b/config/sync/core.entity_form_display.node.basic_page.default.yml index e0dc7226..c570ec43 100644 --- a/config/sync/core.entity_form_display.node.basic_page.default.yml +++ b/config/sync/core.entity_form_display.node.basic_page.default.yml @@ -15,6 +15,7 @@ dependencies: - content_moderation - maxlength - media_library + - media_library_edit - path - text id: node.basic_page.default @@ -56,7 +57,10 @@ content: region: content settings: media_types: { } - third_party_settings: { } + third_party_settings: + media_library_edit: + show_edit: '1' + edit_form_mode: default field_page_weight: type: number weight: 8 @@ -119,6 +123,7 @@ content: settings: { } third_party_settings: { } hidden: + field_featured: true field_slug: true promote: true publish_on: true diff --git a/config/sync/core.entity_form_display.node.community.default.yml b/config/sync/core.entity_form_display.node.community.default.yml index e095c716..81e437ec 100644 --- a/config/sync/core.entity_form_display.node.community.default.yml +++ b/config/sync/core.entity_form_display.node.community.default.yml @@ -22,6 +22,7 @@ dependencies: - field_group - maxlength - media_library + - media_library_edit - path - text third_party_settings: @@ -99,7 +100,10 @@ content: region: content settings: media_types: { } - third_party_settings: { } + third_party_settings: + media_library_edit: + show_edit: '1' + edit_form_mode: default field_dg_shortname: type: string_textfield weight: 35 @@ -128,7 +132,10 @@ content: region: content settings: media_types: { } - third_party_settings: { } + third_party_settings: + media_library_edit: + show_edit: '1' + edit_form_mode: default field_subscribe_email_subject: type: string_textfield weight: 36 diff --git a/config/sync/core.entity_form_display.node.event.default.yml b/config/sync/core.entity_form_display.node.event.default.yml index ab03acd7..ea5edcb8 100644 --- a/config/sync/core.entity_form_display.node.event.default.yml +++ b/config/sync/core.entity_form_display.node.event.default.yml @@ -121,7 +121,10 @@ content: region: content settings: media_types: { } - third_party_settings: { } + third_party_settings: + media_library_edit: + show_edit: '1' + edit_form_mode: default field_host: type: string_textfield weight: 10 diff --git a/config/sync/core.entity_form_display.node.guides.default.yml b/config/sync/core.entity_form_display.node.guides.default.yml index 9fff09ea..0cc3ac02 100644 --- a/config/sync/core.entity_form_display.node.guides.default.yml +++ b/config/sync/core.entity_form_display.node.guides.default.yml @@ -20,6 +20,7 @@ dependencies: - inline_entity_form - maxlength - media_library + - media_library_edit - path - text id: node.guides.default @@ -90,7 +91,10 @@ content: region: content settings: media_types: { } - third_party_settings: { } + third_party_settings: + media_library_edit: + show_edit: '1' + edit_form_mode: default field_summary: type: text_textarea weight: 2 diff --git a/config/sync/core.entity_form_display.node.news.default.yml b/config/sync/core.entity_form_display.node.news.default.yml index afb46d5c..e1da8e32 100644 --- a/config/sync/core.entity_form_display.node.news.default.yml +++ b/config/sync/core.entity_form_display.node.news.default.yml @@ -20,6 +20,7 @@ dependencies: - inline_entity_form - maxlength - media_library + - media_library_edit - path - text id: node.news.default @@ -79,7 +80,10 @@ content: region: content settings: media_types: { } - third_party_settings: { } + third_party_settings: + media_library_edit: + show_edit: '1' + edit_form_mode: default field_kicker: type: string_textfield weight: 1 @@ -101,7 +105,10 @@ content: region: content settings: media_types: { } - third_party_settings: { } + third_party_settings: + media_library_edit: + show_edit: '1' + edit_form_mode: default field_slug: type: string_textfield weight: 14 diff --git a/config/sync/core.entity_form_display.node.source.default.yml b/config/sync/core.entity_form_display.node.source.default.yml index 4ccedc83..32f7c8f5 100644 --- a/config/sync/core.entity_form_display.node.source.default.yml +++ b/config/sync/core.entity_form_display.node.source.default.yml @@ -5,9 +5,11 @@ dependencies: config: - field.field.node.source.field_logo - node.type.source + - workflows.workflow.editorial module: - content_moderation - media_library + - media_library_edit id: node.source.default targetEntityType: node bundle: source @@ -25,7 +27,10 @@ content: region: content settings: media_types: { } - third_party_settings: { } + third_party_settings: + media_library_edit: + show_edit: '1' + edit_form_mode: default moderation_state: type: moderation_state_default weight: 4 diff --git a/config/sync/core.entity_form_display.node.topics.default.yml b/config/sync/core.entity_form_display.node.topics.default.yml index e49bd09c..b84007c0 100644 --- a/config/sync/core.entity_form_display.node.topics.default.yml +++ b/config/sync/core.entity_form_display.node.topics.default.yml @@ -21,6 +21,7 @@ dependencies: - link - maxlength - media_library + - media_library_edit - paragraphs - path - text @@ -136,7 +137,10 @@ content: region: content settings: media_types: { } - third_party_settings: { } + third_party_settings: + media_library_edit: + show_edit: '1' + edit_form_mode: default field_slug: type: string_textfield weight: 14 diff --git a/config/sync/core.entity_view_display.media.image.default.yml b/config/sync/core.entity_view_display.media.image.default.yml index 37dfc1a7..47fca434 100644 --- a/config/sync/core.entity_view_display.media.image.default.yml +++ b/config/sync/core.entity_view_display.media.image.default.yml @@ -4,21 +4,21 @@ status: true dependencies: config: - field.field.media.image.field_media_image - - image.style.large - media.type.image + - responsive_image.styles.brothers module: - - image + - responsive_image id: media.image.default targetEntityType: media bundle: image mode: default content: field_media_image: - type: image + type: responsive_image label: visually_hidden settings: + responsive_image_style: brothers image_link: '' - image_style: large image_loading: attribute: lazy third_party_settings: { } diff --git a/config/sync/core.entity_view_display.node.basic_page.default.yml b/config/sync/core.entity_view_display.node.basic_page.default.yml index ffb5df71..1ee08e03 100644 --- a/config/sync/core.entity_view_display.node.basic_page.default.yml +++ b/config/sync/core.entity_view_display.node.basic_page.default.yml @@ -25,6 +25,11 @@ content: third_party_settings: { } weight: 101 region: content + content_moderation_control: + settings: { } + third_party_settings: { } + weight: -20 + region: content field_deck: type: text_default label: above diff --git a/config/sync/core.entity_view_display.node.basic_page.teaser.yml b/config/sync/core.entity_view_display.node.basic_page.teaser.yml index 2c39f26c..969b3ee2 100644 --- a/config/sync/core.entity_view_display.node.basic_page.teaser.yml +++ b/config/sync/core.entity_view_display.node.basic_page.teaser.yml @@ -27,6 +27,11 @@ content: third_party_settings: { } weight: 101 region: content + content_moderation_control: + settings: { } + third_party_settings: { } + weight: -20 + region: content links: settings: { } third_party_settings: { } diff --git a/config/sync/core.entity_view_display.node.community.default.yml b/config/sync/core.entity_view_display.node.community.default.yml index ee987e90..3a0304ba 100644 --- a/config/sync/core.entity_view_display.node.community.default.yml +++ b/config/sync/core.entity_view_display.node.community.default.yml @@ -32,6 +32,11 @@ content: third_party_settings: { } weight: 101 region: content + content_moderation_control: + settings: { } + third_party_settings: { } + weight: -20 + region: content field_deck: type: text_default label: above diff --git a/config/sync/core.extension.yml b/config/sync/core.extension.yml index 2fecb847..48f96263 100644 --- a/config/sync/core.extension.yml +++ b/config/sync/core.extension.yml @@ -22,6 +22,7 @@ module: dynamic_page_cache: 0 easy_breadcrumb: 0 ec_shortcodes: 0 + edit_media_modal: 0 editor: 0 embedded_content: 0 entity_reference_revisions: 0 @@ -41,6 +42,7 @@ module: maxlength: 0 media: 0 media_library: 0 + media_library_edit: 0 memcache: 0 menu_link_content: 0 menu_ui: 0 @@ -63,6 +65,7 @@ module: redirect: 0 remove_username: 0 require_revision_log_message: 0 + responsive_image: 0 role_delegation: 0 scheduler: 0 scheduler_content_moderation_integration: 0 diff --git a/config/sync/filter.format.html.yml b/config/sync/filter.format.html.yml index 4f28fc98..fca59d5e 100644 --- a/config/sync/filter.format.html.yml +++ b/config/sync/filter.format.html.yml @@ -23,7 +23,7 @@ filters: id: embedded_content provider: embedded_content status: true - weight: 100 + weight: -48 settings: { } filter_align: id: filter_align @@ -47,7 +47,7 @@ filters: id: filter_html provider: filter status: false - weight: -48 + weight: -45 settings: allowed_html: '
' filter_html_help: true @@ -80,21 +80,21 @@ filters: id: filter_url provider: filter status: false - weight: -49 + weight: -46 settings: filter_url_length: 72 linkit: id: linkit provider: linkit status: true - weight: -47 + weight: -49 settings: title: true media_embed: id: media_embed provider: media status: true - weight: -45 + weight: -47 settings: default_view_mode: full allowed_view_modes: { } diff --git a/config/sync/image.style.dg_large_scale_to_1200_convert_to_webp.yml b/config/sync/image.style.dg_large_scale_to_1200_convert_to_webp.yml new file mode 100644 index 00000000..b2210dee --- /dev/null +++ b/config/sync/image.style.dg_large_scale_to_1200_convert_to_webp.yml @@ -0,0 +1,21 @@ +uuid: a01b4d3b-bf07-4cda-a4bc-d46b2abb0c39 +langcode: en +status: true +dependencies: { } +name: dg_large_scale_to_1200_convert_to_webp +label: 'DG Large (scale 1200 w max convert to webp)' +effects: + 28063fb5-20a6-4237-86ac-6c714dca1cfd: + uuid: 28063fb5-20a6-4237-86ac-6c714dca1cfd + id: image_scale + weight: -10 + data: + width: 1200 + height: null + upscale: true + d8d19018-df8f-4792-a58c-2dd13c17c7f1: + uuid: d8d19018-df8f-4792-a58c-2dd13c17c7f1 + id: image_convert + weight: -9 + data: + extension: webp diff --git a/config/sync/image.style.dg_medium_800_max_convert_to_webp.yml b/config/sync/image.style.dg_medium_800_max_convert_to_webp.yml new file mode 100644 index 00000000..9ab75596 --- /dev/null +++ b/config/sync/image.style.dg_medium_800_max_convert_to_webp.yml @@ -0,0 +1,21 @@ +uuid: 2aafc2ab-3bd9-4535-956e-02295504af41 +langcode: en +status: true +dependencies: { } +name: dg_medium_800_max_convert_to_webp +label: 'DG Medium (scale 800 w max convert to webp)' +effects: + 42c4c7a7-f686-4c2e-bf04-e5198d8d0079: + uuid: 42c4c7a7-f686-4c2e-bf04-e5198d8d0079 + id: image_scale + weight: -10 + data: + width: 800 + height: null + upscale: true + c93b3ec1-9090-4844-8f86-6077b6f5e6fd: + uuid: c93b3ec1-9090-4844-8f86-6077b6f5e6fd + id: image_convert + weight: -8 + data: + extension: webp diff --git a/config/sync/image.style.dg_small.yml b/config/sync/image.style.dg_small.yml new file mode 100644 index 00000000..89ff5ab3 --- /dev/null +++ b/config/sync/image.style.dg_small.yml @@ -0,0 +1,21 @@ +uuid: 36e708bb-6dd8-4996-91e7-1d9ce055e779 +langcode: en +status: true +dependencies: { } +name: dg_small +label: 'DG Small (scale 400 w max convert to webp)' +effects: + cd6d305c-07cd-4ef5-9c59-4ea56eee3543: + uuid: cd6d305c-07cd-4ef5-9c59-4ea56eee3543 + id: image_scale + weight: 1 + data: + width: 400 + height: null + upscale: true + 2b7654d1-17f3-4671-a269-f6c9faf76e92: + uuid: 2b7654d1-17f3-4671-a269-f6c9faf76e92 + id: image_convert + weight: 2 + data: + extension: webp diff --git a/config/sync/image.style.logo_250_x_250_convert_to_webp.yml b/config/sync/image.style.logo_250_x_250_convert_to_webp.yml new file mode 100644 index 00000000..7d13244e --- /dev/null +++ b/config/sync/image.style.logo_250_x_250_convert_to_webp.yml @@ -0,0 +1,21 @@ +uuid: 73eb184b-e66b-4002-bceb-2361a56dccbe +langcode: en +status: true +dependencies: { } +name: logo_250_x_250_convert_to_webp +label: 'DG Logo (scale and crop 250 x 250, convert to webp)' +effects: + 938659b3-0f94-4300-ab93-ad5d3c747ad9: + uuid: 938659b3-0f94-4300-ab93-ad5d3c747ad9 + id: image_scale_and_crop + weight: 1 + data: + width: 250 + height: 250 + anchor: center-center + 9a207c2c-2711-4470-bfa2-183e71c4eed1: + uuid: 9a207c2c-2711-4470-bfa2-183e71c4eed1 + id: image_convert + weight: 2 + data: + extension: webp diff --git a/config/sync/image.style.responsive_image_set.yml b/config/sync/image.style.responsive_image_set.yml new file mode 100644 index 00000000..1e5c69ef --- /dev/null +++ b/config/sync/image.style.responsive_image_set.yml @@ -0,0 +1,23 @@ +uuid: 04e3fbc4-5f13-4ce7-b324-e616dd2593f4 +langcode: en +status: true +dependencies: { } +name: responsive_image_set +label: 'DG Responsive Image Set' +effects: + c5b89838-41f1-428c-957f-6f2abd9b035f: + uuid: c5b89838-41f1-428c-957f-6f2abd9b035f + id: image_scale + weight: 1 + data: + width: 800 + height: null + upscale: false + 6e0ee9d0-be22-4c26-a2d0-9c131bcc7b80: + uuid: 6e0ee9d0-be22-4c26-a2d0-9c131bcc7b80 + id: image_scale + weight: 2 + data: + width: 1200 + height: null + upscale: false diff --git a/config/sync/image.style.tiny_icon.yml b/config/sync/image.style.tiny_icon.yml new file mode 100644 index 00000000..5ed6a8c4 --- /dev/null +++ b/config/sync/image.style.tiny_icon.yml @@ -0,0 +1,21 @@ +uuid: d196d387-3355-4e2e-9edc-11e6fce9f07d +langcode: en +status: true +dependencies: { } +name: tiny_icon +label: 'DG Tiny Icon (scale and crop 16 x 16, convert to webp)' +effects: + a28a7ae7-84d2-4554-9cac-5ca9507a3b0c: + uuid: a28a7ae7-84d2-4554-9cac-5ca9507a3b0c + id: image_scale_and_crop + weight: 1 + data: + width: 16 + height: 16 + anchor: center-center + 4f4c7b72-d6f0-4621-9b42-54b90a3be55d: + uuid: 4f4c7b72-d6f0-4621-9b42-54b90a3be55d + id: image_convert + weight: 2 + data: + extension: webp diff --git a/config/sync/responsive_image.styles.brothers.yml b/config/sync/responsive_image.styles.brothers.yml new file mode 100644 index 00000000..ad95a683 --- /dev/null +++ b/config/sync/responsive_image.styles.brothers.yml @@ -0,0 +1,30 @@ +uuid: 8c0fb760-a595-46c3-bd0e-d622ada64523 +langcode: en +status: true +dependencies: + config: + - image.style.dg_large_scale_to_1200_convert_to_webp + - image.style.dg_medium_800_max_convert_to_webp + - image.style.dg_small + theme: + - digital_gov +id: brothers +label: 'DG Responsive Images' +image_style_mappings: + - + image_mapping_type: image_style + image_mapping: dg_large_scale_to_1200_convert_to_webp + breakpoint_id: digital_gov.large + multiplier: 1x + - + image_mapping_type: image_style + image_mapping: dg_medium_800_max_convert_to_webp + breakpoint_id: digital_gov.medium + multiplier: 1x + - + image_mapping_type: image_style + image_mapping: dg_small + breakpoint_id: digital_gov.small + multiplier: 1x +breakpoint_group: digital_gov +fallback_image_style: dg_large_scale_to_1200_convert_to_webp diff --git a/web/themes/custom/digital_gov/digital_gov.breakpoints.yml b/web/themes/custom/digital_gov/digital_gov.breakpoints.yml new file mode 100644 index 00000000..4cd32f4d --- /dev/null +++ b/web/themes/custom/digital_gov/digital_gov.breakpoints.yml @@ -0,0 +1,24 @@ +#Use the w800 image style for screens up to 800 pixels wide. +#Use the w1200 image style for screens up to 1200 pixels wide. +#Use the w1200 image style for screens wider than 1200 pixels. + +digital_gov.small: + label: Small Screens + mediaQuery: 'all and (max-width: 800px)' + weight: 0 + multipliers: + - 1x + +digital_gov.medium: + label: Medium Screens + mediaQuery: 'all and (min-width: 800px)' + weight: 0 + multipliers: + - 1x + +digital_gov.large: + label: Large Screens + mediaQuery: 'all and (min-width: 1200px)' + weight: 2 + multipliers: + - 1x