-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Vote-1124: Confgure responsive Image for Hero component (#949)
- Loading branch information
Showing
7 changed files
with
57 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,5 @@ adding: | |
devel: 0 | ||
disable_language: 0 | ||
field_ui: 0 | ||
responsive_image: 0 | ||
views_ui: 0 | ||
removing: { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
uuid: 41865dd0-e521-4e76-bdd8-51ff0a8230bf | ||
langcode: en | ||
status: true | ||
dependencies: | ||
config: | ||
- image.style.scaled_lg | ||
- image.style.scaled_sm | ||
- image.style.scaled_xl | ||
id: scaled | ||
label: Scaled | ||
image_style_mappings: | ||
- | ||
image_mapping_type: sizes | ||
image_mapping: | ||
sizes: 100vw | ||
sizes_image_styles: | ||
- scaled_lg | ||
- scaled_sm | ||
- scaled_xl | ||
breakpoint_id: responsive_image.viewport_sizing | ||
multiplier: 1x | ||
breakpoint_group: responsive_image | ||
fallback_image_style: scaled_sm |
14 changes: 14 additions & 0 deletions
14
web/themes/custom/votegov/templates/media/media--image--scaled.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{% extends 'media.html.twig' %} | ||
{# | ||
/** | ||
* @file | ||
* Theme override to display a media item: image. | ||
*/ | ||
#} | ||
|
||
{# Caching the data in content object #} | ||
{% set savedCache = content | render %} | ||
|
||
{% block content %} | ||
{{ content.field_media_image | field_value }} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
votegov.mobile: | ||
label: 'Mobile' | ||
mediaQuery: '' | ||
weight: 1 | ||
votegov.tablet: | ||
label: 'Tablet' | ||
mediaQuery: 'all and (min-width: 640px)' | ||
weight: 2 | ||
votegov.desktop: | ||
label: 'Desktop' | ||
mediaQuery: 'all and (min-width: 1024px)' | ||
weight: 3 |