@extends('layout')
@section('content')
    <div class="page-header">
        <h3>Categories</h3>
    </div>
    <div class="" id="categories">
        @foreach($categories as $category)
            <div id="category_box_{{$category->shortname}}" class="col-sm-6 col-md-4 category">
                <div class="thumbnail">
                    <img src="{{ asset('/images/cat/' . $category->shortname . '.webp') }}" alt="{{$category->name}}">
                    <div class="caption">
                        <h3>{{$category->name}} <small>{{$category->videos()->count()}}</small></h3>
                        <p>{{$category->description}}</p>
                        <p><a href="{{$category->shortname}}" class="btn btn-primary" role="button">View</a></p>
                    </div>
                </div>
            </div>
        @endforeach
    </div>
@endsection
