{{-- resources/views/components/ui/card-anthology.blade.php 文集卡片组件。横向布局:封面左 + 内容右。 用于 anthology/index 列表。 Props: $item — 文集数据数组,包含以下字段: id, title, subtitle, description, cover_image, cover_gradient, author{name, avatar, color, initials}, chapters[], children_number, updated_at $href — 卡片链接 --}} @props([ 'item', 'href', ]) {{-- 封面 --}} {{-- 内容 --}}
{{ $item['title'] }}
@if(!empty($item['description']))
{{ $item['description'] }}
@endif
@if(!empty($item['chapters']))
@foreach(array_slice($item['chapters'], 0, 4) as $ch) {{ mb_strimwidth($ch, 0, 14, '…') }} @endforeach @if($item['children_number'] > 4) +{{ $item['children_number'] - 4 }} 章 @endif
@endif
{{ $item['updated_at'] }} {{ $item['children_number'] }} 章节