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

{% block title %}{{ _('Add-ons for {0}')|f(request.APP.pretty) }}{% endblock %}

{% block bodyclass %}home{% endblock %}

{% set ext, extrss = url('browse.extensions'), url('browse.extensions.rss') %}
{% set view_all = {
  'featured': {
    'text': _('Featured Extensions'),
    'link': url('browse.featured'),
    'feed': url('browse.featured.rss'),
  },
  'popular': {
    'text': _('Popular Extensions'),
    'link': ext|urlparams(sort='popular'),
    'feed': extrss|urlparams(sort='popular'),
  }
}
%}


{% block content %}

<section class="secondary">
  {{ side_nav(amo.ADDON_EXTENSION) }}
</section>

<section class="primary" id="homepage">
  <div id="promos" class="island" data-promo-url="{{ url('addons.homepage_promos') }}">
    <ul class="slider noslide">
      <li class="panel">
        <div id="starter" class="promo feature collection">
          <h2>What are Add-ons?</h2>
          <p>lorem ipsum foo bar baz educational content goes here</p>
        </div>
      </li>
    </ul>
  </div>
  <section class="secondary">
    <h2>{{ _('Most Popular') }}
      <a class="seeall" href="{{ url('browse.extensions')|urlparams(sort='popular') }}">{{ _('All »') }}</a>
    </h2>
    {{ popular|addon_toplist }}
  </section>
  <section class="primary">
    <div class="island">
      <h2>{{ _('Featured Extensions') }}
        <a class="seeall" href="{{ url('browse.featured') }}">{{ _('See all »') }}</a>
      </h2>
      {{ featured|addon_grid }}
    </div>
    <div class="island">
      <h2>{{ _('Up &amp; Coming Extensions') }}</h2>
      {{ hotness|addon_grid }}
    </div>
    <div class="island">
      <h2>{{ _('Featured Personas') }}
        <a class="seeall" href="{{ url('browse.personas')|urlparams(sort='featured') }}">{{ _('See all »') }}</a>
      </h2>
      {{ personas|impala_persona_grid }}
    </div>
    <div class="island">
      <h2>{{ _('Featured Collections') }}
        <a class="seeall" href="{{ url('collections.list')|urlparams(sort='featured') }}">{{ _('See all »') }}</a>
      </h2>
      {{ collections|collection_grid }}
    </div>
  </section>
</section>

{% endblock content %}

{% block extrahead %}
{% for feed in view_all.itervalues() %}
  <link rel="alternate" type="application/rss+xml" title="{{ feed['text'] }}"
        href="{{ feed['feed'] }}">
{% endfor %}
{% endblock %}
<commit_msg>don't show grids without addons (bug 660990)<commit_after>{% extends "impala/base.html" %}

{% block title %}{{ _('Add-ons for {0}')|f(request.APP.pretty) }}{% endblock %}

{% block bodyclass %}home{% endblock %}

{% set ext, extrss = url('browse.extensions'), url('browse.extensions.rss') %}
{% set view_all = {
  'featured': {
    'text': _('Featured Extensions'),
    'link': url('browse.featured'),
    'feed': url('browse.featured.rss'),
  },
  'popular': {
    'text': _('Popular Extensions'),
    'link': ext|urlparams(sort='popular'),
    'feed': extrss|urlparams(sort='popular'),
  }
}
%}


{% block content %}

<section class="secondary">
  {{ side_nav(amo.ADDON_EXTENSION) }}
</section>

<section class="primary" id="homepage">
  <div id="promos" class="island" data-promo-url="{{ url('addons.homepage_promos') }}">
    <ul class="slider noslide">
      <li class="panel">
        <div id="starter" class="promo feature collection">
          <h2>What are Add-ons?</h2>
          <p>lorem ipsum foo bar baz educational content goes here</p>
        </div>
      </li>
    </ul>
  </div>
  <section class="secondary">
    <h2>{{ _('Most Popular') }}
      <a class="seeall" href="{{ url('browse.extensions')|urlparams(sort='popular') }}">{{ _('All »') }}</a>
    </h2>
    {{ popular|addon_toplist }}
  </section>
  <section class="primary">
    {% if featured %}
      <div class="island">
        <h2>{{ _('Featured Extensions') }}
          <a class="seeall" href="{{ url('browse.featured') }}">{{ _('See all »') }}</a>
        </h2>
        {{ featured|addon_grid }}
      </div>
    {% endif %}
    {% if hotness %}
      <div class="island">
        <h2>{{ _('Up &amp; Coming Extensions') }}</h2>
        {{ hotness|addon_grid }}
      </div>
    {% endif %}
    {% if personas %}
      <div class="island">
        <h2>{{ _('Featured Personas') }}
          <a class="seeall" href="{{ url('browse.personas')|urlparams(sort='featured') }}">{{ _('See all »') }}</a>
        </h2>
        {{ personas|impala_persona_grid }}
      </div>
    {% endif %}
    {% if featured %}
      <div class="island">
        <h2>{{ _('Featured Collections') }}
          <a class="seeall" href="{{ url('collections.list')|urlparams(sort='featured') }}">{{ _('See all »') }}</a>
        </h2>
        {{ collections|collection_grid }}
      </div>
    {% endif %}
  </section>
</section>

{% endblock content %}

{% block extrahead %}
{% for feed in view_all.itervalues() %}
  <link rel="alternate" type="application/rss+xml" title="{{ feed['text'] }}"
        href="{{ feed['feed'] }}">
{% endfor %}
{% endblock %}

{'fraction_non_alphanumeric': 0.2297081167532987, 'fraction_numerical': 0.006397441023590564, 'mean_word_length': 3.272416737830914, 'pattern_counts': {'":': 0, '<': 97, '<?xml version=': 0, '>': 97, 'https://': 0, 'lorem ipsum': 2, 'www.': 0, 'xml': 2}, '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': '5207645', 'n_tokens_mistral': 1846, 'n_tokens_neox': 1733, 'n_words': 358}