first commit
This commit is contained in:
33
resources/views/thememtyy/catalog.blade.php
Normal file
33
resources/views/thememtyy/catalog.blade.php
Normal file
@@ -0,0 +1,33 @@
|
||||
@extends('themes::thememtyy.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
|
||||
@section('content')
|
||||
<div style="display:none">{{ $section_name ?? 'Danh Sách Phim' }}</div>
|
||||
<div class="box-width wow fadeInUp ec-casc-list animated" style="visibility: visible; animation-name: fadeInUp;">
|
||||
<div class="title flex between top20">
|
||||
<div class="title-left">
|
||||
<h4 class="title-h cor4">{{ $section_name ?? 'Danh Sách Phim' }}</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overflow">
|
||||
</div>
|
||||
<div class="flex wrap border-box public-r">
|
||||
@if (count($data))
|
||||
@foreach ($data as $movie)
|
||||
@include('themes::thememtyy.inc.section.movie_card')
|
||||
@endforeach
|
||||
@else
|
||||
<p class="text-danger">Không có dữ liệu cho mục này</p>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
{{ $data->appends(request()->all())->links("themes::thememtyy.inc.pagination") }}
|
||||
</div>
|
||||
@endsection
|
||||
485
resources/views/thememtyy/episode.blade.php
Normal file
485
resources/views/thememtyy/episode.blade.php
Normal file
@@ -0,0 +1,485 @@
|
||||
@extends('themes::thememtyy.layout')
|
||||
@section('content')
|
||||
<div class="box-width">
|
||||
<div class="player-style-2">
|
||||
<div class="player-top box radius">
|
||||
<style>.MacPlayer {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#jwplayer {
|
||||
height: 100% !important;
|
||||
}
|
||||
|
||||
.active-server {
|
||||
background: #505054 !important;
|
||||
}
|
||||
</style>
|
||||
<div class="MacPlayer">
|
||||
<div id="player-wrapper" style="height: 100%!important;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="player-info cor4">
|
||||
<div class="fun flex between radius">
|
||||
<a class="play-tips-bnt item cor5 load-icon-on"><i class="fa r6"></i>Chọn Server</a>
|
||||
</div>
|
||||
<div class="tips-box radius none">
|
||||
<div class="video-info-aux">
|
||||
@foreach ($currentMovie->episodes->where('slug', $episode->slug)->where('server', $episode->server) as $server)
|
||||
<a onclick="chooseStreamingServer(this)" data-type="{{ $server->type }}" id="streaming-sv"
|
||||
data-id="{{ $server->id }}"
|
||||
data-link="{{ $server->link }}" class="streaming-server tag-link "
|
||||
style="background: #303033;color: #FFF;padding: 10px;border-radius: 10px;margin: 5px">
|
||||
Nguồn #{{ $loop->index + 1 }}
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
<div class="player-info-text cor4 top20 slide-desc-box">
|
||||
<div class="title">
|
||||
<h2 class="title-h cor4">
|
||||
<a target="_self" href="{{ $currentMovie->getUrl() }}" class="ds-line22 more">
|
||||
<span>{{ $currentMovie->name }}</span>
|
||||
<span class="this-get"><i class="this-hide">Chi tiết</i><i class="fa ds-jiantouyou"></i></span>
|
||||
</a>Tập {{ $episode->name }} </h2>
|
||||
</div>
|
||||
<div class="this-desc-labels flex">
|
||||
<span class="this-tag this-b"><i class="focus-item-label-rank">Năm</i>{{ $currentMovie->publish_year }}</span>
|
||||
</div>
|
||||
<div class="this-desc-info">
|
||||
<span class="this-desc-score cor6"><i class="ds-shoucang fa"></i> {{$currentMovie->getRatingStar()}}</span>
|
||||
{!! $currentMovie->regions->map(function ($region) {
|
||||
return '<span>' . $region->name . '</span>';
|
||||
})->implode('') !!}
|
||||
{!! $currentMovie->directors->map(function ($director) {
|
||||
return '<span>' . $director->name . '</span>';
|
||||
})->implode('') !!}
|
||||
</div>
|
||||
<div class="rating-content">
|
||||
<div id="movies-rating-star" style="height: 18px;"></div>
|
||||
<div style="margin-top: 5px">
|
||||
({{$currentMovie->getRatingStar()}}
|
||||
sao
|
||||
/
|
||||
{{$currentMovie->getRatingCount()}} đánh giá)
|
||||
</div>
|
||||
<div id="movies-rating-msg"></div>
|
||||
</div>
|
||||
<div class="this-desc-tags" style="margin-top: 10px">
|
||||
{!! $currentMovie->tags->map(function ($tag) {
|
||||
return ' <span>' . $tag->name . '</span>';
|
||||
})->implode('') !!}
|
||||
</div>
|
||||
|
||||
<div class="this-desc">
|
||||
<div id="height_limit" class="text">
|
||||
<em class="cor5">Nội dung:</em> {!! strip_tags($currentMovie->content) !!}
|
||||
</div>
|
||||
<div class="text-open">
|
||||
<span class="tim-bnt"><i class="fa r6 ease"></i>Xem thêm</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wow fadeInUp wr-list animated" style="visibility: visible; animation-name: fadeInUp;">
|
||||
<div class="actor-new public-r">
|
||||
<div class="ds-r-hide actor-roll swiper-initialized swiper-horizontal swiper-pointer-events swiper-backface-hidden">
|
||||
<ul class="swiper-wrapper">
|
||||
@foreach($currentMovie->actors as $actor)
|
||||
<li class="public-list-box public-pic-e swiper-slide swiper-slide-active"
|
||||
style="width: 146.556px; margin-right: 30px;">
|
||||
<div class="public-list-div">
|
||||
<a target="_self" class="public-list-exp"
|
||||
href="{{$actor->getUrl()}}"
|
||||
title="{{$actor->name}}">
|
||||
<img class="lazy lazy3 mask-1 br-100 entered loaded"
|
||||
alt="{{$actor->name}}"
|
||||
referrerpolicy="no-referrer"
|
||||
src=""
|
||||
data-src=""
|
||||
data-ll-status="loaded">
|
||||
</a>
|
||||
</div>
|
||||
<div class="public-list-button">
|
||||
<a target="_self" class="time-title hide ft4"
|
||||
href="{{$actor->getUrl()}}"
|
||||
title="{{$actor->name}}">{{$actor->name}}</a>
|
||||
</div>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
new Swiper('.actor-roll', {
|
||||
slidesPerView: 6,
|
||||
slidesPerGroup: 6,
|
||||
observer: true,
|
||||
spaceBetween: 8,
|
||||
navigation: {nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev',},
|
||||
breakpoints: {
|
||||
1692: {slidesPerView: 11, slidesPerGroup: 11, spaceBetween: 30,},
|
||||
1330: {slidesPerView: 9, slidesPerGroup: 9, spaceBetween: 30,},
|
||||
993: {slidesPerView: 7, slidesPerGroup: 7, spaceBetween: 30,},
|
||||
560: {slidesPerView: 5, slidesPerGroup: 5, spaceBetween: 15,},
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<div class="title flex between top20">
|
||||
<div class="title-left">
|
||||
<h4 class="title-h cor4">Danh sách tập</h4>
|
||||
</div>
|
||||
</div>
|
||||
@foreach ($currentMovie->episodes->sortBy([['server', 'asc']])->groupBy('server') as $server => $data)
|
||||
<div class="anthology-tab nav-swiper top10 swiper-initialized swiper-horizontal swiper-pointer-events swiper-free-mode">
|
||||
<div class="swiper-wrapper"
|
||||
style="transition-duration: 300ms; transform: translate3d(0px, 0px, 0px);">
|
||||
<a class="vod-playerUrl swiper-slide on nav-dt"
|
||||
role="group"
|
||||
aria-label="1 / 2"><i class="fa"></i>{{ $server }}</a>
|
||||
|
||||
</div>
|
||||
<span class="swiper-notification" aria-live="assertive" aria-atomic="true"></span>
|
||||
</div>
|
||||
<div class="player-list-box top20">
|
||||
<div class="anthology-list select-a">
|
||||
<div class="anthology-list-box none dx">
|
||||
<ul class="anthology-list-play size">
|
||||
@foreach ($data->sortBy('name', SORT_NATURAL)->groupBy('name') as $name => $item)
|
||||
<li class="box border on ecnav-dt">
|
||||
<a class="hide cor4" href="{{ $item->sortByDesc('type')->first()->getUrl() }}">
|
||||
<span>{{ $name }}</span>
|
||||
@if ($item->contains($episode)) <em class="play-on"><i></i><i></i><i></i><i></i></em> @endif</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
<div class="ds-comments top20">
|
||||
<div class="title top10">
|
||||
<h4 class="title-h cor4">Bình luận</h4>
|
||||
</div>
|
||||
<div style="width: 100%; background-color: #fff;margin-top: 10px">
|
||||
<div class="fb-comments w-full" data-href="{{ $currentMovie->getUrl() }}" data-width="100%"
|
||||
data-numposts="5" data-colorscheme="light" data-lazy="true">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-width tv4 wow fadeInUp wr-list">
|
||||
<div class="title top10">
|
||||
<h4 class="title-h cor4">Đề xuất</h4>
|
||||
</div>
|
||||
<div class="flex wrap border-box public-r hide-b-12">
|
||||
<div class="ds-r-hide list-swiper-b">
|
||||
<div class="swiper-wrapper">
|
||||
@foreach ($movie_related as $movie)
|
||||
<div class="public-list-box public-pic-b swiper-slide">
|
||||
<div class="public-list-div public-list-bj">
|
||||
<a target="_self" class="public-list-exp" href="{{$movie->getUrl()}}"
|
||||
title="{{$movie->name}}">
|
||||
<img class="lazy lazy1 gen-movie-img mask-0" referrerpolicy="no-referrer"
|
||||
src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg=="
|
||||
alt="{{$movie->name}} {{ $movie->origin_name }}"
|
||||
data-src="{{$movie->getThumbUrl()}}">
|
||||
<span class="public-bg"></span>
|
||||
<span class="public-list-prb hide ft2">{{$movie->language}} {{$movie->quality}}</span>
|
||||
<span class="public-play"><i
|
||||
class="fa ds-bofang1"></i></span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="public-list-button">
|
||||
<a target="_self" class="time-title hide ft4" href="{{$movie->getUrl()}}"
|
||||
title="{{$movie->name}}">{{$movie->name}}</a>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
<a class="swiper-button-prev fa ds-fanhui" href="javascript:"></a><a
|
||||
class="swiper-button-next fa ds-jiantouyou" href="javascript:"></a></div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
|
||||
<script src="{{ asset('/themes/mtyy/plugins/jquery-raty/jquery.raty.js') }}"></script>
|
||||
<link href="{{ asset('/themes/mtyy/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: '{{ asset('/themes/mtyy/plugins/jquery-raty/images/star-off.png') }}',
|
||||
starOn: '{{ asset('/themes/mtyy/plugins/jquery-raty/images/star-on.png') }}',
|
||||
starHalf: '{{ asset('/themes/mtyy/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);
|
||||
$('#movies-rating-msg').html(`Bạn đã đánh giá ${score} sao cho phim này!`);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script src="/themes/mtyy/player/js/p2p-media-loader-core.min.js"></script>
|
||||
<script src="/themes/mtyy/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('player-wrapper');
|
||||
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('active-server');
|
||||
})
|
||||
el.classList.add('active-server');
|
||||
|
||||
link.replace('http://', 'https://');
|
||||
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/vung/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%",
|
||||
image: "{{ $currentMovie->getPosterUrl() }}",
|
||||
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>
|
||||
|
||||
{!! setting('site_scripts_facebook_sdk') !!}
|
||||
@endpush
|
||||
@@ -0,0 +1,32 @@
|
||||
<div class="box-width tv4 wow fadeInUp wr-list">
|
||||
<div class="title top10">
|
||||
<h4 class="title-h cor4"><a target="_self" href="{{$home_page_slider_thumb['link']}}" class="ds-line22 more"><span>{{$home_page_slider_thumb['label']}}</span><span
|
||||
class="this-get"><i class="this-hide">Xem thêm</i><i class="fa ds-jiantouyou"></i></span></a></h4>
|
||||
</div>
|
||||
<div class="flex wrap border-box public-r hide-a-12">
|
||||
<div class="ds-r-hide list-swiper-a">
|
||||
<div class="swiper-wrapper">
|
||||
@foreach($home_page_slider_thumb['data'] as $movie)
|
||||
<div class="public-list-box public-pic-a swiper-slide">
|
||||
<div class="public-list-div public-list-bj">
|
||||
<a target="_self" class="public-list-exp" href="{{$movie->getUrl()}}" title="{{$movie->name}}">
|
||||
<img class="lazy lazy1 gen-movie-img mask-0" referrerpolicy="no-referrer"
|
||||
src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg=="
|
||||
alt="{{$movie->name}} {{ $movie->origin_name }}" data-src="{{$movie->getThumbUrl()}}">
|
||||
<span class="public-bg"></span>
|
||||
<span class="public-list-prb hide ft2">{{$movie->episode_current}}</span>
|
||||
<span class="public-play">
|
||||
<i class="fa ds-bofang1"></i>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="public-list-button">
|
||||
<a target="_self" class="time-title hide ft4" href="{{$movie->getUrl()}}" title="{{$movie->name}}">{{$movie->name}}</a>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
<a class="swiper-button-prev fa ds-fanhui" href="javascript:"></a><a
|
||||
class="swiper-button-next fa ds-jiantouyou" href="javascript:"></a></div>
|
||||
</div>
|
||||
</div>
|
||||
114
resources/views/thememtyy/inc/nav.blade.php
Normal file
114
resources/views/thememtyy/inc/nav.blade.php
Normal file
@@ -0,0 +1,114 @@
|
||||
@php
|
||||
$logo = setting('site_logo', '');
|
||||
$brand = setting('site_brand', '');
|
||||
$title = isset($title) ? $title : setting('site_homepage_title', '');
|
||||
@endphp
|
||||
<div class="head @hasSection('navclass') @yield('navclass') @else head-c @endif header_nav1" id="nav">
|
||||
<div class="this-pc flex between">
|
||||
<div class="left flex">
|
||||
<div class="logo">
|
||||
<a class="gen-left-list-mobile" href="javascript:"><em class="fa ds-menu"></em></a>
|
||||
<a class="logo-brand" href="/">
|
||||
@if ($logo)
|
||||
{!! $logo !!}
|
||||
@else
|
||||
{!! $brand !!}
|
||||
@endif
|
||||
</a>
|
||||
</div>
|
||||
<div class="head-nav ft4 roll bold0 pc-show1 wap-show0">
|
||||
<ul class="swiper-wrapper">
|
||||
@foreach ($menu as $key => $item)
|
||||
@if (count($item['children']))
|
||||
<li class="rel head-more-menu">
|
||||
<a class="this-get" href="{{$item['link']}}">{{$item['name']}} <em class="fa nav-more" style="font-size:18px"></em></a>
|
||||
<div class="head-more none box size" style="display: none;">
|
||||
@foreach ($item['children'] as $children)
|
||||
<a href="{{$children['link']}}" class="nav-link">{{$children['name']}}</a>
|
||||
@endforeach
|
||||
</div>
|
||||
</li>
|
||||
@else
|
||||
<li class="swiper-slide"><a target="_self" href="{{$item['link']}}" class="">{{$item['name']}}</a></li>
|
||||
@endif
|
||||
@endforeach
|
||||
</ul>
|
||||
<span class="swiper-notification" aria-live="assertive" aria-atomic="true"></span></div>
|
||||
</div>
|
||||
<div class="right flex">
|
||||
<div class="search-min-box">
|
||||
<form id="search" name="s" method="get" action="/">
|
||||
<input id="dsSoInput" type="text" name="search" value="{{ request('search') }}"
|
||||
placeholder="Tìm kiếm"
|
||||
autocomplete="off"
|
||||
class="input">
|
||||
<button id="dsSo" type="submit" class="fa ds-sousuo"></button>
|
||||
</form>
|
||||
<div class="" id="result"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="drawer-list drawer-show" style="display: none;">
|
||||
<div class="drawer-list-bg box-bg ease" style="display: block;"></div>
|
||||
<div class="drawer-list-box bj3">
|
||||
<div class="drawer-menu cor2">
|
||||
<div class="head-user-info"
|
||||
style="background-image: linear-gradient(to top,rgb(0 0 0 / 80%),transparent),url(/static/ds6/img/index_user.jpg);">
|
||||
<a class="head-user" data-url="/user/index.html" href="javascript:">登录账号</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="drawer-nav drawer-scroll bold0 wap-show0" style="width: 100%;overflow-y: scroll">
|
||||
@foreach ($menu as $key => $item)
|
||||
@if (count($item['children']))
|
||||
<div style="color: #757474; padding: 10px 5px">{{$item['name']}}</div>
|
||||
<div class="drawer-scroll-list" style="height: auto; margin: 0">
|
||||
@foreach ($item['children'] as $children)
|
||||
<a target="_self" href="{{$children['link']}}" class="nav-link none2"><em class="fa ds-dianshi"></em><em class="fa none ds-dianshi2"></em>{{$children['name']}}</a>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="this-wap roll bold0 pc-show1">
|
||||
<ul class="swiper-wrapper">
|
||||
@foreach ($menu as $item)
|
||||
@if (count($item['children']))
|
||||
@else
|
||||
<li class="swiper-slide"><a target="_self" href="{{$item['link']}}"
|
||||
class="">{{$item['name']}}</a></li>
|
||||
@endif
|
||||
@endforeach
|
||||
</ul>
|
||||
<span class="swiper-notification" aria-live="assertive" aria-atomic="true"></span></div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$('#dsSoInput').on('keyup', function () {
|
||||
$("#result").html('');
|
||||
$value = $(this).val();
|
||||
if (!$value) {
|
||||
$("#result").html('');
|
||||
return;
|
||||
}
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: '{{ URL::to('search') }}',
|
||||
data: {
|
||||
'search': $value
|
||||
},
|
||||
success: function (data) {
|
||||
$("#result").html('')
|
||||
$.each(data, function (key, value) {
|
||||
$('#result').append('<a href="' + value.slug + '"><div class="rowsearch"> <div class="column lefts"> <img src="' + value.image + '" width="50" /> </div> <div class="column rights"><p> ' + value.title + ' ' + '</p><p> ' + value.original_title + '| ' + value.year + ' </p></div> </div></a>')
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
document.body.addEventListener("click", function (event) {
|
||||
$("#result").html('');
|
||||
});
|
||||
$.ajaxSetup({headers: {'csrftoken': '{{ csrf_token() }}'}});
|
||||
</script>
|
||||
37
resources/views/thememtyy/inc/pagination.blade.php
Normal file
37
resources/views/thememtyy/inc/pagination.blade.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<div class="pages top20">
|
||||
<div class="page-info">
|
||||
@if ($paginator->hasPages())
|
||||
@if ($paginator->onFirstPage())
|
||||
@else
|
||||
<a class="page-link fa ds-fanhui" href="{{ $paginator->previousPageUrl() }}"
|
||||
title="@lang('pagination.previous')"></a>
|
||||
@endif
|
||||
{{-- Pagination Elements --}}
|
||||
@foreach ($elements as $element)
|
||||
{{-- "Three Dots" Separator --}}
|
||||
@if (is_string($element))
|
||||
|
||||
@endif
|
||||
{{-- Array Of Links --}}
|
||||
@if (is_array($element))
|
||||
@foreach ($element as $page => $url)
|
||||
@if ($page == $paginator->currentPage())
|
||||
<a class="page-link ho" href="javascript:" title="{{ $page }}">{{ $page }}</a>
|
||||
@else
|
||||
<a class="page-link" href="{{ $url }}" title="{{ $page }}">{{ $page }}</a>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
{{-- Next Page Link --}}
|
||||
@if ($paginator->hasMorePages())
|
||||
<a class="page-link fa ds-jiantouyou" href="{{ $paginator->nextPageUrl() }}"
|
||||
title="@lang('pagination.next')"></a>
|
||||
@else
|
||||
@endif
|
||||
@endif
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
17
resources/views/thememtyy/inc/section/movie_card.blade.php
Normal file
17
resources/views/thememtyy/inc/section/movie_card.blade.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<div class="public-list-box public-pic-b ">
|
||||
<div class="public-list-div public-list-bj">
|
||||
<a target="_self" class="public-list-exp" href="{{$movie->getUrl()}}" title="{{$movie->name}}">
|
||||
<img class="lazy lazy1 gen-movie-img mask-0" referrerpolicy="no-referrer"
|
||||
src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg=="
|
||||
alt="{{$movie->name}} {{ $movie->origin_name }}" data-src="{{$movie->getThumbUrl()}}">
|
||||
<span class="public-bg"></span>
|
||||
<span class="public-list-prb hide ft2">{{$movie->language}} {{$movie->quality}}</span>
|
||||
<span class="public-play">
|
||||
<i class="fa ds-bofang1"></i>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="public-list-button">
|
||||
<a target="_self" class="time-title hide ft4" href="{{$movie->getUrl()}}" title="{{$movie->name}}">{{$movie->name}}</a>
|
||||
</div>
|
||||
</div>
|
||||
42
resources/views/thememtyy/inc/section/section_side.blade.php
Normal file
42
resources/views/thememtyy/inc/section/section_side.blade.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<div class="box-width tv4 wow fadeInUp wr-list">
|
||||
<div class="title top10">
|
||||
<h4 class="title-h cor4">
|
||||
<a target="_self" href="{{$item['link']}}" class="ds-line22 more">
|
||||
<span>{{$item['label']}}</span>
|
||||
<span class="this-get">
|
||||
<i class="this-hide">Xem thêm</i>
|
||||
<i class="fa ds-jiantouyou"></i>
|
||||
</span>
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="flex wrap border-box public-r hide-b-12">
|
||||
<div class="ds-r-hide list-swiper-b">
|
||||
<div class="swiper-wrapper">
|
||||
@foreach ($item['data'] as $movie)
|
||||
<div class="public-list-box public-pic-b swiper-slide">
|
||||
<div class="public-list-div public-list-bj">
|
||||
<a target="_self" class="public-list-exp" href="{{$movie->getUrl()}}"
|
||||
title="{{$movie->name}}">
|
||||
<img class="lazy lazy1 gen-movie-img mask-0" referrerpolicy="no-referrer"
|
||||
src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg=="
|
||||
alt="{{$movie->name}}"
|
||||
data-src="{{$movie->getThumbUrl()}}">
|
||||
<span class="public-bg"></span>
|
||||
<span class="public-list-prb hide ft2">{{$movie->language}} {{$movie->quality}} </span>
|
||||
<span class="public-play">
|
||||
<i class="fa ds-bofang1"></i>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="public-list-button">
|
||||
<a target="_self" class="time-title hide ft4" href="{{$movie->getUrl()}}" title="{{$movie->name}}">{{$movie->name}}</a>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
<a class="swiper-button-prev fa ds-fanhui" href="javascript:"></a>
|
||||
<a class="swiper-button-next fa ds-jiantouyou" href="javascript:"></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,18 @@
|
||||
<div class="box-width tv4 wow fadeInUp">
|
||||
<div class="title top10">
|
||||
<h4 class="title-h cor4">
|
||||
<a target="_self" href="{{$item['link']}}" class="ds-line22 more">
|
||||
<span>{{$item['label']}}</span>
|
||||
<span class="this-get">
|
||||
<i class="this-hide">Xem thêm</i>
|
||||
<i class="fa ds-jiantouyou"></i>
|
||||
</span>
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="flex wrap border-box public-r hide-b-16">
|
||||
@foreach ($item['data'] as $movie)
|
||||
@include('themes::thememtyy.inc.section.movie_card')
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
49
resources/views/thememtyy/inc/slider_recommended.blade.php
Normal file
49
resources/views/thememtyy/inc/slider_recommended.blade.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<div class="slide-a slide-b overflow slid-d rel" style="background-color:rgb(17, 19, 25)">
|
||||
<div class="slide-time-list mySwiper2 hader1">
|
||||
<div class="swiper-wrapper">
|
||||
@foreach ($home_page_slider_poster['data'] as $key => $movie)
|
||||
<div class="slide-time-bj swiper-slide">
|
||||
<a href="{{$movie->getUrl()}}">
|
||||
<div class="slide-time-img3 mask-1"
|
||||
style="background-image: url({{$movie->getPosterUrl()}});"></div>
|
||||
<div class="large-t"></div>
|
||||
<div class="large-r"></div>
|
||||
<div class="large-l"></div>
|
||||
<div class="box-width flex">
|
||||
<div class="slide-desc-box">
|
||||
<div class="this-desc-title">{{$movie->name}}</div>
|
||||
<div class="this-desc-labels flex">
|
||||
<span class="this-tag this-b"><i class="focus-item-label-rank">TOP {{$key+1}}</i>HOT</span>
|
||||
<span class="focus-item-label-original this-tag bj2"> {{$movie->getStatus()}}</span>
|
||||
</div>
|
||||
<div class="this-desc-info">
|
||||
<span class="this-desc-score cor6"><i
|
||||
class="ds-shoucang fa"></i> {{$movie->getRatingStar()}}</span>
|
||||
<span>{{ $movie->publish_year }}</span>
|
||||
{!! $movie->regions->map(function ($region) {
|
||||
return '<span>' . $region->name . '</span>';
|
||||
})->implode('') !!}
|
||||
<span>{{$movie->episode_current}}</span>
|
||||
</div>
|
||||
<div class="this-desc-tags">
|
||||
{!! $movie->actors->map(function ($director) {
|
||||
return ' <span>' . $director->name . '</span>';
|
||||
})->implode('') !!}
|
||||
</div>
|
||||
<div class="this-desc-item">
|
||||
{!! strip_tags($movie->content) !!}
|
||||
</div>
|
||||
<div class="this-desc-bnt flex">
|
||||
<span href="{{$movie->getUrl()}}" class="bj2 ho cr5"><i class="fa ds-bofang1"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="box-width this-button">
|
||||
<div class="swiper-pagination"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
127
resources/views/thememtyy/index.blade.php
Normal file
127
resources/views/thememtyy/index.blade.php
Normal file
@@ -0,0 +1,127 @@
|
||||
@extends('themes::thememtyy.layout')
|
||||
|
||||
@php
|
||||
use VsMov\Core\Models\Movie;
|
||||
|
||||
$home_page_slider_poster = Cache::remember('site.movies.home_page_slider_poster', setting('site_cache_ttl', 5 * 60), function () {
|
||||
$list = get_theme_option('home_page_slider_poster');
|
||||
$data = null;
|
||||
if(trim($list)) {
|
||||
$list = explode('|', $list);
|
||||
[$label, $relation, $field, $val, $sortKey, $alg, $limit] = array_merge($list, ['Phim đề cử', '', 'is_recommended', '1', 'updated_at', 'desc', 10]);
|
||||
try {
|
||||
$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()
|
||||
];
|
||||
} catch (\Exception $e) {
|
||||
}
|
||||
}
|
||||
return $data;
|
||||
});
|
||||
$home_page_slider_thumb = Cache::remember('site.movies.home_page_slider_thumb', setting('site_cache_ttl', 5 * 60), function () {
|
||||
$list = get_theme_option('home_page_slider_thumb');
|
||||
$data = null;
|
||||
if(trim($list)) {
|
||||
$list = explode('|', $list);
|
||||
[$label, $relation, $field, $val, $sortKey, $alg, $limit, $link] = array_merge($list, ['Phim mới cập nhật', '', 'is_copyright', '0', 'updated_at', 'desc', 20, '#']);
|
||||
try {
|
||||
$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(),
|
||||
'link' => $link ?: '#',
|
||||
|
||||
];
|
||||
} catch (\Exception $e) {
|
||||
}
|
||||
}
|
||||
return $data;
|
||||
});
|
||||
|
||||
|
||||
$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, $show_template] = array_merge($list, ['Phim mới cập nhật', '', '', 'type', 'series', 'created_at', 'desc', 8, '/', 'section_thumb']);
|
||||
try {
|
||||
$data[] = [
|
||||
'label' => $label,
|
||||
'show_template' => $show_template,
|
||||
'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(),
|
||||
'topview' => 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_total', 'desc')
|
||||
->limit(10)
|
||||
->get(),
|
||||
'link' => $link ?: '#',
|
||||
];
|
||||
} catch (\Exception $e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
return $data;
|
||||
});
|
||||
@endphp
|
||||
@section('navclass', 'no-null')
|
||||
@section('slider_recommended')
|
||||
@if(count($home_page_slider_poster['data']))
|
||||
@include('themes::thememtyy.inc.slider_recommended')
|
||||
@endif
|
||||
@endsection
|
||||
@section('home_page_slider_thumb')
|
||||
@if(count($home_page_slider_thumb))
|
||||
@include('themes::thememtyy.inc.home_page_slider_thumb')
|
||||
@endif
|
||||
@endsection
|
||||
@section('content')
|
||||
<script>
|
||||
var body = document.body;
|
||||
body.classList.add("homepage");
|
||||
</script>
|
||||
<main id="index-main" class="wrapper">
|
||||
<div class="content">
|
||||
@foreach($data as $item)
|
||||
@include("themes::thememtyy.inc.section." . $item["show_template"])
|
||||
@endforeach
|
||||
</div>
|
||||
</main>
|
||||
@endsection
|
||||
65
resources/views/thememtyy/layout.blade.php
Normal file
65
resources/views/thememtyy/layout.blade.php
Normal file
@@ -0,0 +1,65 @@
|
||||
@extends('themes::layout')
|
||||
|
||||
@php
|
||||
$menu = \VsMov\Core\Models\Menu::getTree();
|
||||
|
||||
$tops = Cache::remember('site.movies.tops', setting('site_cache_ttl', 5 * 60), function () {
|
||||
$lists = preg_split('/[\n\r]+/', get_theme_option('hotest'));
|
||||
$data = [];
|
||||
foreach ($lists as $list) {
|
||||
if (trim($list)) {
|
||||
$list = explode('|', $list);
|
||||
[$label, $relation, $field, $val, $sortKey, $alg, $limit, $template] = array_merge($list, ['Phim hot', '', 'type', 'series', 'view_total', 'desc', 4, 'top_thumb']);
|
||||
try {
|
||||
$data[] = [
|
||||
'label' => $label,
|
||||
'template' => $template,
|
||||
'data' => \VsMov\Core\Models\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(),
|
||||
];
|
||||
} catch (\Exception $e) {
|
||||
# code
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $data;
|
||||
});
|
||||
@endphp
|
||||
|
||||
@push('header')
|
||||
<link href="{{ asset('/themes/mtyy/ds6/css/common_version_473.css') }}" rel="stylesheet" type="text/css">
|
||||
<link href="{{ asset('/themes/mtyy/ds6/css/custom.css') }}" rel="stylesheet" type="text/css">
|
||||
<script src="{{ asset('/themes/mtyy/ds6/js/jquery.js') }}"></script>
|
||||
<script src="{{ asset('/themes/mtyy/ds6/js/assembly.js') }}"></script>
|
||||
<script src="{{ asset('/themes/mtyy/ds6/js/swiper.min.js') }}"></script>
|
||||
<script src="{{ asset('/themes/mtyy/ds6/js/ecscript.js') }}"></script>
|
||||
<script src="{{ asset('/themes/mtyy/ds6/js/custom.js') }}"></script>
|
||||
@endpush
|
||||
|
||||
@section('body')
|
||||
@include('themes::thememtyy.inc.nav')
|
||||
@if (get_theme_option('ads_header'))
|
||||
{!! get_theme_option('ads_header') !!}
|
||||
@endif
|
||||
@yield('slider_recommended')
|
||||
@yield('home_page_slider_thumb')
|
||||
@yield('content')
|
||||
@endsection
|
||||
|
||||
@section('footer')
|
||||
{!! get_theme_option('footer') !!}
|
||||
@if (get_theme_option('ads_catfish'))
|
||||
{!! get_theme_option('ads_catfish') !!}
|
||||
@endif
|
||||
{!! setting('site_scripts_google_analytics') !!}
|
||||
@endsection
|
||||
226
resources/views/thememtyy/single.blade.php
Normal file
226
resources/views/thememtyy/single.blade.php
Normal file
@@ -0,0 +1,226 @@
|
||||
@extends('themes::thememtyy.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
|
||||
|
||||
@section('content')
|
||||
<div class="ds-vod-detail rel">
|
||||
<div class="box-width rel">
|
||||
@if ($currentMovie->showtimes)
|
||||
<div class="detail-score wow fadeInUp">
|
||||
<div class="play-sc cf">
|
||||
<p><strong>Lịch chiếu : </strong> {{$currentMovie->showtimes}}</p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@if ($currentMovie->notify )
|
||||
<div class="detail-score wow fadeInUp">
|
||||
<div class="play-sc cf">
|
||||
<p><strong>Thông báo : </strong> {{$currentMovie->notify}}</p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="this-bj">
|
||||
<div class="this-pic-bj"
|
||||
style="background-image: url('{{ $currentMovie->getPosterUrl() }}')"></div>
|
||||
<div class="large-t"></div>
|
||||
<div class="large-r"></div>
|
||||
<div class="large-l"></div>
|
||||
<div class="large-b"></div>
|
||||
</div>
|
||||
<div class="slide-desc-box">
|
||||
<div class="this-desc-title">{{ $currentMovie->name }}</div>
|
||||
<div class="this-desc-labels flex">
|
||||
<span class="this-tag this-b"><i class="focus-item-label-rank">Năm</i>{{ $currentMovie->publish_year }}</span>
|
||||
<span class="focus-item-label-original this-tag bj2">{{$currentMovie->getStatus()}}</span>
|
||||
</div>
|
||||
<div class="this-desc-info">
|
||||
<span class="this-desc-score cor6"><i class="ds-shoucang fa"></i> {{$currentMovie->getRatingStar()}}</span>
|
||||
{!! $currentMovie->regions->map(function ($region) {
|
||||
return '<span>' . $region->name . '</span>';
|
||||
})->implode('') !!}
|
||||
<span>{{$currentMovie->episode_current}}</span>
|
||||
</div>
|
||||
<style>
|
||||
.play-sc {
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
padding: 14px 20px;
|
||||
width: 380px;
|
||||
margin: 10px 0 15px 0;
|
||||
font-weight: 700;
|
||||
background: hsla(0, 0%, 100%, .1);
|
||||
}
|
||||
</style>
|
||||
<div class="detail-score wow fadeInUp">
|
||||
<div class="play-sc cf">
|
||||
<div class="rating-content">
|
||||
<div id="movies-rating-star" style="height: 18px;"></div>
|
||||
<div style="margin-top: 5px">
|
||||
({{$currentMovie->getRatingStar()}}
|
||||
sao
|
||||
/
|
||||
{{$currentMovie->getRatingCount()}} đánh giá)
|
||||
</div>
|
||||
<div id="movies-rating-msg"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="this-info">
|
||||
<strong class="r6">Đạo diễn:</strong>
|
||||
{!! $currentMovie->directors->map(function ($director) {
|
||||
return '<a href="' . $director->getUrl() . '" title="' . $director->name . '">' . $director->name . '</a>';
|
||||
})->implode(', ') !!}
|
||||
|
||||
</div>
|
||||
<div class="this-info">
|
||||
<strong class="r6">Diễn viên:</strong> {!! $currentMovie->actors->map(function ($director) {
|
||||
return '<a href="' . $director->getUrl() . '" title="' . $director->name . '">' . $director->name . '</a>';
|
||||
})->implode(', ') !!}
|
||||
</div>
|
||||
<div class="this-desc">
|
||||
<div id="height_limit" class="text">
|
||||
<strong class="r6">Nội dung:</strong> {!! strip_tags($currentMovie->content) !!}
|
||||
</div>
|
||||
<div class="text-open">
|
||||
<span class="tim-bnt"><i class="fa r6 ease"></i>Xem thêm</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="this-bnt flex">
|
||||
@if($watch_url)
|
||||
<a href="{{ $watch_url }}" class="vod-detail-bnt this-play this-bnt-a cr5"><i
|
||||
class="fa r6 ds-bofang1"></i>Xem phim</a>
|
||||
@endif
|
||||
@if ($currentMovie->trailer_url && strpos($currentMovie->trailer_url, 'youtube'))
|
||||
@php
|
||||
parse_str( parse_url( $currentMovie->trailer_url, PHP_URL_QUERY ), $my_array_of_vars );
|
||||
$video_id = $my_array_of_vars['v'] ?? null;
|
||||
@endphp
|
||||
<a href="https://www.youtube.com/embed/{{$video_id}}"
|
||||
class="this-play this-bnt-a cr5 fancybox fancybox.iframe"><i
|
||||
class="fa r6 ds-bofang1"></i>Trailer</a>
|
||||
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-width tv4 wow fadeInUp wr-list">
|
||||
<div class="title top10">
|
||||
<h4 class="title-h cor4">Bình luận</h4>
|
||||
</div>
|
||||
<div class="flex wrap border-box public-r hide-b-12">
|
||||
<div style="width: 100%; background-color: #fff;margin-top: 10px">
|
||||
<div class="fb-comments w-full" data-href="{{ $currentMovie->getUrl() }}" data-width="100%"
|
||||
data-numposts="5" data-colorscheme="light" data-lazy="true">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-width tv4 wow fadeInUp wr-list">
|
||||
<div class="title top10">
|
||||
<h4 class="title-h cor4">Đề xuất</h4>
|
||||
</div>
|
||||
<div class="flex wrap border-box public-r hide-b-12">
|
||||
<div class="ds-r-hide list-swiper-b">
|
||||
<div class="swiper-wrapper">
|
||||
@foreach ($movie_related as $movie)
|
||||
<div class="public-list-box public-pic-b swiper-slide">
|
||||
<div class="public-list-div public-list-bj">
|
||||
<a target="_self" class="public-list-exp" href="{{$movie->getUrl()}}"
|
||||
title="{{$movie->name}}">
|
||||
<img class="lazy lazy1 gen-movie-img mask-0" referrerpolicy="no-referrer"
|
||||
src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg=="
|
||||
alt="{{$movie->name}} {{ $movie->origin_name }}"
|
||||
data-src="{{$movie->getThumbUrl()}}">
|
||||
<span class="public-bg"></span>
|
||||
<span class="public-list-prb hide ft2">{{$movie->language}} {{$movie->quality}}</span>
|
||||
<span class="public-play"><i
|
||||
class="fa ds-bofang1"></i></span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="public-list-button">
|
||||
<a target="_self" class="time-title hide ft4" href="{{$movie->getUrl()}}"
|
||||
title="{{$movie->name}}">{{$movie->name}}</a>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
<a class="swiper-button-prev fa ds-fanhui" href="javascript:"></a><a
|
||||
class="swiper-button-next fa ds-jiantouyou" href="javascript:"></a></div>
|
||||
</div>
|
||||
</div>
|
||||
@push('scripts')
|
||||
<script src="{{ asset('/themes/mtyy/plugins/jquery-raty/jquery.raty.js') }}"></script>
|
||||
<link href="{{ asset('/themes/mtyy/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: '{{ asset('/themes/mtyy/plugins/jquery-raty/images/star-off.png') }}',
|
||||
starOn: '{{ asset('/themes/mtyy/plugins/jquery-raty/images/star-on.png') }}',
|
||||
starHalf: '{{ asset('/themes/mtyy/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);
|
||||
$('#movies-rating-msg').html(`Bạn đã đánh giá ${score} sao cho phim này!`);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<script src="{{ asset('/themes/mtyy/source/jquery.fancybox.pack.js?v=2.1.5') }}"></script>
|
||||
<link rel="stylesheet" type="text/css" href="{{ asset('/themes/mtyy/source/jquery.fancybox.css?v=2.1.5') }}"
|
||||
media="screen"/>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
$(".fancybox").fancybox({
|
||||
maxWidth: 800,
|
||||
maxHeight: 600,
|
||||
fitToView: false,
|
||||
width: '70%',
|
||||
height: '70%',
|
||||
autoSize: false,
|
||||
closeClick: false,
|
||||
openEffect: 'none',
|
||||
closeEffect: 'none'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
{!! setting('site_scripts_facebook_sdk') !!}
|
||||
@endpush
|
||||
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user