{%- set colour_subset = "C" -%}
<div class="details">
    <div class="heading">
      <span>Sactipeptide predictions</span>
      {{ help_tooltip(tooltip, "sacti-body") }}
    </div>
    <div class="details-text ripp-body">
    {% if not motifs_by_locus %}
      Sactipeptides - No core peptides found.
    {% else %}
     {% for locus in motifs_by_locus | sort %}
      <h4>Sactipeptide(s) for {{ locus }}</h4>
      <hr>
       {% for core, motifs in motifs_by_locus[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, colour_subset=colour_subset) }}</div>
         {{ comparippson_results.get_html_for_query(motifs[0].get_name().rsplit("_", 1)[0], colour_subset=colour_subset) }}
        </div>
       {% endfor %}
    {% endfor %}
  {% endif %}
   </div>
</div>
