Skip to content

Commit

Permalink
D8CORE-7207 Add Page Title Banner Paragraph (#754)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdwjdwjdw authored Feb 27, 2024
1 parent 769eb4e commit 17e2a58
Show file tree
Hide file tree
Showing 18 changed files with 459 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,13 @@ content:
closed_mode: preview
autocollapse: none
closed_mode_threshold: 0
add_mode: button
add_mode: dropdown
form_display_mode: default
default_paragraph_type: _none
features:
add_above: '0'
collapse_edit_all: '0'
convert: '0'
duplicate: '0'
third_party_settings:
change_labels:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
uuid: 1c6a81c7-d849-4420-bfcf-f87a8160b5d4
langcode: en
status: true
dependencies:
config:
- field.field.paragraph.stanford_page_title_banner.su_title_banner_image
- paragraphs.paragraphs_type.stanford_page_title_banner
module:
- media_library
id: paragraph.stanford_page_title_banner.default
targetEntityType: paragraph
bundle: stanford_page_title_banner
mode: default
content:
su_title_banner_image:
type: media_library_widget
weight: 0
region: content
settings:
media_types: { }
third_party_settings: { }
hidden:
created: true
status: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
uuid: 701c5dca-9f80-4e9c-8323-46f88a98e618
langcode: en
status: true
dependencies:
config:
- field.field.paragraph.stanford_page_title_banner.su_title_banner_image
- paragraphs.paragraphs_type.stanford_page_title_banner
module:
- ds
- empty_fields
- field_formatter_class
- stanford_media
third_party_settings:
ds:
layout:
id: pattern_hero
library: null
disable_css: false
entity_classes: all_classes
settings:
pattern:
field_templates: default
variant: default
regions:
hero_body:
- 'dynamic_token_field:paragraph-page_title'
- su_title_banner_header
hero_image:
- su_title_banner_image
fields:
'dynamic_token_field:paragraph-page_title':
plugin_id: 'dynamic_token_field:paragraph-page_title'
weight: 0
label: hidden
formatter: default
id: paragraph.stanford_page_title_banner.default
targetEntityType: paragraph
bundle: stanford_page_title_banner
mode: default
content:
su_title_banner_image:
type: media_responsive_image_formatter
label: hidden
settings:
view_mode: default
link: false
image_style: stanford_hero_block_wide
remove_alt: 0
third_party_settings:
empty_fields:
handler: ''
field_formatter_class:
class: ''
weight: 2
region: hero_image
hidden:
search_api_excerpt: true
14 changes: 14 additions & 0 deletions config/sync/ds.field.page_title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
id: page_title
label: 'Page Title'
ui_limit: 'stanford_page_title_banner|*'
type: token
type_label: 'Token field'
entities:
paragraph: paragraph
properties:
content:
value: '<h1>[current-page:title]</h1>'
format: administrative_html
force_global_entity: false
use_global_entity: false
use_global_view_token: false
34 changes: 33 additions & 1 deletion config/sync/field.field.node.stanford_page.su_page_banner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ dependencies:
- field.storage.node.su_page_banner
- node.type.stanford_page
- paragraphs.paragraphs_type.stanford_banner
- paragraphs.paragraphs_type.stanford_page_title_banner
module:
- entity_reference_revisions
id: node.stanford_page.su_page_banner
field_name: su_page_banner
entity_type: node
bundle: stanford_page
label: 'Top Banner'
description: 'The top banner displays directly below the navigation and on interior pages, above the page title.'
description: 'The top banner displays directly below the navigation and on interior pages, above the page title. The page title banner replaces the default page title with a page title within the banner image.'
required: false
translatable: false
default_value: { }
Expand All @@ -23,14 +24,45 @@ settings:
handler_settings:
target_bundles:
stanford_banner: stanford_banner
stanford_page_title_banner: stanford_page_title_banner
negate: 0
target_bundles_drag_drop:
stanford_accordion:
weight: 14
enabled: false
stanford_banner:
weight: 4
enabled: true
stanford_card:
weight: 5
enabled: false
stanford_entity:
weight: 17
enabled: false
stanford_gallery:
weight: 18
enabled: false
stanford_layout:
weight: 19
enabled: false
stanford_lists:
weight: 20
enabled: false
stanford_media_caption:
weight: 21
enabled: false
stanford_page_title_banner:
weight: 22
enabled: true
stanford_person_cta:
weight: 23
enabled: false
stanford_schedule:
weight: 24
enabled: false
stanford_spacer:
weight: 25
enabled: false
stanford_wysiwyg:
weight: 6
enabled: false
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
uuid: 01f81126-912e-40c4-9607-fc318ca24a0b
langcode: en
status: true
dependencies:
config:
- field.storage.paragraph.su_title_banner_image
- media.type.image
- paragraphs.paragraphs_type.stanford_page_title_banner
id: paragraph.stanford_page_title_banner.su_title_banner_image
field_name: su_title_banner_image
entity_type: paragraph
bundle: stanford_page_title_banner
label: Image
description: 'The page title banner background image. Please use hi-resolution images.'
required: true
translatable: false
default_value: { }
default_value_callback: ''
settings:
handler: 'default:media'
handler_settings:
target_bundles:
image: image
sort:
field: _none
direction: ASC
auto_create: false
auto_create_bundle: ''
field_type: entity_reference
20 changes: 20 additions & 0 deletions config/sync/field.storage.paragraph.su_title_banner_image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
uuid: 4327eda2-047f-433c-9b71-59402c332db2
langcode: en
status: true
dependencies:
module:
- media
- paragraphs
id: paragraph.su_title_banner_image
field_name: su_title_banner_image
entity_type: paragraph
type: entity_reference
settings:
target_type: media
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
31 changes: 31 additions & 0 deletions config/sync/filter.format.administrative_html.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
uuid: 5878ed4c-98dc-49fe-9fbb-fd1c4449faa8
langcode: en
status: true
dependencies:
module:
- responsive_tables_filter
- stanford_decoupled
name: 'Administrative HTML'
format: administrative_html
weight: -7
filters:
filter_html_image_secure:
id: filter_html_image_secure
provider: filter
status: true
weight: 9
settings: { }
filter_responsive_tables_filter:
id: filter_responsive_tables_filter
provider: responsive_tables_filter
status: false
weight: 0
settings:
tablesaw_type: stack
tablesaw_persist: '1'
su_clean_html:
id: su_clean_html
provider: stanford_decoupled
status: true
weight: 99
settings: { }
2 changes: 1 addition & 1 deletion config/sync/filter.format.plain_text.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ _core:
default_config_hash: NIKBt6kw_uPhNI0qtR2DnRf7mSOgAQdx7Q94SKMjXbQ
name: 'Plain text'
format: plain_text
weight: 10
weight: -8
filters:
filter_autop:
id: filter_autop
Expand Down
5 changes: 2 additions & 3 deletions config/sync/filter.format.stanford_html.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ dependencies:
- mathjax
- media
- responsive_tables_filter
- stanford_media
- stanford_profile_helper
- stanford_decoupled
name: HTML
format: stanford_html
weight: 0
weight: -10
filters:
editor_file_reference:
id: editor_file_reference
Expand Down
5 changes: 2 additions & 3 deletions config/sync/filter.format.stanford_minimal_html.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ dependencies:
- linkit
- mathjax
- responsive_tables_filter
- stanford_media
- stanford_profile_helper
- stanford_decoupled
name: 'Minimal HTML'
format: stanford_minimal_html
weight: 0
weight: -9
filters:
filter_html:
id: filter_html
Expand Down
5 changes: 5 additions & 0 deletions config/sync/graphql_compose.settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ entity_config:
stanford_media_caption:
enabled: true
query_load_enabled: true
stanford_page_title_banner:
enabled: true
stanford_person_cta:
enabled: true
query_load_enabled: true
Expand Down Expand Up @@ -679,6 +681,9 @@ field_config:
enabled: true
su_media_caption_media:
enabled: true
stanford_page_title_banner:
su_title_banner_image:
enabled: true
stanford_person_cta:
su_person_cta_image:
enabled: true
Expand Down
Loading

0 comments on commit 17e2a58

Please sign in to comment.