<div class="details">
    <div class="heading">
      <span>Lanthipeptide predictions</span>
      {{ help_tooltip(tooltip, "lanthi-body") }}
    </div>
    <div class="details-text ripp-body">
    {% if not results %}
      Lanthipeptides - No core peptides found.
    {% else %}
     {% for locus in results | sort %}
      <h4>Lanthipeptide(s) for {{ locus }}</h4>
      <hr>
       {% for core, motifs in results[locus].items() %}
        <div class="ripp-motif">
         {% for motif in motifs %}
          {% set motif_name = motif.get_name().rsplit("_", 1)[0] %}
           <div class="ripp-name">
            <span class="serif">{{ motif_name }}</span>
           </div>
           <div class="ripp-segment-type">Leader:</div>
           <div class="ripp-segment-sequence">{{ motif.leader }}</div>
         {% endfor %}
           <div class="ripp-segment-type">{% if motifs | length > 1%}Shared core:{% else %}Core:{% endif %}</div>
           <div class="ripp-segment-sequence">{{ coloured_ripp_sequence(core) }}</div>
           <div class="ripp-segment-type">Core with dehydrations:</div>
           <div class="ripp-segment-sequence ripp-dehydrated">{{ coloured_ripp_sequence(core, dehydrate=True) }}</div>
          {{ comparippson.get_html_for_query(motifs[0].get_name().rsplit("_", 1)[0]) }}
        </div>
       {% endfor %}
    {% endfor %}
    <div class="ripp-legend">
      <h4> Legend: </h4>
      <div>
        <span class="dha">Dha</span>: Didehydroalanine<br>
        <span class="dhb">Dhb</span>: Didehydrobutyrine<br>
      </div>
    </div>
  {% endif %}
   </div>
</div>
