-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Render TopicalEvent image src set with image urls that are provided b…
…y Whitehall. Whitehall has changed to start using modern Asset Manager urls for each asset. This means that the image urls are no longer guessable. Each image variant has its own unique id. In order for the srcset to work correctly, the image urls must be collected from content source.
- Loading branch information
Tuomas Nylund
committed
Oct 31, 2023
1 parent
d8a5671
commit 38febda
Showing
5 changed files
with
96 additions
and
15 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
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
64 changes: 64 additions & 0 deletions
64
spec/fixtures/content_store/topical_event_with_no_image_variants.json
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,64 @@ | ||
{ | ||
"base_path": "/government/topical-events/something-very-topical", | ||
"title": "Something very topical", | ||
"description": "This event is happening soon", | ||
"links": { | ||
"organisations": [ | ||
{ | ||
"content_id": "very-topical-id", | ||
"title": "Department of topical affairs", | ||
"base_path": "government/organisations/department-for-topical-affairs", | ||
"details": { | ||
"logo": { | ||
"crest": "single-identity" | ||
}, | ||
"brand": "department-for-topical-affairs" | ||
} | ||
}, | ||
{ | ||
"content_id": "emphasised-topical-id", | ||
"title": "Department of emphasised topical affairs", | ||
"base_path": "government/organisations/department-for-emphasised-topical-affairs", | ||
"details": { | ||
"logo": { | ||
"crest": "single-identity" | ||
}, | ||
"brand": "department-for-emphasised-topical-affairs" | ||
} | ||
} | ||
] | ||
}, | ||
"details": { | ||
"about_page_link_text": "Read more about this event", | ||
"body": "This is a very important topical event.", | ||
"image": { | ||
"url": "https://www.gov.uk/some-image.png", | ||
"alt_text": "Text describing the image" | ||
}, | ||
"end_date": "2016-04-28T00:00:00+00:00", | ||
"emphasised_organisations": ["emphasised-topical-id"], | ||
"ordered_featured_documents": [ | ||
{ | ||
"href": "https://www.gov.uk/somewhere", | ||
"image": { | ||
"url": "https://www.gov.uk/someimage.png", | ||
"alt_text": "Alt text for the image" | ||
}, | ||
"title": "A document related to this event", | ||
"summary": "Very interesting document content. However this goes over the 160 character limit so when displayed this should be truncated in order to display the content neatly on the page." | ||
} | ||
], | ||
"social_media_links": [ | ||
{ | ||
"href": "https://www.facebook.com/a-topical-event", | ||
"title": "Facebook", | ||
"service_type": "facebook" | ||
}, | ||
{ | ||
"href": "https://www.twitter.com/a-topical-event", | ||
"title": "Twitter", | ||
"service_type": "twitter" | ||
} | ||
] | ||
} | ||
} |