index_catalog.blade.php 4.23 KB
@if ($goods->count())
    @foreach ($goods as $good_new)
        <div class="content-item">
            <div class="swiper swiper-catalog swiperCatalog">
                <div class="swiper-icons">
                    <div class="swiper-icons-left">
                        <svg class="swiper-icons-left__clock">
                            <use xlink:href="./img/icons.svg#clock"></use>
                        </svg>
                        <p class="swiper-icons-left__text">Под заказ</p>
                    </div>
                    <div class="swiper-icons-right">
                        <span class="swiper-icons-right__compare js_compare"></span>
                        <span class="swiper-icons-right__favorite js_favorite"></span>
                    </div>
                </div>

                <div class="swiper-wrapper">
                    @if (!empty($good_new->image))
                        <div class="swiper-slide"><img src="{{ asset(Storage::url($good_new->image)) }}" width="280px" alt=""></div>
                @endif
                <!--<div class="swiper-slide"><img src="./img/main/catalog/cat-1.png" alt=""></div>
                                <div class="swiper-slide"><img src="./img/main/catalog/cat-1.png" alt=""></div>-->
                </div>
                <div class="swiper-pagination"></div>
            </div>
            <div class="content-text">
                <a class="content-text-hover" href="{{ route('good', ['good' => $good_new->id]) }}">
                    <p>
                        {{$good_new->text}}
                    </p>
                </a>
                <h5 class="content-text__title">
                    {{ $good_new->title }}
                </h5>
                <div class="content-info">
                    <div class="info-one">
                        <? //if ((!empty($good_new->diametr_min)) && ($good_new->diametr_min > 0) &&
                        //(!empty($good_new->diametr_max)) && ($good_new->diametr_max > 0)) {?>
                        <p class="info-one__par"><span class="content-info__par-title">⌀ обработки:</span> {{$good_new->diametr_min}}-{{$good_new->diametr_max}} мм
                        </p>
                        <? //} ?>
                        <? //if ((!empty($good_new->RMC_min)) && ($good_new->RMC_min > 0) &&
                        //(!empty($good_new->RMC_max)) && ($good_new->RMC_max > 0)) {
                        ?>
                        <p class="info-one__par"><span class="content-info__par-title">РМЦ</span> {{$good_new->RMC_min}} - {{$good_new->RMC_max}} мм</p>
                        <? //} ?>
                        <p class="info-one__par"><span>Мощность</span> {{$good_new->power}} кВт</p>
                        <p class="info-one__par"><span>Вес</span> {{$good_new->weight}} кг</p>
                    </div>
                    <div class="info-two">
                        <p class="info-two__title">Производитель:</p>
                        <div class="info-two-wrapper">
                            <img class="info-two-wrapper__country" src="{{ asset('/img/main/catalog/country/'.$good_new->country.'.svg') }}" alt="">
                            <span class="info-two-wrapper__name">{{ $good_new->manufacturer }}</span>
                        </div>
                    </div>
                </div>
                <div class="content-text-down">
                    <? if (!empty($good_new->price)) { ?>
                    @if ($good_new->price_old > 0)
                        <span class="content-text-down__before content-text-down__before--active">{{$good_new->price_old}} ₽</span>
                    @endif
                    @if ($good_new->price > 0)
                        <p class="content-text-down__price">
                            {{$good_new->price}} ₽
                        </p>
                    @endif
                    <a class="content-text-down__button" href="{{ route('catalog_detail', ['category'=> $good_new->category_id]) }}">В каталог</a>
                    <? } else {?>
                    <button class="content-text-down__calculate">Узнать цену</button>
                    <? } ?>
                </div>
            </div>
        </div>
    @endforeach
@endif