Skip to content

Commit

Permalink
Merge pull request #1328 from CuBoulder/issue/1304
Browse files Browse the repository at this point in the history
Places first name and last name on the same line to prevent trimming of the space between them
  • Loading branch information
jcsparks authored Sep 25, 2024
2 parents 25d56c9 + 83716c1 commit 6dd038b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
6 changes: 4 additions & 2 deletions templates/content/node--ucb-person.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
] %}

{% set baseurlJSON = url('<front>')|render|trim('/') %}
{% set firstName = content.field_ucb_person_first_name['#items'].0.value|trim %}
{% set lastName = content.field_ucb_person_last_name['#items'].0.value|trim %}

<article{{ attributes.addClass(classes) }} itemscope itemtype="https://schema.org/Person">
<div class="container ucb-person-header">
<h1 class="ucb-person-name">
{{ content.field_ucb_person_first_name }} {{ content.field_ucb_person_last_name }}
<span itemprop="givenName">{{ firstName }}</span>&nbsp;<span itemprop="familyName">{{ lastName }}</span>
</h1>
{{ content.field_ucb_person_pronouns }}
{% if content.field_ucb_person_title.0 or content.field_ucb_person_department.0 %}
Expand Down Expand Up @@ -74,7 +76,7 @@
<div class="ucb-articles-by-person-block">
<person-article-list base-uri="{{ baseurlJSON }}" nodeid="{{ node.id }}">
<div id="ucb-person-article-block-title" style="display:none">
<h2>Articles by {{ content.field_ucb_person_first_name.0 }} {{ content.field_ucb_person_last_name.0 }}</h2>
<h2>Articles by {{ firstName }} {{ lastName }}</h2>
</div>
<div id="ucb-al-loading" style="display:none" class="ucb-list-msg ucb-loading-data">
<i class="fa-solid fa-spinner fa-3x fa-spin-pulse"></i>
Expand Down
6 changes: 0 additions & 6 deletions templates/field/field--field-ucb-person-first-name.html.twig

This file was deleted.

6 changes: 0 additions & 6 deletions templates/field/field--field-ucb-person-last-name.html.twig

This file was deleted.

0 comments on commit 6dd038b

Please sign in to comment.