<commit_before><?php
/**
* Template Name: Home
*/
require_once __DIR__.'/../App/bootstrap.php';

/**
 * @var $twig \Twig_Environment
 */
$twig = $container->get("twig.environment");
$flexibleContent = [];
while (have_rows('content')) {
    the_row();
    switch($layout = get_row_layout()) {
        case 'hero_slider':
            $slides = get_sub_field('slides');
            $data = [];
            foreach ($slides as $slide) {
                $data[] = [
                    'image' => $slide['image'],
                    'title' => $slide['title'],
                    'tagline' => $slide['tagline'],
                    'links' => $slide['links'],
                ];
            }
            $flexibleContent[] = $twig->render('panels/hero-slider.html.twig', ['slides' => $data]);
            break;
        default:
            throw new \Exception("Template does not support a layout for $layout");
            break;
    }
}

echo $twig->render('base.html.twig', ['flexible_content' => $flexibleContent]);<commit_msg>services<commit_after><?php
/**
* Template Name: Home
*/
require_once __DIR__.'/../App/bootstrap.php';

/**
 * @var $twig \Twig_Environment
 */
$twig = $container->get("twig.environment");
$flexibleContent = [];
while (have_rows('content')) {
    the_row();
    switch($layout = get_row_layout()) {
        case 'hero_slider':
            $slides = get_sub_field('slides');
            $data = [];
            foreach ($slides as $slide) {
                $data[] = [
                    'image' => $slide['image'],
                    'title' => $slide['title'],
                    'tagline' => $slide['tagline'],
                    'links' => $slide['links'],
                ];
            }
            $flexibleContent[] = $twig->render('panels/hero-slider.html.twig', ['slides' => $data]);
            break;
        case 'services':
            $services = get_sub_field('warranty_image');
            $data = [
                'warranty_image' => get_sub_field('warranty_image'),
                'warranty_text' => get_sub_field('warranty_text'),
                'title_1' => get_sub_field('title_line_1'),
                'title_2' => get_sub_field('title_line_2'),
                'content' => get_sub_field('content'),
                'boxes' => get_sub_field('boxes'),
            ];
            $flexibleContent[] = $twig->render('partials/services.html.twig', $data);
            break;
        default:
            throw new \Exception("Template does not support a layout for $layout");
            break;
    }
}

echo $twig->render('base.html.twig', ['flexible_content' => $flexibleContent]);
{'fraction_non_alphanumeric': 0.17379780386217342, 'fraction_numerical': 0.0015145778114350624, 'mean_word_length': 1.95195530726257, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 28, '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': '2271987', 'n_tokens_mistral': 795, 'n_tokens_neox': 773, 'n_words': 132}