<?php /* NOTE: GENERATED BY GULP !!! */ ?><?php
$b = "flo-block-image-links-1"; // To be used inside HTML

// Start: Class name automation
  $b__for_css = ".".$b; // To be used inside CSS
  $b__uniq = $b."--".mt_rand(1, 999); // To be used inside HTML
  $b__uniq_for_css = ".".$b__uniq; // To be used inside CSS
// End: Class name automation

$elements_color = flo_data($data, "text_elements_color");
$images_list = flo_data($data, "images");
$title_font = flo_data($data, "title_font");
$subtitle_font = flo_data($data, "subtitle_font");

$number_of_images = sizeof($images_list);
$image_number_class = " ";

if ($number_of_images == 3) {
  $image_number_class = $b . "--has-3-images";
}
elseif ($number_of_images == 2) {
  $image_number_class = $b . "--has-2-images";
}
elseif ($number_of_images == 1) {
  $image_number_class = $b . "--has-1-image";
}
?>

<?php echo $__env->make('core.style', [
  "breakpoint__general" => "

    ".
    flo_render_typography_styles(
    $b__uniq_for_css." ".$b__for_css."__link-title",
    $title_font
    )
    ."

    ".
    flo_render_typography_styles(
    $b__uniq_for_css." ".$b__for_css."__link-subtitle",
    $subtitle_font
    )
    ."

    ".$b__uniq_for_css."{
      color: ".$elements_color.";
    }

  "
], array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php $__env->startSection('block_content'); ?>
  <div class="<?php echo $b; ?> <?php echo $b__uniq; ?> <?php echo $image_number_class; ?>">
    <?php foreach($images_list as $index => $image): ?>
      <?php
        $link_image = flo_data($image, "image");
        $link_title = flo_data($image, "title");
        $link_subtitle = flo_data($image, "subtitle");
        $url = flo_data($image, "image_url");

        $check_link = $url ? "has-url" : "no-url";

        if ($index == 1) {
          $img_width = 434;
          $img_height = 434;
        }
        else {
          $img_width = 694;
          $img_height = 432;
        }
      ?>
      <?php if($url): ?>
        <a href="<?php echo $url; ?>" class="<?php echo $b; ?>__link <?php echo $b; ?>__link--<?php echo $check_link; ?>">
          <span class="<?php echo $b; ?>__link-image-wrap">
            <?php /* <span class="<?php echo $b; ?>__link-image <?php echo $b; ?>__link-image--<?php echo $check_link; ?>" style="background-image:url(<?php echo $link_image["url"]; ?>);"></span> */ ?>

            <?php echo flo_aq_img($class = $b . "__link-image ", $url = $link_image['url'], $width = $img_width, $height = $img_height, $crop = true, $alt = $link_image['alt'], $force_sizes = true); ?>

          </span>
          <div class="<?php echo $b; ?>__link-description">
            <h2 class="<?php echo $b; ?>__link-title"><?php echo $link_title; ?></h2>
            <h3 class="<?php echo $b; ?>__link-subtitle"><?php echo $link_subtitle; ?></h3>
          </div>
        </a>
      <?php else: ?>
        <div class="<?php echo $b; ?>__link <?php echo $b; ?>__link--<?php echo $check_link; ?>">
          <div class="<?php echo $b; ?>__link-image-wrap">
            <div class="<?php echo $b; ?>__link-image" style="background-image:url(<?php echo $link_image["url"]; ?>);" aria-label="<?php echo $link_image["alt"]; ?>"></div>
          </div>
          <div class="<?php echo $b; ?>__link-description">
            <h3 class="<?php echo $b; ?>__link-title"><?php echo $link_title; ?></h3>
            <h4 class="<?php echo $b; ?>__link-subtitle"><?php echo $link_subtitle; ?></h4>
          </div>

        </div>
      <?php endif; ?>
    <?php endforeach; ?>
  </div>
<?php $__env->stopSection(true); ?>

<?php echo $__env->make('layout.block', [
  "block_classes" => "", // Will be added to main block div. e.g. flo-block--full-width
  // "data_onready" => "block_name" // Specify a function (see _blank.js on how to define) that will be executed on document ready.
], array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>