house_mini.blade.php 3.05 KB
<div class="card">
            <div class="card__top">
                @if (empty($house->foto_main))

                @else
                <img src="/storage/app/public/<?=$house->foto_main; //asset(Storage::url($house->foto_main)) ?>"  alt="{{ $house->title }}" loading="lazy"/>
                @endif;

                <h3 class="card__title">{{$house->typearea->name_type }}</h3>
                <div class="card__labels"><span class="card__label card__label-favorites js_card_favorites <?=\App\Classes\RusDate::selected_item($house->id);?>" data-val="{{$house->id}}" id="card_favorite{{$house->id}}" name="card_favorite{{$house->id}}">
                                  <svg width="18" height="18">
                                    <use xlink:href="{{ asset('images/sprite.svg#card-favorites-empty') }}"></use>
                                  </svg>
                                  <svg width="18" height="18">
                                    <use xlink:href="{{ asset('images/sprite.svg#card-favorites') }}"></use>
                                  </svg></span>
                    <a class="card__label card__label-messenger" href="tel:{{ $items_contact[0]->telephone }}">
                        <svg width="25" height="25">
                            <use xlink:href="{{ asset('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 'Аренда':
                        $comment = "<span>в месяц</span>";
                        break;
                    case 'Продажа':
                        $comment = "";
                        break;
                    case 'Бизнес':
                        $comment= "<span>в месяц</span>";
                        break;
                    case 'Арендованные':
                        $comment = "<span>в месяц</span>";
                        break;
                    default:
                        $comment = "<span>в месяц</span>";
                        break;
                   }
                ?>
                <div class="card__price"><span>{{ $house->price }} ₽ </span><? echo $comment; ?>
                </div><a class="card__btn btn btn--bordered" href="{{ route('offer', ['house' => $house->id]) }}">Подробнее</a>
            </div>
        </div>