123456789101112131415161718192021222324252627282930313233 |
- @php
- $w = "width: ". (isset($width) ? $width : 2) ."rem";
- $w2 = "width: calc(100% - " . (isset($width) ? $width : 2) ."rem)";
- $h = "height: ". ((isset($width) ? $width : 2) / 3 * 4) ."rem";
- @endphp
- @if(!$recom)
- <dl class="x-book x-book--multi {{$class or ''}}">
- <dt class="x-book__coverbox" style="{{$w.';'.$h}}">
- @if ($book->cover_url)
- <img src="{{ $book->cover_url }}" class="x-book__cover" style="{{$w.';'.$h}}">
- @else
- <img src="https://yueduyun.oss-cn-hangzhou.aliyuncs.com/book/cover/loading.png" class="x-book__cover" style="{{$w.';'.$h}}">
- @endif
- </dt>
- <dd class="x-book__text--multi" style="{{$w2.';'.$h}}">
- {{ $slot }}
- </dd>
- </dl>
- @else
- <a href="/detail?bid={{ $book['book_id']}}">
- <dl class="x-book {{$class or ''}}" style="{{$w}}">
- <dt class="x-book__coverbox">
- @if ($book['cover_url'])
- <img src="{{ $book['cover_url'] }}" class="x-book__cover" style="{{$w.';'.$h}}">
- @else
- <img src="https://yueduyun.oss-cn-hangzhou.aliyuncs.com/book/cover/loading.png" class="x-book__cover" style="{{$w.';'.$h}}">
- @endif
- </dt>
- <dd class="x-book__text--normal">{{ $book['book_name'] }}</dd>
- </dl>
- </a>
- @endif
|