Skip to content
Snippets Groups Projects
_header.twig 2.51 KiB
Newer Older
<div class="card__header {{ node_classes }}">
  {% if bundle == 'uw_ct_profile' %}
    {% if image %}
      <div class="uw-image__profiles">
        {% include '@components/card/card-elements/_image.twig' with {
          'image': image,
          'bundle': bundle
        } %}
      </div>
    {% endif %}
  {% endif %}

  {% if header.date %}

    {% if type == 'event' %}
      {% set date_format = 'long_with_time' %}
    {% else %}
      {% set date_format = 'long' %}
    {% endif %}

    {% include '@components/card/card-elements/_date.twig' with {
      'date_format': date_format,
      'date': header.date,
      'type': type,
    } %}
  {% endif %}

  {% if header.title and (media_flags.has_media or media_flags.has_portrait or type == 'teaser') %}

    {% if type  == 'teaser' %}
      {% set header_level = '2' %}
    {% endif %}

    {% if not media.media.use_page_title_big_text %}
      {% include '@components/card/card-elements/_title.twig' with {
        'header_level': header_level,
        'title': header.title,
        'type': type
      } %}
    {% endif %}
  {% endif %}

  {% if header.position %}
    {% include '@components/card/card-elements/_position.twig' with {
      'position': header.position
    } %}
  {% endif %}

  {% if header.author %}
    {% include '@components/card/card-elements/_author.twig' with {
      'author': header.author
    } %}
  {% endif %}

  {% if header.posted %}
    {% include '@components/label/label.twig' with {
      'label': 'Date posted'
    } %}
    {% include '@components/card/card-elements/_date.twig' with {
      'date_format': 'long',
      'date': header.posted
    } %}
  {% endif %}

  {% if header.opportunity_type %}
    {% include '@components/card/card-elements/_opportunity-type.twig' with {
      'opportunity_type': header.opportunity_type
    } %}
  {% endif %}

  {% if header.employment_type %}
    {% include '@components/card/card-elements/_employment-type.twig' with {
      'employment_type': header.employment_type
    } %}
  {% endif %}

  {% if header.rate_of_pay or header.rate_of_pay_type %}
    {% include '@components/card/card-elements/_rate-of-pay.twig' with {
      'rate_of_pay': header.rate_of_pay,
      'rate_of_pay_type': header.rate_of_pay_type
    } %}
  {% endif %}

  {% if header.job_id %}
    {% include '@components/card/card-elements/_job-id.twig' with {
      'job_id': header.job_id
    } %}
  {% endif %}

  {% if ical %}
    {% include '@components/view/view-interact/view-interact.twig' with {
      'ical': ical
    }%}
  {% endif %}

</div>