<div class="details">
    <div class="heading">
      <span>Lasso peptide predictions</span>
      {{help_tooltip(tooltip, "lasso-body")}}
    </div>
  {% if not results %}
    <div class="details-text">
      Lassopeptides - No core peptides found.
    </div>
  {% else %}
    {% for locus in results | sort %}
      <h4>Lassopeptide(s) for {{locus}} - Putative {{results[locus][0].peptide_subclass}}</h4>
    <hr>
      <dl class="details-text">
        {% for motif in results[locus] %}
          <dt><span class="serif">{{motif.get_name()}}</span> leader / core peptide / cleaved tail</dt>
          <dd>
            {{ motif.leader }}
            -
            {% for aa in motif.detailed_information.macrolactam -%}
              {%- if aa == 'C' -%}
                <span class="cys">C</span>
              {%- else -%}
                <span class ="macrolactam">{{ aa }}</span>
              {%- endif -%}
            {% endfor -%}

            {%- for aa in (motif.core | replace (motif.detailed_information.macrolactam, '')) -%}
              {%- if aa == 'C' -%}
                <span class="cys">C</span>
              {%- else -%}
                {{ aa }}
              {%- endif -%}
            {% endfor -%}
            {% if motif.tail %}
              - <span class="cut">{{motif.tail}}</span>
            {% endif %}
          </dd>
        {% endfor %}
      </dl>
    {% endfor %}
  <div class="legend">
    <h4> Legend: </h4>
    <div>
      <span class="macrolactam">Red</span>: Putative macrolactam<br>
      <span class="cut">Purple</span>: Putative cleaved off residues<br>
    </div>
  </div>
  {% endif %}
</div>
