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/httpdocs/wp-content/themes/GreenClinic/archive-news.php
<?php get_header(); ?>

<div class="page__banner--bread">
  <div class="bread-line">
    <div class="container">
      <?php if( function_exists('dimox_breadcrumbs') ) dimox_breadcrumbs(); ?>
    </div>
  </div>
</div>

<style>
   
      /*  .book-section {
            width: 100%;
            padding: 40px 20px;
            margin: 0 auto;
            overflow: hidden;
            text-align: center;
        }
        .book-section button:focus{
            outline:none;
        }
       
        .container > .right{
            position: absolute;
            height: 100%;
            width: 50%;
            transition: 0.7s ease-in-out;
            transform-style: preserve-3d;
        }
        .book-section > .container > .right{
            right:0;
            transform-origin: left;
            border-radius: 10px 0 0 10px;
        }
        .right > figure.front, .right > figure.back{
            margin: 0;
            height: 100%;
            width: 100%;
            position: absolute;
            left:0;
            top:0;
            background-size: cover;
            background-repeat: no-repeat;
            backface-visibility: hidden;
            background-color: white;
            overflow: hidden;
        }
        .right > figure.front{
            background-position: right;
            border-radius: 0 10px 10px 0;
            box-shadow: 2px 2px 15px -2px rgba(0,0,0,0.2);
        }
        .right > figure.back{
            background-position: left;
            border-radius: 10px 0 0 10px;
            box-shadow: -2px 2px 15px -2px rgba(0,0,0,0.2);
            transform: rotateY(180deg);
        }
        .flip{
            transform: rotateY(-180deg);
        }
        .flip::before{
            content: "";
            position: absolute;
            top:0;
            left:0;
            z-index: 10;
            width: 100%;
            height: 100%;
            border-radius: 0 10px 10px 0;
            background-color: rgba(0,0,0,0.1);
        }
        .book-section > button{
            border: 2px solid #ef9f00;
            background-color: transparent;
            color: #ef9f00;
            padding: 10px 20px;
            border-radius: 5px;
            cursor: pointer;
            margin: 10px;
            transition: 0.3s ease-in-out;
        }
        .book-section > button:focus, .book-section > button:active{
            outline: none;
        }
        .book-section > p{
            color: rgba(0,0,0,0.7);
            font-family: calibri;
            font-size: 24px;
        }
        .book-section > p > a{
            text-decoration: none;
            color: #ef9f00;
        }
        .book-section > button:hover{
            background-color: #ef9f00;
            color: #fff;
        }
        .front#cover, .back#back-cover{
            background-color: #ffcb63;
            font-family: calibri;
            text-align: left;
            padding: 0 30px;
        }
        .front#cover h1{
            color: #fff;
        }
        .front#cover p{
            color: rgba(0,0,0,0.8);
            font-size: 14px;
        }*/
  
  </style>


  <div class="container">

  <div class="section__title">
      <h3 class="service__title title">
        Новости
</h3>
    </div>

  </div>


<!--<section class="section__new section__margin">
  <div class="container">
    <div class="section__news--grid">
    <?php 
        $media_news = new WP_Query( array(
            'orderby' => 'date', 
            'post_type' => 'news',
			 'paged' => get_query_var('paged') ?: 1 
        ));
    ?>
    <?php while ( $media_news->have_posts() ) { $media_news->the_post(); ?>
      <?php get_template_part( 'components/component', 'news' ); ?>
    <?php } ?>

    </div>

    <div class="pagination-row">
		 <?php
      kama_pagenavi( $before = ' ', $after = ' ', $echo = true, $args = array(), $wp_query = $news);
    ?>
     
      </div>

  </div>
</section>-->

<section class="news">

		<div class="book-section">
				<div class="container">
				<?php 
				$media_news = new WP_Query( array(
				'orderby' => 'date', // тип сортировки (в данном случае по дате)
				'post_type' => 'news',
				'posts_per_page' => 6,
				//'offset' => $b,
				));
				?> 
				<?php  $j=0; $cc=0; ?> 

				<? for ($i=0; $i <=0; $i++) {?>
				<div class="right">
                    <?php while ( $media_news->have_posts() ) { $media_news->the_post(); ?>  
                    <?php get_template_part( 'components/component', 'news2' ); ?> 
                    <? /*echo ($cc)*/?>
                    <? if(($cc%2!==0) && ($cc!==5)){ ?> 
                    </div><div class="right">
                        <?} ?>

                    <? $cc++; }  ?> 
                    
                </div> 
				<?  }  ?>    
			

		<button  class="swiper-button-prev" onclick="turnLeft()">Prev</button> 
		<button class="swiper-button-next" onclick="turnRight()">Next</button>
		</div>
        </div>
		</section>

<?php get_footer(); ?>
<script>
var right = document.getElementsByClassName("right");
    var si = right.length;
    var z=1;
    turnRight();
    function turnRight()
    {
        if(si>=1){
            si--;
        }
        else{
            si=right.length-1;
            function sttmot(i){
                setTimeout(function(){right[i].style.zIndex="auto";},300);
            }
            for(var i=0;i<right.length;i++){
                right[i].className="right";
                sttmot(i);
                z=1;
            }
        }
        right[si].classList.add("flip");
        z++;
        right[si].style.zIndex=z;
    }
    function turnLeft()
    {
        if(si<right.length){
            si++;
        }
        else{
            si=1;
            for(var i=right.length-1;i>0;i--){
                right[i].classList.add("flip");
                right[i].style.zIndex=right.length+1-i;
            }
        }
        right[si-1].className="right";
        setTimeout(function(){right[si-1].style.zIndex="auto";},350);
    }
$(document).ready(function() {
        $('figure.figure:nth-child(1)').addClass('back'); 
        $('figure.figure:nth-child(2)').addClass('front'); 

});
</script>