<commit_before>{% extends "browse/impala/base_listing.html" %}

{% set addon_sets = filter.all() %}

{% set src_dict = {'featured': 'featured',
               'created': 'recentlyadded',
               'users': 'mostpopular',
               'rating': 'toprated'} %}

{% block bodyclass %}category-landing{% endblock %}

{% block primary %}
<section class="primary">
  {% set addons = addon_sets['featured'] %}
  {% if addons %}
    <div class="island hero c">
      <h2>{{ category.name }}</h2>
      {{ addons[:3]|featured_grid(src='cb-hc-recentlyadded',
                                  dl_src='cb-dl-recentlyadded') }}
    </div>
  {% endif %}

  {% for key, title in filter.opts if key != 'featured' %}
  {% set addons = addon_sets[key][:10] %}
  {% set link = url('i_browse.extensions', category.slug)|urlparams(sort=key) %}
  {% set hc_src = 'cb-hc-' + src_dict[key] %}
  {% set dl_src = 'cb-dl-' + src_dict[key] %}
  <div class="island c">
    <h2>
      {{ filter.opts_dict[key] }}
      <a class="seeall" href="{{ link }}">{{ _('See all »') }}</a>
    </h2>
    {{ addons|addon_grid(cols=3, src=hc_src, dl_src=dl_src) }}
  </div>
  {% endfor %}
</section>
{% endblock %}<commit_msg>fixing category landing feature sources (bug 672627)<commit_after>{% extends "browse/impala/base_listing.html" %}

{% set addon_sets = filter.all() %}

{% set src_dict = {'featured': 'featured',
               'created': 'recentlyadded',
               'users': 'mostpopular',
               'rating': 'toprated'} %}

{% block bodyclass %}category-landing{% endblock %}

{% block primary %}
<section class="primary">
  {% set addons = addon_sets['featured'] %}
  {% if addons %}
    <div class="island hero c">
      <h2>{{ category.name }}</h2>
      {{ addons[:3]|featured_grid(src='cb-hc-featured',
                                  dl_src='cb-dl-featured') }}
    </div>
  {% endif %}

  {% for key, title in filter.opts if key != 'featured' %}
  {% set addons = addon_sets[key][:10] %}
  {% set link = url('i_browse.extensions', category.slug)|urlparams(sort=key) %}
  {% set hc_src = 'cb-hc-' + src_dict[key] %}
  {% set dl_src = 'cb-dl-' + src_dict[key] %}
  <div class="island c">
    <h2>
      {{ filter.opts_dict[key] }}
      <a class="seeall" href="{{ link }}">{{ _('See all »') }}</a>
    </h2>
    {{ addons|addon_grid(cols=3, src=hc_src, dl_src=dl_src) }}
  </div>
  {% endfor %}
</section>
{% endblock %}
{'fraction_non_alphanumeric': 0.2088686282635723, 'fraction_numerical': 0.009117281392457521, 'mean_word_length': 2.938009787928222, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2978279', 'n_tokens_mistral': 952, 'n_tokens_neox': 860, 'n_words': 174}