@extends('business.layouts.base-noheader')

@section('contents')
<style type="text/css" media="print">
    @page {
        size: A4 landscape;
    }


 </style>
<style type="text/css">
.p-print {
  width: 251mm;
  height: 182mm;
  margin:18mm auto 0 auto;
  page-break-after: always;
    padding: 3px 0;
    margin: 0px auto;
    color: #000;
}
_::-webkit-full-page-media, _:future, :root .p-print {
  margin:0 auto;
}
.p-print:last-child{
   page-break-after: avoid;
}
.sheet {
    text-align:center;
    color: #7A7A7A;
    width: 100%;
    height: 100%;
    margin: 0 auto;
    border: 1px solid #7A7A7A;
    /*page-break-after: always;*/
}

.sheet img {
    width: 100%;
}
.head-print{
    width: 251mm;
    margin: auto;
    padding: 9mm 0 0 0;
    page-break-after: always;
    color: #000;
}
.f-left {
    float: left;
}
.f-right {
    float: right;
}
.print_header p {
    margin-bottom: 0 !important;
}
</style>
<div class="head-print">
    <div class="print_header">
        <p class="f-left"><b>
                @if(strstr($_SERVER["REQUEST_URI"],'close'))
                    成約物件
                @else
                    売出物件
                @endif
            </b></p>
        @if(isset($set_count))
            <p class="f-right"><b>該当件数：1</b></p>
        @else
            <p class="f-right"><b>該当件数：{{$total - count($items->whereIn('building_id', $hide_items))}}</b></p>
        @endif

        <div class="clear"></div>
        <hr>
    </div>
</div>
@foreach($items as $item)
<section class="p-print">
    <div class="sheet" style="padding-top: 10px">
@if(!empty($item->disp_sheet_file))
<img src="{{$item->disp_sheet_file}}" style="max-height: 794px; height: 100%;">
@else
<img src="{{root('img/noimage2.jpg')}}" style="max-height: 794px; height: 100%;"/>
@endif
    </div>
</section>
@endforeach

@endsection
