HEX
Server: Apache/2
System: Linux cp07.iserverteam.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: fliyingp (1085)
PHP: 7.4.33
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/fliyingp/domains/fliyingpigeon.hk/public_html/wp-content/themes/ocean-theme/single-case.php
<?php 
function enqueue_cases_files() {
    wp_enqueue_style('case-style', get_template_directory_uri() . '/case.css', array(), null, 'all');
    wp_enqueue_style('top-title-style', get_template_directory_uri() . '/template-parts/blocks/hero/style.css', array(), null, 'all');
}; 
add_action('wp_enqueue_scripts', 'enqueue_cases_files');
?>
<?php get_header(); ?>
<div class="reveal-wrapper">
<main class="reveal-content">
<section class="hero">
  <div class="hero__sticky">
    <div class="container">
      <div class="hero__head">
		  <?php if (!is_front_page()) : ?>
		  <div class='ocean-breadcrumbs'>
			<a class='ocean-breadcrumbs__link' href="<?php echo home_url(); ?>">
				<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
					<path d="M6.69594 12.0396L2.65234 7.99995L6.70706 3.94922L7.55778 4.79475L4.96151 7.39367H13.3606V8.60067H4.96151L7.54666 11.1858L6.69594 12.0396Z" fill="white"/>
				</svg>
			</a>
			<div class='ocean-breadcrumbs__list'>
			  <a href='/'>
			  	головна
			  </a>
			  <span class="separator">
				  <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
					<path d="M6.13392 12.0394L10.1847 7.98871L6.13392 3.93799L5.2832 4.79982L8.47209 7.98871L5.2832 11.1776L6.13392 12.0394Z" fill="#F0F2F5"/>
				  </svg>
			  </span>
			  <a href='/portfolio-metalokonstruktsii/'>
			  	проекти
			  </a>
			  <span class="separator current">
				  <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
					<path d="M6.13392 12.0394L10.1847 7.98871L6.13392 3.93799L5.2832 4.79982L8.47209 7.98871L5.2832 11.1776L6.13392 12.0394Z" fill="#F0F2F5"/>
				  </svg>
			  </span>
			  <span class="current">
				<?php the_title(); ?>
			  </span>
			</div>
		  </div>
		  <?php else : ?>
		  <div class="hero_mini-title mini-title visible" bis_skin_checked="1">
          	<div class="circle" bis_skin_checked="1"></div>
          	<h2>завод «Океан»</h2>
          </div>
		  <?php endif; ?>
		  <?php if(have_rows('social_media_list', 'option')) : ?>
		<div class='sticky-social-mob'>
			<?php while(have_rows('social_media_list', 'option')) : the_row(); ?>
			<a href='<?php echo get_sub_field('link') ?>' class='sticky-social__item'><img src='<?php echo get_sub_field('image') ?>'></a>
			<?php endwhile; ?>
		</div>
	<?php endif; ?>
        <h1 class="hero__title">
          <?php echo get_field('title') ?>
        </h1>
      </div>
    </div>
  </div>

  <div class='hero__body'>
        <?php $hero_video = get_field('case_video'); ?>
		<?php if ($hero_video) :
  ?>
    <video class="hero__video" autoplay muted loop playsinline>
      <source src="<?php echo esc_url($hero_video); ?>" type="video/mp4">
      Ваш браузер не підтримує відео.
    </video>
  <?php else : ?>
            <img src="<?php echo get_the_post_thumbnail_url(get_the_ID(), 'full'); ?>" alt="">
  <?php endif; ?>

    </div>
</section>

<section class='case-description'>
    <div class='container'>
        <div class='case-description__content'>
            <div class='case-description__left'>
                <div class='case-description__mini-title mini-title'>
                    <div class='circle'></div>
                    <h2>про кейс</h2>
                </div>
                <div class='case-description__right d-s'>
                    <?php echo get_field('short_description') ?>
                </div>
                <div class='case-description__info'>
                    <?php
                    $year_terms = get_the_terms(get_the_ID(), 'years');
                    if ($year_terms && !is_wp_error($year_terms)) :
                        ?>
                        <div class='case-description__item'>
                            <p class='case-description__item-label'>рік:</p>
                            <p class='case-description__item-value'><?php echo esc_html($year_terms[0]->name); ?></p>
                        </div>
                    <?php endif; ?>
                    <?php
                    $location_terms = get_the_terms(get_the_ID(), 'location');
                    if ($location_terms && !is_wp_error($location_terms)) :
                        ?>
                        <div class='case-description__item'>
                            <p class='case-description__item-label'>локація:</p>
                            <p class='case-description__item-value'><?php echo esc_html($location_terms[0]->name); ?></p>
                        </div>
                    <?php endif; ?>
                    <?php
                    $category_terms = get_the_terms(get_the_ID(), 'service-type');
                    if ($category_terms && !is_wp_error($category_terms)) :
                        ?>
                        <div class='case-description__item'>
                            <p class='case-description__item-label'>категорія:</p>
                            <p class='case-description__item-value'><?php echo esc_html($category_terms[0]->name); ?></p>
                        </div>
                    <?php endif; ?>
                    <?php if (get_field('square')) : ?>
                    <div class='case-description__item'>
                        <p class='case-description__item-label'>площа:</p>
                        <p class='case-description__item-value'><?php echo get_field('square') ?></p>
                    </div>
                    <?php endif; ?>
                </div>
            </div>
            <div class='case-description__right d-l'>
                <?php echo get_field('short_description') ?>
            </div>
        </div>
    </div>
</section>

<section class='technologies'>
    <div class='container'>
        <div class='technologies__content'>
            <div class='technologies__head'>
                <div class='technologies__mini-title mini-title'>
                    <div class='circle'></div>
                    <h2>технології</h2>
                </div>
                <div class='technologies__title'>
                    наші <strong>технології</strong>
                </div>
            </div>
            <div class='technologies__body'>
                <img src='<?php echo get_field('image_tech') ?>'>
                <div class='technologies__body-accordion'>
                    <?php $counter = 1; ?>
                    <?php while (have_rows('technologies_list')) : the_row(); ?>
                    <div class='technologies__body-accordion-item accordion'>
                        <div class='technologies__body-accordion-item-top'>
                            <p class='technologies__body-accordion-counter'><?php echo str_pad($counter, 3, '0', STR_PAD_LEFT); ?></p>
                            <div class='technologies__body-accordion-label-button'>
                                <p class='technologies__body-accordion-label'><?php echo get_sub_field('label') ?></p>
                                <div class='technologies__body-accordion-button faq__button'>
                                    <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
                                        <path d="M7.36428 8.63965H3.04688V7.35124H7.36428V3.02588H8.65267V7.35124H12.9574V8.63965H8.65267V12.9404H7.36428V8.63965Z" fill="#001C36"/>
                                    </svg>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class='technologies__body-accordion-item-panel panel'>
                        <p class='technologies__body-accordion-item-panel-text'><?php echo get_sub_field('text') ?></p>
                    </div>
                    <?php $counter++; ?>
                    <?php endwhile; ?>
                </div>
            </div>
        </div>
    </div>
</section>

<?php if (have_rows('project_gallery')) : ?>

<section class='project-gallery'>
    <div class='container'>
        <div class='project-gallery__content'>
            <div class='project-gallery__head'>
                <div class='project-gallery__mini-title mini-title'>
                    <div class='circle'></div>
                    <h2>галерея</h2>
                </div>
                <div class='project-gallery__title'>
                    галерея <strong>проекту</strong>
                </div>
            </div>
            <div class='project-gallery__body project-gallery-slider'>
                <div class='swiper-wrapper'>
                    <?php $counter = 1 ?>
                    <?php while (have_rows('project_gallery')) : the_row(); ?>
                    <div class='swiper-slide'>
                        <img src='<?php echo get_sub_field('image') ?>' class='<?php echo $counter % 2 == 0 ? "high-image" : "" ?>'>
                    </div>
                    <?php $counter++; ?>
                    <?php endwhile; ?>
                </div>
                <div class='project-gallery__pagination-container'>
                    <div class='project-gallery__arrows'>
                        <div class='project-gallery__prev project-gallery__arrow'>
                            <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
                                <path d="M6.70728 3.98192L7.55802 4.83572L4.9729 7.42082L13.334 7.42082V8.62782H4.9729L7.56913 11.2267L6.7184 12.0723L2.6637 8.02154L6.70728 3.98192Z" fill="#F0F2F5"/>
                            </svg>
                        </div>
                        <div class='project-gallery__next project-gallery__arrow'>
                            <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
                                <path d="M9.29272 12.0176L8.44198 11.1638L11.0271 8.5787H2.66602V7.3717H11.0271L8.43087 4.77278L9.2816 3.92725L13.3363 7.97798L9.29272 12.0176Z" fill="#F0F2F5"/>
                            </svg>
                        </div>
                    </div>
                    <div class='project-gallery__pagination'></div>
                </div>
            </div>
            <?php
            $current_id = get_the_ID();

            $prev_post = get_previous_post();
            $next_post = get_next_post();
            ?>

            <div class='project-gallery__footer'>

                <?php if ($prev_post): ?>
                    <a class='project-gallery__prev-proj' href="<?php echo get_permalink($prev_post); ?>">
                        <img src="<?php echo get_the_post_thumbnail_url($prev_post, 'full'); ?>" alt="<?php echo esc_attr(get_the_title($prev_post)); ?>">
                        <div class='project-gallery__prev-proj-container'>
                            <svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg">
                                <path d="M2.53914 13.7545L2.45594 13.8371C1.65153 14.6796 1.63967 16.0067 2.42899 16.8635L2.51043 16.9473L7.26356 21.5967L8.52215 20.31L4.34559 16.2242H18.6272C20.5756 16.2241 22.1551 14.6447 22.1552 12.6963V6.93125C22.155 4.98289 20.5756 3.40347 18.6272 3.40332H14.7477V5.20332H18.6272C19.5815 5.20347 20.355 5.97701 20.3552 6.93125V12.6963C20.3551 13.6506 19.5815 14.4241 18.6272 14.4242H4.45223L8.51102 10.5939L7.27528 9.28496L2.53914 13.7545Z" fill="#F0F2F5"/>
                            </svg>
                            <p>Попередній проект</p>
                        </div>
                    </a>
                <?php endif; ?>

                <?php if ($next_post): ?>
                    <a class='project-gallery__next-proj' href="<?php echo get_permalink($next_post); ?>">
                        <img src="<?php echo get_the_post_thumbnail_url($next_post, 'full'); ?>" alt="<?php echo esc_attr(get_the_title($next_post)); ?>">
                        <div class='project-gallery__next-proj-container'>
                            <div class='project-gallery__next-proj-top'>
                                <p>Наступний проект</p>
                                <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                                    <path d="M21.4607 13.2545L21.5439 13.3371C22.3484 14.1796 22.3602 15.5067 21.5709 16.3635L21.4895 16.4473L16.7363 21.0967L15.4777 19.81L19.6543 15.7242H5.37266C3.42426 15.7241 1.84481 14.1447 1.84473 12.1963V6.43125C1.84487 4.48289 3.4243 2.90347 5.37266 2.90332H9.25215V4.70332H5.37266C4.41841 4.70347 3.64487 5.47701 3.64473 6.43125V12.1963C3.64481 13.1506 4.41838 13.9241 5.37266 13.9242H19.5477L15.4889 10.0939L16.7246 8.78496L21.4607 13.2545Z" fill="#F0F2F5"/>
                                </svg>                            
                            </div>
                            <div class='project-gallery__next-proj-bot'>
                               [ <?php echo get_the_title($next_post); ?> ]
                            </div>
                        </div>
                    </a>
                <?php endif; ?>

            </div>

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

<?php endif; ?>
	<?php the_content(); ?>
</main>
<?php get_footer(); ?>