<commit_before>{% macro menu_item(item) %}
	<a tabindex="-1" href="{{item.get_url()}}">
   	{% if item.icon %}
        <i class="fa {{item.icon}}"></i>&nbsp;
    {% endif %}
	{{_(item.label)}}</a>
{% endmacro %}

{% macro menu_debug(menu) %}
    {% for item1 in menu.get_list() %}
        {{ item1.label }} {{ item1.href }}
            {% for item2 in item1.childs %}
		        {{ item2.label }} {{ item2.href }}
        	{% endfor %}
	{% endfor %}
{% endmacro %}


{% macro menu_block(menu) %}
	{% for item1 in menu.get_list() %}
		{% if item1 | is_menu_visible %}
			{% if item1.childs %}
				<li class="dropdown">
				<a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)">
                {% if item1.icon %}
                    <i class="fa {{item1.icon}}"></i>&nbsp;
                {% endif %}
				{{_(item1.label)}}<b class="caret"></b></a>
		        <ul class="dropdown-menu">
				{% for item2 in item1.childs %}
					{% if item2.name == '-' %}
                        <li class="divider"></li>
                    {% else %}
                            {% if item2 | is_menu_visible %}
					        <li>
                                {{ menu_item(item2) }}
                            </li>
                            {% endif %}
					{% endif %}
				{% endfor %}
				</ul></li>
			{% else %}
				<li>
                    {{ menu_item(item1) }}
				</li>
        	{% endif %}
        {% endif %}
    {% endfor %}

{% endmacro %}

{% macro locale_menu(languages) %}
{% set locale = session['locale'] %}
{% if not locale %}
	{% set locale = 'en' %}
{% endif %}
<li class="dropdown">
	<a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)">
	<ul class="f16"><li class="flag {{languages[locale].get('flag')}}"></li></ul>
	</a>
	<ul class="dropdown-menu">
	<li class="dropdown">
		{% for lang in languages %}
			{% if lang != locale %}
        		<a tabindex="-1" href="{{appbuilder.get_url_for_locale(lang)}}">
        		<ul class="f16"><li class="flag {{languages[lang].get('flag')}}"></li> - {{languages[lang].get('name')}}</ul>
        		</a>
        		{% endif %}
        	{% endfor %}
        </li>
        </ul>
</li>
{% endmacro %}       

{% macro navbar_block(menu, languages) %}
{% if menu.reverse %}
	<div class="navbar navbar-inverse" role="navigation">
{% else %}
	<div class="navbar" role="navigation">
{% endif %}
   <div class="container">
        <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                {% if appbuilder.app_icon %}
                	<a class="brand" href="{{appbuilder.get_url_for_index}}">
                	<img src="{{appbuilder.app_icon}}" height="50px" width="100%">
                	</a>
                {% else %}
                	<span class="navbar-brand">
                	<a href="{{appbuilder.get_url_for_index}}">
                	{{ appbuilder.app_name }}
                	</a>
                	</span>
                {% endif %}
        </div>
        <div class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                        {{ menu_block(menu)}}
                </ul>
                <ul class="nav navbar-nav navbar-right">
                {{ locale_menu(languages) }}
                {% if not current_user.is_anonymous() %}
				    <li><a href="{{appbuilder.get_url_for_logout}}"><commit_msg>Update baselib.html<commit_after>{% macro menu_item(item) %}
	<a tabindex="-1" href="{{item.get_url()}}">
   	{% if item.icon %}
        <i class="fa {{item.icon}}"></i>&nbsp;
    {% endif %}
	{{_(item.label)}}</a>
{% endmacro %}

{% macro menu_debug(menu) %}
    {% for item1 in menu.get_list() %}
        {{ item1.label }} {{ item1.href }}
            {% for item2 in item1.childs %}
		        {{ item2.label }} {{ item2.href }}
        	{% endfor %}
	{% endfor %}
{% endmacro %}


{% macro menu_block(menu) %}
	{% for item1 in menu.get_list() %}
		{% if item1 | is_menu_visible %}
			{% if item1.childs %}
				<li class="dropdown">
				<a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)">
                {% if item1.icon %}
                    <i class="fa {{item1.icon}}"></i>&nbsp;
                {% endif %}
				{{_(item1.label)}}<b class="caret"></b></a>
		        <ul class="dropdown-menu">
				{% for item2 in item1.childs %}
					{% if item2.name == '-' %}
                        <li class="divider"></li>
                    {% else %}
                            {% if item2 | is_menu_visible %}
					        <li>
                                {{ menu_item(item2) }}
                            </li>
                            {% endif %}
					{% endif %}
				{% endfor %}
				</ul></li>
			{% else %}
				<li>
                    {{ menu_item(item1) }}
				</li>
        	{% endif %}
        {% endif %}
    {% endfor %}

{% endmacro %}

{% macro locale_menu(languages) %}
{% set locale = session['locale'] %}
{% if not locale %}
	{% set locale = 'en' %}
{% endif %}
<li class="dropdown">
	<a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)">
	<ul class="f16"><li class="flag {{languages[locale].get('flag')}}"></li></ul>
	</a>
	<ul class="dropdown-menu">
	<li class="dropdown">
		{% for lang in languages %}
			{% if lang != locale %}
        		<a tabindex="-1" href="{{appbuilder.get_url_for_locale(lang)}}">
        		<ul class="f16"><li class="flag {{languages[lang].get('flag')}}"></li> - {{languages[lang].get('name')}}</ul>
        		</a>
        		{% endif %}
        	{% endfor %}
        </li>
        </ul>
</li>
{% endmacro %}       

{% macro navbar_block(menu, languages) %}

<div class="navbar {{menu.extra_classes}}" role="navigation">
{% endif %}
   <div class="container">
        <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                {% if appbuilder.app_icon %}
                	<a class="brand" href="{{appbuilder.get_url_for_index}}">
                	<img src="{{appbuilder.app_icon}}" height="50px" width="100%">
                	</a>
                {% else %}
                	<span class="navbar-brand">
                	<a href="{{appbuilder.get_url_for_index}}">
                	{{ appbuilder.app_name }}
                	</a>
                	</span>
                {% endif %}
        </div>
        <div class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                        {{ menu_block(menu)}}
                </ul>
                <ul class="nav navbar-nav navbar-right">
                {{ locale_menu(languages) }}
                {% if not current_user.is_anonymous() %}
				    <li><a href="{{appbuilder.get_url_for_logout}}">
{'fraction_non_alphanumeric': 0.19494484010613042, 'fraction_numerical': 0.008937299259879905, 'mean_word_length': 1.7770453664210935, 'pattern_counts': {'":': 0, '<': 130, '<?xml version=': 0, '>': 130, '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': '820184', 'n_tokens_mistral': 2551, 'n_tokens_neox': 2162, 'n_words': 398}