<?php
/*
Template Name: Шаблон страницы О нас
*/
?>
<?php
get_header();
$post_id = get_the_ID();
$useragent=$_SERVER['HTTP_USER_AGENT'];

$page_breadcrumbs = carbon_get_post_meta( $post_id, 'page_breadcrumbs' ); 
?>

<main class="page-o-nas">
	<?php get_template_part( 'template-parts/block-banner' ); ?>

	<section class="contetn-main_block">
		<div class="container">
			<div class="main_content">
				<?php
				add_filter('the_content', function( $content ) {
					return str_replace( '<p', '<p class="hero-cta__text"', $content );
				});
				the_content();
				?>
			</div>
		</div>
	</section>
	
	<section class="section foto-slider">
		<div class="container">
			<h2 class="page_h2">Фото нашей школы</h2>
			<div class="swiper swiper-foto">
				<div class="swiper-wrapper">
					<?php 
						$images = carbon_get_theme_option( 'slider_img' );
						foreach ($images as $img) { ?>
						<div class="swiper-slide img__item">
							<img loading="lazy" class="certificates__item_img" src="<?php echo wp_get_attachment_url($img['img']); ?>" alt="<?php echo get_post_meta( $img['img'], '_wp_attachment_image_alt', true ); ?>">
						</div>
					<?php } ?>
				</div>
			</div>
			<div class="swiper-pagination"></div>
			<div class="custom-button-next foto-next desktop"></div>
			<div class="custom-button-prev foto-prev desktop"></div>
		</div>
	</section>
	
	<?php get_template_part( 'template-parts/teachers' ); ?>
	
	<?php get_template_part( 'template-parts/promo-form' ); ?>
	
	<?php //get_template_part( 'template-parts/block-why-us' ); ?>
	
	<?php get_template_part( 'template-parts/map' ); ?>
		
</main>

<?php
get_footer(); 