<commit_before>{% macro navbar(search=True) %}
<nav class="navbar navbar-default">
    <div class="container-fluid">
        
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-responsive-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="/">LibreAnt</a>
        </div>
        
        <div class="navbar-collapse collapse" id="navbar-responsive-collapse">
            <ul class="nav navbar-nav">
                <li><a href="{{url_for('add')}}">{%trans%}Add item{%endtrans%}</a></li>
                <li><a href="{{url_for('search',q='*:*')}}">{%trans%}All items{%endtrans%}</a></li>
            </ul>
            {% if search %}
            <form class="navbar-form navbar-left" action="{{url_for('search')}}">
                <input class="form-control col-lg-8" placeholder="Search" type="text" id="search" name="q">
            </form>
            {% endif %}
        </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
</nav>
{% endmacro %}

<commit_msg>[ templates ] adding `search_query` param to navbar macro for prefill searchbox<commit_after>{% macro navbar(search=True,search_query="") %}
<nav class="navbar navbar-default">
    <div class="container-fluid">
        
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-responsive-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="/">LibreAnt</a>
        </div>
        
        <div class="navbar-collapse collapse" id="navbar-responsive-collapse">
            <ul class="nav navbar-nav">
                <li><a href="{{url_for('add')}}">{%trans%}Add item{%endtrans%}</a></li>
                <li><a href="{{url_for('search',q='*:*')}}">{%trans%}All items{%endtrans%}</a></li>
            </ul>
            {% if search %}
            <form class="navbar-form navbar-left" action="{{url_for('search')}}">
                <input class="form-control col-lg-8" placeholder="Search" type="text" id="search" name="q" value="{{ search_query }}">
            </form>
            {% endif %}
        </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
</nav>
{% endmacro %}


{'fraction_non_alphanumeric': 0.20919361121932217, 'fraction_numerical': 0.0007791195948578107, 'mean_word_length': 2.2796934865900385, 'pattern_counts': {'":': 0, '<': 69, '<?xml version=': 0, '>': 69, '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': '7194013', 'n_tokens_mistral': 809, 'n_tokens_neox': 742, 'n_words': 134}