<?php if (!function_exists('renderMarquee')) {
  function renderMarquee($context, $item) {
    $journal3 = $context['journal3'];
    ?>
    <?php if ($item['link']['href']): ?>
      <a href="<?php echo $item['link']['href']; ?>" class="<?php echo $journal3->classes($item['classes']); ?>" <?php echo $journal3->linkAttrs($item['link']); ?>>
        <span>
          <?php echo $item['title']; ?>
        </span>
      </a>
    <?php else: ?>
      <div class="<?php echo $journal3->classes($item['classes']); ?>">
          <span>
            <?php echo $item['title']; ?>
          </span>
        </div>
    <?php endif; ?>
    <?php
  }
} ?>
<?php if ($items): ?>
  <div class="<?php echo $journal3->classes($classes); ?>  <?php echo $color_scheme_module; ?>">
    <button aria-label="Edit" class="admin-edit" type="button" data-edit="<?php echo $edit; ?>"><em class="fa fa-pencil" data-placement="auto" data-toggle="tooltip-hover" data-tooltip-class="admin-edit-tooltip" title="Edit <?php echo $name; ?>"></em></button>
    <div class="module-body">
      <div class="marquee-slider">
        <div class="marquee-items marquee-items-1">
          <?php for ($i = 1; $i <= max(1, $repeat); $i++): ?>
            <?php foreach ($items as $item): ?>
              <?php renderMarquee(get_defined_vars(), $item); ?>
            <?php endforeach; ?>
          <?php endfor; ?>
        </div>
        <div class="marquee-items marquee-items-2" aria-hidden="true">
          <?php for ($i = 1; $i <= max(1, $repeat); $i++): ?>
            <?php foreach ($items as $item): ?>
              <?php renderMarquee(get_defined_vars(), $item); ?>
            <?php endforeach; ?>
          <?php endfor; ?>
        </div>
      </div>
    </div>
  </div>
<?php endif; ?>
