Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UHF-10191: Image style refactor #530

Merged
merged 6 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions conf/cmi/core.entity_view_display.node.job_listing.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,10 @@ dependencies:
- field.field.node.job_listing.field_task_area
- field.field.node.job_listing.field_video
- field.field.node.job_listing.job_description
- image.style.3_2_m_2x
- node.type.job_listing
module:
- datetime
- link
- media
- text
- user
id: node.job_listing.default
Expand Down Expand Up @@ -79,13 +77,11 @@ content:
weight: 0
region: content
field_image:
type: media_thumbnail
type: entity_reference_entity_view
label: hidden
settings:
image_link: ''
image_style: 3_2_m_2x
image_loading:
attribute: lazy
view_mode: job_listing_organization
link: false
third_party_settings: { }
weight: 15
region: content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ dependencies:
config:
- field.field.taxonomy_term.organization.field_default_image
- field.field.taxonomy_term.organization.field_external_id
- image.style.3_2_m_2x
- responsive_image.styles.job_listing_org
- taxonomy.vocabulary.organization
module:
- image
- responsive_image
- text
_core:
default_config_hash: Gz4Fau02tN8C3_Pjzxy-VS8VljtfEJNKjRK2Tfdh1Ag
Expand All @@ -25,13 +25,13 @@ content:
weight: 0
region: content
field_default_image:
type: image
type: responsive_image
label: above
settings:
responsive_image_style: job_listing_org
image_link: ''
image_style: 3_2_m_2x
image_loading:
attribute: lazy
attribute: eager
third_party_settings: { }
weight: 1
region: content
Expand Down
7 changes: 5 additions & 2 deletions public/themes/custom/hdbt_subtheme/hdbt_subtheme.theme
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,14 @@ function hdbt_subtheme_preprocess_organization_information_block(array &$variabl
// Set organization default image variable.
if (!empty($organization) && !empty($organization->get('field_default_image')->first())) {
$variables['content']['organization_default_image'] = $organization->get('field_default_image')->first()->view([
'type' => 'image',
'type' => 'responsive_image',
'label' => 'hidden',
'settings' => [
'image_style' => '3_2_m_2x',
'responsive_image_style' => 'job_listing_org',
'image_link' => '',
'image_loading' => [
'attribute' => 'eager',
],
],
]);
}
Expand Down