
<ul>
{% for q, ratio in output %}
   <li title="{{q}}">{{ratio}}

    <span
   _="on click set s to title of closest <li/> then
   repeat for pre in .pre-question
        if s is pre.innerHTML
            then go to pre then break
    ">+</span>
    <button type="button" class="btn btn-sm p-0" _="on click set #question1.value to the title of the closest <li/>">
        Diff1
    </button>
    <button type="button" class="btn btn-sm p-0" _="on click set #question2.value to the title of the closest <li/> then go to #question2 ">
        Diff2
    </button>
   </li> 
{% endfor %}
</ul>
    