<commit_before><?php
/**
 * Returns the HTML for the Fact page.
 *
 * Available Variables
 * - $nid: Node ID for fact page (integer).
 * - $classes: Additional classes passed for output (string).
 * - $title: Title of fact page (string).
 * - $subtitle: Subtitle of fact page (string).
 * - $intro_title: Introductory title of fact page (string).
 * - $facts: Array of facts for the fact page (array).
 * - $sources: List of sources for the fact page (string).
 * - $cta_link: Call To Action link of fact page (string).
 */
?>

<article id="node-<?php print $node->nid; ?>" class="fact fact-page <?php print $classes; ?> clearfix"<?php print $attributes; ?>>
  <header role="banner" class="-basic">
    <div class="wrapper">
      <h1 class="__title"><?php print $title; ?></h1>
      <?php if (isset($subtitle)): ?>
        <h2 class="__subtitle"><?php print $subtitle; ?></h2>
      <?php endif; ?>
    </div>
  </header>

  <?php if (isset($intro)): ?>
    <section class="container">
      <div class="wrapper">
        <div class="container__block -narrow">
          <?php print $intro; ?>
        </div>
      </div>
    </section>
  <?php endif; ?>

  <?php if (isset($facts_chunked)): ?>
    <?php foreach ($facts_chunked as $key_chunk => $fact_chunk): ?>
      <?php
        $start_value = (($key_chunk * 5) + 1); // Start value for list of facts
        $is_first = ($start_value === 1); // First set of facts
        $is_last = ($key_chunk === (sizeof($facts_chunked) - 1)); // Last set of facts
      ?>

      <section class="container container--fact">
        <div class="wrapper">
          <div class="container__block">

            <?php if (isset($intro_image) && $is_first): ?>
              <aside class="fact-aside">
                <?php print $intro_image; ?>
              </aside>
            <?php endif; ?>

            <ol class="list" start="<?php print $start_value; ?>">
              <?php foreach ($fact_chunk as $key => $fact): ?>
                <li><?php print $fact['fact']; ?></li>
              <?php endforeach; ?>
            </ol>

            <?php if (isset($sources) && $is_last): ?>
              <section class="sources">
                <h3 class="__title js-toggle-sources"><?php print t('Sources'); ?></h3>
                <ul class="__body legal">
                  <?php foreach ($sources as $key => $source): ?>
                    <li><sup><?php print ($key + 1); ?></sup> <?php print $source; ?></li>
                  <?php endforeach; ?>
                </ul>
              </section>
            <?php endif; ?>

          </div>
        </div>
      </section>

      <?php if (isset($call_to_action) && $is_first): ?>
      <div class="cta">
        <div class="wrapper">
          <h2 class="cta__message"><?php print $call_to_action; ?></h2>
          <?php print $cta_link; ?>
        </div>
      </div>
      <?php endif; ?>

    <?php endforeach; ?>
  <?php endif; ?>
<commit_msg>Update sources markup on facts page.<commit_after><?php
/**
 * Returns the HTML for the Fact page.
 *
 * Available Variables
 * - $nid: Node ID for fact page (integer).
 * - $classes: Additional classes passed for output (string).
 * - $title: Title of fact page (string).
 * - $subtitle: Subtitle of fact page (string).
 * - $intro_title: Introductory title of fact page (string).
 * - $facts: Array of facts for the fact page (array).
 * - $sources: List of sources for the fact page (string).
 * - $cta_link: Call To Action link of fact page (string).
 */
?>

<article id="node-<?php print $node->nid; ?>" class="fact fact-page <?php print $classes; ?> clearfix"<?php print $attributes; ?>>
  <header role="banner" class="-basic">
    <div class="wrapper">
      <h1 class="__title"><?php print $title; ?></h1>
      <?php if (isset($subtitle)): ?>
        <h2 class="__subtitle"><?php print $subtitle; ?></h2>
      <?php endif; ?>
    </div>
  </header>

  <?php if (isset($intro)): ?>
    <section class="container">
      <div class="wrapper">
        <div class="container__block -narrow">
          <?php print $intro; ?>
        </div>
      </div>
    </section>
  <?php endif; ?>

  <?php if (isset($facts_chunked)): ?>
    <?php foreach ($facts_chunked as $key_chunk => $fact_chunk): ?>
      <?php
        $start_value = (($key_chunk * 5) + 1); // Start value for list of facts
        $is_first = ($start_value === 1); // First set of facts
        $is_last = ($key_chunk === (sizeof($facts_chunked) - 1)); // Last set of facts
      ?>

      <section class="container container--fact">
        <div class="wrapper">
          <div class="container__block">

            <?php if (isset($intro_image) && $is_first): ?>
              <aside class="fact-aside">
                <?php print $intro_image; ?>
              </aside>
            <?php endif; ?>

            <ol class="list" start="<?php print $start_value; ?>">
              <?php foreach ($fact_chunk as $key => $fact): ?>
                <li><?php print $fact['fact']; ?></li>
              <?php endforeach; ?>
            </ol>

            <?php if (isset($sources) && $is_last): ?>
              <section class="footnote">
                <h4 class="js-footnote-toggle"><?php print t('Sources'); ?></h4>
                <ul class="js-footnote-hidden">
                  <?php foreach ($sources as $key => $source): ?>
                    <li><sup><?php print ($key + 1); ?></sup> <?php print $source; ?></li>
                  <?php endforeach; ?>
                </ul>
              </section>
            <?php endif; ?>

          </div>
        </div>
      </section>

      <?php if (isset($call_to_action) && $is_first): ?>
      <div class="cta">
        <div class="wrapper">
          <h2 class="cta__message"><?php print $call_to_action; ?></h2>
          <?php print $cta_link; ?>
        </div>
      </div>
      <?php endif; ?>

    <?php endforeach; ?>
  <?php endif; ?>

{'fraction_non_alphanumeric': 0.18425941563925013, 'fraction_numerical': 0.004391150143556831, 'mean_word_length': 2.1449814126394053, 'pattern_counts': {'":': 0, '<': 157, '<?xml version=': 0, '>': 165, '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': '4558988', 'n_tokens_mistral': 1833, 'n_tokens_neox': 1778, 'n_words': 517}