<commit_before><script src="{{ asset('bundles/mindgeekweb/js/twig.min.js') }}"></script>

<h1>Static:</h1>
<div id="userbar-static">
    {% include "User/bar.html.twig" %}
</div>

<h1>Dynamic:</h1>

<div id="userbar"></div>
<script type="text/html" src="{{ asset('bundles/mindgeekweb/views/User/bar.html.twig') }}" id="userbar-template"></script>
<script>
App = {
    user: {{ user|json_encode|raw }}
};
</script>
<input id="name" placeholder="Name">
<input id="description" placeholder="Description">
<button class="changeinfo">Change Info</button>


<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script>
window.getTemplate = function(selector) {
    var tplSrc = $(selector).attr('src');
    

    $.get(tplSrc, useTemplate);

};

window.useTemplate = function(tpl) {
    window.template = twig({
        id: "list", // id is optional, but useful for referencing the template later
        data: tpl
    });

    makeTemplate();
};

window.makeTemplate = function() {
    var output = template.render({'user' : App.user });
    $('#userbar').html(output);
};

$('.changeinfo').click(function() {
    App.user = {
        'name' : $('#name').val(),
        'description' : $('#description').val()
    };

    makeTemplate();

});

getTemplate('#userbar-template');
</script><commit_msg>Better index page<commit_after><script src="{{ asset('bundles/mindgeekweb/js/twig.min.js') }}"></script>

<h1>Static:</h1>
<div id="userbar-static">
    {% include "User/bar.html.twig" %}
</div>

<h1>Dynamic:</h1>

<div id="userbar"></div>
<script type="text/html" src="{{ asset('bundles/mindgeekweb/views/User/bar.html.twig') }}" id="userbar-template"></script>
<script>
App = {
    user: {{ user|json_encode|raw }}
};
</script>


<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script>
window.getTemplate = function(selector) {
    var tplSrc = $(selector).attr('src');
    

    $.get(tplSrc, useTemplate);

};

window.useTemplate = function(tpl) {
    window.template = twig({
        id: "list", // id is optional, but useful for referencing the template later
        data: tpl
    });

    makeTemplate();
};

window.makeTemplate = function() {
    var output = template.render({'user' : App.user });
    $('#userbar').html(output);
};

$('.changeinfo').click(function() {
    App.user = {
        'name' : $('#name').val(),
        'description' : $('#description').val()
    };

    makeTemplate();

});

getTemplate('#userbar-template');
</script>
{'fraction_non_alphanumeric': 0.2202572347266881, 'fraction_numerical': 0.006430868167202572, 'mean_word_length': 3.8518518518518516, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 43, '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': '2495541', 'n_tokens_mistral': 854, 'n_tokens_neox': 844, 'n_words': 146}