<commit_before>{% extends 'partials/base.html.twig' %}

{% set route = admin.route == '' ? '' : '/' ~ admin.route %}
{% set preview_link = base_url_relative_frontend|rtrim('/') ~ route %}
{% set preview_html = (base_url|rtrim('/') ~ '/preview' ~ (context.home ? '' : context.route)) ?: '/' %}
{% set admin_route = '/' ~ admin.route %}
{% set back_link = base_url|rtrim('/') ~ '/pages' ~ page.find(admin_route).rawRoute() %}

{% block titlebar %}
    <div class="button-bar">
        <a class="button" href="{{ back_link }}"><i class="fa fa-reply"></i> {{ "PLUGIN_ADMIN.BACK"|tu }}</a>
        <a class="button" href="{{ preview_link }}" target="_blank"><i class="fa fa-external-link"></i> {{ "PLUGIN_ADMIN.OPEN_NEW_TAB"|tu }}</a>
    </div>
    <h1><i class="fa fa-fw fa-eye"></i> {{ "PLUGIN_ADMIN.PREVIEW"|tu }}: <strong>/{{ admin.route }}</strong></h1>
{% endblock %}

{% block content_wrapper %}
<commit_msg>Fix for admin preview of homepage #2426<commit_after>{% extends 'partials/base.html.twig' %}

{% set route = admin.route == '' ? '/' : '/' ~ admin.route %}
{% set preview_link = base_url_relative_frontend|rtrim('/') ~ route %}
{% set preview_html = (base_url|rtrim('/') ~ '/preview' ~ (context.home ? '' : context.route)) ?: '/' %}
{% set admin_route = '/' ~ admin.route %}
{% set back_link = base_url|rtrim('/') ~ '/pages' ~ page.find(admin_route).rawRoute() %}

{% block titlebar %}
    <div class="button-bar">
        <a class="button" href="{{ back_link }}"><i class="fa fa-reply"></i> {{ "PLUGIN_ADMIN.BACK"|tu }}</a>
        <a class="button" href="{{ preview_link }}" target="_blank"><i class="fa fa-external-link"></i> {{ "PLUGIN_ADMIN.OPEN_NEW_TAB"|tu }}</a>
    </div>
    <h1><i class="fa fa-fw fa-eye"></i> {{ "PLUGIN_ADMIN.PREVIEW"|tu }}: <strong>/{{ admin.route }}</strong></h1>
{% endblock %}

{% block content_wrapper %}

{'fraction_non_alphanumeric': 0.24986479177934018, 'fraction_numerical': 0.004326663061114116, 'mean_word_length': 4.2259887005649714, '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': '5701033', 'n_tokens_mistral': 707, 'n_tokens_neox': 659, 'n_words': 124}