Initial commit
This commit is contained in:
58
resources/views/themexingkong/catalog.blade.php
Executable file
58
resources/views/themexingkong/catalog.blade.php
Executable file
@@ -0,0 +1,58 @@
|
||||
@extends('themes::themexingkong.layout')
|
||||
|
||||
@php
|
||||
$years = Cache::remember('all_years', \Backpack\Settings\app\Models\Setting::get('site_cache_ttl', 5 * 60), function () {
|
||||
return \VsMov\Core\Models\Movie::select('publish_year')->distinct()->pluck('publish_year')->sortDesc();
|
||||
});
|
||||
@endphp
|
||||
|
||||
@push('header')
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="col-lg-wide-8 col-xs-1 padding-0">
|
||||
<div class="stui-pannel stui-pannel-bg clearfix">
|
||||
<div class="stui-pannel-box">
|
||||
<div class="stui-pannel_hd">
|
||||
@include('themes::themexingkong.inc.catalog_filter')
|
||||
</div>
|
||||
<div class="stui-pannel_hd">
|
||||
<h1>{{ $section_name }}</h1>
|
||||
</div>
|
||||
<div class="stui-pannel_bd">
|
||||
<ul class="stui-vodlist clearfix">
|
||||
@foreach ($data as $movie)
|
||||
<li class="col-md-5 col-sm-4 col-xs-3">
|
||||
<div class="stui-vodlist__box">
|
||||
<a class="stui-vodlist__thumb lazyload" href="{{ $movie->getUrl() }}"
|
||||
title="{{ $movie->name }}" data-original="{{ $movie->getThumbUrl() }}">
|
||||
<span class="play hidden-xs"></span>
|
||||
<span class="pic-text text-right">{{ $movie->episode_current }}</span>
|
||||
</a>
|
||||
<div class="stui-vodlist__detail">
|
||||
<h4 class="title text-overflow">
|
||||
<a href="{{ $movie->getUrl() }}"
|
||||
title="{{ $movie->name }}">{{ $movie->name }}</a>
|
||||
</h4>
|
||||
<p class="text text-overflow text-muted hidden-xs">{{ $movie->origin_name }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ $data->appends(request()->all())->links('themes::themexingkong.inc.pagination') }}
|
||||
</div>
|
||||
@include('themes::themexingkong.inc.right_bar')
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
$(".score").each(function() {
|
||||
var star = $(this).find(".branch").text().replace(".", "0.");
|
||||
$(this).find("#score").css("width", "" + star + "%");
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
425
resources/views/themexingkong/episode.blade.php
Executable file
425
resources/views/themexingkong/episode.blade.php
Executable file
@@ -0,0 +1,425 @@
|
||||
@extends('themes::themexingkong.layout')
|
||||
|
||||
@push('header')
|
||||
<style>
|
||||
#wrapper-video {
|
||||
height: 505px !important;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 500px) {
|
||||
#wrapper-video {
|
||||
height: 210px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 501px) and (max-width: 767px) {
|
||||
#wrapper-video {
|
||||
height: 286px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 768px) and (max-width: 991px) {
|
||||
#wrapper-video {
|
||||
height: 388px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 992px) and (max-width: 1199px) {
|
||||
#wrapper-video {
|
||||
height: 525px !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="col-lg-wide-8 col-xs-1 padding-0">
|
||||
<div class="stui-pannel stui-pannel-bg clearfix">
|
||||
<div class="stui-pannel-box">
|
||||
<div class="stui-pannel-bd">
|
||||
<div class="stui-player col-pd">
|
||||
<div id="wrapper-video" class="stui-player__video clearfix">
|
||||
|
||||
</div>
|
||||
<div class="stui-player__detail detail">
|
||||
<ul class="more-btn">
|
||||
<li>
|
||||
<div class="" style="display: flex;gap:5px">
|
||||
@foreach ($currentMovie->episodes->where('slug', $episode->slug)->where('server', $episode->server) as $server)
|
||||
<button onclick="chooseStreamingServer(this)" data-type="{{ $server->type }}"
|
||||
data-id="{{ $server->id }}" data-link="{{ $server->link }}"
|
||||
class="streaming-server btn btn-default">VIP
|
||||
#{{ $loop->index + 1 }}</button>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
<button class="btn btn-default" id="report_error">Báo lỗi
|
||||
<i class="icon iconfont icon-close "></i>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
<h1 class="title">
|
||||
<a href="{{ $episode->getUrl() }}">Tập {{ $episode->name }}</a>
|
||||
</h1>
|
||||
<p>
|
||||
<span class="title">Đổi nguồn phát VIP #1, VIP #2 khi lỗi.</span>
|
||||
|
||||
</p>
|
||||
<div class="col-sm-12">
|
||||
<div id="movies-rating-star"></div>
|
||||
({{ $currentMovie->getRatingStar() }}
|
||||
sao
|
||||
/
|
||||
{{ $currentMovie->getRatingCount() }} đánh giá)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@foreach ($currentMovie->episodes->sortBy([['server', 'asc']])->groupBy('server') as $server => $data)
|
||||
<div class="stui-pannel stui-pannel-bg clearfix">
|
||||
<div class="stui-pannel-box b playlist mb">
|
||||
<div class="stui-pannel_hd">
|
||||
<div class="stui-pannel__head bottom-line active clearfix">
|
||||
<span class="more text-muted pull-right"></span>
|
||||
<h3 class="title"> Phim {{ $currentMovie->name }} - {{ $server }} </h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stui-pannel_bd col-pd clearfix">
|
||||
<ul class="stui-content__playlist clearfix">
|
||||
@foreach ($data->sortByDesc('name', SORT_NATURAL)->groupBy('name') as $name => $item)
|
||||
<li class="@if ($item->contains($episode)) active @endif"><a
|
||||
href="{{ $item->sortByDesc('type')->first()->getUrl() }}">Tập
|
||||
{{ $name }}</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
<div class="stui-pannel stui-pannel-bg clearfix">
|
||||
<div class="stui-pannel-box">
|
||||
<div class="stui-pannel_hd">
|
||||
<div class="stui-pannel__head clearfix">
|
||||
<h3 class="title">
|
||||
<img src="{{ asset('themes/xingkong/img/icon_30.png') }}" /> Nội dung phim
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stui-pannel_bd">
|
||||
<p class="col-pd detail">
|
||||
<span class="detail-sketch">
|
||||
{!! Str::limit(strip_tags($currentMovie->content), 300, '...') !!}
|
||||
</span>
|
||||
<span class="detail-content" style="display: none;">
|
||||
{!! strip_tags($currentMovie->content) !!}
|
||||
</span>
|
||||
<a class="detail-more" href="javascript:;">Xem thêm <i class="icon iconfont icon-moreunfold"></i>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('themes::themexingkong.inc.related_movie')
|
||||
@include('themes::themexingkong.inc.comment')
|
||||
</div>
|
||||
@include('themes::themexingkong.inc.right_bar')
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script src="/themes/xingkong/player/js/p2p-media-loader-core.min.js"></script>
|
||||
<script src="/themes/xingkong/player/js/p2p-media-loader-hlsjs.min.js"></script>
|
||||
|
||||
<script src="/js/jwplayer-8.9.3.js"></script>
|
||||
<script src="/js/hls.min.js"></script>
|
||||
<script src="/js/jwplayer.hlsjs.min.js"></script>
|
||||
|
||||
<script>
|
||||
var episode_id = {{ $episode->id }};
|
||||
const wrapper = document.getElementById('wrapper-video');
|
||||
const vastAds = "{{ Setting::get('jwplayer_advertising_file') }}";
|
||||
|
||||
function chooseStreamingServer(el) {
|
||||
const type = el.dataset.type;
|
||||
const link = el.dataset.link.replace(/^http:\/\//i, 'https://');
|
||||
const id = el.dataset.id;
|
||||
|
||||
const newUrl =
|
||||
location.protocol +
|
||||
"//" +
|
||||
location.host +
|
||||
location.pathname.replace(`-${episode_id}`, `-${id}`);
|
||||
|
||||
history.pushState({
|
||||
path: newUrl
|
||||
}, "", newUrl);
|
||||
episode_id = id;
|
||||
|
||||
Array.from(document.getElementsByClassName('streaming-server')).forEach(server => {
|
||||
server.classList.remove('btn-primary');
|
||||
})
|
||||
el.classList.add('btn-primary');
|
||||
renderPlayer(type, link, id);
|
||||
}
|
||||
|
||||
function renderPlayer(type, link, id) {
|
||||
if (type == 'embed') {
|
||||
if (vastAds) {
|
||||
wrapper.innerHTML = `<div id="fake_jwplayer"></div>`;
|
||||
const fake_player = jwplayer("fake_jwplayer");
|
||||
const objSetupFake = {
|
||||
key: "{{ Setting::get('jwplayer_license') }}",
|
||||
aspectratio: "16:9",
|
||||
width: "100%",
|
||||
file: "/themes/xingkong/player/1s_blank.mp4",
|
||||
volume: 100,
|
||||
mute: false,
|
||||
autostart: true,
|
||||
advertising: {
|
||||
tag: "{{ Setting::get('jwplayer_advertising_file') }}",
|
||||
client: "vast",
|
||||
vpaidmode: "insecure",
|
||||
skipoffset: {{ (int) Setting::get('jwplayer_advertising_skipoffset') ?: 5 }}, // Bỏ qua quảng cáo trong vòng 5 giây
|
||||
skipmessage: "Bỏ qua sau xx giây",
|
||||
skiptext: "Bỏ qua"
|
||||
}
|
||||
};
|
||||
fake_player.setup(objSetupFake);
|
||||
fake_player.on('complete', function(event) {
|
||||
$("#fake_jwplayer").remove();
|
||||
wrapper.innerHTML = `<iframe width="100%" height="100%" src="${link}" frameborder="0" scrolling="no"
|
||||
allowfullscreen="" allow='autoplay'></iframe>`
|
||||
fake_player.remove();
|
||||
});
|
||||
|
||||
fake_player.on('adSkipped', function(event) {
|
||||
$("#fake_jwplayer").remove();
|
||||
wrapper.innerHTML = `<iframe width="100%" height="100%" src="${link}" frameborder="0" scrolling="no"
|
||||
allowfullscreen="" allow='autoplay'></iframe>`
|
||||
fake_player.remove();
|
||||
});
|
||||
|
||||
fake_player.on('adComplete', function(event) {
|
||||
$("#fake_jwplayer").remove();
|
||||
wrapper.innerHTML = `<iframe width="100%" height="100%" src="${link}" frameborder="0" scrolling="no"
|
||||
allowfullscreen="" allow='autoplay'></iframe>`
|
||||
fake_player.remove();
|
||||
});
|
||||
} else {
|
||||
if (wrapper) {
|
||||
wrapper.innerHTML = `<iframe width="100%" height="100%" src="${link}" frameborder="0" scrolling="no"
|
||||
allowfullscreen="" allow='autoplay'></iframe>`
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == 'm3u8' || type == 'mp4') {
|
||||
wrapper.innerHTML = `<div id="jwplayer"></div>`;
|
||||
const player = jwplayer("jwplayer");
|
||||
const objSetup = {
|
||||
key: "{{ Setting::get('jwplayer_license') }}",
|
||||
aspectratio: "16:9",
|
||||
width: "100%",
|
||||
file: link,
|
||||
playbackRateControls: true,
|
||||
playbackRates: [0.25, 0.75, 1, 1.25],
|
||||
sharing: {
|
||||
sites: [
|
||||
"reddit",
|
||||
"facebook",
|
||||
"twitter",
|
||||
"googleplus",
|
||||
"email",
|
||||
"linkedin",
|
||||
],
|
||||
},
|
||||
volume: 100,
|
||||
mute: false,
|
||||
autostart: true,
|
||||
logo: {
|
||||
file: "{{ Setting::get('jwplayer_logo_file') }}",
|
||||
link: "{{ Setting::get('jwplayer_logo_link') }}",
|
||||
position: "{{ Setting::get('jwplayer_logo_position') }}",
|
||||
},
|
||||
advertising: {
|
||||
tag: "{{ Setting::get('jwplayer_advertising_file') }}",
|
||||
client: "vast",
|
||||
vpaidmode: "insecure",
|
||||
skipoffset: {{ (int) Setting::get('jwplayer_advertising_skipoffset') ?: 5 }}, // Bỏ qua quảng cáo trong vòng 5 giây
|
||||
skipmessage: "Bỏ qua sau xx giây",
|
||||
skiptext: "Bỏ qua"
|
||||
}
|
||||
};
|
||||
|
||||
if (type == 'm3u8') {
|
||||
const segments_in_queue = 50;
|
||||
|
||||
var engine_config = {
|
||||
debug: !1,
|
||||
segments: {
|
||||
forwardSegmentCount: 50,
|
||||
},
|
||||
loader: {
|
||||
cachedSegmentExpiration: 864e5,
|
||||
cachedSegmentsCount: 1e3,
|
||||
requiredSegmentsPriority: segments_in_queue,
|
||||
httpDownloadMaxPriority: 9,
|
||||
httpDownloadProbability: 0.06,
|
||||
httpDownloadProbabilityInterval: 1e3,
|
||||
httpDownloadProbabilitySkipIfNoPeers: !0,
|
||||
p2pDownloadMaxPriority: 50,
|
||||
httpFailedSegmentTimeout: 500,
|
||||
simultaneousP2PDownloads: 20,
|
||||
simultaneousHttpDownloads: 2,
|
||||
// httpDownloadInitialTimeout: 12e4,
|
||||
// httpDownloadInitialTimeoutPerSegment: 17e3,
|
||||
httpDownloadInitialTimeout: 0,
|
||||
httpDownloadInitialTimeoutPerSegment: 17e3,
|
||||
httpUseRanges: !0,
|
||||
maxBufferLength: 300,
|
||||
// useP2P: false,
|
||||
},
|
||||
};
|
||||
if (Hls.isSupported() && p2pml.hlsjs.Engine.isSupported()) {
|
||||
var engine = new p2pml.hlsjs.Engine(engine_config);
|
||||
player.setup(objSetup);
|
||||
jwplayer_hls_provider.attach();
|
||||
p2pml.hlsjs.initJwPlayer(player, {
|
||||
liveSyncDurationCount: segments_in_queue, // To have at least 7 segments in queue
|
||||
maxBufferLength: 300,
|
||||
loader: engine.createLoaderClass(),
|
||||
});
|
||||
} else {
|
||||
player.setup(objSetup);
|
||||
}
|
||||
} else {
|
||||
player.setup(objSetup);
|
||||
}
|
||||
|
||||
const resumeData = 'OPCMS-PlayerPosition-' + id;
|
||||
|
||||
player.on('ready', function() {
|
||||
if (typeof(Storage) !== 'undefined') {
|
||||
if (localStorage[resumeData] == '' || localStorage[resumeData] == 'undefined') {
|
||||
console.log("No cookie for position found");
|
||||
var currentPosition = 0;
|
||||
} else {
|
||||
if (localStorage[resumeData] == "null") {
|
||||
localStorage[resumeData] = 0;
|
||||
} else {
|
||||
var currentPosition = localStorage[resumeData];
|
||||
}
|
||||
console.log("Position cookie found: " + localStorage[resumeData]);
|
||||
}
|
||||
player.once('play', function() {
|
||||
console.log('Checking position cookie!');
|
||||
console.log(Math.abs(player.getDuration() - currentPosition));
|
||||
if (currentPosition > 180 && Math.abs(player.getDuration() - currentPosition) >
|
||||
5) {
|
||||
player.seek(currentPosition);
|
||||
}
|
||||
});
|
||||
window.onunload = function() {
|
||||
localStorage[resumeData] = player.getPosition();
|
||||
}
|
||||
} else {
|
||||
console.log('Your browser is too old!');
|
||||
}
|
||||
});
|
||||
|
||||
player.on('complete', function() {
|
||||
if (typeof(Storage) !== 'undefined') {
|
||||
localStorage.removeItem(resumeData);
|
||||
} else {
|
||||
console.log('Your browser is too old!');
|
||||
}
|
||||
})
|
||||
|
||||
function formatSeconds(seconds) {
|
||||
var date = new Date(1970, 0, 1);
|
||||
date.setSeconds(seconds);
|
||||
return date.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1");
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
const episode = '{{ $episode->id }}';
|
||||
let playing = document.querySelector(`[data-id="${episode}"]`);
|
||||
if (playing) {
|
||||
playing.click();
|
||||
return;
|
||||
}
|
||||
|
||||
const servers = document.getElementsByClassName('streaming-server');
|
||||
if (servers[0]) {
|
||||
servers[0].click();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script src="/themes/xingkong/plugins/jquery-raty/jquery.raty.js"></script>
|
||||
<link href="/themes/xingkong/plugins/jquery-raty/jquery.raty.css" rel="stylesheet" type="text/css" />
|
||||
<script>
|
||||
var rated = false;
|
||||
$('#movies-rating-star').raty({
|
||||
score: {{ $currentMovie->getRatingStar() }},
|
||||
number: 10,
|
||||
numberMax: 10,
|
||||
hints: ['quá tệ', 'tệ', 'không hay', 'không hay lắm', 'bình thường', 'xem được', 'có vẻ hay', 'hay',
|
||||
'rất hay', 'siêu phẩm'
|
||||
],
|
||||
starOff: '/themes/xingkong/plugins/jquery-raty/images/star-off.png',
|
||||
starOn: '/themes/xingkong/plugins/jquery-raty/images/star-on.png',
|
||||
starHalf: '/themes/xingkong/plugins/jquery-raty/images/star-half.png',
|
||||
click: function(score, evt) {
|
||||
if (rated) return
|
||||
fetch("{{ route('movie.rating', ['movie' => $currentMovie->slug]) }}", {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
'X-CSRF-TOKEN': document.querySelector(
|
||||
'meta[name="csrf-token"]')
|
||||
.getAttribute(
|
||||
'content')
|
||||
},
|
||||
body: JSON.stringify({
|
||||
rating: score
|
||||
})
|
||||
});
|
||||
rated = true;
|
||||
$('#movies-rating-star').data('raty').readOnly(true);
|
||||
alert(`Bạn đã đánh giá ${score} sao cho phim này!`);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$("#report_error").click(() => {
|
||||
fetch("{{ route('episodes.report', ['movie' => $currentMovie->slug, 'episode' => $episode->slug, 'id' => $episode->id]) }}", {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
'X-CSRF-TOKEN': document.querySelector('meta[name="csrf-token"]').getAttribute(
|
||||
'content')
|
||||
},
|
||||
body: JSON.stringify({
|
||||
message: ''
|
||||
})
|
||||
});
|
||||
$("#report_error").remove();
|
||||
alert("Báo lỗi thành công!")
|
||||
})
|
||||
</script>
|
||||
|
||||
{!! setting('site_scripts_facebook_sdk') !!}
|
||||
@endpush
|
||||
59
resources/views/themexingkong/inc/catalog_filter.blade.php
Executable file
59
resources/views/themexingkong/inc/catalog_filter.blade.php
Executable file
@@ -0,0 +1,59 @@
|
||||
<div>
|
||||
<h2 class="title">Bộ lọc phim</h2>
|
||||
<form action="/" method="GET" id="form-filter">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6 col-sm-3 col-xs-2">
|
||||
<select class="form-control" id="sort" name="filter[sort]" form="form-filter">
|
||||
<option value="">Sắp xếp</option>
|
||||
<option value="update" @if (isset(request('filter')['sort']) && request('filter')['sort'] == 'update') selected @endif>Thời gian cập nhật
|
||||
</option>
|
||||
<option value="create" @if (isset(request('filter')['sort']) && request('filter')['sort'] == 'create') selected @endif>Thời gian đăng</option>
|
||||
<option value="year" @if (isset(request('filter')['sort']) && request('filter')['sort'] == 'year') selected @endif>Năm sản xuất</option>
|
||||
<option value="view" @if (isset(request('filter')['sort']) && request('filter')['sort'] == 'view') selected @endif>Lượt xem</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-6 col-sm-3 col-xs-2">
|
||||
<select class="form-control" id="type" name="filter[type]" form="form-filter">
|
||||
<option value="">Mọi định dạng</option>
|
||||
<option value="series" @if (isset(request('filter')['type']) && request('filter')['type'] == 'series') selected @endif>Phim bộ</option>
|
||||
<option value="single" @if (isset(request('filter')['type']) && request('filter')['type'] == 'single') selected @endif>Phim lẻ</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-6 col-sm-3 col-xs-2">
|
||||
<select class="form-control" id="category" name="filter[category]" form="form-filter">
|
||||
<option value="">Tất cả thể loại</option>
|
||||
@foreach (\VsMov\Core\Models\Category::fromCache()->all() as $item)
|
||||
<option value="{{ $item->id }}" @if (
|
||||
(isset(request('filter')['category']) && request('filter')['category'] == $item->id) ||
|
||||
(isset($category) && $category->id == $item->id)) selected @endif>
|
||||
{{ $item->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-6 col-sm-3 col-xs-2">
|
||||
<select class="form-control" name="filter[region]" form="form-filter">
|
||||
<option value="">Tất cả quốc gia</option>
|
||||
@foreach (\VsMov\Core\Models\Region::fromCache()->all() as $item)
|
||||
<option value="{{ $item->id }}" @if (
|
||||
(isset(request('filter')['region']) && request('filter')['region'] == $item->id) ||
|
||||
(isset($region) && $region->id == $item->id)) selected @endif>
|
||||
{{ $item->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-6 col-sm-3 col-xs-2">
|
||||
<select class="form-control" name="filter[year]" form="form-filter">
|
||||
<option value="">Tất cả năm</option>
|
||||
@foreach ($years as $year)
|
||||
<option value="{{ $year }}" @if (isset(request('filter')['year']) && request('filter')['year'] == $year) selected @endif>
|
||||
{{ $year }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-md-6 col-sm-3 col-xs-2 text-center">
|
||||
<button type="submit" form="form-filter" class="btn btn-primary">Lọc</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
20
resources/views/themexingkong/inc/comment.blade.php
Executable file
20
resources/views/themexingkong/inc/comment.blade.php
Executable file
@@ -0,0 +1,20 @@
|
||||
<div class="stui-pannel stui-pannel-bg clearfix">
|
||||
<div class="stui-pannel-box clearfix">
|
||||
<div class="stui-pannel_bd clearfix">
|
||||
<div class="stui-pannel_hd">
|
||||
<div class="stui-pannel__head clearfix">
|
||||
<h3 class="title">
|
||||
<img src="{{ asset('themes/xingkong/img/icon_30.png') }}" /> Bình luận
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stui-pannel_bd">
|
||||
<div style="width: 100%; background-color: #fff">
|
||||
<div style="width: 100%; background-color: #fff" class="fb-comments"
|
||||
data-href="{{ $currentMovie->getUrl() }}" data-width="100%" data-colorscheme="light"
|
||||
data-numposts="5" data-order-by="reverse_time" data-lazy="true"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
59
resources/views/themexingkong/inc/header.blade.php
Executable file
59
resources/views/themexingkong/inc/header.blade.php
Executable file
@@ -0,0 +1,59 @@
|
||||
@php
|
||||
$logo = setting('site_logo', '');
|
||||
$brand = setting('site_brand', '');
|
||||
$title = isset($title) ? $title : setting('site_homepage_title', '');
|
||||
@endphp
|
||||
|
||||
<header class="stui-header__top clearfix">
|
||||
<div class="stui-header__bar clearfix">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="stui-header__logo">
|
||||
<a href="/">
|
||||
@if ($logo)
|
||||
{!! $logo !!}
|
||||
@else
|
||||
{!! $brand !!}
|
||||
@endif
|
||||
</a>
|
||||
</div>
|
||||
<div class="stui-header__search">
|
||||
<form action="/" method="GET">
|
||||
<input type="text" name="search" class="mac_wd form-control" value="{{ request('search') }}"
|
||||
placeholder="Tìm kiếm phim..." />
|
||||
<button class="submit" type="submit">
|
||||
<i class="icon iconfont icon-search"></i>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stui-header__menu clearfix">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<ul class="">
|
||||
@foreach ($menu as $key => $item)
|
||||
@if (count($item['children']))
|
||||
<li class="dropdown">
|
||||
<a href="{{ $item['link'] }}">{{ $item['name'] }} <i
|
||||
class="icon iconfont icon-moreunfold"></i></a>
|
||||
<ul class="submenu">
|
||||
@foreach ($item['children'] as $children)
|
||||
<li class="">
|
||||
<a href="{{ $children['link'] }}">{{ $children['name'] }}</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</li>
|
||||
@else
|
||||
<li>
|
||||
<a href="{{ $item['link'] }}">{{ $item['name'] }}</a>
|
||||
</li>
|
||||
@endif
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
42
resources/views/themexingkong/inc/pagination.blade.php
Executable file
42
resources/views/themexingkong/inc/pagination.blade.php
Executable file
@@ -0,0 +1,42 @@
|
||||
@php
|
||||
$pageRange = 3;
|
||||
@endphp
|
||||
@if ($paginator->hasPages())
|
||||
<ul class="stui-page text-center clearfix">
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($paginator->onFirstPage())
|
||||
@else
|
||||
<li><a title="Trang trước" href="{{ $paginator->previousPageUrl() }}"> << </a></li>
|
||||
@endif
|
||||
|
||||
{{-- Pagination Elements --}}
|
||||
@foreach ($elements as $element)
|
||||
{{-- Array Of Links --}}
|
||||
@if (is_array($element))
|
||||
@foreach ($element as $page => $url)
|
||||
@if ($page == $paginator->currentPage())
|
||||
<li class="hidden-xs active"><a title="Trang {{ $page }}"
|
||||
href="#">{{ $page }}</a></li>
|
||||
<li class="active visible-xs">
|
||||
<span class="num">{{ $page }}/{{ $paginator->total() }}</span>
|
||||
</li>
|
||||
@else
|
||||
@if (
|
||||
($page > $paginator->currentPage() && $page < $paginator->currentPage() + $pageRange) ||
|
||||
($page < $paginator->currentPage() && $page > $paginator->currentPage() - $pageRange))
|
||||
<li class="hidden-xs">
|
||||
<a title="Trang {{ $page }}" href="{{ $url }}">{{ $page }}</a>
|
||||
</li>
|
||||
@endif
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
{{-- Next Page Link --}}
|
||||
@if ($paginator->hasMorePages())
|
||||
<li><a title="Trang tiếp" href="{{ $paginator->nextPageUrl() }}">>></a></li>
|
||||
@else
|
||||
@endif
|
||||
</ul>
|
||||
@endif
|
||||
32
resources/views/themexingkong/inc/related_movie.blade.php
Executable file
32
resources/views/themexingkong/inc/related_movie.blade.php
Executable file
@@ -0,0 +1,32 @@
|
||||
<div class="stui-pannel stui-pannel-bg clearfix">
|
||||
<div class="stui-pannel-box">
|
||||
<div class="stui-pannel_hd">
|
||||
<div class="stui-pannel__head bottom-line active clearfix">
|
||||
<h3 class="title">
|
||||
<img src="{{ asset('themes/xingkong/img/icon_6.png') }}" /> Có thể bạn sẽ thích?
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stui-pannel_bd">
|
||||
<ul class="stui-vodlist__bd clearfix">
|
||||
@foreach ($movie_related as $movie)
|
||||
<li class="col-md-6 col-sm-4 col-xs-3 ">
|
||||
<div class="stui-vodlist__box">
|
||||
<a class="stui-vodlist__thumb lazyload" href="{{ $movie->getUrl() }}"
|
||||
title="{{ $movie->name }}" data-original="{{ $movie->getThumbUrl() }}">
|
||||
<span class="play hidden-xs"></span>
|
||||
<span class="pic-text text-right">{{ $movie->episode_current }}</span>
|
||||
</a>
|
||||
<div class="stui-vodlist__detail">
|
||||
<h4 class="title text-overflow">
|
||||
<a href="{{ $movie->getUrl() }}" title="{{ $movie->name }}">{{ $movie->name }}</a>
|
||||
</h4>
|
||||
<p class="text text-overflow text-muted hidden-xs">{{ $movie->origin_name }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
37
resources/views/themexingkong/inc/right_bar.blade.php
Normal file
37
resources/views/themexingkong/inc/right_bar.blade.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<div class="col-lg-wide-2 col-xs-1 stui-pannel-side visible-lg">
|
||||
@foreach ($tops as $top)
|
||||
<div class="stui-pannel stui-pannel-bg clearfix">
|
||||
<div class="col-pd clearfix">
|
||||
<div class="stui-pannel_hd">
|
||||
<div class="stui-pannel__head bottom-line active clearfix">
|
||||
<h3 class="title"> {{ $top['label'] }} </h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stui-pannel_bd">
|
||||
<ul class="stui-vodlist__media active col-pd clearfix">
|
||||
@foreach ($top['data'] as $movie)
|
||||
<li class="top-line-dot">
|
||||
<div class="thumb">
|
||||
<a class="stui-vodlist__thumb" href="{{ $movie->getUrl() }}"
|
||||
title="{{ $movie->name }}"
|
||||
style="width: 33.5px; background-image: url({{ $movie->getThumbUrl() }});"></a>
|
||||
</div>
|
||||
<div class="detail detail-side" style="padding-top: 5px;">
|
||||
<p class="margin-0 text_single-line">
|
||||
<a href="{{ $movie->getUrl() }}">{{ $movie->name }}</a>
|
||||
</p>
|
||||
<div class="score">
|
||||
<div class="star">
|
||||
<span class="star-cur" id="score"></span>
|
||||
</div>
|
||||
<span class="branch">{{ $movie->getRatingStar() }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
42
resources/views/themexingkong/inc/sections/default.blade.php
Normal file
42
resources/views/themexingkong/inc/sections/default.blade.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<div class="stui-pannel clearfix">
|
||||
<div class="stui-pannel-box padding-0">
|
||||
<div class="col-lg-wide-9.5 col-xs-1 padding-0">
|
||||
<div class="col-pd stui-pannel-bg">
|
||||
<div class="stui-pannel_hd">
|
||||
<div class="stui-pannel__head bottom-line active clearfix">
|
||||
<a class="more text-muted pull-right" href="{{ $item['link'] }}">Xem thêm <i
|
||||
class="icon iconfont icon-more"></i>
|
||||
</a>
|
||||
<h3 class="title">
|
||||
<img src="{{ asset('themes/xingkong/img/icon_1.png') }}" alt="{{ $item['label'] }}" />
|
||||
<a href="{{ $item['link'] }}">{{ $item['label'] }}</a>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stui-pannel_bd clearfix">
|
||||
<ul class="stui-vodlist clearfix">
|
||||
@foreach ($item['data'] as $movie)
|
||||
<li class="col-md-6 col-sm-4 col-xs-3 ">
|
||||
<div class="stui-vodlist__box">
|
||||
<a class="stui-vodlist__thumb lazyload" href="{{ $movie->getUrl() }}"
|
||||
title="{{ $movie->name }}" data-original="{{ $movie->getThumbUrl() }}">
|
||||
<span class="play hidden-xs"></span>
|
||||
<span class="pic-text text-right">{{ $movie->episode_current }}</span>
|
||||
</a>
|
||||
<div class="stui-vodlist__detail">
|
||||
<h4 class="title text-overflow">
|
||||
<a href="{{ $movie->getUrl() }}"
|
||||
title="{{ $movie->name }}">{{ $movie->name }}</a>
|
||||
</h4>
|
||||
<p class="text text-overflow text-muted hidden-xs">{{ $movie->origin_name }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,75 @@
|
||||
<div class="stui-pannel clearfix">
|
||||
<div class="stui-pannel-box padding-0">
|
||||
<div class="col-lg-wide-8 col-xs-1 padding-0">
|
||||
<div class="col-pd stui-pannel-bg">
|
||||
<div class="stui-pannel_hd">
|
||||
<div class="stui-pannel__head bottom-line active clearfix">
|
||||
<a class="more text-muted pull-right" href="{{ $item['link'] }}">Xem thêm <i
|
||||
class="icon iconfont icon-more"></i>
|
||||
</a>
|
||||
<h3 class="title">
|
||||
<img src="{{ asset('themes/xingkong/img/icon_1.png') }}" alt="{{ $item['label'] }}" />
|
||||
<a href="{{ $item['link'] }}">{{ $item['label'] }}</a>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stui-pannel_bd clearfix">
|
||||
<ul class="stui-vodlist clearfix">
|
||||
@foreach ($item['data'] as $movie)
|
||||
<li class="col-md-5 col-sm-4 col-xs-3 ">
|
||||
<div class="stui-vodlist__box">
|
||||
<a class="stui-vodlist__thumb lazyload" href="{{ $movie->getUrl() }}"
|
||||
title="{{ $movie->name }}" data-original="{{ $movie->getThumbUrl() }}">
|
||||
<span class="play hidden-xs"></span>
|
||||
<span class="pic-text text-right">{{ $movie->episode_current }}</span>
|
||||
</a>
|
||||
<div class="stui-vodlist__detail">
|
||||
<h4 class="title text-overflow">
|
||||
<a href="{{ $movie->getUrl() }}"
|
||||
title="{{ $movie->name }}">{{ $movie->name }}</a>
|
||||
</h4>
|
||||
<p class="text text-overflow text-muted hidden-xs">{{ $movie->origin_name }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-wide-2 stui-pannel-side hidden-md hidden-sm hidden-xs">
|
||||
<div class="col-pd stui-pannel-bg clearfix">
|
||||
<div class="stui-pannel_hd">
|
||||
<div class="stui-pannel__head bottom-line active clearfix">
|
||||
<h3 class="title"> Top tuần </h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stui-pannel_bd">
|
||||
<ul class="stui-vodlist__media active col-pd clearfix">
|
||||
@foreach ($item['top'] as $movie)
|
||||
<li class="top-line-dot">
|
||||
<div class="thumb">
|
||||
<a class="stui-vodlist__thumb" href="{{ $movie->getUrl() }}"
|
||||
title="{{ $movie->name }}"
|
||||
style="width: 33.5px; background-image: url({{ $movie->getThumbUrl() }});"></a>
|
||||
</div>
|
||||
<div class="detail detail-side" style="padding-top: 5px;">
|
||||
<p class="margin-0 text_single-line">
|
||||
<a href="{{ $movie->getUrl() }}">{{ $movie->name }}</a>
|
||||
</p>
|
||||
<div class="score">
|
||||
<div class="star">
|
||||
<span class="star-cur" id="score"></span>
|
||||
</div>
|
||||
<span class="branch">{{ $movie->getRatingStar() }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
16
resources/views/themexingkong/inc/slider_recommended.blade.php
Executable file
16
resources/views/themexingkong/inc/slider_recommended.blade.php
Executable file
@@ -0,0 +1,16 @@
|
||||
<div class="stui-pannel stui-pannel-bg clearfix">
|
||||
<div class="stui-pannel-box clearfix">
|
||||
<div class="stui-pannel-bd">
|
||||
<div class="carousel carousel_default flickity-page">
|
||||
@foreach ($recommendations as $movie)
|
||||
<div class="col-xs-1">
|
||||
<a href="{{ $movie->getUrl() }}" class="stui-vodlist__thumb banner" title="{{ $movie->name }}"
|
||||
style="background: url({{ $movie->getPosterUrl() }}) no-repeat; background-position:50% 50%; background-size: cover;">
|
||||
<span class="pic-text text-center">{{ $movie->name }}</span>
|
||||
</a>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
85
resources/views/themexingkong/index.blade.php
Executable file
85
resources/views/themexingkong/index.blade.php
Executable file
@@ -0,0 +1,85 @@
|
||||
@extends('themes::themexingkong.layout')
|
||||
|
||||
|
||||
@php
|
||||
use VsMov\Core\Models\Movie;
|
||||
$recommendations = Cache::remember('site.movies.recommendations', setting('site_cache_ttl', 5 * 60), function () {
|
||||
return Movie::where('is_recommended', true)->limit(get_theme_option('recommendations_limit', 10))->orderBy('updated_at', 'desc')->get();
|
||||
});
|
||||
$data = Cache::remember('site.movies.latest', setting('site_cache_ttl', 5 * 60), function () {
|
||||
$lists = preg_split('/[\n\r]+/', get_theme_option('latest'));
|
||||
$data = [];
|
||||
foreach ($lists as $list) {
|
||||
if (trim($list)) {
|
||||
$list = explode('|', $list);
|
||||
[$label, $relation, $field, $val, $sortKey, $alg, $limit, $link, $template] = array_merge($list, ['Phim mới cập nhật', '', 'type', 'series', 'created_at', 'desc', 8, '/', 'default']);
|
||||
try {
|
||||
$top = null;
|
||||
if ($template === 'with_top') {
|
||||
$top = Movie::when($relation, function ($query) use ($relation, $field, $val) {
|
||||
$query->whereHas($relation, function ($rel) use ($field, $val) {
|
||||
$rel->where($field, $val);
|
||||
});
|
||||
})
|
||||
->when(!$relation, function ($query) use ($field, $val) {
|
||||
$query->where($field, $val);
|
||||
})
|
||||
->orderBy('view_week', 'desc')
|
||||
->limit(9)
|
||||
->get();
|
||||
}
|
||||
$data[] = [
|
||||
'label' => $label,
|
||||
'data' => Movie::when($relation, function ($query) use ($relation, $field, $val) {
|
||||
$query->whereHas($relation, function ($rel) use ($field, $val) {
|
||||
$rel->where($field, $val);
|
||||
});
|
||||
})
|
||||
->when(!$relation, function ($query) use ($field, $val) {
|
||||
$query->where($field, $val);
|
||||
})
|
||||
->orderBy($sortKey, $alg)
|
||||
->limit($limit)
|
||||
->get(),
|
||||
'top' => $top,
|
||||
'link' => $link ?: '#',
|
||||
'template' => $template,
|
||||
];
|
||||
} catch (\Exception $e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
return $data;
|
||||
});
|
||||
@endphp
|
||||
|
||||
@push('header')
|
||||
<style type="text/css">
|
||||
.stui-vodlist__thumb.banner {
|
||||
padding-top: 30%;
|
||||
}
|
||||
|
||||
@media (max-width:767px) {
|
||||
.stui-vodlist__thumb.banner {
|
||||
padding-top: 45%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
@include('themes::themexingkong.inc.slider_recommended')
|
||||
|
||||
@foreach ($data as $item)
|
||||
@include('themes::themexingkong.inc.sections.' . $item['template'])
|
||||
@endforeach
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/javascript">
|
||||
$(".score").each(function() {
|
||||
var star = $(this).find(".branch").text().replace(".", "0.");
|
||||
$(this).find("#score").css("width", "" + star + "%");
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
54
resources/views/themexingkong/layout.blade.php
Executable file
54
resources/views/themexingkong/layout.blade.php
Executable file
@@ -0,0 +1,54 @@
|
||||
@extends('themes::layout')
|
||||
|
||||
@php
|
||||
@endphp
|
||||
|
||||
@push('header')
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"
|
||||
rel="stylesheet">
|
||||
|
||||
<link rel="stylesheet" href="{{ asset('themes/xingkong/css/iconfont.css') }}" type="text/css" />
|
||||
<link rel="stylesheet" href="{{ asset('themes/xingkong/css/stui_block.css') }}" type="text/css" />
|
||||
<link rel="stylesheet" href="{{ asset('themes/xingkong/css/stui_block_color.css') }}" type="text/css" />
|
||||
<link rel="stylesheet" href="{{ asset('themes/xingkong/css/stui_default.css') }}" type="text/css" />
|
||||
|
||||
<script type="text/javascript" src="{{ asset('themes/xingkong/js/jquery.min.js') }}"></script>
|
||||
<script type="text/javascript" src="{{ asset('themes/xingkong/js/stui_default.js') }}"></script>
|
||||
<script type="text/javascript" src="{{ asset('themes/xingkong/js/stui_block.js') }}"></script>
|
||||
@endpush
|
||||
|
||||
@section('body')
|
||||
@include('themes::themexingkong.inc.header')
|
||||
@if (get_theme_option('ads_header'))
|
||||
<div class="container">
|
||||
<div id="top-banner">
|
||||
{!! get_theme_option('ads_header') !!}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
@yield('content')
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
@endpush
|
||||
|
||||
@section('footer')
|
||||
{!! get_theme_option('footer') !!}
|
||||
|
||||
@if (get_theme_option('ads_catfish'))
|
||||
<div class="container">
|
||||
<div id="catfish-banner">
|
||||
{!! get_theme_option('ads_catfish') !!}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{!! setting('site_scripts_google_analytics') !!}
|
||||
@endsection
|
||||
221
resources/views/themexingkong/single.blade.php
Executable file
221
resources/views/themexingkong/single.blade.php
Executable file
@@ -0,0 +1,221 @@
|
||||
@extends('themes::themexingkong.layout')
|
||||
|
||||
@php
|
||||
$watch_url = '';
|
||||
if (!$currentMovie->is_copyright && count($currentMovie->episodes) && $currentMovie->episodes[0]['link'] != '') {
|
||||
$watch_url = $currentMovie->episodes
|
||||
->sortBy([['server', 'asc']])
|
||||
->groupBy('server')
|
||||
->first()
|
||||
->sortByDesc('name', SORT_NATURAL)
|
||||
->groupBy('name')
|
||||
->last()
|
||||
->sortByDesc('type')
|
||||
->first()
|
||||
->getUrl();
|
||||
}
|
||||
@endphp
|
||||
|
||||
@push('header')
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
<div class="col-lg-wide-8 col-xs-1 padding-0">
|
||||
<div class="stui-pannel stui-pannel-bg clearfix">
|
||||
<div class="stui-pannel-box clearfix">
|
||||
<div class="stui-pannel_bd clearfix">
|
||||
<div class="stui-content col-pd clearfix">
|
||||
<div class="stui-content__thumb">
|
||||
<a class="stui-vodlist__thumb picture v-thumb" href="{{ $watch_url }}"
|
||||
title="{{ $currentMovie->name }}">
|
||||
<img class="lazyload" src="{{ asset('themes/xingkong/img/load.gif') }}"
|
||||
data-original="{{ $currentMovie->getThumbUrl() }}" />
|
||||
<span class="play active hidden-xs"></span>
|
||||
<span class="pic-text text-right">{{ $currentMovie->episode_current }}</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="stui-content__detail">
|
||||
<h1 class="title">{{ $currentMovie->name }}</h1>
|
||||
<p class="data">
|
||||
<h2>{{ $currentMovie->origin_name }}</h2>
|
||||
</p>
|
||||
<p class="movie-rating">
|
||||
<span id="movies-rating-star"></span>
|
||||
</p>
|
||||
<p class="data">
|
||||
<span class="text-muted hidden-xs">Thể Loại: </span>
|
||||
{!! $currentMovie->categories->map(function ($category) {
|
||||
return '<a href="' . $category->getUrl() . '">' . $category->name . '</a>';
|
||||
})->implode(', ') !!}
|
||||
<span class="split-line"></span>
|
||||
<span class="text-muted hidden-xs">Quốc gia: </span>
|
||||
|
||||
{!! $currentMovie->regions->map(function ($region) {
|
||||
return '<a href="' . $region->getUrl() . '">' . $region->name . '</a>';
|
||||
})->implode(', ') !!}
|
||||
|
||||
<span class="split-line"></span>
|
||||
<span class="text-muted hidden-xs">Năm: </span>{{ $currentMovie->publish_year }}
|
||||
</p>
|
||||
<p class="data">
|
||||
|
||||
</p>
|
||||
<p class="data">
|
||||
<span class="text-muted">Ngôn ngữ: </span>{{ $currentMovie->language }} <span
|
||||
class="split-line"></span>
|
||||
<span class="text-muted hidden-xs">Chất lượng: </span>{{ $currentMovie->quality }}
|
||||
</p>
|
||||
<p class="data">
|
||||
<span class="text-muted">Diễn viên: </span>
|
||||
{!! $currentMovie->actors->map(function ($actor) {
|
||||
return '<a href="' . $actor->getUrl() . '">' . $actor->name . '</a>';
|
||||
})->implode(', ') !!}
|
||||
</p>
|
||||
<p class="data">
|
||||
<span class="text-muted">Đạo diễn: </span>
|
||||
{!! $currentMovie->directors->map(function ($director) {
|
||||
return '<a href="' . $director->getUrl() . '">' . $director->name . '</a>';
|
||||
})->implode(', ') !!}
|
||||
</p>
|
||||
<p class="desc detail hidden-xs">
|
||||
<span class="left text-muted">Nội dung:</span>
|
||||
<span class="detail-sketch">
|
||||
{!! Str::limit(strip_tags($currentMovie->content), 60, '...') !!}
|
||||
</span>
|
||||
<span class="detail-content" style="display: none;">
|
||||
{!! strip_tags($currentMovie->content) !!}
|
||||
</span>
|
||||
<a class="detail-more" href="javascript:;">Xem thêm <i
|
||||
class="icon iconfont icon-moreunfold"></i>
|
||||
</a>
|
||||
</p>
|
||||
<div class="play-btn clearfix">
|
||||
<div class="share bdsharebuttonbox hidden-sm hidden-xs pull-right"></div>
|
||||
@if ($watch_url)
|
||||
<a class="btn btn-primary" href="{{ $watch_url }}">Xem Phim</a>
|
||||
@endif
|
||||
@if (strpos($currentMovie->trailer_url, 'youtube'))
|
||||
<a href="javascript:void(0);" class="btn btn-default" id="show-trailer">Trailer</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if ($watch_url)
|
||||
<div class="stui-pannel stui-pannel-bg clearfix">
|
||||
<div class="stui-pannel-box b playlist mb">
|
||||
<div class="stui-pannel_hd">
|
||||
<div class="stui-pannel__head bottom-line active clearfix">
|
||||
<span class="more text-muted pull-right"></span>
|
||||
<h3 class="title"> Xem phim {{ $currentMovie->name }} </h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stui-pannel_bd col-pd clearfix">
|
||||
<ul class="stui-content__playlist clearfix">
|
||||
@php
|
||||
$currentMovie->episodes
|
||||
->sortBy([['name', 'desc'], ['type', 'desc']])
|
||||
->sortByDesc('name', SORT_NATURAL)
|
||||
->unique('name')
|
||||
->take(8)
|
||||
->map(function ($episode) {
|
||||
echo '<li><a href="' . $episode->getUrl() . '">Tập ' . $episode->name . '</a></li>';
|
||||
});
|
||||
@endphp
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@include('themes::themexingkong.inc.related_movie')
|
||||
@include('themes::themexingkong.inc.comment')
|
||||
</div>
|
||||
|
||||
@include('themes::themexingkong.inc.right_bar')
|
||||
|
||||
@if (strpos($currentMovie->trailer_url, 'youtube'))
|
||||
@php
|
||||
try {
|
||||
parse_str(parse_url($currentMovie->trailer_url, PHP_URL_QUERY), $parse_url);
|
||||
$trailer_id = $parse_url['v'];
|
||||
} catch (\Throwable $th) {
|
||||
$trailer_id = '';
|
||||
}
|
||||
@endphp
|
||||
<div class="stui-modal fade" id="modal-trailer" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="stui-modal__dialog">
|
||||
<div class="stui-modal__content">
|
||||
<div class="stui-pannel clearfix">
|
||||
<div class="stui-pannel-box clearfix">
|
||||
<div class="stui-pannel_hd">
|
||||
<div class="stui-pannel__head active bottom-line clearfix">
|
||||
<a href="javascript:;" class="more close pull-right" data-dismiss="modal"
|
||||
aria-hidden="true">
|
||||
<i class="icon iconfont icon-close"></i>
|
||||
</a>
|
||||
<h3 class="title">Trailer phim {{ $currentMovie->name }}</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stui-pannel_bd clearfix">
|
||||
<iframe src="https://www.youtube.com/embed/{{ $trailer_id }}"
|
||||
style="width: 100%;height: 100%;" frameborder="0"
|
||||
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
|
||||
allowfullscreen></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
$(function() {
|
||||
$("#show-trailer").click(function() {
|
||||
$("#modal-trailer").modal('show');
|
||||
})
|
||||
})
|
||||
</script>
|
||||
<script src="/themes/xingkong/plugins/jquery-raty/jquery.raty.js"></script>
|
||||
<link href="/themes/xingkong/plugins/jquery-raty/jquery.raty.css" rel="stylesheet" type="text/css" />
|
||||
<script>
|
||||
var rated = false;
|
||||
$('#movies-rating-star').raty({
|
||||
score: {{ $currentMovie->getRatingStar() }},
|
||||
number: 10,
|
||||
numberMax: 10,
|
||||
hints: ['quá tệ', 'tệ', 'không hay', 'không hay lắm', 'bình thường', 'xem được', 'có vẻ hay', 'hay',
|
||||
'rất hay', 'siêu phẩm'
|
||||
],
|
||||
starOff: '/themes/xingkong/plugins/jquery-raty/images/star-off.png',
|
||||
starOn: '/themes/xingkong/plugins/jquery-raty/images/star-on.png',
|
||||
starHalf: '/themes/xingkong/plugins/jquery-raty/images/star-half.png',
|
||||
click: function(score, evt) {
|
||||
if (rated) return
|
||||
fetch("{{ route('movie.rating', ['movie' => $currentMovie->slug]) }}", {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
'X-CSRF-TOKEN': document.querySelector(
|
||||
'meta[name="csrf-token"]')
|
||||
.getAttribute(
|
||||
'content')
|
||||
},
|
||||
body: JSON.stringify({
|
||||
rating: score
|
||||
})
|
||||
});
|
||||
rated = true;
|
||||
$('#movies-rating-star').data('raty').readOnly(true);
|
||||
alert(`Bạn đã đánh giá ${score} sao cho phim này!`);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{!! setting('site_scripts_facebook_sdk') !!}
|
||||
@endpush
|
||||
Reference in New Issue
Block a user