Custom WooCommerce theme for orgsteklo.ru including: - Product catalog with category/subcategory hierarchy - Custom checkout with delivery calculation - Price calculator - Admin settings panel - Search functionality - User account pages
121 lines
11 KiB
PHP
121 lines
11 KiB
PHP
<!--
|
|
Template Name: Шаблон Документация
|
|
-->
|
|
<?php get_header(); ?>
|
|
<main>
|
|
<nav class="breadcumbs container">
|
|
<ul>
|
|
<li><a href="/">Главная</a></li>
|
|
<li><p class="breadcumbs-separator">/</p></li>
|
|
<li><p><?php echo the_title(); ?></p></li>
|
|
</ul>
|
|
</nav>
|
|
<?php
|
|
$documentation_title = get_field('documentation_title');
|
|
$documentation_repeats = get_field('documentation_repeat');
|
|
if($documentation_repeats) {
|
|
?>
|
|
<section class="documentation">
|
|
<div class="documentation-container container">
|
|
<?php
|
|
if($documentation_title) {
|
|
echo '<h1>' . $documentation_title . '</h1>';
|
|
}
|
|
?>
|
|
<?php
|
|
if($documentation_repeats) {
|
|
?>
|
|
<div class="documentation-main">
|
|
<div class="documentation-tabs">
|
|
<?php
|
|
$first_tab = true;
|
|
foreach ($documentation_repeats as $documentation_repeat) {
|
|
$documentation_repeat_title = $documentation_repeat['documentation_repeat_title'];
|
|
$active_tab = $first_tab ? ' active' : '';
|
|
echo '<button class="documentation-tab' . $active_tab . '">' . $documentation_repeat_title . '</button>';
|
|
$first_tab = false;
|
|
}
|
|
?>
|
|
</div>
|
|
<div class="documentation-mob">
|
|
<?php $first_title = !empty($documentation_repeats) ? $documentation_repeats[0]['documentation_repeat_title'] : ''; ?>
|
|
<button class="documentation-mob__button">
|
|
<p><?php echo $first_title; ?></p>
|
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.9485 5.45312H7.79512H4.05512C3.41512 5.45312 3.09512 6.22646 3.54845 6.67979L7.00179 10.1331C7.55512 10.6865 8.45512 10.6865 9.00845 10.1331L10.3218 8.81979L12.4618 6.67979C12.9085 6.22646 12.5885 5.45312 11.9485 5.45312Z" fill="#2C3846"/></svg>
|
|
</button>
|
|
<div class="documentation-mob__content">
|
|
<?php
|
|
$first_tab2 = true;
|
|
foreach ($documentation_repeats as $documentation_repeat) {
|
|
$documentation_repeat_title = $documentation_repeat['documentation_repeat_title'];
|
|
$active_tab2 = $first_tab2 ? ' active' : '';
|
|
echo '<button class="documentation-mob__item' . $active_tab2 . '"><p>' . $documentation_repeat_title . '</p><svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.00065 1.3335C4.32732 1.3335 1.33398 4.32683 1.33398 8.00016C1.33398 11.6735 4.32732 14.6668 8.00065 14.6668C11.674 14.6668 14.6673 11.6735 14.6673 8.00016C14.6673 4.32683 11.674 1.3335 8.00065 1.3335ZM11.1873 6.46683L7.40732 10.2468C7.31398 10.3402 7.18732 10.3935 7.05398 10.3935C6.92065 10.3935 6.79398 10.3402 6.70065 10.2468L4.81398 8.36016C4.62065 8.16683 4.62065 7.84683 4.81398 7.6535C5.00732 7.46016 5.32732 7.46016 5.52065 7.6535L7.05398 9.18683L10.4807 5.76016C10.674 5.56683 10.994 5.56683 11.1873 5.76016C11.3807 5.9535 11.3807 6.26683 11.1873 6.46683Z" fill="#02ADEF"/></svg></button>';
|
|
$first_tab2 = false;
|
|
}
|
|
?>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
$first_tab3 = true;
|
|
foreach ($documentation_repeats as $documentation_repeat) {
|
|
$documentation_repeat_title = $documentation_repeat['documentation_repeat_title'];
|
|
$documentation_repeat_repeats = $documentation_repeat['documentation_repeat_repeat'];
|
|
$active_tab3 = $first_tab3 ? ' active' : '';
|
|
echo '<div class="documentation-content' . $active_tab3 . '">';
|
|
echo '<h2>' . $documentation_repeat_title . '</h2>';
|
|
echo '<div class="documentation-col">';
|
|
echo '<div class="documentation-items">';
|
|
$count = count($documentation_repeat_repeats);
|
|
foreach ($documentation_repeat_repeats as $index => $documentation_repeat_repeat) {
|
|
$documentation_repeat_repeat_title = $documentation_repeat_repeat['documentation_repeat_repeat_title'];
|
|
$documentation_repeat_repeat_format = $documentation_repeat_repeat['documentation_repeat_repeat_format'];
|
|
$documentation_repeat_repeat_razmer = $documentation_repeat_repeat['documentation_repeat_repeat_razmer'];
|
|
$documentation_repeat_repeat_file = $documentation_repeat_repeat['documentation_repeat_repeat_file'];
|
|
$documentation_repeat_repeat_file_url = $documentation_repeat_repeat_file ? esc_url($documentation_repeat_repeat_file['url']) : '';
|
|
$item_class = ($index < 18) ? 'documentation-item' : 'documentation-item hidden';
|
|
echo '<div class="' . $item_class . '">';
|
|
echo '<a href="' . $documentation_repeat_repeat_file_url . '" class="documentation-item__title">' . $documentation_repeat_repeat_title . '</a>';
|
|
echo '<div class="documentation-item__row">';
|
|
echo '<div class="documentation-item__info">';
|
|
if($documentation_repeat_repeat_format) {
|
|
echo '<p>' . $documentation_repeat_repeat_format . '</p>';
|
|
}
|
|
if($documentation_repeat_repeat_razmer) {
|
|
echo '<p>' . $documentation_repeat_repeat_razmer . '</p>';
|
|
}
|
|
echo '</div>';
|
|
echo '<a href="' . $documentation_repeat_repeat_file_url . '" class="documentation-item__download" download=""><svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_3011_8559)"><path d="M6.58516 12.0813C6.77089 12.2672 6.99143 12.4146 7.23416 12.5152C7.4769 12.6158 7.73707 12.6676 7.99983 12.6676C8.26258 12.6676 8.52275 12.6158 8.76549 12.5152C9.00822 12.4146 9.22876 12.2672 9.41449 12.0813L11.5552 9.94067C11.6699 9.81373 11.7315 9.64752 11.7271 9.47644C11.7227 9.30536 11.6527 9.14253 11.5316 9.02165C11.4104 8.90077 11.2474 8.8311 11.0764 8.82707C10.9053 8.82304 10.7392 8.88496 10.6125 9L8.66182 10.9513L8.66649 0.666667C8.66649 0.489856 8.59625 0.320286 8.47123 0.195262C8.34621 0.0702379 8.17664 0 7.99983 0V0C7.82301 0 7.65344 0.0702379 7.52842 0.195262C7.4034 0.320286 7.33316 0.489856 7.33316 0.666667L7.32716 10.9387L5.38716 9C5.26206 8.875 5.09244 8.8048 4.91559 8.80486C4.73874 8.80493 4.56916 8.87524 4.44416 9.00033C4.31915 9.12543 4.24896 9.29506 4.24902 9.4719C4.24909 9.64875 4.3194 9.81833 4.44449 9.94333L6.58516 12.0813Z" fill="#02ADEF"/><path d="M15.3333 10.6665C15.1565 10.6665 14.987 10.7367 14.8619 10.8618C14.7369 10.9868 14.6667 11.1564 14.6667 11.3332V13.9998C14.6667 14.1766 14.5964 14.3462 14.4714 14.4712C14.3464 14.5963 14.1768 14.6665 14 14.6665H2C1.82319 14.6665 1.65362 14.5963 1.5286 14.4712C1.40357 14.3462 1.33333 14.1766 1.33333 13.9998V11.3332C1.33333 11.1564 1.2631 10.9868 1.13807 10.8618C1.01305 10.7367 0.843478 10.6665 0.666667 10.6665C0.489856 10.6665 0.320286 10.7367 0.195262 10.8618C0.0702379 10.9868 0 11.1564 0 11.3332L0 13.9998C0 14.5303 0.210714 15.039 0.585786 15.414C0.960859 15.7891 1.46957 15.9998 2 15.9998H14C14.5304 15.9998 15.0391 15.7891 15.4142 15.414C15.7893 15.039 16 14.5303 16 13.9998V11.3332C16 11.1564 15.9298 10.9868 15.8047 10.8618C15.6797 10.7367 15.5101 10.6665 15.3333 10.6665Z" fill="#02ADEF"/></g><defs><clipPath id="clip0_3011_8559"><rect width="16" height="16" fill="white"/></clipPath></defs></svg></a>'; // оставить SVG как есть
|
|
echo '</div>';
|
|
echo '<div class="documentation-item__mob">';
|
|
echo '<a href="' . esc_url($documentation_repeat_repeat_file['url']) . '" class="documentation-item__title">' . $documentation_repeat_repeat_title . '</a>';
|
|
echo '<div class="documentation-item__info">';
|
|
if($documentation_repeat_repeat_format) {
|
|
echo '<p>' . $documentation_repeat_repeat_format . '</p>';
|
|
}
|
|
if($documentation_repeat_repeat_razmer) {
|
|
echo '<p>' . $documentation_repeat_repeat_razmer . '</p>';
|
|
}
|
|
echo '</div>';
|
|
echo '</div>';
|
|
echo '</div>';
|
|
}
|
|
echo '</div>';
|
|
if ($count > 18) {
|
|
echo '<button class="categories-more documentation-more">Загрузить еще<svg width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_3004_541)"><path d="M7.99981 1.83327C8.88415 1.83617 9.75913 2.01443 10.5741 2.35773C11.3891 2.70103 12.1279 3.20255 12.7478 3.83327H10.6665C10.4897 3.83327 10.3201 3.90351 10.1951 4.02854C10.07 4.15356 9.99981 4.32313 9.99981 4.49994C9.99981 4.67675 10.07 4.84632 10.1951 4.97134C10.3201 5.09637 10.4897 5.16661 10.6665 5.16661H13.4285C13.7568 5.16643 14.0715 5.03594 14.3037 4.80381C14.5358 4.57168 14.6663 4.25689 14.6665 3.92861V1.16661C14.6665 0.989796 14.5962 0.820226 14.4712 0.695202C14.3462 0.570178 14.1766 0.49994 13.9998 0.49994V0.49994C13.823 0.49994 13.6534 0.570178 13.5284 0.695202C13.4034 0.820226 13.3331 0.989796 13.3331 1.16661V2.55194C12.2313 1.55958 10.8749 0.893546 9.41587 0.628439C7.95688 0.363332 6.45289 0.509614 5.07233 1.0509C3.69177 1.5922 2.48915 2.50712 1.59915 3.69322C0.709148 4.87932 0.166904 6.28977 0.0331428 7.76661C0.0245317 7.85945 0.0353533 7.95306 0.0649181 8.04149C0.0944829 8.12991 0.142143 8.21121 0.20486 8.2802C0.267578 8.34919 0.343979 8.40436 0.429195 8.44219C0.514411 8.48002 0.606573 8.49969 0.699809 8.49994V8.49994C0.862868 8.50202 1.02083 8.44317 1.14278 8.3349C1.26473 8.22664 1.34189 8.07676 1.35914 7.91461C1.50755 6.25511 2.27113 4.71108 3.49986 3.58583C4.7286 2.46059 6.33369 1.83547 7.99981 1.83327Z" fill="white"></path><path d="M15.3003 8.50005C15.1373 8.49798 14.9793 8.55683 14.8574 8.66509C14.7354 8.77335 14.6583 8.92323 14.641 9.08539C14.5308 10.3542 14.059 11.5648 13.2814 12.5735C12.5039 13.5823 11.4534 14.3468 10.2544 14.7764C9.0555 15.2061 7.75847 15.2828 6.51724 14.9975C5.27601 14.7122 4.14267 14.0768 3.25167 13.1667H5.33301C5.50982 13.1667 5.67939 13.0965 5.80441 12.9715C5.92944 12.8464 5.99967 12.6769 5.99967 12.5001C5.99967 12.3233 5.92944 12.1537 5.80441 12.0287C5.67939 11.9036 5.50982 11.8334 5.33301 11.8334H2.57101C2.40841 11.8333 2.24738 11.8653 2.09714 11.9275C1.9469 11.9896 1.81039 12.0808 1.69541 12.1958C1.58044 12.3108 1.48925 12.4473 1.42707 12.5975C1.36488 12.7478 1.33292 12.9088 1.33301 13.0714V15.8334C1.33301 16.0102 1.40325 16.1798 1.52827 16.3048C1.65329 16.4298 1.82286 16.5001 1.99967 16.5001C2.17649 16.5001 2.34605 16.4298 2.47108 16.3048C2.5961 16.1798 2.66634 16.0102 2.66634 15.8334V14.4481C3.76823 15.4404 5.12462 16.1065 6.58361 16.3716C8.0426 16.6367 9.54659 16.4904 10.9272 15.9491C12.3077 15.4078 13.5103 14.4929 14.4003 13.3068C15.2903 12.1207 15.8326 10.7102 15.9663 9.23339C15.975 9.14055 15.9641 9.04694 15.9346 8.95851C15.905 8.87008 15.8573 8.78879 15.7946 8.7198C15.7319 8.65081 15.6555 8.59564 15.5703 8.5578C15.4851 8.51997 15.3929 8.5003 15.2997 8.50005H15.3003Z" fill="white"></path></g><defs><clipPath id="clip0_3004_541"><rect width="16" height="16" fill="white" transform="translate(0 0.5)"></rect></clipPath></defs></svg></button>';
|
|
}
|
|
echo '</div>';
|
|
echo '</div>';
|
|
$first_tab3 = false;
|
|
}
|
|
?>
|
|
</div>
|
|
<?php
|
|
}
|
|
?>
|
|
</div>
|
|
</section>
|
|
<?php
|
|
}
|
|
?>
|
|
</main>
|
|
<?php get_footer(); ?>
|