
<div ng-if="group_matches_keyword(group)">
    <div class="row m-3">
        <div class="col">
            <h3 class="plot-title">{{ group.pri.title | nounderscore }} {{ group.variant == 'default' ? '' : '(' + group.variant + ')' }}</h3>
            <div ng-if="!group.pri || !group.sec || group.pri.description == group.sec.description">
                <expandable-text text="group.pri.description"></expandable-text>
            </div>
        </div>
    </div>

    <div class="row m-3">
        <div class="col" ng-repeat="doc in unfold_docs(group) | filter:doc_matches_keyword track by $index">
            <div ng-if="doc && !(!group.pri || !group.sec || group.pri.description == group.sec.description)">
                <expandable-text text="doc.description"></expandable-text>
            </div>
            <div ng-if="doc" class="{{ compare_mode ? 'text-center' : '' }}">
                <h6 ng-if="compare_mode">{{ doc.problem_name }}</h6>
                <figure ng-if="doc" class="figure">
                    <span ng-repeat="item in doc.items | filter:keyword">

                        <img
                            class="figure-img img-fluid"
                            ng-src="{{ image_path(doc, item); }}" />

                        <div class=figure-caption" ng-if="item.title || item.description">
                            <expandable-text lead="'(' + ($index+1) + ')'" title="item.title" text="item.description"></expandable-text>
                        </div>
                    </span>
                </figure>
            </div>
        </div>
    </div>
</div>
