HEX
Server: Apache
System: Linux srv-plesk28.ps.kz 5.14.0-284.18.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jun 29 17:06:27 EDT 2023 x86_64
User: greencl1 (10085)
PHP: 8.1.33
Disabled: apache_setenv,dl,eval,exec,openlog,passthru,pcntl_exec,pcntl_fork,popen,posix_getpwuid,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,socket_create,socket_create_listen,socket_create_pair,syslog,system,socket_listen,stream_socket_server
Upload Files
File: /var/www/vhosts/greenclinic.kz/newsite/wp-content/themes/green-clinic/blocks/btn_img.php
<?php 

    $list = get_sub_field('list');
    $title = get_sub_field('title');
    $i = 1;
?>

<div class="container">
<h1 class="advantages-title title">
          <?php echo $title ?>
        </h1>
        <div class="people-container">
          <?php foreach($list as $item): ?>
          <a
             href="<?php echo $item['link'] ?>"
          >
            <div class="people male">
              <span>
                <?php echo $item['title'] ?>
                <svg
                  width="24"
                  height="24"
                  viewBox="0 0 24 24"
                  fill="none"
                  xmlns="http://www.w3.org/2000/svg"
                >
                  <path
                    d="M18 12L18.3536 11.6464L18.7071 12L18.3536 12.3536L18 12ZM6 12.5C5.72386 12.5 5.5 12.2761 5.5 12C5.5 11.7239 5.72386 11.5 6 11.5V12.5ZM14.3536 7.64645L18.3536 11.6464L17.6464 12.3536L13.6464 8.35355L14.3536 7.64645ZM18.3536 12.3536L14.3536 16.3536L13.6464 15.6464L17.6464 11.6464L18.3536 12.3536ZM18 12.5H6V11.5H18V12.5Z"
                    fill="white"
                  />
                </svg>
              </span>
              
              <img class="people-image"  src="<?php echo $item['img']['url'] ?>" alt="<?php echo $item['title'] ?>" />
            </div>
          </a>
          <?php endforeach; ?>
        </div>
</div>
<script>
  const peopleImages = document.querySelectorAll(".people-image"); 
  var btmImg = document.querySelector(".section__btn_img");
  var animation4Triggered = false;
  var options = {
        root: null,
        threshold: 0.5,
      }; 
var observerBlock4 = new IntersectionObserver(function (
        entries,
        observer
      ) {
        entries.forEach(function (entry) {
          if (entry.isIntersecting && !animation4Triggered) {             
            peopleImages.forEach((elem, index) => {
              elem.classList.add("visible");
            });
            animation4Triggered = true;
            observerBlock4.unobserve(btmImg);
          }
        });
      },
      options);

      observerBlock4.observe(btmImg);
</script>