elemhouse.blade.php 2.35 KB
<div class="swiper-slide">
        <div class="card">
            <div class="card__top"><img src="images/card/card-img-1.jpg" alt="Фото недвижимости" loading="lazy">
                <h3 class="card__title">{{$house->typearea->name_type }}</h3>
                <div class="card__labels"><span class="card__label card__label-favorites js_card_favorites">
                                  <svg width="18" height="18">
                                    <use xlink:href="images/sprite.svg#card-favorites-empty"></use>
                                  </svg>
                                  <svg width="18" height="18">
                                    <use xlink:href="images/sprite.svg#card-favorites"></use>
                                  </svg></span><a class="card__label card__label-messenger" href="#">
                        <svg width="25" height="25">
                            <use xlink:href="images/sprite.svg#card-messenger"></use>
                        </svg></a></div>
            </div>
            <div class="card__cnt">
                <div class="card__info">
                    <address class="card__line card__line-complex">{{ $house->areas->name_area }}</address>
                    <address class="card__line">{{$house->metro}} ({{$house->description_metro  }})<span style="background-color: #FFC955;"></span></address>
                    <address class="card__line">{{$house->address }}</address>
                    <div class="card__line">Площадь: <b>{{$house->area}} м2</b></div>
                    <div class="card__line">Цена за м<sup>2</sup>: <b>{{ $house->price_m2 }}₽</b></div>
                </div>
                <? switch ($house->format_house) {
                    case 'Аренда':
                        $price = $house->rent_in_month;
                        $comment = "<span>в месяц</span>";
                        break;
                    case 'Продажа':
                        $price = $house->price;
                        $comment = "";
                        break;
                   }
                ?>
                <div class="card__price"><span>{{ $price }} ₽ </span><? echo $comment; ?>
                </div><a class="card__btn btn btn--bordered" href="{{ route('offer', ['house' => $house->id]) }}">Подробнее</a>
            </div>
        </div>
    </div>