/home/bdqbpbxa/demo-subdomains/artcosmetic.goodface.com.ua/wp-content/themes/artcosmetic/main.php
<?php /* Template Name: Main */ ?>

<?php get_header(); ?>

	<div class="banners">
		<div class="counter">
			<div class="container">
				<div class="numbers">
					<span class="slide-number"></span><span class="divider">/</span><span class="total-number"></span>
				</div>
			</div>
		</div>
		<div class="slider main-slider">
			<?php $slides = get_field('main-slider'); if ($slides): foreach ($slides as $slide): ?>
				<div class="slide">
					<div class="container">
						<div class="slide-inner" style="<?php if ($slide['main-slide-background']): echo 'background-image: url('. $slide['main-slide-background'] .');'; endif; ?>">
							<div class="slide-middle">
								<?php if ($slide['main-slide-image']): ?>
									<div class="logo">
										<img src="<?php echo $slide['main-slide-image']; ?>" alt="logo">
									</div>
								<?php endif; ?>
								<?php if ($slide['main-slide-title']): ?>
									<p class="heading heading1"><?php echo $slide['main-slide-title']; ?></p>
								<?php endif; ?>
								<?php if ($slide['main-slide-button']): ?>
									<a href="<?php echo $slide['main-slide-link']; ?>" class="button"><?php echo $slide['main-slide-button']; ?></a>
								<?php endif; ?>
							</div>
						</div>
					</div>
				</div>
			<?php endforeach; endif; ?>
		</div>
	</div>
	<div class="categories">
		<div class="container">
			<div class="row my-flex-row">
				<?php 
					$args = array(
						'meta_key' => 'product-category-number', 
						'orderby' => 'meta_value_num', 
						'order' => 'ASC', 
						'hide_empty' => false, 
						'exclude' => array(15,42,44,116,127,139,118,129,137)
					); 
					$catTerms = get_terms('product_cat', $args);
					foreach($catTerms as $catTerm):
				?>
					<div class="col col-6">
						<div class="category">
							<div class="category-left">
								<div class="image">
									<?php
										$catTextId = 'term_'.$catTerm->term_id;
										$imgSize = get_field('product-category-image-size', $catTextId);
										if (!$imgSize) {
											$imgSize = 24;
										}
									?>
									<?php $catThumbnailId = get_term_meta($catTerm->term_id, 'thumbnail_id', true); $catThumbnail = wp_get_attachment_image_url($catThumbnailId, 'full'); ?>
									<img style="<?php echo "height:{$imgSize}px" ?>" src="<?php echo $catThumbnail; ?>" alt="logo">
								</div>
								<p class="text small-text"><?php  $catText = get_field('product-category-text', $catTextId); echo $catText; ?></p>
								<a href="<?php echo get_term_link($catTerm); ?>" class="link">
									<?php
										if ('ru' == pll_current_language()): echo 'Перейти к бренду'; endif;
										if ('uk' == pll_current_language()): echo 'Перейти до бренду'; endif;
										if ('en' == pll_current_language()): echo 'Go to brand'; endif;
									?>
								</a>
							</div>
							<div class="category-right">
								<?php $catImageId = get_term_meta($catTerm->term_id, 'product-category-image', true); $catImage = wp_get_attachment_image_url($catImageId, 'full'); ?>
								<img src="<?php echo $catImage; ?>" alt="image">
							</div>
						</div>
					</div>
				<?php endforeach; ?>
			</div>
		</div>
	</div>
	<div class="main">
		<div class="container">
			<div class="row">
				<div class="col col-6">
					<div class="owner">
						<div class="owner-content">
							<p class="heading heading1"><?php the_field('main-owner-title'); ?></p>
							<div class="text big-text"><?php the_field('main-owner-text'); ?></div>
						</div>
						<div class="owner-person">
							<div class="owner-left">
								<img src="<?php the_field('main-owner-photo'); ?>" alt="owner">
							</div>
							<div class="owner-right">
								<p class="text big-text"><?php the_field('main-owner-name'); ?></p>
								<p class="text big-text grey-color"><?php the_field('main-owner-position'); ?></p>
							</div>
						</div>
					</div>
				</div>
				<div class="col col-6">
					<div class="form">
						<div class="form-visible">
							<p class="heading heading1">
								<?php
									if ('ru' == pll_current_language()): the_field('global-form-title', 'option'); endif;
									if ('uk' == pll_current_language()): the_field('global-form-title-uk', 'option'); endif;
									if ('en' == pll_current_language()): the_field('global-form-title-en', 'option'); endif;
								?>
							</p>
							<p class="text small-text">
								<?php
									if ('ru' == pll_current_language()): the_field('global-form-text', 'option'); endif;
									if ('uk' == pll_current_language()): the_field('global-form-text-uk', 'option'); endif;
									if ('en' == pll_current_language()): the_field('global-form-text-en', 'option'); endif;
								?>
							</p>
							<?php
								if ('ru' == pll_current_language()): echo do_shortcode('[contact-form-7 id="28"]'); endif;
								if ('uk' == pll_current_language()): echo do_shortcode('[contact-form-7 id="522"]'); endif;
								if ('en' == pll_current_language()): echo do_shortcode('[contact-form-7 id="523"]'); endif;
							?>
						</div>
						<div class="form-hidden">
							<p class="heading heading1">
								<?php
									if ('ru' == pll_current_language()): the_field('global-message-title', 'option'); endif;
									if ('uk' == pll_current_language()): the_field('global-message-title-uk', 'option'); endif;
									if ('en' == pll_current_language()): the_field('global-message-title-en', 'option'); endif;
								?>
							</p>
							<p class="text big-text">
								<?php
									if ('ru' == pll_current_language()): the_field('global-message-text', 'option'); endif;
									if ('uk' == pll_current_language()): the_field('global-message-text-uk', 'option'); endif;
									if ('en' == pll_current_language()): the_field('global-message-text-en', 'option'); endif;
								?>
							</p>
							<a href="#" class="button continue">
								<?php
									if ('ru' == pll_current_language()): echo 'Продолжить'; endif;
									if ('uk' == pll_current_language()): echo 'Продовжити'; endif;
									if ('en' == pll_current_language()): echo 'Continue'; endif;
								?>
							</a>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="follow">
		<div class="container">
			<div class="row">
				<div class="col col-6">
					<div class="follow-block">
						<div class="follow-left">
							<svg width="104" height="104" viewBox="0 0 104 104" fill="none" xmlns="http://www.w3.org/2000/svg">
								<defs>
							    	<linearGradient id="gradient4" x1="52" y1="7.03" x2="52" y2="99.424" gradientUnits="userSpaceOnUse">
							      		<stop stop-color="#00C6FF"/>
							      		<stop offset="1" stop-color="#0068FF"/>
							    	</linearGradient>
							  	</defs>
							  	<path d="M89.985 0h-75.97C6.274 0 0 6.274 0 14.014v75.971C0 97.725 6.274 104 14.014 104h37.468l.064-37.163h-9.655a2.278 2.278 0 0 1-2.278-2.27l-.046-11.98a2.278 2.278 0 0 1 2.278-2.286h9.638V38.725c0-13.433 8.204-20.747 20.187-20.747h9.833a2.278 2.278 0 0 1 2.278 2.278v10.101a2.278 2.278 0 0 1-2.277 2.278l-6.034.003c-6.517 0-7.779 3.097-7.779 7.641V50.3h14.32a2.278 2.278 0 0 1 2.262 2.547l-1.42 11.98a2.278 2.278 0 0 1-2.262 2.01H67.755L67.69 104h22.294C97.725 104 104 97.726 104 89.986V14.014C103.999 6.274 97.725 0 89.985 0z" fill="url(#gradient4)"/>
							</svg>
						</div>
						<div class="follow-right">
							<p class="heading heading1"><?php the_field('main-facebook-title'); ?></p>
							<p class="text big-text"><?php the_field('main-facebook-text'); ?></p>
							<a href="<?php the_field('global-facebook', 'option'); ?>" class="link" target="_blank">
								<?php
									if ('ru' == pll_current_language()): echo 'Подписаться'; endif;
									if ('uk' == pll_current_language()): echo 'Підписатися'; endif;
									if ('en' == pll_current_language()): echo 'Subscribe'; endif;
								?>
							</a>
						</div>
					</div>
				</div>
				<div class="col col-6">
					<div class="follow-block">
						<div class="follow-left">
							<svg width="104" height="104" viewBox="0 0 104 104" fill="none" xmlns="http://www.w3.org/2000/svg">
								<defs>
							    	<radialGradient id="gradient1" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0 -136.88 127.344 0 19.634 131.688)">
							      		<stop stop-color="#FD5"/>
							      		<stop offset=".1" stop-color="#FD5"/>
							      		<stop offset=".5" stop-color="#FF543E"/>
							      		<stop offset="1" stop-color="#C837AB"/>
							    	</radialGradient>
							    	<radialGradient id="gradient2" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="rotate(78.678 -15.763 -28.082) scale(61.1868 252.278)">
							      		<stop stop-color="#3771C8"/>
							      		<stop offset=".128" stop-color="#3771C8"/>
							      		<stop offset="1" stop-color="#60F" stop-opacity="0"/>
							    	</radialGradient>
							  	</defs>
							  	<mask id="gradient3" maskUnits="userSpaceOnUse" x="1" y="1" width="102" height="102">
							    	<path d="M52.004 1c-13.85 0-15.589.06-21.029.308-5.43.249-9.135 1.108-12.378 2.37-3.354 1.302-6.2 3.045-9.034 5.88-2.837 2.835-4.58 5.68-5.887 9.034-1.264 3.244-2.125 6.95-2.369 12.378C1.064 36.41 1 38.15 1 52c0 13.85.062 15.584.308 21.024.25 5.43 1.11 9.135 2.37 12.378 1.303 3.354 3.046 6.2 5.881 9.034 2.834 2.837 5.68 4.584 9.032 5.887 3.245 1.261 6.952 2.12 12.38 2.369 5.44.247 7.177.308 21.027.308 13.852 0 15.585-.061 21.025-.308 5.429-.249 9.14-1.108 12.384-2.369 3.353-1.303 6.195-3.05 9.028-5.887 2.837-2.835 4.58-5.68 5.886-9.033 1.254-3.244 2.115-6.951 2.37-12.378.244-5.44.308-7.174.308-21.025 0-13.85-.064-15.589-.308-21.029-.255-5.43-1.116-9.135-2.37-12.378-1.306-3.354-3.049-6.2-5.886-9.035-2.837-2.836-5.674-4.579-9.031-5.88-3.251-1.262-6.96-2.121-12.389-2.37C67.575 1.061 65.843 1 51.988 1h.016zm-4.575 9.19c1.358-.002 2.873 0 4.575 0 13.617 0 15.231.05 20.608.294 4.973.227 7.672 1.058 9.47 1.756 2.38.925 4.076 2.03 5.86 3.815 1.785 1.785 2.89 3.485 3.817 5.865.698 1.795 1.53 4.494 1.756 9.466.244 5.377.298 6.992.298 20.602s-.054 15.226-.298 20.602c-.227 4.973-1.058 7.671-1.756 9.467-.925 2.38-2.032 4.075-3.817 5.859-1.785 1.785-3.48 2.89-5.86 3.814-1.796.701-4.497 1.53-9.47 1.757-5.376.245-6.99.298-20.608.298s-15.232-.053-20.608-.298c-4.973-.23-7.671-1.06-9.47-1.758-2.38-.924-4.08-2.03-5.865-3.814-1.785-1.785-2.89-3.481-3.817-5.862-.698-1.796-1.53-4.495-1.756-9.467-.244-5.376-.293-6.991-.293-20.61 0-13.62.049-15.226.293-20.602.228-4.973 1.058-7.672 1.756-9.47.925-2.38 2.032-4.08 3.817-5.864 1.785-1.785 3.485-2.89 5.865-3.817 1.798-.701 4.498-1.53 9.47-1.758 4.705-.213 6.528-.277 16.033-.287v.013zm31.799 8.469a6.12 6.12 0 1 0 6.12 6.118 6.122 6.122 0 0 0-6.12-6.12v.002zm-27.224 7.15c-14.464 0-26.19 11.727-26.19 26.191 0 14.464 11.726 26.185 26.19 26.185S78.191 66.464 78.191 52c0-14.464-11.724-26.19-26.188-26.19h.001zm0 9.191c9.389 0 17 7.61 17 17 0 9.388-7.612 17-17 17-9.39 0-17-7.612-17-17 0-9.39 7.61-17 17-17z" fill="#fff"/>
							  	</mask>
							  	<g mask="url(#gradient3)">
							    	<path d="M52.035-17.063c-28.838 0-37.272.03-38.911.166-5.919.492-9.601 1.424-13.613 3.421-3.092 1.536-5.53 3.316-7.937 5.81-4.383 4.55-7.04 10.147-8 16.8-.468 3.23-.604 3.89-.632 20.388-.01 5.5 0 12.737 0 22.445 0 28.815.032 37.24.17 38.877.478 5.759 1.382 9.382 3.294 13.345 3.655 7.586 10.636 13.281 18.86 15.406 2.847.733 5.992 1.137 10.03 1.328 1.71.075 19.146.128 36.592.128 17.446 0 34.892-.021 36.56-.106 4.676-.22 7.39-.585 10.392-1.36a28.92 28.92 0 0 0 18.859-15.439c1.875-3.867 2.826-7.628 3.257-13.086.093-1.19.132-20.163.132-39.111 0-18.95-.042-37.889-.136-39.079-.435-5.546-1.386-9.275-3.322-13.217-1.588-3.227-3.352-5.637-5.913-8.1-4.57-4.366-10.158-7.022-16.818-7.982-3.227-.467-3.87-.605-20.381-.634H52.035z" fill="url(#gradient1)"/>
							    	<path d="M52.035-17.063c-28.838 0-37.272.03-38.911.166-5.919.492-9.601 1.424-13.613 3.421-3.092 1.536-5.53 3.316-7.937 5.81-4.383 4.55-7.04 10.147-8 16.8-.468 3.23-.604 3.89-.632 20.388-.01 5.5 0 12.737 0 22.445 0 28.815.032 37.24.17 38.877.478 5.759 1.382 9.382 3.294 13.345 3.655 7.586 10.636 13.281 18.86 15.406 2.847.733 5.992 1.137 10.03 1.328 1.71.075 19.146.128 36.592.128 17.446 0 34.892-.021 36.56-.106 4.676-.22 7.39-.585 10.392-1.36a28.92 28.92 0 0 0 18.859-15.439c1.875-3.867 2.826-7.628 3.257-13.086.093-1.19.132-20.163.132-39.111 0-18.95-.042-37.889-.136-39.079-.435-5.546-1.386-9.275-3.322-13.217-1.588-3.227-3.352-5.637-5.913-8.1-4.57-4.366-10.158-7.022-16.818-7.982-3.227-.467-3.87-.605-20.381-.634H52.035z" fill="url(#gradient2)"/>
							  	</g>
							</svg>
						</div>
						<div class="follow-right">
							<p class="heading heading1"><?php the_field('main-instagram-title'); ?></p>
							<p class="text big-text"><?php the_field('main-instagram-text'); ?></p>
							<a href="<?php the_field('global-instagram', 'option'); ?>" class="link" target="_blank">
								<?php
									if ('ru' == pll_current_language()): echo 'Подписаться'; endif;
									if ('uk' == pll_current_language()): echo 'Підписатися'; endif;
									if ('en' == pll_current_language()): echo 'Subscribe'; endif;
								?>
							</a>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<?php if (get_field('main-optimization-text')): ?>
		<div class="promo">
			<div class="container">
				<div class="content">
					<?php the_field('main-optimization-text'); ?>
				</div>
			</div>
		</div>
	<?php endif; ?>

<?php get_footer(); ?>