From 6e4d3ed88a1f3fd50a4e1a06ed80b815f7742279 Mon Sep 17 00:00:00 2001 From: James O'Toole Date: Thu, 30 May 2024 16:18:44 -0700 Subject: [PATCH] Fix cards --- templates/content/node--card-image.html.twig | 2 +- .../content/node--card-vertical.html.twig | 2 +- ...node--homepage--featured-content.html.twig | 69 +------------------ .../content/node--ubc-profile--full.html.twig | 21 +----- .../paragraph--card-horizontal.html.twig | 2 +- .../paragraph--card-vertical.html.twig | 2 +- 6 files changed, 7 insertions(+), 91 deletions(-) diff --git a/templates/content/node--card-image.html.twig b/templates/content/node--card-image.html.twig index 2046227..9022ba0 100644 --- a/templates/content/node--card-image.html.twig +++ b/templates/content/node--card-image.html.twig @@ -111,7 +111,7 @@ {% endif %} {% endblock %} {% block content %} -

{{ summary }}

+

{{ summary }}

{% endblock %} {% endembed %} diff --git a/templates/content/node--card-vertical.html.twig b/templates/content/node--card-vertical.html.twig index 7b13d63..5f33d76 100755 --- a/templates/content/node--card-vertical.html.twig +++ b/templates/content/node--card-vertical.html.twig @@ -111,7 +111,7 @@ {% endif %} {% endblock %} {% block content %} -

{{ summary }}

+

{{ summary }}

{% endblock %} {% block actions %}

diff --git a/templates/content/node--homepage--featured-content.html.twig b/templates/content/node--homepage--featured-content.html.twig index 2b039f4..e2beb3e 100644 --- a/templates/content/node--homepage--featured-content.html.twig +++ b/templates/content/node--homepage--featured-content.html.twig @@ -65,10 +65,6 @@ * in different view modes. */ #} -{% set container_attributes = create_attribute() %} -{% set caption_attributes = create_attribute() %} -{% set title_attributes = create_attribute() %} -{% set link_attributes = create_attribute() %} {% set classes = [ view_mode ? 'node--view-mode-' ~ view_mode|clean_class, @@ -76,71 +72,10 @@ 'img-cover', ] %} -{% - set container_classes = [ - 'container', - 'absolute', - 'inset-0', - 'z-40', - 'flex', - 'flex-col', - 'justify-center', - 'px-5', - 'mx-auto', - 'text-white', - 'md--px-4', - ] -%} -{% - set caption_classes = [ - 'p-16', - 'max-w-[640px]', - 'xl--max-w-[768px]', - ] -%} -{% - set title_classes = [ - 'mt-0', - 'text-white', - 'heading-responsive', - ] -%} -{% - set link_classes = [ - 'sm--text-lg', - 'xl--text-4xl', - 'unit-button', - 'link-expand', - ] -%} - -{% if node.field_show_gradient_on_image.value %} - {% set gradient = 'has-gradient--after' %} -{% endif %} {{ attach_library('kraken/scroll-to-content') }} - + {% block content %} - {% if not (node.field_home_feature_image.isEmpty == true) and content.field_home_feature_image is defined %} - {{ content.field_home_feature_image['0'] }} - {% endif %} - - - - {{ content.field_feature_text.0 }} - - {% if not (node.field_feature_link.isEmpty == true) and content.field_feature_link is defined %} -

- {{ content.field_feature_link[0]['#title'] }} -

- {% endif %} - - - + {{ content }} {% endblock %} diff --git a/templates/content/node--ubc-profile--full.html.twig b/templates/content/node--ubc-profile--full.html.twig index a82ae35..87bca15 100755 --- a/templates/content/node--ubc-profile--full.html.twig +++ b/templates/content/node--ubc-profile--full.html.twig @@ -156,26 +156,7 @@ {% if not node.isPublished() %}
Unpublished
{% endif %} - {{ content|without( - 'field_profile_accreditation', - 'field_profile_affiliated', - 'field_profile_category', - 'field_profile_department_unit', - 'field_profile_email', - 'field_profile_faculty', - 'field_profile_google_scholar', - 'field_profile_image', - 'field_profile_job_title', - 'field_profile_name_prefix', - 'field_profile_name_suffix', - 'field_profile_office', - 'field_profile_phone', - 'field_profile_pronouns', - 'field_profile_preferred_website', - 'field_profile_research_area', - 'field_profile_role', - 'field_profile_tags', - 'links') }} + {{ content|without('field_profile_accreditation', 'field_profile_affiliated', 'field_profile_category', 'field_profile_department_unit', 'field_profile_email', 'field_profile_faculty', 'field_profile_google_scholar', 'field_profile_image', 'field_profile_job_title', 'field_profile_name_prefix', 'field_profile_name_suffix', 'field_profile_office', 'field_profile_phone', 'field_profile_preferred_pronouns', 'field_profile_preferred_website', 'field_profile_research_area', 'field_profile_role', 'field_profile_tags', 'links') }} {% if not (node.field_profile_tags.isEmpty == true) and content.field_profile_tags is defined %}
diff --git a/templates/paragraphs/paragraph--card-horizontal.html.twig b/templates/paragraphs/paragraph--card-horizontal.html.twig index c16bb2e..31b340c 100644 --- a/templates/paragraphs/paragraph--card-horizontal.html.twig +++ b/templates/paragraphs/paragraph--card-horizontal.html.twig @@ -68,7 +68,7 @@ {% endblock %} {% block content %} {% if not (paragraph.field_paragraph_card_text.isEmpty == true) and content.field_paragraph_card_text is defined %} -

{{ paragraph.field_paragraph_card_text.value }}

+

{{ paragraph.field_paragraph_card_text.value }}

{% endif %} {% endblock %} {% block actions %} diff --git a/templates/paragraphs/paragraph--card-vertical.html.twig b/templates/paragraphs/paragraph--card-vertical.html.twig index c0a79a9..a54494e 100644 --- a/templates/paragraphs/paragraph--card-vertical.html.twig +++ b/templates/paragraphs/paragraph--card-vertical.html.twig @@ -62,7 +62,7 @@ {% endblock %} {% block content %} {% if not (paragraph.field_paragraph_card_text.isEmpty == true) and content.field_paragraph_card_text is defined %} -

{{ paragraph.field_paragraph_card_text.value }}

+

{{ paragraph.field_paragraph_card_text.value }}

{% endif %} {% endblock %} {% block actions %}