@extends('profilelayout')
@section('content')
    <div class="page-header">
    	    <div class="page">
        {!! $videos->render() !!}
    </div>
        <form method="get">
	<button type="submit" class="suchbutton"><i style="color:white;" class="fa fa-search"></i></button>
            {!! Form::text('q', isset($q) ? $q : null, ['class' => 'suchleiste', 'placeholder' => 'Search w0bm.com']) !!}
        </form>
    </div>

    <div class="items">
    	@foreach($videos as $video)
            <?php
                $thumb = str_replace(".webm","",$video->file);
            ?>
            <div class="main-item">
            <a href="/{{$video->id}}">
            {{-- MUSS UNBEDINGT NOCH ANGEPASST WERDEN!!! --}}
            @if(file_exists('/home/sirx/web/devw0bm/w0bm.com/public/thumbs/beta/'.$thumb.'.png'))
    			<img src="/thumbs/beta/{{$thumb}}.png">
				@else
    			{{$video->tesThumb()}}
    			<img src="/thumbs/beta/{{$thumb}}.png">
			@endif
			</a>
			</div>
        @endforeach
    </div>
@endsection
