videoPost.blade.php 1.3 KB
<div class="col-xs-12 col-ms-6 col-md-4 card {{ @$postCssClass }}">
	<div class="card-image">
		<a href="{{ $post->url }}">
			<img src="{{ $post->thumbnailUrl }}" />
		</a>

		@if ($post->viewCount > 0 || $post->commentCount > 0)
			<div class="card-info">
				@if ($post->viewCount > 0)
					<div class="views-count"><span class="icon"></span>{{ $post->viewCount }}</div>
				@endif
				@if ($post->commentCount > 0)
					<div class="comments-count"><span class="icon"></span>{{ $post->commentCount }}</div>
				@endif
			</div>
		@endif
	</div>
	
	<header class="card-title">
		<a href="{{ $post->url }}" target="_blank" class="spoiler">{{ $post->title }}</a>
		<a href="{{ $post->url }}" target="_blank" class="not-spoiler">{{ $post->titleNoSpoilers or $post->title }}</a>
	</header>
	
	@if (isset($post->competitionId))
		<a class="card-category" href="{!! route('competition', [
			'slug' => \Illuminate\Support\Str::slug($post->competitionName),
			'id' => $post->competitionId
		]) !!}">{{ $post->competitionName }}</a>
	@elseif (isset($post->categoryUrl))
		<a class="card-category" href="{{ $post->categoryUrl }}">{{ $post->categoryName }}</a>
	@endif
	
	@if (@$legendary && isset($post->stageName))
		{{ ' - ' . $post->stageName }}
	@endif
	<span fr-easy-time-ago date="{{ $post->date }}" class="card-time"></span>
</div>