Skip to content

Commit

Permalink
DIGITAL-47: Guide Navigation templates
Browse files Browse the repository at this point in the history
* Render the desktop navigation for guides.
* Render the mobile navigation for guides.
* Show summary and title below nav
* Show prev/next links if enabled.
* Show summary box if enabled
* Show reading time if enabled
* Display overview page elements in header.
* Link to parent guide in header if set.
* Show sidebar navigation if enabled.
  • Loading branch information
omerida committed Dec 18, 2024
1 parent 7cd5bfc commit 551a8b4
Show file tree
Hide file tree
Showing 28 changed files with 643 additions and 118 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ content:
third_party_settings: { }
field_parent_guide:
type: options_select
weight: 14
weight: 26
region: content
settings: { }
third_party_settings: { }
Expand Down
13 changes: 4 additions & 9 deletions config/sync/core.entity_form_display.node.guides.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ dependencies:
- workflows.workflow.editorial
module:
- content_moderation
- entity_reference_revisions
- field_group
- inline_entity_form
- maxlength
Expand All @@ -30,8 +29,8 @@ third_party_settings:
field_group:
group_guide_navigation:
children:
- field_guide_nav_ref
- field_guide_nav_title
- field_guide_nav_ref
label: 'Guide Navigation'
region: content
parent_name: ''
Expand Down Expand Up @@ -85,14 +84,10 @@ content:
media_types: { }
third_party_settings: { }
field_guide_nav_ref:
type: entity_reference_revisions_autocomplete
weight: 17
type: options_select
weight: 26
region: content
settings:
match_operator: CONTAINS
match_limit: 10
size: 60
placeholder: ''
settings: { }
third_party_settings: { }
field_guide_nav_title:
type: string_textfield
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,20 @@ content:
third_party_settings: { }
weight: 1
region: content
field_parent_guide:
type: entity_reference_label
label: above
settings:
link: true
third_party_settings: { }
weight: 3
region: content
links:
settings: { }
third_party_settings: { }
weight: 0
region: content
hidden:
field_parent_guide: true
field_show_in_page_nav: true
field_show_next_previous: true
field_show_read_time: true
63 changes: 15 additions & 48 deletions config/sync/core.entity_view_display.node.guides.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ dependencies:
- field.field.node.guides.field_topics
- node.type.guides
module:
- entity_reference_revisions
- text
- user
id: node.guides.default
Expand All @@ -30,19 +29,19 @@ content:
label: hidden
settings: { }
third_party_settings: { }
weight: 101
weight: 2
region: content
content_moderation_control:
settings: { }
third_party_settings: { }
weight: -20
weight: 0
region: content
field_deck:
type: text_default
label: above
settings: { }
third_party_settings: { }
weight: 108
weight: 5
region: content
field_featured_image:
type: entity_reference_entity_view
Expand All @@ -51,41 +50,15 @@ content:
view_mode: default
link: false
third_party_settings: { }
weight: 119
region: content
field_guide_nav_ref:
type: entity_reference_revisions_entity_view
label: above
settings:
view_mode: default
link: ''
third_party_settings: { }
weight: 128
region: content
field_guide_nav_title:
type: string
label: above
settings:
link_to_entity: false
third_party_settings: { }
weight: 129
region: content
field_guide_weight:
type: number_integer
label: above
settings:
thousand_separator: ''
prefix_suffix: true
third_party_settings: { }
weight: 127
weight: 8
region: content
field_kicker:
type: string
label: above
settings:
link_to_entity: false
third_party_settings: { }
weight: 116
weight: 7
region: content
field_page_weight:
type: number_integer
Expand All @@ -94,7 +67,7 @@ content:
thousand_separator: ''
prefix_suffix: true
third_party_settings: { }
weight: 102
weight: 3
region: content
field_primary_image:
type: entity_reference_entity_view
Expand All @@ -103,36 +76,30 @@ content:
view_mode: default
link: false
third_party_settings: { }
weight: 114
weight: 6
region: content
field_summary:
type: text_default
label: above
settings: { }
third_party_settings: { }
weight: 104
region: content
field_summary_box:
type: boolean
label: above
settings:
format: default
format_custom_false: ''
format_custom_true: ''
third_party_settings: { }
weight: 126
weight: 4
region: content
field_topics:
type: entity_reference_label
label: above
settings:
link: true
third_party_settings: { }
weight: 125
weight: 9
region: content
links:
settings: { }
third_party_settings: { }
weight: 100
weight: 1
region: content
hidden: { }
hidden:
field_guide_nav_ref: true
field_guide_nav_title: true
field_guide_weight: true
field_summary_box: true
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ field_name: field_guide_start_page
entity_type: node
bundle: guide_navigation
label: 'Start Page'
description: ''
description: 'The page to use as the overview of the guide.'
required: true
translatable: false
default_value: { }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
uuid: e3af469a-8b6e-415d-b333-659809ced01b
uuid: 2e9e93c2-3d30-4a49-be9c-3124e243fda8
langcode: en
status: true
dependencies:
config:
- field.storage.node.field_parent_guide
- node.type.guide_navigation
module:
- entity_reference_revisions
id: node.guide_navigation.field_parent_guide
field_name: field_parent_guide
entity_type: node
bundle: guide_navigation
label: 'Parent Guide'
description: 'Add a link to this parent guide above title.'
description: ''
required: false
translatable: false
default_value: { }
Expand All @@ -24,4 +22,4 @@ settings:
view_name: parent_guide_nav_pages_ref
display_name: entity_reference_1
arguments: { }
field_type: entity_reference_revisions
field_type: entity_reference
10 changes: 4 additions & 6 deletions config/sync/field.field.node.guides.field_guide_nav_ref.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
uuid: cacc81a5-669e-4408-a688-bb694a693381
uuid: c401a03f-21ab-4bdc-942a-ae789b8f255f
langcode: en
status: true
dependencies:
config:
- field.storage.node.field_guide_nav_ref
- node.type.guide_navigation
- node.type.guides
module:
- entity_reference_revisions
id: node.guides.field_guide_nav_ref
field_name: field_guide_nav_ref
entity_type: node
bundle: guides
label: 'Guide Nav'
description: 'Select which guide navigation this page uses. <em>Does not add the page to those links</em>'
label: 'Guide Navigation'
description: ''
required: false
translatable: false
default_value: { }
Expand All @@ -28,4 +26,4 @@ settings:
direction: ASC
auto_create: false
auto_create_bundle: ''
field_type: entity_reference_revisions
field_type: entity_reference
2 changes: 1 addition & 1 deletion config/sync/field.field.node.guides.field_kicker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ field_name: field_kicker
entity_type: node
bundle: guides
label: Kicker
description: 'Highlight the relevant topic. This displays above the title on the /gudes/ page. Should always be included. Use only one or two words.'
description: 'Highlight the relevant topic. This displays above the title on the /guides/ page. Should always be included. Use only one or two words.'
required: false
translatable: false
default_value: { }
Expand Down
7 changes: 3 additions & 4 deletions config/sync/field.storage.node.field_guide_nav_ref.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
uuid: 89c0ef8f-af2c-4f5f-be55-02fb7af4aae9
uuid: e9ed8dfb-c0e4-4831-b20c-05f3c719773a
langcode: en
status: true
dependencies:
module:
- entity_reference_revisions
- node
id: node.field_guide_nav_ref
field_name: field_guide_nav_ref
entity_type: node
type: entity_reference_revisions
type: entity_reference
settings:
target_type: node
module: entity_reference_revisions
module: core
locked: false
cardinality: 1
translatable: true
Expand Down
7 changes: 3 additions & 4 deletions config/sync/field.storage.node.field_parent_guide.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
uuid: 5d41c45a-d4cf-4357-b8dc-c950331793e2
uuid: 71eab602-c462-4dec-95e7-2c7a234d9915
langcode: en
status: true
dependencies:
module:
- entity_reference_revisions
- node
id: node.field_parent_guide
field_name: field_parent_guide
entity_type: node
type: entity_reference_revisions
type: entity_reference
settings:
target_type: node
module: entity_reference_revisions
module: core
locked: false
cardinality: 1
translatable: true
Expand Down
Loading

0 comments on commit 551a8b4

Please sign in to comment.