<commit_before>@extends('layout.main')
	@section('content')
	{{-- <pre>{{print_r($items)}}</pre> --}}
		<div class="col-lg-8 col-lg-offset-2 col-md-8 col-md-offset-2 col-sm-8 col-sm-offset-2 col-xs-12 well well-sm">
			
			@foreach($items as $item)
			{{-- <pre> json_encode($item) </pre> --}}
			<div class="item" id="{{ $item['id'] }}">
				<div class="item-user panel panel-default">
						<a href="{{ action('UsersController@show', $item['user']['username']) }}"><img src="{{ $item['user']['profile_img'][0]['url'] }}" class="item-user-img img-circle"></a>
						<a href="{{ action('UsersController@show', $item['user']['username']) }}" class="h4 name">{{ $item['user']['name'] }} </a> <a href="{{ action('UsersController@show', $item['user']['username']) }}"class="h5 username text-primary">{{ '@' . $item['user']['username'] }}</a>
				</div>

				<div class="thumbnail">
					<div class="caption">
        				<a href="{{ action('BuyController@create', $item['id']) }}"><h3>{{{ $item['title'] }}}</h3></a>
        			</div>

        			<div class="img-gallery">
						@foreach($item['photos'] as $photo)
      						<div class="gallery-item">
      							<img draggable="false" src="{{ $photo['url'] }}" class="img-responsive" alt="...">
      						</div>
      					@endforeach
      				</div>

      				<div class="caption">
        				<a href="{{ action('BuyController@create', $item['id']) }}" class="btn btn-primary btn-lg btn-block h3" role="button">Buy now for {{$item['currency']}}{{$item['price']}}</a>
      				</div>

    			</div>
        				<form action="{{ action('CommentsController@store') }}" method="post" class="">
        					{{ Form::token() }}
        					<input type="hidden" name="item_id" value="{{ $item['id'] }}">
        					<input type="text" name="comment" placeholder="Write a comment..." class="panel panel-default form-control h6">
        				</form>

        				@foreach($item['comment'] as $comment)
	        				<div class="panel panel-default item-user comment">
	        					<a href="{{{ action('UsersController@show', $comment['user']['username']) }}}"><img src="{{ $comment['user']['profile_img'][0]['url'] }}" class="profile-img img-circle"></a>
								<a href="{{{ action('UsersController@show', $comment['user']['username']) }}}"class="h6 text-primary">{{ '@' . $comment['user']['username'] }}</a>
								<span class="h6">{{{ $comment['comment'] }}}</span>

								@if($comment['user_id'] == Auth::user()->id)
								{{ Form::open(['action' => array('CommentsController@destroy', $comment['id']), 'method' => 'delete']) }}
								    <button value="submit" class="glyphicon glyphicon-trash btn btn-danger btn-sm del-btn"></button>
								{{Form::close()}}
								@endif
	        				</div>
        				@endforeach

    		</div>
			@endforeach
		{{ $paginator->links() }}<commit_msg>Makes comment auto link hashtags etc. by adding .autolink-text class<commit_after>@extends('layout.main')
	@section('content')
	{{-- <pre>{{print_r($items)}}</pre> --}}
		<div class="col-lg-8 col-lg-offset-2 col-md-8 col-md-offset-2 col-sm-8 col-sm-offset-2 col-xs-12 well well-sm">
			
			@foreach($items as $item)
			{{-- <pre> json_encode($item) </pre> --}}
			<div class="item" id="{{ $item['id'] }}">
				<div class="item-user panel panel-default">
						<a href="{{ action('UsersController@show', $item['user']['username']) }}"><img src="{{ $item['user']['profile_img'][0]['url'] }}" class="item-user-img img-circle"></a>
						<a href="{{ action('UsersController@show', $item['user']['username']) }}" class="h4 name">{{ $item['user']['name'] }} </a> <a href="{{ action('UsersController@show', $item['user']['username']) }}"class="h5 username text-primary">{{ '@' . $item['user']['username'] }}</a>
				</div>

				<div class="thumbnail">
					<div class="caption">
        				<a href="{{ action('BuyController@create', $item['id']) }}"><h3>{{{ $item['title'] }}}</h3></a>
        			</div>

        			<div class="img-gallery">
						@foreach($item['photos'] as $photo)
      						<div class="gallery-item">
      							<img draggable="false" src="{{ $photo['url'] }}" class="img-responsive" alt="...">
      						</div>
      					@endforeach
      				</div>

      				<div class="caption">
        				<a href="{{ action('BuyController@create', $item['id']) }}" class="btn btn-primary btn-lg btn-block h3" role="button">Buy now for {{$item['currency']}}{{$item['price']}}</a>
      				</div>

    			</div>
        				<form action="{{ action('CommentsController@store') }}" method="post" class="">
        					{{ Form::token() }}
        					<input type="hidden" name="item_id" value="{{ $item['id'] }}">
        					<input type="text" name="comment" placeholder="Write a comment..." class="panel panel-default form-control h6">
        				</form>

        				@foreach($item['comment'] as $comment)
	        				<div class="panel panel-default item-user comment">
	        					<a href="{{{ action('UsersController@show', $comment['user']['username']) }}}"><img src="{{ $comment['user']['profile_img'][0]['url'] }}" class="profile-img img-circle"></a>
								<a href="{{{ action('UsersController@show', $comment['user']['username']) }}}"class="h6 text-primary">{{ '@' . $comment['user']['username'] }}</a>
								<span class="h6 autolink-text">{{{ $comment['comment'] }}}</span>

								@if($comment['user_id'] == Auth::user()->id)
								{{ Form::open(['action' => array('CommentsController@destroy', $comment['id']), 'method' => 'delete']) }}
								    <button value="submit" class="glyphicon glyphicon-trash btn btn-danger btn-sm del-btn"></button>
								{{Form::close()}}
								@endif
	        				</div>
        				@endforeach

    		</div>
			@endforeach
		{{ $paginator->links() }}
{'fraction_non_alphanumeric': 0.2511692360990819, 'fraction_numerical': 0.00623592586177031, 'mean_word_length': 3.2865627319970305, 'pattern_counts': {'":': 0, '<': 99, '<?xml version=': 0, '>': 107, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '355596', 'n_tokens_mistral': 2184, 'n_tokens_neox': 1845, 'n_words': 354}