<commit_before>/* global Modal, Slideshow */

function scrollHandler() {
  const scroll = window.scrollY;
  const height = window.innerHeight;

  // Top bar color
  document.getElementById('top-bar').className =
    scroll > 50 ? 'opaque' : '';

  // Name zoom
  const name = document.querySelector('h1.huge');
  name.style.transform = `translateY(-50%) scale(${(1 + (scroll / window.innerHeight))})`;

  // Header fade
  const header = document.querySelector('header');
  let opacity = 1 - (2 * (scroll / height));
  if (opacity < 0) opacity = 0;
  header.style.opacity = 1 - (2 * (scroll / height));
}

window.addEventListener('scroll', scrollHandler);
window.addEventListener('resize', scrollHandler);


const message = `

<h3> Pledge your vote </h3>
<p> Support <NAME> and <NAME> for the 2017 junior class president and vice president </p>

<div class="form">
  <div class="horizontal-inputs">
    <input type="text" placeholder="First Name"> <input type="text" placeholder="Last Name">
  </div>

  <input type="email" placeholder="Email">

  <div class="button"> <button type="button" id="formSubmit"> Pledge your vote </button> </div>
</div>
`;

document.addEventListener('DOMContentLoaded', () => {
  window.modal = new Modal(message);
  document.querySelector('header > a').addEventListener('click', window.modal.present);

  document.getElementById('formSubmit').addEventListener('click', () => {
    console.log('submit');
  });

  const imageUrls = [];
  for (let i = 1; i <= 11; i += 1) imageUrls.push(`http://evan2017.com/images/photo-${i}.jpg`);
  window.slideshow = new Slideshow(document.querySelector('.background'), imageUrls);
  window.slideshow.start(5000);
});<commit_msg>Itsy-bitsy images<commit_after>/* global Modal, Slideshow */

function scrollHandler() {
  const scroll = window.scrollY;
  const height = window.innerHeight;

  // Top bar color
  document.getElementById('top-bar').className =
    scroll > 50 ? 'opaque' : '';

  // Name zoom
  const name = document.querySelector('h1.huge');
  name.style.transform = `translateY(-50%) scale(${(1 + (scroll / window.innerHeight))})`;

  // Header fade
  const header = document.querySelector('header');
  let opacity = 1 - (2 * (scroll / height));
  if (opacity < 0) opacity = 0;
  header.style.opacity = 1 - (2 * (scroll / height));
}

window.addEventListener('scroll', scrollHandler);
window.addEventListener('resize', scrollHandler);


const message = `

<h3> Pledge your vote </h3>
<p> Support <NAME> and <NAME> for the 2017 junior class president and vice president </p>

<div class="form">
  <div class="horizontal-inputs">
    <input type="text" placeholder="First Name"> <input type="text" placeholder="Last Name">
  </div>

  <input type="email" placeholder="Email">

  <div class="button"> <button type="button" id="formSubmit"> Pledge your vote </button> </div>
</div>
`;

document.addEventListener('DOMContentLoaded', () => {
  window.modal = new Modal(message);
  document.querySelector('header > a').addEventListener('click', window.modal.present);

  document.getElementById('formSubmit').addEventListener('click', () => {
    console.log('submit');
  });

  const imageUrls = [];
  for (let i = 1; i <= 11; i += 1) imageUrls.push(`https://ch7bmv8n.cloudimg.io/s/width/1000/evan2017.com/images/photo-${i}.jpg`);
  window.slideshow = new Slideshow(document.querySelector('.background'), imageUrls);
  window.slideshow.start(5000);
});
{'fraction_non_alphanumeric': 0.17605839416058394, 'fraction_numerical': 0.01927007299270073, 'mean_word_length': 4.516908212560386, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 45, 'https://': 1, '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': '175742', 'n_tokens_mistral': 1094, 'n_tokens_neox': 1041, 'n_words': 257}