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

HPC-9292: Add caption for story images and show as overlay over the image #148

Merged
merged 1 commit into from
Nov 16, 2023
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
39 changes: 34 additions & 5 deletions config/core.entity_form_display.node.story.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ langcode: en
status: true
dependencies:
config:
- field.field.node.story.field_caption
- field.field.node.story.field_content_space
- field.field.node.story.field_footnotes
- field.field.node.story.field_media
Expand All @@ -13,13 +14,41 @@ dependencies:
module:
- allowed_formats
- content_moderation
- double_field
- media_library
- text
id: node.story.default
targetEntityType: node
bundle: story
mode: default
content:
field_caption:
type: double_field
weight: 4
region: content
settings:
first:
type: textfield
label_display: block
size: 60
placeholder: 'Ex: Mbuji-Mayi, RDC'
label: Ok
cols: 10
rows: 5
prefix: ''
suffix: ''
second:
type: textarea
label_display: block
size: 10
placeholder: ''
label: Ok
cols: 10
rows: 5
prefix: ''
suffix: ''
inline: false
third_party_settings: { }
field_content_space:
type: options_select
weight: 0
Expand All @@ -28,7 +57,7 @@ content:
third_party_settings: { }
field_footnotes:
type: text_textarea
weight: 5
weight: 6
region: content
settings:
rows: 5
Expand All @@ -46,7 +75,7 @@ content:
third_party_settings: { }
field_source:
type: text_textarea
weight: 6
weight: 7
region: content
settings:
rows: 5
Expand All @@ -57,7 +86,7 @@ content:
hide_guidelines: '1'
field_text:
type: text_textarea
weight: 4
weight: 5
region: content
settings:
rows: 5
Expand All @@ -74,13 +103,13 @@ content:
third_party_settings: { }
moderation_state:
type: moderation_state_default
weight: 8
weight: 9
region: content
settings: { }
third_party_settings: { }
status:
type: boolean_checkbox
weight: 7
weight: 8
region: content
settings:
display_label: true
Expand Down
9 changes: 9 additions & 0 deletions config/core.entity_view_display.node.story.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ langcode: en
status: true
dependencies:
config:
- field.field.node.story.field_caption
- field.field.node.story.field_content_space
- field.field.node.story.field_footnotes
- field.field.node.story.field_media
Expand All @@ -11,13 +12,21 @@ dependencies:
- field.field.node.story.field_type
- node.type.story
module:
- gho_fields
- text
- user
id: node.story.default
targetEntityType: node
bundle: story
mode: default
content:
field_caption:
type: gho_caption
label: hidden
settings: { }
third_party_settings: { }
weight: 6
region: content
field_footnotes:
type: text_default
label: above
Expand Down
50 changes: 50 additions & 0 deletions config/core.entity_view_display.node.story.full.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
uuid: 66a0c6ee-2406-498b-9756-620fb42f3b09
langcode: en
status: true
dependencies:
config:
- core.entity_view_mode.node.full
- field.field.node.story.field_caption
- field.field.node.story.field_content_space
- field.field.node.story.field_footnotes
- field.field.node.story.field_media
- field.field.node.story.field_source
- field.field.node.story.field_text
- field.field.node.story.field_type
- node.type.story
module:
- gho_fields
- user
id: node.story.full
targetEntityType: node
bundle: story
mode: full
content:
field_caption:
type: gho_caption
label: hidden
settings: { }
third_party_settings: { }
weight: 4
region: content
links:
settings: { }
third_party_settings: { }
weight: 100
region: content
title:
type: string
label: hidden
settings:
link_to_entity: false
third_party_settings: { }
weight: -5
region: content
hidden:
field_content_space: true
field_footnotes: true
field_media: true
field_source: true
field_text: true
field_type: true
langcode: true
50 changes: 50 additions & 0 deletions config/core.entity_view_display.node.story.home_page.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
uuid: aa35d3d3-c347-415f-a191-94eb15cf4769
langcode: en
status: true
dependencies:
config:
- core.entity_view_mode.node.home_page
- field.field.node.story.field_caption
- field.field.node.story.field_content_space
- field.field.node.story.field_footnotes
- field.field.node.story.field_media
- field.field.node.story.field_source
- field.field.node.story.field_text
- field.field.node.story.field_type
- node.type.story
module:
- gho_fields
- user
id: node.story.home_page
targetEntityType: node
bundle: story
mode: home_page
content:
field_caption:
type: gho_caption
label: hidden
settings: { }
third_party_settings: { }
weight: 4
region: content
links:
settings: { }
third_party_settings: { }
weight: 100
region: content
title:
type: string
label: hidden
settings:
link_to_entity: false
third_party_settings: { }
weight: -5
region: content
hidden:
field_content_space: true
field_footnotes: true
field_media: true
field_source: true
field_text: true
field_type: true
langcode: true
2 changes: 2 additions & 0 deletions config/core.entity_view_display.node.story.preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ status: true
dependencies:
config:
- core.entity_view_mode.node.preview
- field.field.node.story.field_caption
- field.field.node.story.field_content_space
- field.field.node.story.field_footnotes
- field.field.node.story.field_media
Expand Down Expand Up @@ -71,6 +72,7 @@ content:
weight: -5
region: content
hidden:
field_caption: true
field_content_space: true
langcode: true
links: true
38 changes: 32 additions & 6 deletions config/core.entity_view_display.node.story.teaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ status: true
dependencies:
config:
- core.entity_view_mode.node.teaser
- field.field.node.story.field_caption
- field.field.node.story.field_content_space
- field.field.node.story.field_footnotes
- field.field.node.story.field_media
Expand All @@ -12,19 +13,44 @@ dependencies:
- field.field.node.story.field_type
- node.type.story
module:
- double_field
- text
- user
id: node.story.teaser
targetEntityType: node
bundle: story
mode: teaser
content:
field_caption:
type: double_field_unformatted_list
label: hidden
settings:
first:
format_type: medium
link: false
hidden: false
key: false
decimal_separator: .
thousand_separator: ''
scale: 2
second:
format_type: medium
link: false
hidden: false
key: false
decimal_separator: .
thousand_separator: ''
scale: 2
inline: true
third_party_settings: { }
weight: 3
region: content
field_footnotes:
type: text_default
label: above
settings: { }
third_party_settings: { }
weight: 3
weight: 5
region: content
field_media:
type: entity_reference_entity_view
Expand All @@ -33,37 +59,37 @@ content:
view_mode: story
link: false
third_party_settings: { }
weight: 1
weight: 2
region: content
field_source:
type: text_default
label: above
settings: { }
third_party_settings: { }
weight: 4
weight: 6
region: content
field_text:
type: text_default
label: hidden
settings: { }
third_party_settings: { }
weight: 2
weight: 4
region: content
field_type:
type: entity_reference_label
label: hidden
settings:
link: false
third_party_settings: { }
weight: 0
weight: 1
region: content
title:
type: string
label: hidden
settings:
link_to_entity: false
third_party_settings: { }
weight: -5
weight: 0
region: content
hidden:
field_content_space: true
Expand Down
39 changes: 39 additions & 0 deletions config/field.field.node.story.field_caption.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
uuid: 727f2c1b-3db9-4588-b276-40b695622243
langcode: en
status: true
dependencies:
config:
- field.storage.node.field_caption
- node.type.story
module:
- double_field
id: node.story.field_caption
field_name: field_caption
entity_type: node
bundle: story
label: Caption
description: 'When this image is used on Humanitarian Action, it will include a written text comprising the <strong>location</strong> in bold, followed by the <strong>caption</strong>, and then the <strong>image credits</strong>. These credits are defined in the Media Library and not editable here.'
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
first:
label: 'Image location'
list: false
allowed_values: { }
max: null
min: null
required: false
on_label: 'On'
off_label: 'Off'
second:
label: Caption
list: false
allowed_values: { }
max: null
min: null
required: false
on_label: 'On'
off_label: 'Off'
field_type: double_field
Loading
Loading