{% set fighterImg = file_url(node.field_player_photo.entity.field_media_image.entity.uri.value) %}

<article{{ attributes }} id="fighter">
  <div{{ content_attributes }}>

    <div id="fighter__hero">
      <div id="fighter__image">
        <img src="{{ fighterImg }}"/>
      </div>
      <div id="fighter__text">
        <h1>{{ node.field_first_name.value }} {{ node.field_last_name.value }}</h1>
        <div id="fighter__record">
          {{ node.field_wins.value }} - {{ node.field_losses.value }} - {{ node.field_ties.value }}
        </div>
      </div>
    </div>

    <h2 id="personal-header">Personal Information</h2>
    <div id="fighter__personal">
      {% for datapoint, value in personal_info %}
        <div class="data-wrapper">
          <span class="label">{{ datapoint }}</span>
          <div class="datapoint">
            {{ value }}
          </div>
        </div>
      {% endfor %}
    </div>

    <h2 id="stats-header">Fighter Stats</h2>
    <div id="fighter__stats">
      {% for datapoint, value in stats %}
        <div class="data-wrapper">
          <span class="label">{{ datapoint }}</span>
          <div class="datapoint">
            {{ value }}
          </div>
        </div>
      {% endfor %}
    </div>

  </div>
</article>

