-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DIGITAL-37: Migrate links paragraph templates.
Adds paragraph_view_mode module. Migrate template for featured links field display. Adds separate templates for default and featured links views of resources. Updates featured links template with correct markup. Switch shortcodes to use theme templates for resources.
- Loading branch information
Showing
23 changed files
with
571 additions
and
55 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
37 changes: 37 additions & 0 deletions
37
config/sync/core.entity_view_display.paragraph.external_content.featured_links.yml
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,37 @@ | ||
uuid: 7ebac564-9b60-4ebc-bf4f-b1c7e387dc7c | ||
langcode: en | ||
status: true | ||
dependencies: | ||
config: | ||
- core.entity_view_mode.paragraph.featured_links | ||
- field.field.paragraph.external_content.field_link | ||
- field.field.paragraph.external_content.field_summary | ||
- paragraphs.paragraphs_type.external_content | ||
module: | ||
- link | ||
- text | ||
id: paragraph.external_content.featured_links | ||
targetEntityType: paragraph | ||
bundle: external_content | ||
mode: featured_links | ||
content: | ||
field_link: | ||
type: link | ||
label: hidden | ||
settings: | ||
trim_length: 80 | ||
url_only: false | ||
url_plain: false | ||
rel: '' | ||
target: '' | ||
third_party_settings: { } | ||
weight: 0 | ||
region: content | ||
field_summary: | ||
type: text_default | ||
label: hidden | ||
settings: { } | ||
third_party_settings: { } | ||
weight: 1 | ||
region: content | ||
hidden: { } |
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
34 changes: 34 additions & 0 deletions
34
config/sync/core.entity_view_display.paragraph.featured_links.featured_links.yml
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,34 @@ | ||
uuid: 3311037a-b3d8-46b7-9df5-081f4fa9ba2a | ||
langcode: en | ||
status: true | ||
dependencies: | ||
config: | ||
- core.entity_view_mode.paragraph.featured_links | ||
- field.field.paragraph.featured_links.field_links | ||
- field.field.paragraph.featured_links.field_title | ||
- paragraphs.paragraphs_type.featured_links | ||
module: | ||
- entity_reference_revisions | ||
id: paragraph.featured_links.featured_links | ||
targetEntityType: paragraph | ||
bundle: featured_links | ||
mode: featured_links | ||
content: | ||
field_links: | ||
type: entity_reference_revisions_entity_view | ||
label: hidden | ||
settings: | ||
view_mode: featured_links | ||
link: '' | ||
third_party_settings: { } | ||
weight: 1 | ||
region: content | ||
field_title: | ||
type: string | ||
label: above | ||
settings: | ||
link_to_entity: false | ||
third_party_settings: { } | ||
weight: 0 | ||
region: content | ||
hidden: { } |
41 changes: 41 additions & 0 deletions
41
config/sync/core.entity_view_display.paragraph.internal_content.featured_links.yml
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,41 @@ | ||
uuid: 87533f62-27c9-408b-969e-7778bf2d1903 | ||
langcode: en | ||
status: true | ||
dependencies: | ||
config: | ||
- core.entity_view_mode.paragraph.featured_links | ||
- field.field.paragraph.internal_content.field_content | ||
- field.field.paragraph.internal_content.field_override_summary | ||
- field.field.paragraph.internal_content.field_override_title | ||
- paragraphs.paragraphs_type.internal_content | ||
module: | ||
- text | ||
id: paragraph.internal_content.featured_links | ||
targetEntityType: paragraph | ||
bundle: internal_content | ||
mode: featured_links | ||
content: | ||
field_content: | ||
type: entity_reference_label | ||
label: above | ||
settings: | ||
link: true | ||
third_party_settings: { } | ||
weight: 0 | ||
region: content | ||
field_override_summary: | ||
type: text_default | ||
label: above | ||
settings: { } | ||
third_party_settings: { } | ||
weight: 2 | ||
region: content | ||
field_override_title: | ||
type: string | ||
label: above | ||
settings: | ||
link_to_entity: false | ||
third_party_settings: { } | ||
weight: 1 | ||
region: content | ||
hidden: { } |
11 changes: 11 additions & 0 deletions
11
config/sync/core.entity_view_mode.paragraph.featured_links.yml
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,11 @@ | ||
uuid: 1fc042bc-9ce1-468f-a7f5-c626b6201d31 | ||
langcode: en | ||
status: true | ||
dependencies: | ||
module: | ||
- paragraphs | ||
id: paragraph.featured_links | ||
label: 'Featured Links' | ||
description: '' | ||
targetEntityType: paragraph | ||
cache: true |
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
35 changes: 9 additions & 26 deletions
35
web/modules/custom/ec_shortcodes/templates/ec-shortcodes-featured-resource-ext.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 |
---|---|---|
@@ -1,28 +1,11 @@ | ||
{# NOT MIGRATED | ||
This should be the partial for featured recources | ||
Kicker should also allow html, but only a single line. | ||
{# | ||
The partial for featured recources: | ||
- Kicker should also allow html, but only a single line. | ||
#} | ||
<div class="dg-featured-resource"> | ||
<a href="{{ url }}" class="dg-featured-resource__body"> | ||
<div class="dg-featured-resource__text"> | ||
<p class="dg-featured-resource__kicker"> | ||
{% if kicker %} | ||
{{ kicker }} | ||
{% else %} | ||
{{ 'Featured Resource'|t }} | ||
{% endif %} | ||
</p> | ||
{% if title %} | ||
<h2 class="dg-featured-resource__text-title"> | ||
{{ title }} | ||
</h2> | ||
{% endif %} | ||
{% if summary %} | ||
<p class="dg-featured-resource__text-description"> | ||
{{ summary }} | ||
</p> | ||
{% endif %} | ||
</div> | ||
</a> | ||
</div> | ||
|
||
{{ include("@digital_gov/partials/featured-resource.html.twig", { | ||
'kicker' : kicker ?: '', | ||
'url': url, | ||
'title': title ?: '', | ||
'summary': summary ?: '' | ||
}, with_context = false) }} |
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
Oops, something went wrong.