<div class="details">
    <div class="heading">
      <span>Thiopeptide predictions</span>
      {{help_tooltip(tooltip, "thio-body")}}
    </div>
  {% if not cluster.motifs %}
    <div class="details-text">
      No core peptides found.
    </div>
  {% else %}
    <h4> Thiopeptide(s) </h4>
    <hr>
    <dl class="details-text">
      {% for motif in cluster.motifs if motif.peptide_class == "thiopeptide" %}
        <dt> {{motif.locus_tag}} leader / core peptide, putative {{motif.peptide_subclass}} </dt>
        <dd>
          {{ motif.leader }}
          -
          {% for aa in motif.core -%}
            {%- if aa == 'S' -%}
              <span class="dha">Dha</span>
            {%- elif aa == 'T' -%}
              <span class="dhb">Dhb</span>
            {%- elif aa == 'C' -%}
              <span class="cys">C</span>
            {%- else -%}
              {{ aa }}
            {%- endif -%}
          {% endfor -%}
          <span class="cut">{{motif.tail}}</span>
        </dd>
      {% endfor %}
    </dl>
    <div class="legend">
      <h4> Legend: </h4>
        <div>
          <span class="dha">Dha</span>: Didehydroalanine<br>
          <span class="dhb">Dhb</span>: Didehydrobutyrine<br>
          <span class="cut">Grey</span>: Putative cleaved off residues<br>
          <span>Type I</span>: Featuring genes encoding indolic acid side ring (series e)<br>
          <span>Type II</span>: Featuring the gene coding for quinaldic acid moiety formation (series a, b, and c)<br>
          <span>Type III</span>: No genes for synthesizing L-Trp derivatives (series d)<br>
        </div>
    </div>
    {% endif %}
</div>
