-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ysp-301 add templates for text-card view mode
- Loading branch information
1 parent
1bc63a4
commit 6a6043e
Showing
4 changed files
with
74 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{{ attach_library('atomic/reference-card') }} | ||
|
||
{% set date__formatted %} | ||
{% include "@atoms/date-time/yds-date-time.twig" with { | ||
date_time__start: content.field_event_date.0.start_time['#markup'], | ||
} %} | ||
{% endset %} | ||
|
||
{% if content.field_event_type %} | ||
{% set reference_card__overline -%} | ||
{% include "@molecules/cards/reference-card/event/_yds-event-format.twig" with { | ||
format: content.field_event_type, | ||
} %} | ||
{%- endset %} | ||
{% endif %} | ||
|
||
{% set heading = content.field_teaser_title.0 ? content.field_teaser_title : label %} | ||
|
||
{% set url = content.field_external_source[0]['#url']|render ? content.field_external_source[0]['#url']|render : url %} | ||
|
||
{% embed "@molecules/cards/reference-card/yds-reference-card.twig" with { | ||
reference_card__heading: heading, | ||
reference_card__subheading: date__formatted, | ||
reference_card__url: url, | ||
reference_card__snippet: content.field_teaser_text, | ||
reference_card__image: 'false', | ||
} %} | ||
{% endembed %} |
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,13 @@ | ||
{{ attach_library('atomic/reference-card') }} | ||
|
||
{% set heading = content.field_teaser_title.0 ? content.field_teaser_title : label %} | ||
{% set url = content.field_external_source[0]['#url']|render ? content.field_external_source[0]['#url']|render : url %} | ||
|
||
{% embed "@molecules/cards/reference-card/yds-reference-card.twig" with { | ||
reference_card__heading: heading, | ||
reference_card__subheading: date__formatted, | ||
reference_card__url: url, | ||
reference_card__snippet: content.field_teaser_text, | ||
reference_card__image: 'false', | ||
} %} | ||
{% endembed %} |
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,20 @@ | ||
{{ attach_library('atomic/reference-card') }} | ||
|
||
{% set date__formatted %} | ||
{% include "@atoms/date-time/yds-date-time.twig" with { | ||
date_time__start: date_formatted, | ||
date_time__format: 'date', | ||
} %} | ||
{% endset %} | ||
|
||
{% set heading = content.field_teaser_title.0 ? content.field_teaser_title : label %} | ||
{% set url = content.field_external_source[0]['#url']|render ? content.field_external_source[0]['#url']|render : url %} | ||
|
||
{% embed "@molecules/cards/reference-card/yds-reference-card.twig" with { | ||
reference_card__overline: date__formatted, | ||
reference_card__heading: heading, | ||
reference_card__url: url, | ||
reference_card__snippet: content.field_teaser_text, | ||
reference_card__image: 'false', | ||
} %} | ||
{% endembed %} |
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,13 @@ | ||
{{ attach_library('atomic/reference-card') }} | ||
|
||
{% set heading = content.field_teaser_title.0 ? content.field_teaser_title : label %} | ||
{% set url = content.field_external_source[0]['#url']|render ? content.field_external_source[0]['#url']|render : url %} | ||
|
||
{% embed "@molecules/cards/reference-card/yds-reference-card.twig" with { | ||
reference_card__heading: heading, | ||
reference_card__subheading: content.field_position, | ||
reference_card__url: url, | ||
reference_card__snippet: content.field_subtitle, | ||
reference_card__image: 'false', | ||
} %} | ||
{% endembed %} |