<commit_before>{% extends 'layouts/master.html' %}

{% block head %}
  {# Prevent this page from being indexed, prevent links from being followed #}
  <meta name="robots" content="noindex,nofollow">
{% endblock %}

{% block embed %}

  <!-- WIP reminder -->

  <div class="alert alert-info" role="alert">
    <b>Notice:</b>
    The search system is under construction.
    This is an early/ugly/buggy prototype. &mdash; Mahz
  </div>

  <!-- Breadcrumbs -->

  <ol class="breadcrumb">
    <li><a href="/">Home</a></li>
    <li>Search</li>
  </ol>

  <!-- Search filters -->

  <h2>Filters</h2>

  <form class="well well-sm clearfix"
        method="get"
        action="/search">

    <!-- Topic/Forum filter -->
    {#
        <!-- Destination forum -->
         <select name="forum-id">
           {% for c in categories %}
            <optgroup label="{{ c.title }}"></optgroup>
            {% for f in c.forums %}
              <option style="padding-left: 15px" value="{{ f.id }}">
                &mdash; {{ f.title }}
              </option>
            {% endfor %}
           {% endfor %}
         </select>
    #}

    <div id="location-filter"></div>

    <!-- Data for React components -->
    <pre id="react-data" style="display: none;">
      {{ reactData|json }}
    </pre>

    <ul>
      {#{% if searchParams.topic_id %}
        <li>Topic: <a href="{{ searchParams.back_url || topic.url }}">{{ topic.title }}</a></li>
      {% endif %}#}
      <li>
        Post types:
        <div class="btn-group" data-toggle="buttons">
          {% for post_type in ['ic', 'ooc', 'char'] %}
            <label class="btn btn-default
                          {% if post_type|isIn(searchParams.post_types) %}
                            active
                          {% endif %}">
              <input type="checkbox" autocomplete="off"
                     name="post_types"
                     value="{{ post_type }}"
                     {% if post_type|isIn(searchParams.post_types) %}
                       checked
                     {% endif %}
                     >
              {{ post_type.toUpperCase() }}
            </label>
          {% endfor %}
        </div>
      </li>
      {% if searchParams.unames %}
        <li>
          Users:
          <div id="filter-unames-list-hardpoint">
            <ul id="filter-unames-list">
              {% for uname in searchParams.unames %}
                <li>
                  <input type="hidden" name="unames" value="{{ uname }}">
                  {{ uname }}
                </li>
              {% endfor %}
            </ul>
          </div>
        </li>
      {% endif %}
      <li>
        Keywords:
        <input type="text" name="term" value="{{ searchParams.term }}"
               class="form-control" style="width: 300px; display: inline-block;">
      </li>
      <li>
        Sort:
        <div class="btn-group" data-toggle="buttons">
          {% for sort_type in ['newest-first', 'oldest-first', 'relevance'] %}<commit_msg>Always expose unames React hardpoint<commit_after>{% extends 'layouts/master.html' %}

{% block head %}
  {# Prevent this page from being indexed, prevent links from being followed #}
  <meta name="robots" content="noindex,nofollow">
{% endblock %}

{% block embed %}

  <!-- WIP reminder -->

  <div class="alert alert-info" role="alert">
    <b>Notice:</b>
    The search system is under construction.
    This is an early/ugly/buggy prototype. &mdash; Mahz
  </div>

  <!-- Breadcrumbs -->

  <ol class="breadcrumb">
    <li><a href="/">Home</a></li>
    <li>Search</li>
  </ol>

  <!-- Search filters -->

  <h2>Filters</h2>

  <form class="well well-sm clearfix"
        method="get"
        action="/search">

    <!-- Topic/Forum filter -->
    {#
        <!-- Destination forum -->
         <select name="forum-id">
           {% for c in categories %}
            <optgroup label="{{ c.title }}"></optgroup>
            {% for f in c.forums %}
              <option style="padding-left: 15px" value="{{ f.id }}">
                &mdash; {{ f.title }}
              </option>
            {% endfor %}
           {% endfor %}
         </select>
    #}

    <div id="location-filter"></div>

    <!-- Data for React components -->
    <pre id="react-data" style="display: none;">
      {{ reactData|json }}
    </pre>

    <ul>
      {#{% if searchParams.topic_id %}
        <li>Topic: <a href="{{ searchParams.back_url || topic.url }}">{{ topic.title }}</a></li>
      {% endif %}#}
      <li>
        Post types:
        <div class="btn-group" data-toggle="buttons">
          {% for post_type in ['ic', 'ooc', 'char'] %}
            <label class="btn btn-default
                          {% if post_type|isIn(searchParams.post_types) %}
                            active
                          {% endif %}">
              <input type="checkbox" autocomplete="off"
                     name="post_types"
                     value="{{ post_type }}"
                     {% if post_type|isIn(searchParams.post_types) %}
                       checked
                     {% endif %}
                     >
              {{ post_type.toUpperCase() }}
            </label>
          {% endfor %}
        </div>
      </li>
      <li>
        Users:
        <div id="filter-unames-list-hardpoint">
          <ul id="filter-unames-list">
            {% for uname in searchParams.unames %}
            <li>
              <input type="hidden" name="unames" value="{{ uname }}">
              {{ uname }}
            </li>
            {% endfor %}
          </ul>
        </div>
      </li>
      <li>
        Keywords:
        <input type="text" name="term" value="{{ searchParams.term }}"
               class="form-control" style="width: 300px; display: inline-block;">
      </li>
      <li>
        Sort:
        <div class="btn-group" data-toggle="buttons">
          {% for sort_type in ['newest-first', 'oldest-first', 'relevance'] %}
{'fraction_non_alphanumeric': 0.1709731543624161, 'fraction_numerical': 0.002348993288590604, 'mean_word_length': 1.579402855906534, 'pattern_counts': {'":': 0, '<': 119, '<?xml version=': 0, '>': 119, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6057694', 'n_tokens_mistral': 1866, 'n_tokens_neox': 1717, 'n_words': 389}