post.blade.php 3.41 KB
@inject('request', 'Illuminate\Http\Request')
@inject('webpackAssets', 'FootyRoom\Support\WebpackAssets')

@extends('layouts.default')

@section('title', \FootyRoom\Support\Utils\Helpers::title($post->title))

@section('meta.og:image', $thumbnailUrl)
@section('meta.og:image:width', 353)
@section('meta.og:image:height', 200)

@push('meta')
	<meta property="og:title" content="{!! $post->title !!}"/>
	<meta property="og:type" content="article"/>
@endpush

@php
    $webpackAssets->require('web/public/js/dist/lemix');
@endphp

@push('dfp')
	<script type="text/javascript">
		freestar.queue.push(function() {
			googletag
				.defineSlot('/1873845/FR_RightSide_of_Vid', [[300, 250], [300, 600]], 'div-gpt-ad-1341915070098-0')
				.addService(googletag.pubads());
		});
	</script>
@endpush

@section('content')
	<script type="text/javascript">
		$.post('/views/{!! "post:{$post->id}" !!}');
	</script>

	<div class="site-tree">
		<a href="/">Home</a>
		<div class="separator"></div>
		<a href="/lemix">Le Mix</a>
		<div class="separator"></div>
		<a>{!! $post->title !!}</a>
	</div>

	<div id="mainBox">
		<div class="video-section clearfix">
			<div class="social-share">
				<a ng-click="fbShare($event)" ng-href="https://www.facebook.com/sharer.php?u={!! $request->url() !!}" target="blank"><img src="/pics/fb-share.png" /></a>
				<a href="https://twitter.com/intent/tweet?text={!! $post->title !!}&via=footyroom&url={!! $request->url() !!}" target="_blank"><img src="/pics/twitter-share.png" /></a>
			</div>

			<div class="video-section-wrap clearfix">
				<fr-media-viewer class="videos-wrap videos-wrap--lemix"></fr-media-viewer>
				<script type="text/ng-template" id="media-viewer-template">
					<?php include(base_path('public/views/ng/media/viewer.html'));?>			
				</script>
			</div>
			
			<script type="text/javascript">
				DataStore.media = {!! json_encode([$video]) !!};
			</script>
			
			<fr-media-list ng-show="false"></fr-media-list>
			<script type="text/ng-template" id="media-list-template">
				<?php include(base_path('public/views/ng/media/list.html'));?>
			</script>
		</div>
	</div>

	<div class="after-content clearfix">
		<div class="discussion-col">
			@compose('comments/discussion', 'DiscussionComposer', 'post:'.$post->id, $user())
			@compose('comments/commenter', 'CommenterComposer', $post->id, $user())
		</div>
		<div class="aside-col">
			<div class="aside-ad">
				<!-- FR_RightSide_of_Vid -->
				<div id='div-gpt-ad-1341915070098-0' data-refresh-time="-1">
				<script type='text/javascript'>
				freestar.queue.push(function() { googletag.display('div-gpt-ad-1341915070098-0'); });
				</script>
				</div>
			</div>

			<div class="related">
				<div class="related-title">More from <a href="/lemix">Le Mix</a></div>
				<div class="row small-gutter">
					@foreach ($relatedPosts as $relatedPost)
						<div class="col-xs-12 col-ms-4 col-sm-12">
							<a class="postcard postcard--related" href="{!! $relatedPost->url !!}">
								<div class="postcard-image" style="background: url({!! $relatedPost->thumbnailUrl !!}) center center / cover no-repeat;"></div>
								<div class="postcard-text">
									<div class="postcard-text-overlay"></div>
									<div class="postcard-title">{!! $relatedPost->title !!}</div>
									<div class="postcard-meta">{!! \FootyRoom\Support\Helpers\TimeAgo::from($relatedPost->date) !!}</div>
								</div>
							</a>
						</div>
					@endforeach
				</div>
			</div>
		</div>
	</div>
@endsection