@extends('layouts.nova')

@section('content')
<div class="container-fluid legacy-page">
    <div class="effect2 page-header-wrap">
        <header class="page-heading">
            <h1 class="page-header">{{ $page_title ?? 'Interviews' }}</h1>
            <p>List of interviews and their authors.</p>
        </header>
    </div>

    <div class="mb-3">
        @php \App\Banner::ShowResponsiveAd(); @endphp
    </div>

    <div class="panel panel-default">
        <div class="panel-body">
            <table class="table table-bordered table-striped">
                <tbody>
                @foreach($interviews as $interview)
                    <tr>
                        <td style="width:60px;">
                            @if(!empty($interview->icon))
                                <a href="/profile/{{ $interview->user_id }}/{{ \Illuminate\Support\Str::slug($interview->uname ?? '') }}">
                                    <img src="{{ \App\Support\AvatarUrl::forUser((int) $interview->user_id, null, 50) }}" width="50" height="50" alt="">
                                </a>
                            @else
                                <img src="/gfx/avatar.jpg" alt="">
                            @endif
                        </td>
                        <td>
                            <a href="/interview/{{ $interview->id }}/{{ \Illuminate\Support\Str::slug($interview->headline ?? '') }}">{{ $interview->headline }}</a>
                        </td>
                    </tr>
                @endforeach
                </tbody>
            </table>
        </div>
    </div>
</div>
@endsection
