<commit_before>{% extends "index.twig" %}

{% block styles %}
    <link rel="stylesheet" href="/ThePost/View/Templates/css/style-summernote.css"/>
{% endblock %}

{% block main %}

    <article class="element entry clearfix" id="entry-{{ entry.id }}">

        {% if authentication.login %}

            <h2 class="title onedit" contenteditable="true">{{ entry.title }}</h2>
            <div class="text onedit summernote"></div>
            <button class="update btn btn-default pull-right" onclick="uploadEntry('entry',{{ entry.id }})">
                <span class="glyphicon glyphicon-floppy-open"></span>
                <span class="update"> Update</span>
            </button>

            {# glyphicon-floppy-open #}
        {% else %}
            <h2 class="title">{{ entry.title }}</h2>
            <div class="text">{{ entry.content|raw }}</div>
        {% endif %}

    </article>

{% endblock %}

{% block scripts %}
    <script src="/ThePost/View/Templates/js/upload.js"></script>
    <script src="/ThePost/View/Templates/js/summernote.min.js"></script>
    <script>
        $(document).ready(function() {
            $('.summernote').summernote().code('{{ entry.content|raw }}');
        });
    </script>
{% endblock %}<commit_msg>Only load style-summernote.css if authenticated<commit_after>{% extends "index.twig" %}

    {% block styles %}
        {% if authentication.login %}
            <link rel="stylesheet" href="/ThePost/View/Templates/css/style-summernote.css"/>
        {% else %}
            <link rel="stylesheet" href="/ThePost/View/Templates/css/style.css"/>
        {% endif %}
    {% endblock %}

{% block main %}

    <article class="element entry clearfix" id="entry-{{ entry.id }}">

        {% if authentication.login %}

            <h2 class="title onedit" contenteditable="true">{{ entry.title }}</h2>
            <div class="text onedit summernote"></div>
            <button class="update btn btn-default pull-right" onclick="uploadEntry('entry',{{ entry.id }})">
                <span class="glyphicon glyphicon-floppy-open"></span>
                <span class="update"> Update</span>
            </button>

            {# glyphicon-floppy-open #}
        {% else %}
            <h2 class="title">{{ entry.title }}</h2>
            <div class="text">{{ entry.content|raw }}</div>
        {% endif %}

    </article>

{% endblock %}

{% block scripts %}
    <script src="/ThePost/View/Templates/js/upload.js"></script>
    <script src="/ThePost/View/Templates/js/summernote.min.js"></script>
    <script>
        $(document).ready(function () {
            $('.summernote').summernote().code('{{ entry.content|raw }}');
        });
    </script>
{% endblock %}
{'fraction_non_alphanumeric': 0.19170984455958548, 'fraction_numerical': 0.0029607698001480384, 'mean_word_length': 2.4698331193838254, 'pattern_counts': {'":': 0, '<': 50, '<?xml version=': 0, '>': 50, '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': '2342454', 'n_tokens_mistral': 866, 'n_tokens_neox': 783, 'n_words': 147}