Skip to content

Commit

Permalink
Merge pull request #1717 from weather-gov/eg-1567-social-empty-layout
Browse files Browse the repository at this point in the history
WFO Page contact layout fix
  • Loading branch information
eric-gade authored Sep 10, 2024
2 parents 081a0de + 5d1b819 commit ff7dbd6
Showing 1 changed file with 21 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,30 +71,33 @@
{% set hasSocial = hasFacebook or hasTwitter or hasYoutube %}

{% set hasContact = hasSocial or hasAddress or hasPhone or hasEmail %}
{% set hasFirstPane = hasPhone or hasAddress or hasEmail %}

{% if hasContact %}
<h2 class="font-sans-xl border-top-1px border-base-light text-normal text-primary-darker margin-bottom-0 padding-top-105 margin-top-4">
{{ "Contact us" | t }}
</h2>

<div class="grid-row margin-top-2">
<div class="grid-col-12 tablet:grid-col-4">
{% if hasPhone %}
{{ content.field_phone_number_opt }}
{% endif %}

{% if hasEmail %}
{% if hasPhone %}<div class="margin-top-2">{% endif %}
{{ content.field_wfo_email }}
{% if hasPhone %}</div>{% endif %}
{% endif %}

{% if hasAddress %}
{% if hasPhone or hasEmail %}<div class="margin-top-2">{% endif %}
{{ content.field_address }}
{% if hasPhone or hasEmail %}</div>{% endif %}
{% endif %}
</div>
{% if hasFirstPane %}
<div class="grid-col-12 tablet:grid-col-4">
{% if hasPhone %}
{{ content.field_phone_number_opt }}
{% endif %}

{% if hasEmail %}
{% if hasPhone %}<div class="margin-top-2">{% endif %}
{{ content.field_wfo_email }}
{% if hasPhone %}</div>{% endif %}
{% endif %}

{% if hasAddress %}
{% if hasPhone or hasEmail %}<div class="margin-top-2">{% endif %}
{{ content.field_address }}
{% if hasPhone or hasEmail %}</div>{% endif %}
{% endif %}
</div>
{% endif %}

<div class="grid-col-12 tablet:grid-col-8">
{% if hasSocial %}
Expand All @@ -108,4 +111,4 @@
</div>
{% endif %}
</div>
</div>
</div>

0 comments on commit ff7dbd6

Please sign in to comment.