<commit_before>{##
 # Standard HTML page template
 #
 # Dont't use, use "_page-<nav|no_nav|popup>.twig" instead!
 #
 # Blocks: page_nav:      Navigation path, like: "Dashboard", "Settings/Configuration", "Content/*", ...
 #         page_main:     content
 #         page_title:    used as html title
 #         page_subtitle: used as html title (optional)
 #         page_script:   script added after the body tag (script tags needed!)
 #}
{%- spaceless %}

{% set page_locale_long = app.locale %}
{% set page_locale_short = page_locale_long|slice(0, 2) %}
{% set page_timezone_offset = app.timezone_offset %}

{% if block('page_subtitle') is empty %}
    {% set page_title = block('page_title') %}
{% else %}
    {% set page_title = block('page_title') ~ ' » ' ~ block('page_subtitle') %}
{% endif %}

{# TODO: Refactor this out. Too much business logic in the template. #}
{% set page_scripts_inc = [
    'view/js/lib.min.js',
    'view/lib/ckeditor/ckeditor.js',
] %}

{# Add locale include for datepicker #}
{% set localepath = 'view/js/locale/datepicker/' %}
{% if file_exists(paths.apppath ~ '/' ~ localepath ~ page_locale_long ~ '.min.js') %}
    {% set page_scripts_inc = page_scripts_inc|merge([localepath ~ page_locale_long ~ '.min.js']) %}
{% elseif page_locale_short != 'en' and file_exists(paths.apppath ~ '/' ~ localepath ~ page_locale_short ~ '.min.js') %}
    {% set page_scripts_inc = page_scripts_inc|merge([localepath ~ page_locale_short ~ '.min.js']) %}
{% endif %}

{# Add locale include for moment #}
{% set localepath = 'view/lib/moment/' %}
{% if file_exists(paths.apppath ~ '/' ~ localepath ~ page_locale_long|lower|replace({'_': '-'}) ~ '.js') %}
    {% set page_scripts_inc = page_scripts_inc|merge([localepath ~ page_locale_long|lower|replace({'_': '-'}) ~ '.js']) %}
{% elseif page_locale_short != 'en' and file_exists(paths.apppath ~ '/' ~ localepath ~ page_locale_short ~ '.js') %}
    {% set page_scripts_inc = page_scripts_inc|merge([localepath ~ page_locale_short ~ '.js']) %}
{% endif %}

{% endspaceless -%}

<!DOCTYPE html>
<html lang="{{ page_locale_short }}">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">

    <title>{{ page_title|striptags|trim }} – {{ app.config.get('general/branding/name') }}</title>

    <link rel="stylesheet" href="{{ paths.app }}view/css/lib.css">

    <!--[if lt IE 9]>
        <link rel="stylesheet" href="{{ paths.app }}view/css/bolt-old-ie.css" media="screen, projection">
    <![endif]-->

    <!--[if gte IE 9]><!-->
        <link rel="stylesheet" href="{{ paths.app }}view/css/bolt.css" media="screen, projection"><commit_msg>Use generated moment locale files<commit_after>{##
 # Standard HTML page template
 #
 # Dont't use, use "_page-<nav|no_nav|popup>.twig" instead!
 #
 # Blocks: page_nav:      Navigation path, like: "Dashboard", "Settings/Configuration", "Content/*", ...
 #         page_main:     content
 #         page_title:    used as html title
 #         page_subtitle: used as html title (optional)
 #         page_script:   script added after the body tag (script tags needed!)
 #}
{%- spaceless %}

{% set page_locale_long = app.locale %}
{% set page_locale_short = page_locale_long|slice(0, 2) %}
{% set page_timezone_offset = app.timezone_offset %}

{% if block('page_subtitle') is empty %}
    {% set page_title = block('page_title') %}
{% else %}
    {% set page_title = block('page_title') ~ ' » ' ~ block('page_subtitle') %}
{% endif %}

{# TODO: Refactor this out. Too much business logic in the template. #}
{% set page_scripts_inc = [
    'view/js/lib.min.js',
    'view/lib/ckeditor/ckeditor.js',
] %}

{# Add locale include for datepicker #}
{% set localepath = 'view/js/locale/datepicker/' %}
{% if file_exists(paths.apppath ~ '/' ~ localepath ~ page_locale_long ~ '.min.js') %}
    {% set page_scripts_inc = page_scripts_inc|merge([localepath ~ page_locale_long ~ '.min.js']) %}
{% elseif page_locale_short != 'en' and file_exists(paths.apppath ~ '/' ~ localepath ~ page_locale_short ~ '.min.js') %}
    {% set page_scripts_inc = page_scripts_inc|merge([localepath ~ page_locale_short ~ '.min.js']) %}
{% endif %}

{# Add locale include for moment #}
{% set localepath = 'view/js/locale/moment/' %}
{% if file_exists(paths.apppath ~ '/' ~ localepath ~ page_locale_long ~ '.min.js') %}
    {% set page_scripts_inc = page_scripts_inc|merge([localepath ~ page_locale_long ~ '.min.js']) %}
{% elseif page_locale_short != 'en' and file_exists(paths.apppath ~ '/' ~ localepath ~ page_locale_short ~ '.min.js') %}
    {% set page_scripts_inc = page_scripts_inc|merge([localepath ~ page_locale_short ~ '.min.js']) %}
{% endif %}

{% endspaceless -%}

<!DOCTYPE html>
<html lang="{{ page_locale_short }}">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">

    <title>{{ page_title|striptags|trim }} – {{ app.config.get('general/branding/name') }}</title>

    <link rel="stylesheet" href="{{ paths.app }}view/css/lib.css">

    <!--[if lt IE 9]>
        <link rel="stylesheet" href="{{ paths.app }}view/css/bolt-old-ie.css" media="screen, projection">
    <![endif]-->

    <!--[if gte IE 9]><!-->
        <link rel="stylesheet" href="{{ paths.app }}view/css/bolt.css" media="screen, projection">
{'fraction_non_alphanumeric': 0.18541741311357937, 'fraction_numerical': 0.004299534217126478, 'mean_word_length': 4.047920433996383, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, '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': '336987', 'n_tokens_mistral': 2004, 'n_tokens_neox': 1865, 'n_words': 399}