-
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-461): add new JS file/library for event-meta-localist * feat(YSP-461): remove reference-card and custom-card JS libraries * feat(YSP-461): add todo for multi-day event label * feat(YSP-461): add multi_day_text * fix(YSP-461): multi day event should not be passed to date function * feat(YSP-461): add calculated ics_url and event_dates fields to view modes * feat(YSP-461): add buttons * feat(YSP-461): update wiring * feat(YSP-461): fix multi-day event text appended to date * feat(YSP-461): add localist_image_url to card template - wip * feat(YSP-461): add localist_image_url to both card templates that need it * feat(YSP-461): add localist_image_url to both card templates that need it - using image component include * feat(YSP-461): wire reference_card__image_aria * feat(YSP-276): Remove add to calendar links for past events * feat(YSP-298): Adds multi-day event language to cards to match list and condensed * feat(YSP-281): If cost, change from Register to Buy, also if Register is enabled, send to Localist Register instead of ticket CTA * feat(YSP-281): Rework tickets to work with basic tickets or Localist Register tickets * feat(YSP-560): Localist: Update Event lists + default image updates (#235) * feat(YSP-560): wiring prefix variable for past event * feat(YSP-560): make sure event_has_passed is set so we can display event_title_prefix for Past Event: * feat(YSP-281): Template for taxonomy views * refactor(YSP-281): Use best practices to include component library --------- Co-authored-by: Marc Berger <[email protected]> Co-authored-by: Joe Tower <[email protected]>
- Loading branch information
1 parent
486d303
commit e91bc77
Showing
17 changed files
with
140 additions
and
47 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
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,3 @@ | ||
{% for item in items %} | ||
{{ item.content }} | ||
{% endfor %} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,31 @@ | ||
{{ attach_library('atomic/reference-card') }} | ||
{# Use event_dates array to print any event dates - look inside array for formatted options #} | ||
{% if event_dates|length > 1 %} | ||
{% set multi_day_text %} | ||
{% include "@atoms/typography/text/yds-text.twig" with { | ||
text__base_class: 'multi-day-event', | ||
text__content: '(multi-day event)', | ||
} %} | ||
{% endset %} | ||
{% endif %} | ||
|
||
{% set event_has_passed = event_dates is empty %} | ||
|
||
{% set heading = content.field_teaser_title.0 ? content.field_teaser_title : label %} | ||
{% set reference_card__image = 'false' %} | ||
{% set url = content.field_external_source[0]['#url']|render ? content.field_external_source[0]['#url']|render : url %} | ||
|
||
{# Set the event title prefix based on event status #} | ||
{% set event_title__prefix = event_has_passed ? 'Past Event: ' : '' %} | ||
|
||
{% set date__formatted %} | ||
{% include "@atoms/date-time/yds-date-time.twig" with { | ||
date_time__start: content.field_event_date.0.start_time['#markup'], | ||
} %} | ||
} %} {{multi_day_text}} | ||
{% endset %} | ||
|
||
{% embed "@molecules/cards/reference-card/yds-reference-card.twig" with { | ||
{% include "@molecules/cards/reference-card/yds-reference-card.twig" with { | ||
reference_card__prefix: event_title__prefix, | ||
reference_card__heading: heading, | ||
reference_card__subheading: date__formatted, | ||
reference_card__url: url, | ||
} %} | ||
{% 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 |
---|---|---|
@@ -1,37 +1,59 @@ | ||
{{ attach_library('atomic/reference-card') }} | ||
{% set event_has_passed = event_dates is empty %} | ||
|
||
{# Use event_dates array to print any event dates - look inside array for formatted options #} | ||
{% if event_dates|length > 1 %} | ||
{% set multi_day_text %} | ||
{% include "@atoms/typography/text/yds-text.twig" with { | ||
text__base_class: 'multi-day-event', | ||
text__content: '(multi-day event)', | ||
} %} | ||
{% endset %} | ||
{% endif %} | ||
|
||
{% set date__formatted %} | ||
{% include "@atoms/date-time/yds-date-time.twig" with { | ||
date_time__start: content.field_event_date.0.start_time['#markup'], | ||
} %} | ||
} %} {{ multi_day_text }} | ||
{% endset %} | ||
|
||
{% if content.field_event_type %} | ||
{% if content.field_localist_event_experience.0 %} | ||
{% set reference_card__overline -%} | ||
{% include "@molecules/cards/reference-card/event/_yds-event-format.twig" with { | ||
format: content.field_event_type, | ||
format: content.field_localist_event_experience, | ||
} %} | ||
{%- 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 %} | ||
|
||
{# Set the event title prefix based on event status #} | ||
{% set event_title__prefix = event_has_passed ? 'Past Event: ' : '' %} | ||
|
||
{% embed "@molecules/cards/reference-card/yds-reference-card.twig" with { | ||
reference_card__prefix: event_title__prefix, | ||
reference_card__heading: heading, | ||
reference_card__subheading: date__formatted, | ||
reference_card__url: url, | ||
reference_card__snippet: content.field_teaser_text, | ||
reference_card__image: 'true', | ||
reference_card__cta_primary__href: ticket_url, | ||
reference_card__cta_primary__content: cost_button_text, | ||
reference_card__cta_secondary__content: 'Add to Calendar', | ||
reference_card__cta_secondary__href: ics_url, | ||
reference_card__image_aria: heading[0]['#context'].value, | ||
} %} | ||
{% block reference_card__image %} | ||
|
||
{% if content.field_teaser_media[0] %} | ||
{{ content.field_teaser_media }} | ||
{% elseif getCoreSetting('image_fallback.teaser') %} | ||
{{ drupal_entity('media', getCoreSetting('image_fallback.teaser'), 'card_list_3_2') }} | ||
{% if localist_image_url %} | ||
{% include "@atoms/images/image/_responsive-image.twig" with { | ||
image__src: localist_image_url, | ||
image__alt: localist_image_alt, | ||
responsive_image__modifiers: ['localist-3-2'], | ||
}%} | ||
{% elseif content.field_teaser_media[0] %} | ||
{{ content.field_teaser_media }} | ||
{% elseif getCoreSetting('image_fallback.teaser') %} | ||
{{ drupal_entity('media', getCoreSetting('image_fallback.teaser'), 'card_list_3_2') }} | ||
{% endif %} | ||
|
||
{% endblock %} | ||
{% 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
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
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
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
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
41 changes: 41 additions & 0 deletions
41
templates/views/views-view-unformatted--taxonomy_term--page_1.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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{% set dom_id_class = dom_id ? 'js-view-dom-id-' ~ dom_id %} | ||
|
||
<div class={{ dom_id_class }}> | ||
|
||
{% if header %} | ||
<header> | ||
{{ header }} | ||
</header> | ||
{% endif %} | ||
|
||
{{ attachment_before }} | ||
|
||
{% if rows -%} | ||
{% embed "@organisms/card-collection/yds-card-collection.twig" with { | ||
card_collection__heading: title, | ||
card_collection__featured: 'true', | ||
card_collection__type: 'list', | ||
card_collection__width: 'site', | ||
} %} | ||
{% block card_collection__cards %} | ||
{% for row in rows %} | ||
{{- row.content -}} | ||
{% endfor %} | ||
{% endblock %} | ||
{% endembed %} | ||
{% elseif empty -%} | ||
{{ empty }} | ||
{% endif %} | ||
{{ pager }} | ||
|
||
{{ attachment_after }} | ||
{{ more }} | ||
|
||
{% if footer %} | ||
<footer> | ||
{{ footer }} | ||
</footer> | ||
{% endif %} | ||
|
||
{{ feed_icons }} | ||
</div> |