Initial commit

This commit is contained in:
vsphim 2026-05-20 11:49:41 +07:00
commit 7d71ff0d8e
52 changed files with 3584 additions and 0 deletions

2
.gitattributes vendored Normal file
View File

@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.idea/

61
README.md Normal file
View File

@ -0,0 +1,61 @@
# THEME - TORO 2023 - VSMOV CMS
## Demo
### Trang Chủ
![Alt text](https://i.ibb.co/WzsL2vL/THEME-TORO-INDEX.png "Home Page")
### Trang Danh Sách Phim
![Alt text](https://i.ibb.co/W29D6Pp/THEME-TORO-CATALOG.png "Catalog Page")
### Trang Thông Tin Phim
![Alt text](https://i.ibb.co/dbSBgfC/THEME-TORO-SINGLE.png "Single Page")
### Trang Xem Phim
![Alt text](https://i.ibb.co/QfcscDD/THEME-TORO-EPISODE.png "Episode Page")
## Requirements
https://github.com/vsphim/vsmov-core
## Install
1. Tại thư mục của Project: `composer require vsmov/theme-toro`
2. Kích hoạt giao diện trong Admin Panel
## Update
1. Tại thư mục của Project: `composer update vsmov/theme-toro`
2. Re-Activate giao diện trong Admin Panel
## Note
- Một vài lưu ý quan trọng của các nút chức năng:
+ `Activate``Re-Activate` sẽ publish toàn bộ file js,css trong themes ra ngoài public của laravel.
+ `Reset` reset lại toàn bộ cấu hình của themes
## Document
### List
- Home page poster slider: `Label|relation|find_by_field|value|sort_by_field|sort_algo|limit`
####
Phim đề cử||is_recommended|1|updated_at|desc|10
####
- Home page thumb slider: `Label|relation|find_by_field|value|sort_by_field|sort_algo|limit`
####
Phim mới cập nhật||is_copyright|0|updated_at|desc|24
####
- Leftbar: `display_label|relation|find_by_field|value|sort_by_field|sort_algo|limit|show_more_url|show_template (section_thumb|section_poster)`
####
Phim chiếu rạp mới||is_shown_in_theater|1|created_at|desc|6|/danh-sach/phim-chieu-rap|section_poster
Phim bộ mới||type|series|updated_at|desc|16|/danh-sach/phim-bo|section_thumb
Phim lẻ mới||type|single|updated_at|desc|16|/danh-sach/phim-le|section_thumb
Phim hoạt hình mới|categories|slug|hoat-hinh|updated_at|desc|12|/the-loai/hoat-hinh|section_poster
####
- Rightbar: `Label|relation|find_by_field|value|sort_by_field|sort_algo|limit|show_template (rightbar_text|rightbar_thumb|rightbar_thumb_2)`
####
Sắp chiếu||status|trailer|publish_year|desc|5|rightbar_text
Top phim lẻ||type|single|view_week|desc|5|rightbar_thumb
Top phim bộ||type|series|view_week|desc|6|rightbar_thumb_2
####
### Custom View Blade
- File blade gốc trong Package: `/vendor/vsmov/ophim-toro/resources/views/themetoro`
- Copy file cần custom đến: `/resources/views/vendor/themes/toro`

32
composer.json Normal file
View File

@ -0,0 +1,32 @@
{
"name": "vsmov/theme-toro",
"description": "VsMov's toro theme",
"type": "library",
"authors": [
{
"name": "vsmov",
"email": "vsmov@gmail.com"
}
],
"require": {
"laravel/framework": "^6|^7|^8",
"ckfinder/ckfinder-laravel-package": "v3.5.2.1",
"vsmov/vsmov-core": "^1.0.0"
},
"license": "MIT",
"autoload": {
"psr-4": {
"VsMov\\ThemeToro\\": "src/",
"VsMov\\ThemeToro\\Database\\Factories\\": "database/factories/",
"VsMov\\ThemeToro\\Database\\Seeders\\": "database/seeders/"
}
},
"extra": {
"laravel": {
"providers": [
"VsMov\\ThemeToro\\ThemeToroServiceProvider"
]
}
},
"minimum-stability": "stable"
}

2
resources/assets/css/font-awesome.css vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,331 @@
body {
--wp--preset--color--black: #000000;
--wp--preset--color--cyan-bluish-gray: #abb8c3;
--wp--preset--color--white: #ffffff;
--wp--preset--color--pale-pink: #f78da7;
--wp--preset--color--vivid-red: #cf2e2e;
--wp--preset--color--luminous-vivid-orange: #ff6900;
--wp--preset--color--luminous-vivid-amber: #fcb900;
--wp--preset--color--light-green-cyan: #7bdcb5;
--wp--preset--color--vivid-green-cyan: #00d084;
--wp--preset--color--pale-cyan-blue: #8ed1fc;
--wp--preset--color--vivid-cyan-blue: #0693e3;
--wp--preset--color--vivid-purple: #9b51e0;
--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple: linear-gradient(135deg, rgba(6, 147, 227, 1) 0%, rgb(155, 81, 224) 100%);
--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan: linear-gradient(135deg, rgb(122, 220, 180) 0%, rgb(0, 208, 130) 100%);
--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange: linear-gradient(135deg, rgba(252, 185, 0, 1) 0%, rgba(255, 105, 0, 1) 100%);
--wp--preset--gradient--luminous-vivid-orange-to-vivid-red: linear-gradient(135deg, rgba(255, 105, 0, 1) 0%, rgb(207, 46, 46) 100%);
--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray: linear-gradient(135deg, rgb(238, 238, 238) 0%, rgb(169, 184, 195) 100%);
--wp--preset--gradient--cool-to-warm-spectrum: linear-gradient(135deg, rgb(74, 234, 220) 0%, rgb(151, 120, 209) 20%, rgb(207, 42, 186) 40%, rgb(238, 44, 130) 60%, rgb(251, 105, 98) 80%, rgb(254, 248, 76) 100%);
--wp--preset--gradient--blush-light-purple: linear-gradient(135deg, rgb(255, 206, 236) 0%, rgb(152, 150, 240) 100%);
--wp--preset--gradient--blush-bordeaux: linear-gradient(135deg, rgb(254, 205, 165) 0%, rgb(254, 45, 45) 50%, rgb(107, 0, 62) 100%);
--wp--preset--gradient--luminous-dusk: linear-gradient(135deg, rgb(255, 203, 112) 0%, rgb(199, 81, 192) 50%, rgb(65, 88, 208) 100%);
--wp--preset--gradient--pale-ocean: linear-gradient(135deg, rgb(255, 245, 203) 0%, rgb(182, 227, 212) 50%, rgb(51, 167, 181) 100%);
--wp--preset--gradient--electric-grass: linear-gradient(135deg, rgb(202, 248, 128) 0%, rgb(113, 206, 126) 100%);
--wp--preset--gradient--midnight: linear-gradient(135deg, rgb(2, 3, 129) 0%, rgb(40, 116, 252) 100%);
--wp--preset--duotone--dark-grayscale: url('#wp-duotone-dark-grayscale');
--wp--preset--duotone--grayscale: url('#wp-duotone-grayscale');
--wp--preset--duotone--purple-yellow: url('#wp-duotone-purple-yellow');
--wp--preset--duotone--blue-red: url('#wp-duotone-blue-red');
--wp--preset--duotone--midnight: url('#wp-duotone-midnight');
--wp--preset--duotone--magenta-yellow: url('#wp-duotone-magenta-yellow');
--wp--preset--duotone--purple-green: url('#wp-duotone-purple-green');
--wp--preset--duotone--blue-orange: url('#wp-duotone-blue-orange');
--wp--preset--font-size--small: 13px;
--wp--preset--font-size--medium: 20px;
--wp--preset--font-size--large: 36px;
--wp--preset--font-size--x-large: 42px;
--wp--preset--spacing--20: 0.44rem;
--wp--preset--spacing--30: 0.67rem;
--wp--preset--spacing--40: 1rem;
--wp--preset--spacing--50: 1.5rem;
--wp--preset--spacing--60: 2.25rem;
--wp--preset--spacing--70: 3.38rem;
--wp--preset--spacing--80: 5.06rem;
}
:where(.is-layout-flex) {
gap: 0.5em;
}
body .is-layout-flow > .alignleft {
float: left;
margin-inline-start: 0;
margin-inline-end: 2em;
}
body .is-layout-flow > .alignright {
float: right;
margin-inline-start: 2em;
margin-inline-end: 0;
}
body .is-layout-flow > .aligncenter {
margin-left: auto !important;
margin-right: auto !important;
}
body .is-layout-constrained > .alignleft {
float: left;
margin-inline-start: 0;
margin-inline-end: 2em;
}
body .is-layout-constrained > .alignright {
float: right;
margin-inline-start: 2em;
margin-inline-end: 0;
}
body .is-layout-constrained > .aligncenter {
margin-left: auto !important;
margin-right: auto !important;
}
body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
max-width: var(--wp--style--global--content-size);
margin-left: auto !important;
margin-right: auto !important;
}
body .is-layout-constrained > .alignwide {
max-width: var(--wp--style--global--wide-size);
}
body .is-layout-flex {
display: flex;
}
body .is-layout-flex {
flex-wrap: wrap;
align-items: center;
}
body .is-layout-flex > * {
margin: 0;
}
:where(.wp-block-columns.is-layout-flex) {
gap: 2em;
}
.has-black-color {
color: var(--wp--preset--color--black) !important;
}
.has-cyan-bluish-gray-color {
color: var(--wp--preset--color--cyan-bluish-gray) !important;
}
.has-white-color {
color: var(--wp--preset--color--white) !important;
}
.has-pale-pink-color {
color: var(--wp--preset--color--pale-pink) !important;
}
.has-vivid-red-color {
color: var(--wp--preset--color--vivid-red) !important;
}
.has-luminous-vivid-orange-color {
color: var(--wp--preset--color--luminous-vivid-orange) !important;
}
.has-luminous-vivid-amber-color {
color: var(--wp--preset--color--luminous-vivid-amber) !important;
}
.has-light-green-cyan-color {
color: var(--wp--preset--color--light-green-cyan) !important;
}
.has-vivid-green-cyan-color {
color: var(--wp--preset--color--vivid-green-cyan) !important;
}
.has-pale-cyan-blue-color {
color: var(--wp--preset--color--pale-cyan-blue) !important;
}
.has-vivid-cyan-blue-color {
color: var(--wp--preset--color--vivid-cyan-blue) !important;
}
.has-vivid-purple-color {
color: var(--wp--preset--color--vivid-purple) !important;
}
.has-black-background-color {
background-color: var(--wp--preset--color--black) !important;
}
.has-cyan-bluish-gray-background-color {
background-color: var(--wp--preset--color--cyan-bluish-gray) !important;
}
.has-white-background-color {
background-color: var(--wp--preset--color--white) !important;
}
.has-pale-pink-background-color {
background-color: var(--wp--preset--color--pale-pink) !important;
}
.has-vivid-red-background-color {
background-color: var(--wp--preset--color--vivid-red) !important;
}
.has-luminous-vivid-orange-background-color {
background-color: var(--wp--preset--color--luminous-vivid-orange) !important;
}
.has-luminous-vivid-amber-background-color {
background-color: var(--wp--preset--color--luminous-vivid-amber) !important;
}
.has-light-green-cyan-background-color {
background-color: var(--wp--preset--color--light-green-cyan) !important;
}
.has-vivid-green-cyan-background-color {
background-color: var(--wp--preset--color--vivid-green-cyan) !important;
}
.has-pale-cyan-blue-background-color {
background-color: var(--wp--preset--color--pale-cyan-blue) !important;
}
.has-vivid-cyan-blue-background-color {
background-color: var(--wp--preset--color--vivid-cyan-blue) !important;
}
.has-vivid-purple-background-color {
background-color: var(--wp--preset--color--vivid-purple) !important;
}
.has-black-border-color {
border-color: var(--wp--preset--color--black) !important;
}
.has-cyan-bluish-gray-border-color {
border-color: var(--wp--preset--color--cyan-bluish-gray) !important;
}
.has-white-border-color {
border-color: var(--wp--preset--color--white) !important;
}
.has-pale-pink-border-color {
border-color: var(--wp--preset--color--pale-pink) !important;
}
.has-vivid-red-border-color {
border-color: var(--wp--preset--color--vivid-red) !important;
}
.has-luminous-vivid-orange-border-color {
border-color: var(--wp--preset--color--luminous-vivid-orange) !important;
}
.has-luminous-vivid-amber-border-color {
border-color: var(--wp--preset--color--luminous-vivid-amber) !important;
}
.has-light-green-cyan-border-color {
border-color: var(--wp--preset--color--light-green-cyan) !important;
}
.has-vivid-green-cyan-border-color {
border-color: var(--wp--preset--color--vivid-green-cyan) !important;
}
.has-pale-cyan-blue-border-color {
border-color: var(--wp--preset--color--pale-cyan-blue) !important;
}
.has-vivid-cyan-blue-border-color {
border-color: var(--wp--preset--color--vivid-cyan-blue) !important;
}
.has-vivid-purple-border-color {
border-color: var(--wp--preset--color--vivid-purple) !important;
}
.has-vivid-cyan-blue-to-vivid-purple-gradient-background {
background: var(--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple) !important;
}
.has-light-green-cyan-to-vivid-green-cyan-gradient-background {
background: var(--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan) !important;
}
.has-luminous-vivid-amber-to-luminous-vivid-orange-gradient-background {
background: var(--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange) !important;
}
.has-luminous-vivid-orange-to-vivid-red-gradient-background {
background: var(--wp--preset--gradient--luminous-vivid-orange-to-vivid-red) !important;
}
.has-very-light-gray-to-cyan-bluish-gray-gradient-background {
background: var(--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray) !important;
}
.has-cool-to-warm-spectrum-gradient-background {
background: var(--wp--preset--gradient--cool-to-warm-spectrum) !important;
}
.has-blush-light-purple-gradient-background {
background: var(--wp--preset--gradient--blush-light-purple) !important;
}
.has-blush-bordeaux-gradient-background {
background: var(--wp--preset--gradient--blush-bordeaux) !important;
}
.has-luminous-dusk-gradient-background {
background: var(--wp--preset--gradient--luminous-dusk) !important;
}
.has-pale-ocean-gradient-background {
background: var(--wp--preset--gradient--pale-ocean) !important;
}
.has-electric-grass-gradient-background {
background: var(--wp--preset--gradient--electric-grass) !important;
}
.has-midnight-gradient-background {
background: var(--wp--preset--gradient--midnight) !important;
}
.has-small-font-size {
font-size: var(--wp--preset--font-size--small) !important;
}
.has-medium-font-size {
font-size: var(--wp--preset--font-size--medium) !important;
}
.has-large-font-size {
font-size: var(--wp--preset--font-size--large) !important;
}
.has-x-large-font-size {
font-size: var(--wp--preset--font-size--x-large) !important;
}
.wp-block-navigation a:where(:not(.wp-element-button)) {
color: inherit;
}
:where(.wp-block-columns.is-layout-flex) {
gap: 2em;
}
.wp-block-pullquote {
font-size: 1.5em;
line-height: 1.6;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,417 @@
/**************************/
/* General
***************************/
/*(Main Color)*/
a:hover, .SearchBtn > i, .Top:before, .TpMvPlay:before, .TPost.B .TPMvCn .TPlay:before, .SrtdBy li a:before, .Clra, .ShareList > li > a, .PlayMovie:hover, .VideoPlayer > span, .OptionBx p:before, .comment-reply-link:before, section > .Top > .Title > span, .widget_categories > ul li:hover > a:before, .Frm-Slct > label:before, .widget span.required, .comment-notes:before, .TPost .Description .CastList li:hover:before, .error-404:before, .widget_recent_comments li:before, .widget_recent_entries li:before, .widget_views li:before, .widget_rss li:before, .widget_meta li:before, .widget_pages li:before, .widget_archive li:before {
color: #de1212
}
.Tf-Wp.open .MenuBtn i, .owl-dots > div.active > span, #Tf-Wp.open .MenuBtn i, .TpTv, .TPost.C .Top, .TPost.C .Image, .Bgra, .VideoOptions.open + .BtnOptions, .lgtbx-on .VideoPlayer > span.BtnLight {
background-color: #de1212
}
.widget_nav_menu > div > ul > li[class*="current"], .widget_categories > ul > li:hover, .comment-list .children, blockquote {
border-color: #de1212
}
.menu-item-has-children > a:after, .SrtdBy:after {
border-top-color: #de1212
}
@media screen and (max-width: 62em) {
.Menu {
border-top-color: #de1212
}
}
@media screen and (min-width: 62em) {
::-webkit-scrollbar-thumb {
background-color: #de1212
}
.menu-item-has-children:hover > .sub-menu {
border-top-color: #de1212
}
.menu-item-has-children:after {
border-bottom-color: #de1212
}
}
::selection {
background-color: #de1212;
color: #fff
}
::-moz-selection {
background-color: #de1212;
color: #fff
}
/*(Body Background)*/
body {
background-color: #1a191f
}
/*(Text Color)*/
body {
color: #818083
}
/*(Links Color)*/
a, .ShareList.Count .numbr {
color: #fff
}
/*(Titles - Color)*/
.Top > .Title, .Title.Top, .comment-reply-title, #email-notes, .Description h1, .Description h2, .Description h3, .Description h4, .Description h5, .Description h6, .Description legend {
color: #fff
}
/**************************/
/* Header
***************************/
/*Background*/
.Header:after {
background-color: #000
}
.BdGradient .Header:after {
background: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0) 100%)
}
/*Menu*/
/*(Menu Links Color)*/
.Menu a, .SearchBtn {
color: #fff
}
.MenuBtn i {
background-color: #fff
}
/*(Menu Links Color Hover)*/
.Menu li:hover a {
color: #fff
}
@media screen and (min-width: 62em) {
.Menu [class*="current"] > a, .Header .Menu > ul > li:hover > a {
color: #fff
}
}
/*(Menu Icons Color)*/
.Menu li:before, .menu li:before {
color: #de1212
}
/*(Submenus Brackground)*/
.Frm-Slct > label, .TPost.B .TPMvCn, .SrtdBy.open .List, .SearchMovies .sol-selection, .trsrcbx, .SearchMovies .sol-no-results, .OptionBx {
background-color: #1a191f
}
@media screen and (max-width: 62em) {
.Menu {
background-color: #1a191f
}
}
@media screen and (min-width: 62em) {
.sub-menu {
background-color: #1a191f
}
}
/*(Submenus Text Color)*/
.Frm-Slct > label, .TPost.B .TPMvCn, .OptionBx {
color: #818083
}
/*(Submenus Links Color)*/
.TPost.B .TPMvCn a, .OptionBx div, .sub-menu a, .Menu li:hover .sub-menu li > a {
color: #fff !important
}
@media screen and (max-width: 62em) {
.Menu a {
color: #fff
}
}
/*(Submenus Links Color Hover)*/
.TPost.B .TPMvCn a:hover, .OptionBx a:hover, .sub-menu li:hover a, .Menu li:hover .sub-menu li:hover > a {
color: #fff !important
}
@media screen and (max-width: 62em) {
.Menu li:hover a {
color: #fff
}
}
/**************************/
/* Banner Top
***************************/
/*(Banner Top Background)*/
.TPost.A .Image:after, .TPost .Description .CastList:before {
background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, #1a191f 100%)
}
/*(Banner Top Links Color)*/
.MovieListSldCn .TPost.A .TPMvCn div a, .MovieListSldCn .TPost.A .TPMvCn .Title {
color: #e0e0e0
}
/*(Banner Top Links Color Hover)*/
.MovieListSldCn .TPost.A .TPMvCn div a:hover, .MovieListSldCn .TPost.A .TPMvCn .Title:hover {
color: #e0e0e0
}
/*(Banner Top Text Color)*/
.MovieListSldCn .TPost.A {
color: #e0e0e0
}
/**************************/
/* Forms
***************************/
/*(Buttons Background)*/
.Button, a.Button, a.Button:hover, button, input[type="button"], input[type="reset"], input[type="submit"], .BuyNow > a, .sol-selected-display-item, .trsrclst > li, .ShareList > li > a:hover, .TPost.B .Image .Qlty {
background-color: #de1212
}
.ShareList > li > a {
border-color: #de1212
}
/*(Buttons Background Hover)*/
.Button:hover, .Button:hover, button:hover, input[type="button"]:hover, input[type="reset"]:hover, input[type="submit"]:hover, .BuyNow > a:hover {
background-color: #de1212
}
/*(Buttons Text Color)*/
.Button, a.Button, button, input[type="button"], input[type="reset"], input[type="submit"], .BuyNow > a, .sol-selected-display-item, .trsrclst > li, .ShareList > li > a:hover, .TPost.B .Image .Qlty {
color: #fff
}
/*(Buttons Text Color Hover)*/
.Button:hover, .Button:hover, button:hover, input[type="button"]:hover, input[type="reset"]:hover, input[type="submit"]:hover, .BuyNow > a:hover {
color: #fff
}
/*(Form controls Background)*/
input, textarea, select, .Form-Select label, .OptionBx p {
background-color: #2a292f
}
/*(Form controls Text Color)*/
input, textarea, select, .Form-Select label, .OptionBx p {
color: #fff
}
/**************************/
/* Widgets
***************************/
/*(Widget - Backgorund)*/
aside .Wdgt {
background-color: #212026
}
/*(Widget Title - Backgorund)*/
aside .Wdgt > .Title {
background-color: #19181d
}
/*(Widget Title - Color)*/
aside .Wdgt > .Title {
color: #fff
}
/*(Widget Text Color)*/
aside .Wdgt {
color: #818083
}
/*(Widget Links Color)*/
aside .Wdgt a {
color: #fff
}
/*(Widget Links Color Hover)*/
aside .Wdgt a:hover {
color: #de1212
}
/**************************/
/* Tables
***************************/
/*(Table Title Background)*/
thead tr {
background-color: #de1212
}
/*(Table Title Text)*/
thead tr {
color: #fff
}
/*(Table Cell Background)*/
td {
background-color: #26252a
}
.SeasonBx {
border-bottom-color: #26252a
}
/*(Table Cell Background Hover )*/
tr:hover > td, tr.Viewed td {
background-color: #313036
}
/*(Table Cell Text)*/
td {
color: #818083
}
/*(Table Cell Links)*/
td a, .TPTblCnMvs td:first-child, .TPTblCnMvs td:nth-child(2), .TPTblCnMvs td:nth-child(3) {
color: #fff
}
/*(Table Cell Links Hover)*/
td a:hover {
color: #de1212
}
/**************************/
/* Pagination
***************************/
/*Pagination Links Background*/
.menu-azlist ul.sub-menu a, .AZList > li > a, .wp-pagenavi a, .wp-pagenavi span, .nav-links a, .nav-links span, .tagcloud a {
background-color: #313036
}
@media screen and (max-width: 62em) {
.Menu > ul > li {
border-bottom-color: #313036
}
.Menu .sub-menu a {
background-color: #313036
}
}
/*Pagination Links Background Hover*/
.menu-azlist ul.sub-menu a:hover, .menu-azlist [class*="current"] > a, .AZList a:hover, .AZList .Current a, .wp-pagenavi a:hover, .wp-pagenavi span.current, .nav-links a:hover, .nav-links [class*="current"], .tagcloud a:hover {
background-color: #de1212
}
@media screen and (max-width: 62em) {
.Menu .sub-menu a:hover {
background-color: #de1212
}
}
/*Pagination Links Color*/
.menu-azlist ul.sub-menu a, .AZList > li > a, .wp-pagenavi a, .wp-pagenavi span, .tagcloud a {
color: #fff !important
}
@media screen and (max-width: 62em) {
.Menu .sub-menu a {
color: #fff !important
}
}
/*Pagination Links Color Hover*/
.Menu li.menu-azlist:hover ul.sub-menu a:hover, .menu-azlist [class*="current"] > a, .AZList a:hover, .AZList .Current a, .wp-pagenavi a:hover, .wp-pagenavi span.current, .nav-links a:hover, .nav-links [class*="current"], .tagcloud a:hover {
color: #fff !important
}
@media screen and (max-width: 62em) {
.Menu li:hover .sub-menu li:hover a, .Menu .sub-menu li:hover:before {
color: #fff !important
}
}
/**************************/
/* Footer
***************************/
/*Top*/
/*(Footer Top - Background)*/
.Footer .Top {
background-color: #151419
}
/*(Footer Top - Text Color)*/
.Footer .Top {
color: #818083
}
/*(Footer Top - Links Color)*/
.Footer .Top a {
color: #fff
}
/*(Footer Top - Links Color Hover)*/
.Footer .Top a:hover {
color: #de1212
}
/*Bot*/
/*(Footer Bot - Background)*/
.Footer .Bot {
background-color: #1a191f
}
/*(Footer Bot - Text Color)*/
.Footer .Bot {
color: #818083
}
/*(Footer Bot - Links Color)*/
.Footer .Bot a {
color: #fff
}
/*(Footer Bot - Links Color Hover)*/
.Footer .Bot a:hover {
color: #de1212
}
/**************************** NO EDIT ****************************/
.Search input[type="text"] {
background-color: rgba(255, 255, 255, .2);
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
color: #fff
}
.Search input[type="text"]:focus {
background-color: rgba(255, 255, 255, .3);
box-shadow: 0 0 5px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .2)
}
.Button, a.Button, button, input[type="button"], input[type="reset"], input[type="submit"], .BuyNow > a, .wp-pagenavi .current, thead tr, .nav-links [class*="current"] {
box-shadow: inset 0 -10px 20px rgba(0, 0, 0, .3)
}
.Button:hover, .Button:hover, button:hover, input[type="button"]:hover, input[type="reset"]:hover, input[type="submit"]:hover, .BuyNow > a:hover {
box-shadow: none
}
.TPost.B .TPMvCn, aside .Wdgt, .SrtdBy.open .List, .sol-active.sol-selection-top .sol-selection-container, .trsrcbx, .sub-menu, .OptionBx, .wp-pagenavi a, .wp-pagenavi span, .nav-links a, .nav-links span, .tagcloud a {
box-shadow: inset 0 0 70px rgba(0, 0, 0, .3), 0 0 20px rgba(0, 0, 0, .5)
}
.widget_categories > ul li:hover, .sol-option:hover {
box-shadow: inset 0 0 70px rgba(0, 0, 0, .2)
}
@media screen and (max-width: 62em) {
.sub-menu {
box-shadow: none
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 523 B

View File

@ -0,0 +1,5 @@
<svg fill="#de1212" height="24" viewBox="0 0 24 24" width="24" class="To_ro-The_mes" xmlns="http://www.w3.org/2000/svg">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/>
<path d="M0 0h24v24H0z" fill="none"/>
</svg>

After

Width:  |  Height:  |  Size: 368 B

View File

@ -0,0 +1,23 @@
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 143 34" preserveAspectRatio="xMidYMid" width="170" height="40">
<path fill="#DE1212" d="M142.8,34c-1.8-0.3-3.6-0.5-5.4-0.8c-1.5-3.8-3.1-7.5-4.6-11.1c-1.3,3.4-2.6,6.7-4,10c-1.7-0.2-3.4-0.4-5.1-0.6
c2.2-5.1,4.3-10.3,6.5-15.6c-2.1-5-4.2-9.8-6.3-14.5c1.8,0,3.7,0,5.5,0.1c1.4,3.2,2.8,6.5,4.2,9.8c1.2-3.2,2.4-6.4,3.7-9.7
c1.7,0,3.4,0.1,5.1,0.1c-2.1,5.4-4.1,10.7-6.2,15.8C138.3,22.8,140.5,28.3,142.8,34z M115.6,1.3c1.9,0,3.9,0,5.8,0.1
c0,10,0.1,20,0.1,29.9c-1.9-0.2-3.9-0.4-5.8-0.6C115.7,20.9,115.6,11.1,115.6,1.3z M99.4,1.1c2,0,3.9,0,5.9,0
c0,8.4,0.1,16.7,0.1,25.1c2.6,0.2,5.3,0.4,7.9,0.6c0,1.2,0,2.4,0,3.6c-4.6-0.4-9.2-0.7-13.8-1C99.5,20,99.4,10.6,99.4,1.1z
M89.6,12.7c2,0,4.1,0.1,6.1,0.1c0,1.2,0,2.4,0,3.6c-2-0.1-4.1-0.1-6.1-0.2c0,4.2,0,8.5,0,12.7c-2-0.1-3.9-0.1-5.9-0.2
c0-9.2,0-18.5,0-27.7c4.4,0,8.9,0,13.3,0.1c0,1.2,0,2.4,0,3.6c-2.5,0-5-0.1-7.4-0.1C89.6,7.3,89.6,10,89.6,12.7z M70.8,29
c-3.4,0-5.8-0.7-7.2-2.2c-1.4-1.5-2.2-3.7-2.2-6.7c0-3.5,0-6.9,0-10.4c0-2.9,0.7-5.2,2.2-6.7c1.4-1.5,3.8-2.3,7.2-2.3
c3.3,0,5.7,0.8,7.2,2.3c1.4,1.5,2.2,3.7,2.2,6.7c0,3.5,0,6.9,0,10.4c0,2.9-0.7,5.2-2.2,6.7C76.5,28.2,74.1,29,70.8,29z M74.1,8.5
c0-1.3-0.2-2.3-0.7-3c-0.4-0.7-1.3-1-2.7-1c-1.3,0-2.2,0.3-2.7,1c-0.5,0.7-0.7,1.7-0.7,3c0,4.2,0,8.5,0,12.7c0,1.3,0.2,2.4,0.7,3.1
c0.5,0.7,1.4,1,2.7,1c1.3,0,2.2-0.3,2.6-1.1c0.5-0.7,0.7-1.7,0.7-3.1C74.1,16.9,74.1,12.7,74.1,8.5z M52.8,29
c-1.3-4.2-2.6-8.4-3.9-12.7c-0.9,0-1.9,0.1-2.8,0.1c0,4.3,0,8.6,0,12.9c-2,0.1-3.9,0.2-5.9,0.4c0-9.5,0.1-19,0.1-28.5
c2.6,0,5.2,0,7.8,0c3.4,0,6,0.5,7.6,1.6c1.7,1.1,2.5,3,2.5,5.7c0,1.8-0.3,3.2-0.9,4.3c-0.6,1.1-1.6,1.9-3.1,2.5
c1.5,4.5,3,9.1,4.5,13.6C56.8,28.8,54.8,28.9,52.8,29z M51.8,5.6c-0.6-0.7-1.8-1-3.4-1c-0.7,0-1.5,0-2.2,0c0,2.9,0,5.7,0,8.6
c0.6,0,1.3,0,1.9,0c1.7,0,2.9-0.4,3.6-1.1c0.7-0.7,1.1-1.8,1.1-3.3C52.7,7.3,52.4,6.2,51.8,5.6z M34.5,28c-1.5,1.7-3.8,2.7-7.1,3
c-3.4,0.3-5.8-0.2-7.2-1.8c-1.4-1.5-2.1-3.9-2.1-7.2c0-3.8,0-7.6,0-11.4c0-3.2,0.7-5.7,2.2-7.3c1.4-1.7,3.8-2.5,7.2-2.5
c3.3,0,5.7,0.7,7.2,2.3c1.4,1.5,2.1,3.8,2.1,6.9c0,3.6,0,7.2,0,10.8C36.7,23.9,35.9,26.3,34.5,28z M30.1,5.9c-0.4-0.7-1.3-1.1-2.7-1
c-1.3,0-2.2,0.4-2.7,1.2C24.3,6.8,24,7.9,24,9.3c0,4.6,0,9.1,0,13.7c0,1.4,0.2,2.5,0.7,3.2c0.5,0.7,1.3,1,2.7,0.9
c1.3-0.1,2.2-0.6,2.6-1.3c0.5-0.8,0.7-1.9,0.7-3.3c0-4.5,0-8.9,0-13.4C30.7,7.6,30.5,6.6,30.1,5.9z M11.5,5.6c0,8.9,0,17.9-0.1,26.8
c-2,0.2-3.9,0.5-5.8,0.8c0-9.1,0-18.3,0-27.4C3.8,5.8,2,5.9,0.2,6c0-1.5,0-2.9,0-4.4c5.5-0.1,11.1-0.2,16.6-0.2c0,1.4,0,2.7,0,4.1
C15,5.5,13.2,5.6,11.5,5.6z"/></svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -0,0 +1,17 @@
!function(t){t.fn.recliner=function(n){var i,a,o=t(window),e=this,r=this.selector;n=t.extend({attrib:"data-src",throttle:300,threshold:100,printable:!0,live:!0,getScript:!1},n);function l(t){t.removeClass("lazy-loading"),t.addClass("lazy-loaded"),t.trigger("lazyshow")}function d(){var a=e.filter(function(){var i=t(this);if("none"!=i.css("display")){var a=void 0!==window.innerHeight?window.innerHeight:o.height(),e=o.scrollTop(),r=e+a,l=i.offset().top;return l+i.height()>=e-n.threshold&&l<=r+n.threshold}});i=a.trigger("lazyload"),e=e.not(i)}function c(i){i.one("lazyload",function(){var i,a,o;i=t(this),a=i.attr(n.attrib),o=i.prop("tagName"),a?(i.addClass("lazy-loading"),/^(IMG|IFRAME|AUDIO|EMBED|SOURCE|TRACK|VIDEO)$/.test(o)?(i.attr("src",a),i[0].onload=function(t){l(i)}):!0===n.getScript?t.getScript(a,function(t){l(i)}):i.load(a,function(t){l(i)})):l(i)}),d()}return o.on("scroll.lazy resize.lazy lookup.lazy",function(t){a&&clearTimeout(a),a=setTimeout(function(){o.trigger("lazyupdate")},n.throttle)}),o.on("lazyupdate",function(t){d()}),n.live&&t(document).ajaxSuccess(function(n,i,a){var o=t(r).not(".lazy-loaded").not(".lazy-loading");e=e.add(o),c(o)}),n.printable&&window.matchMedia&&window.matchMedia("print").addListener(function(n){n.matches&&t(r).trigger("lazyload")}),c(this),this}}(jQuery);var createCookie=function(name,value,days){var expires;if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));expires="; expires="+date.toGMTString();}
else{expires="";}
document.cookie=name+"="+value+expires+"; path=/";}
function getCookie(c_name){if(document.cookie.length>0){c_start=document.cookie.indexOf(c_name+"=");if(c_start!=-1){c_start=c_start+c_name.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1){c_end=document.cookie.length;}
return unescape(document.cookie.substring(c_start,c_end));}}
return "";}
if(typeof jQuery==='undefined'){throw new Error('jquery-rate-picker requires jQuery');}
(function($){"use strict";$.ratePicker=function(target,options){if(typeof options==='undefined')options={};options.max=typeof options.max==='undefined'?5:options.max;options.rgbOn=typeof options.rgbOn==='undefined'?"#f1c40f":options.rgbOn;options.rgbOff=typeof options.rgbOff==='undefined'?"#ecf0f1":options.rgbOff;options.rgbSelection=typeof options.rgbSelection==='undefined'?"#ffcf10":options.rgbSelection;options.cursor=typeof options.cursor==='undefined'?"pointer":options.cursor;options.indicator=typeof options.indicator==='undefined'?"fa fa-star":"fa "+options.indicator;var stars=typeof $(target).data('stars')=='undefined'?0:$(target).data('stars');$(target).css('cursor',options.cursor);$(target).append($("<input>",{type:"hidden",name:target.replace("#",""),value:stars}));$(target).append($("<i>",{class:options.indicator,style:"color: transparent; font-size: 0;"}));for(var i=1;i<=options.max;i++){$(target).append($("<i>",{class:options.indicator,style:"color:"+(i<=stars?options.rgbOn:options.rgbOff)}));}
$(target).append($("<i>",{class:options.indicator,style:"color: transparent; font-size: 0;"}));$.each($(target+" > i"),function(index,item){$(item).click(function(){$("[name="+target.replace("#","")+"]").val(index);for(var i=1;i<=options.max;i++){$($(target+"> i")[i]).css("color",i<=index?options.rgbOn:options.rgbOff);}
if(!(options.rate==='undefined')){options.rate(index>options.max?options.max:index);stars=index;}});$(item).mouseover(function(){for(var i=1;i<=options.max;i++){$($(target+" > i")[i]).css("color",i<=index?options.rgbSelection:options.rgbOff);}});$(item).mouseleave(function(){$("[name="+target.replace("#","")+"]").val(index);for(var i=1;i<=options.max;i++){$($(target+"> i")[i]).css("color",i<=stars?options.rgbOn:options.rgbOff);}});});};})(jQuery);jQuery(document).ready(function($){$(document).on('click','.rtg',function(event){event.preventDefault();var ide=$(this).attr('tab');$('.rtg').addClass('inactive').removeClass('active');$(this).addClass('active').removeClass('inactive');$('.lrt').removeClass('active');$('#'+ide).addClass('active');});function modalReport(){var html='';html+='<div class="Modal-Box Treport on">';html+='<div class="Modal-Content">';html+='<span class="Modal-Close Button AAIco-clear"></span>';html+='<div class="report-form">';html+='<form id="form-report">';html+='<h3>'+toroflixPublic.report_text_reportForm+'</h3>';html+='<label for="desc-report">'+toroflixPublic.report_text_message+'</label>';html+='<textarea required id="desc-report"></textarea>';html+='<button type="submit">'+toroflixPublic.report_text_send+'</button>';html+='</form>';html+='</div>';html+='</div>';html+='<i class="AAOverlay"></i>';html+='</div>';return html;}
$(document).on('click','#tr-report',function(event){event.preventDefault();$('body').append(modalReport());});$(document).on('submit','#form-report',function(event){event.preventDefault();var message=$('#desc-report').val(),postType=toroflixPublic.type,postID=toroflixPublic.id;$.ajax({url:toroflixPublic.url,dataType:'json',method:'POST',data:{action:'action_send_report',message:message,postType:postType,postID:postID},beforeSend:function(){},success:function(data){console.log(data);$('.TPMvCn').append('<p class="report-succ">'+toroflixPublic.report_text_has_send+'</p>');setTimeout(()=>{$('.report-succ').fadeOut('400',function(){$('.report-succ').remove();});},3000);$('.Treport').remove();},error:function(){}});});$(document).on('click','.drpdn',function(){var $this=$(this);if($this.find('.bstd').hasClass('on')){$('.bstd').removeClass('on');}else{$('.bstd').removeClass('on');$this.find('.bstd').addClass('on');}});$(document).click(function(event){if(!($(event.target).closest("#HdTop").length)){$('#HdTop').removeClass('open');$('#tr_live_search_content').empty().removeClass('on');$('#Tf-Search').val('');}});$('.like-mov').on('click',function(event){event.preventDefault();var id=$(this).data('id'),like=$(this).data('like');if(getCookie('like_flix_'+id)==1){return;}
$.ajax({url:toroflixPublic.url,dataType:'json',method:'POST',data:{action:'action_like_mov',like:like,id:id},beforeSend:function(){},success:function(data){console.log(data);$('.vot_cl').text(data.like);$('.vot_cu').text(data.unlike);createCookie('like_flix_'+id,1,365);},error:function(){console.warn('error');}});});$('.Cast-sh a').hide();$('.Cast-sh .dot-sh').hide();$('.Cast-sh a').eq(0).show();$('.Cast-sh a').eq(1).show();$('.Cast-sh a').eq(2).show();$('.Cast-sh .dot-sh').eq(0).show();$('.Cast-sh .dot-sh').eq(1).show();$('.Cast-sh').append('<a class="view-sh Button">'+toroflixPublic.viewmore+'</a>');$('body').on('click','.view-sh',function(event){event.preventDefault();$('.Cast-sh a').show();$('.Cast-sh a').show();$('.view-sh').remove();$('.Cast-sh .dot-sh').show();$('.Cast.Cast-sh').removeClass('oh');});$('#watch-trailer').on('click',function(event){event.preventDefault();var trailer=$(this).data('trailer');$('.Ttrailer').addClass('on');$('.Ttrailer .Modal-Content').prepend(toroflixPublic.trailer);});$(document).on('click','.Modal-Close',function(event){event.preventDefault();$(this).parent().parent().removeClass('on');$('.Treport').remove();$('.Ttrailer iframe').remove();});$('body').on('click','.sorted-list a',function(event){event.preventDefault();var $this=$(this),type_list=$this.attr('href'),type_post=$this.parent().parent().parent().parent().parent().data('id');if($this.parent().hasClass('on')){$this.parent().parent().parent().removeClass('open');return;}
$this.parent().parent().find('li').removeClass('on');$this.parent().addClass('on');$this.parent().parent().parent().removeClass('open');$.ajax({url:toroflixPublic.url,method:'POST',data:{action:'action_changue_post_by',type:type_list,posttype:type_post},beforeSend:function(){$this.parent().parent().parent().parent().next().fadeOut(400);},success:function(data){$this.parent().parent().parent().parent().next().empty().fadeIn(300).html(data);$('.imglazy').recliner({attrib:"data-src",throttle:300,threshold:300,live:true});},error:function(){}});});$('.AADrpd').each(function(){var $AADrpdwn=$(this);$('.AALink',$AADrpdwn).click(function(e){e.preventDefault();$AADrpdDv=$('.AACont',$AADrpdwn);$AADrpdDv.parent('.AADrpd').toggleClass('open');$('.AACont').not($AADrpdDv).parent('.AADrpd').removeClass('open');return false;});});$(document).on('click',function(e){if($(e.target).closest('.AACont').length===0){$('.AACont').parent('.AADrpd').removeClass('open');}});$('.AATggl').on('click',function(){var shwhdd=$(this).attr('data-tggl');$('#'+shwhdd).toggleClass('open');$('#tr_live_search_content').empty().removeClass('on');$('#Tf-Search').val('');});if(toroflixPublic.playerAutomaticSlider==1){var autoplayOpt=true;}else{var autoplayOpt=false;}
$(".MovieListSld").owlCarousel({items:1,autoHeight:true,loop:true,lazyLoad:true,autoplay:autoplayOpt,rtl:(document.dir=='rtl')?true:false});$('.MovieListTop').owlCarousel({margin:10,lazyLoad:true,responsive:{0:{items:2},360:{items:3},560:{items:4},760:{items:6},960:{items:8},1360:{items:10},1600:{items:12}},rtl:(document.dir=='rtl')?true:false});$(document).keyup(function(a){if(a.keyCode==27)$('.lgtbx-on').toggleClass('lgtbx-on');});$('.lgtbx').click(function(event){event.preventDefault();$('body').toggleClass('lgtbx-on');});$('.lgtbx-lnk').click(function(event){event.preventDefault();$('body').toggleClass('lgtbx-on');});$('.ListOptions>li').click(function(){var tab_id=$(this).attr('data-VidOpt'),id=$(this).data('id'),typ=$(this).data('typ'),key=$(this).data('key');$('.ListOptions>li').removeClass('on');$(this).addClass('on');$("#"+tab_id).addClass('on');$.ajax({url:toroflixPublic.url,method:'POST',data:{action:'action_player_change',id:id,key:key,typ:typ},beforeSend:function(){},success:function(data){$('#VideoOption01').fadeOut('200');setTimeout(()=>{$('#VideoOption01').empty().fadeIn('0').html(data);},100);setTimeout(()=>{$('#VidOpt').removeClass('open');},500);},error:function(){}});});(function(a){var b=["DOMMouseScroll","mousewheel"];if(a.event.fixHooks)for(var c=b.length;c;)a.event.fixHooks[b[--c]]=a.event.mouseHooks;a.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=b.length;a;)this.addEventListener(b[--a],d,false);else this.onmousewheel=d},teardown:function(){if(this.removeEventListener)for(var a=b.length;a;)this.removeEventListener(b[--a],d,false);else this.onmousewheel=null}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}});function d(b){var c=b||window.event,d=[].slice.call(arguments,1),e=0,f=true,g=0,h=0;b=a.event.fix(c);b.type="mousewheel";if(c.wheelDelta)e=c.wheelDelta/120;if(c.detail)e=-c.detail/3;h=e;if(c.axis!==undefined&&c.axis===c.HORIZONTAL_AXIS){h=0;g=-1*e}if(c.wheelDeltaY!==undefined)h=c.wheelDeltaY/120;if(c.wheelDeltaX!==undefined)g=-1*c.wheelDeltaX/120;d.unshift(b,e,g,h);return(a.event.dispatch||a.event.handle).apply(this,d)}})(jQuery);$(function(){$(".ListOptions").mousewheel(function(a,b){this.scrollLeft-=b*30;a.preventDefault()})})
$('#Tf-Search').on('keyup',function(event){$(this).attr('autocomplete','off');var searchTerm=$(this).val();if(searchTerm.length>2){$.ajax({url:toroflixPublic.url,type:'POST',data:{action:'action_search_suggest',term:searchTerm},beforeSend:function(){$('form .Result').addClass('On');var html='<p class="trloading"><i class="fa-spinner fa-spin"></i> Loading</p>';$('form .Result').append(html);},success:function(data){$('form .Result').addClass('On').html(data);},error:function(){}});}else{$('form .Result').empty().removeClass('On');}}).keyup();$('.imglazy').recliner({attrib:"data-src",throttle:100,threshold:100,live:true});$.ratePicker("#star",{rate:function(stars){var id=$('#star').data('id');if(getCookie('vote_ep'+id)==id){return;}
$.ajax({url:toroflixPublic.url,method:'POST',dataType:'json',data:{action:'action_vote_serie',id:id,stars:stars},beforeSend:function(){},success:function(data){console.log(data);createCookie('vote_ep'+id,id);$('#star').attr('data-stars',data.prom);},error:function(){}});console.log(stars);}});$.ratePicker("#stars",{rate:function(stars){var id=$('#stars').data('id');console.log('prev12');if(getCookie('vote_tx'+id)==id){return;}
console.log('prev');$.ajax({url:toroflixPublic.url,method:'POST',dataType:'json',data:{action:'action_vote_tax',id:id,stars:stars},beforeSend:function(){},success:function(data){console.log(data);createCookie('vote_tx'+id,id);$('#stars').attr('data-stars',data.prom);},error:function(){}});console.log(stars);}});});$(document).on('click','#scrapper',function(event){event.preventDefault();console.log(toroflixPublic.url);$.ajax({url:'https://torothemes.com/demo/toroflix/wp-admin/admin-ajax.php',method:'POST',data:{action:'action_player_change',id:156,key:0,typ:'movie'},beforeSend:function(){console.log('cargando');},success:function(data){console.log(data);},error:function(){console.log('error');}});});

1
resources/assets/js/jquery.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,14 @@
(function(a,b,c){"use strict";var d=function(a,b){this.$originalElement=a;this.options=b;this.metadata=this.$originalElement.data("sol-options")};d.prototype={SOL_OPTION_FORMAT:{type:"option",value:undefined,selected:false,disabled:false,label:undefined,tooltip:undefined,cssClass:""},SOL_OPTIONGROUP_FORMAT:{type:"optiongroup",label:undefined,tooltip:undefined,disabled:false,children:undefined},DATA_KEY:"sol-element",WINDOW_EVENTS_KEY:"sol-window-events",defaults:{data:undefined,name:undefined,texts:{noItemsAvailable:toroflixPublic.noItemsAvailable,selectAll:toroflixPublic.selectAll,selectNone:toroflixPublic.selectNone,quickDelete:"&times;",searchplaceholder:toroflixPublic.searchplaceholder,loadingData:toroflixPublic.loadingData,itemsSelected:"{$a} items selected"},events:{onInitialized:undefined,onRendered:undefined,onOpen:undefined,onClose:undefined,onChange:undefined,onScroll:function(){var a=this.$input.offset().top-this.config.scrollTarget.scrollTop()+this.$input.outerHeight(false),b=this.$selectionContainer.outerHeight(false),d=a+b,e=this.config.displayContainerAboveInput||c.documentElement.clientHeight-this.config.scrollTarget.scrollTop()<d,f=this.$innerContainer.outerWidth(false)-parseInt(this.$selectionContainer.css("border-left-width"),10)-parseInt(this.$selectionContainer.css("border-right-width"),10);if(e){a=this.$input.offset().top-b-this.config.scrollTarget.scrollTop()+parseInt(this.$selectionContainer.css("border-bottom-width"),10);this.$container.removeClass("sol-selection-bottom").addClass("sol-selection-top")}else this.$container.removeClass("sol-selection-top").addClass("sol-selection-bottom");if(this.$innerContainer.css("display")!=="block")f=f*1.2;else{var g=e?"border-bottom-right-radius":"border-top-right-radius";this.$selectionContainer.css(g,"initial");if(this.$actionButtons)this.$actionButtons.css(g,"initial")}
this.$selectionContainer.css("top",Math.floor(a)).css("left",Math.floor(this.$container.offset().left)).css("width",f);this.config.displayContainerAboveInput=e}},selectAllMaxItemsThreshold:30,showSelectAll:function(){return this.config.multiple&&this.config.selectAllMaxItemsThreshold&&this.items&&this.items.length<=this.config.selectAllMaxItemsThreshold},useBracketParameters:false,multiple:undefined,showSelectionBelowList:false,allowNullSelection:false,scrollTarget:undefined,maxHeight:undefined,converter:undefined,asyncBatchSize:300,maxShow:0},init:function(){this.config=a.extend(true,{},this.defaults,this.options,this.metadata);var c=this._getNameAttribute(),d=this;if(!c){this._showErrorLabel("name attribute is required");return}
if(typeof String.prototype.trim!=="function")String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};this.config.multiple=this.config.multiple||this.$originalElement.attr("multiple");if(!this.config.scrollTarget)this.config.scrollTarget=a(b);this._registerWindowEventsIfNeccessary();this._initializeUiElements();this._initializeInputEvents();setTimeout(function(){d._initializeData();d.$originalElement.data(d.DATA_KEY,d).removeAttr("name").data("sol-name",c)},0);this.$originalElement.hide();this.$container.css("visibility","initial").show();return this},_getNameAttribute:function(){return this.config.name||this.$originalElement.data("sol-name")||this.$originalElement.attr("name")},_showErrorLabel:function(b){var c=a('<div style="color: red; font-weight: bold;" />').html(b);if(!this.$container)c.insertAfter(this.$originalElement);else this.$container.append(c)},_registerWindowEventsIfNeccessary:function(){if(!b[this.WINDOW_EVENTS_KEY]){a(c).click(function(b){var c=a(b.target),e=c.closest(".sol-selection-container"),f=c.closest(".sol-inner-container"),g;if(f.length)g=f.first().parent(".sol-container");else if(e.length)g=e.first().parent(".sol-container");a(".sol-active").not(g).each(function(b,c){a(c).data(d.prototype.DATA_KEY).close()})});b[this.WINDOW_EVENTS_KEY]=true}},_initializeUiElements:function(){var b=this;this.internalScrollWrapper=function(){if(a.isFunction(b.config.events.onScroll))b.config.events.onScroll.call(b)};this.$input=a('<input type="text"/>').attr("placeholder",this.config.texts.searchplaceholder);this.$noResultsItem=a('<div class="sol-no-results"/>').html(this.config.texts.noItemsAvailable).hide();this.$loadingData=a('<div class="sol-loading-data"/>').html(this.config.texts.loadingData);this.$xItemsSelected=a('<div class="sol-results-count"/>');this.$caret=a('<div class="sol-caret-container"><b class="sol-caret"/></div>').click(function(a){b.toggle();a.preventDefault();return false});var c=a('<div class="sol-input-container"/>').append(this.$input);this.$innerContainer=a('<div class="sol-inner-container"/>').append(c).append(this.$caret);this.$selection=a('<div class="sol-selection"/>');this.$selectionContainer=a('<div class="sol-selection-container"/>').append(this.$noResultsItem).append(this.$loadingData).append(this.$selection);this.$container=a('<div class="sol-container"/>').hide().data(this.DATA_KEY,this).append(this.$selectionContainer).append(this.$innerContainer).insertBefore(this.$originalElement);this.$showSelectionContainer=a('<div class="sol-current-selection"/>');if(this.config.showSelectionBelowList)this.$showSelectionContainer.insertAfter(this.$innerContainer);else this.$showSelectionContainer.insertBefore(this.$innerContainer);if(this.config.maxHeight)this.$selection.css("max-height",this.config.maxHeight);var d=this.$originalElement.attr("class"),e=this.$originalElement.attr("style"),f=[],g=[];if(d&&d.length>0){f=d.split(/\s+/);for(var h=0;h<f.length;h++)this.$container.addClass(f[h])}
if(e&&e.length>0){g=e.split(/\;/);for(var h=0;h<g.length;h++){var i=g[h].split(/\s*\:\s*/g);if(i.length===2)
if(i[0].toLowerCase().indexOf("height")>=0)this.$innerContainer.css(i[0].trim(),i[1].trim());else this.$container.css(i[0].trim(),i[1].trim())}}
if(this.$originalElement.css("display")!=="block")this.$container.css("width",this._getActualCssPropertyValue(this.$originalElement,"width"));if(a.isFunction(this.config.events.onRendered))this.config.events.onRendered.call(this,this)},_getActualCssPropertyValue:function(a,d){var e=a.get(0),f=a.css("display");a.css("display","none");if(e.currentStyle)return e.currentStyle[d];else if(b.getComputedStyle)return c.defaultView.getComputedStyle(e,null).getPropertyValue(d);a.css("display",f);return a.css(d)},_initializeInputEvents:function(){var b=this,c=this.$input.parents("form").first();if(c&&c.length===1&&!c.data(this.WINDOW_EVENTS_KEY)){var d=function(){var d=[];c.find(".sol-option input").each(function(b,c){var e=a(c),f=e.data("sol-item").selected;if(e.prop("checked")!==f){e.prop("checked",f).trigger("sol-change",true);d.push(e)}});if(d.length>0&&a.isFunction(b.config.events.onChange))b.config.events.onChange.call(b,b,d)};c.on("reset",function(a){d.call(b);setTimeout(function(){d.call(b)},100)});c.data(this.WINDOW_EVENTS_KEY,true)}
this.$input.focus(function(){b.open()}).on("propertychange input",function(a){var c=true;if(a.type=="propertychange")c=a.originalEvent.propertyName.toLowerCase()=="value";if(c)b._applySearchTermFilter()});this.$container.on("keydown",function(c){var d=c.keyCode;if(!b.$noResultsItem.is(":visible")){var e,f,g,h=false,i=b.$selection.find(".sol-option:visible");if(d===40||d===38){b._setKeyBoardNavigationMode(true);e=b.$selection.find(".sol-option.keyboard-selection");g=d===38?-1:1;var j=i.index(e)+g;if(j<0)j=i.length-1;else if(j>=i.length)j=0;e.removeClass("keyboard-selection");f=a(i[j]).addClass("keyboard-selection");b.$selection.scrollTop(b.$selection.scrollTop()+f.position().top);h=true}else if(b.keyboardNavigationMode===true&&d===32){e=b.$selection.find(".sol-option.keyboard-selection input");e.prop("checked",!e.prop("checked")).trigger("change");h=true}
if(h){c.preventDefault();return false}}}).on("keyup",function(a){var c=a.keyCode;if(c===27)
if(b.keyboardNavigationMode===true)b._setKeyBoardNavigationMode(false);else if(b.$input.val()===""){b.$caret.trigger("click");b.$input.trigger("blur")}else b.$input.val("").trigger("input");else if(c===16||c===17||c===18||c===20)return})},_setKeyBoardNavigationMode:function(a){if(a){this.keyboardNavigationMode=true;this.$selection.addClass("sol-keyboard-navigation")}else{this.keyboardNavigationMode=false;this.$selection.find(".sol-option.keyboard-selection");this.$selection.removeClass("sol-keyboard-navigation");this.$selectionContainer.find(".sol-option.keyboard-selection").removeClass("keyboard-selection");this.$selection.scrollTop(0)}},_applySearchTermFilter:function(){if(!this.items||this.items.length===0)return;var b=this.$input.val(),c=(b||"").toLowerCase();this.$selectionContainer.find(".sol-filtered-search").removeClass("sol-filtered-search");this._setNoResultsItemVisible(false);if(c.trim().length>0)this._findTerms(this.items,c);if(a.isFunction(this.config.events.onScroll))this.config.events.onScroll.call(this)},_findTerms:function(b,c){if(!b||!a.isArray(b)||b.length===0)return;var d=this;this._setKeyBoardNavigationMode(false);a.each(b,function(a,b){if(b.type==="option"){var e=b.displayElement,f=(b.label+" "+b.tooltip).trim().toLowerCase();if(f.indexOf(c)===-1)e.addClass("sol-filtered-search")}else{d._findTerms(b.children,c);var g=b.displayElement.find(".sol-option:not(.sol-filtered-search)");if(g.length===0)b.displayElement.addClass("sol-filtered-search")}});this._setNoResultsItemVisible(this.$selectionContainer.find(".sol-option:not(.sol-filtered-search)").length===0)},_initializeData:function(){if(!this.config.data)this.items=this._detectDataFromOriginalElement();else if(a.isFunction(this.config.data))this.items=this._fetchDataFromFunction(this.config.data);else if(a.isArray(this.config.data))this.items=this._fetchDataFromArray(this.config.data);else if(typeof this.config.data===typeof "a string")this._loadItemsFromUrl(this.config.data);else this._showErrorLabel("Unknown data type");if(this.items)this._processDataItems(this.items)},_detectDataFromOriginalElement:function(){if(this.$originalElement.prop("tagName").toLowerCase()==="select"){var b=this,c=[];a.each(this.$originalElement.children(),function(d,e){var f=a(e),g=f.prop("tagName").toLowerCase(),h;if(g==="option"){h=b._processSelectOption(f);if(h)c.push(h)}else if(g==="optgroup"){h=b._processSelectOptgroup(f);if(h)c.push(h)}else b._showErrorLabel("Invalid element found in select: "+g+". Only option and optgroup are allowed")});return this._invokeConverterIfNeccessary(c)}else if(this.$originalElement.data("sol-data")){var d=this.$originalElement.data("sol-data");return this._invokeConverterIfNeccessary(d)}else this._showErrorLabel('Could not determine data from original element. Must be a select or data must be provided as data-sol-data="" attribute')},_processSelectOption:function(b){return a.extend({},this.SOL_OPTION_FORMAT,{value:b.val(),selected:b.prop("selected"),disabled:b.prop("disabled"),cssClass:b.attr("class"),label:b.html(),tooltip:b.attr("title"),element:b})},_processSelectOptgroup:function(b){var c=this,d=a.extend({},this.SOL_OPTIONGROUP_FORMAT,{label:b.attr("label"),tooltip:b.attr("title"),disabled:b.prop("disabled"),children:[]}),e=b.children("option");a.each(e,function(b,e){var f=a(e),g=c._processSelectOption(f);if(d.disabled)g.disabled=true;d.children.push(g)});return d},_fetchDataFromFunction:function(a){return this._invokeConverterIfNeccessary(a(this))},_fetchDataFromArray:function(a){return this._invokeConverterIfNeccessary(a)},_loadItemsFromUrl:function(b){var c=this;a.ajax(b,{success:function(a){c.items=c._invokeConverterIfNeccessary(a);if(c.items)c._processDataItems(c.items)},error:function(a,d,e){c._showErrorLabel("Error loading from url "+b+": "+e)},dataType:"json"})},_invokeConverterIfNeccessary:function(b){if(a.isFunction(this.config.converter))return this.config.converter.call(this,this,b);return b},_processDataItems:function(b){if(!b){this._showErrorLabel("Data items not present. Maybe the converter did not return any values");return}
if(b.length===0){this._setNoResultsItemVisible(true);this.$loadingData.remove();return}
var c=this,d=0,e=function(){this.$loadingData.remove();this._initializeSelectAll();if(a.isFunction(this.config.events.onInitialized))this.config.events.onInitialized.call(this,this,b)},f=function(){var a=0,g;while(a++<c.config.asyncBatchSize&&d<b.length){g=b[d++];if(g.type===c.SOL_OPTION_FORMAT.type)c._renderOption(g);else if(g.type===c.SOL_OPTIONGROUP_FORMAT.type)c._renderOptiongroup(g);else{c._showErrorLabel("Invalid item type found "+g.type);return}}
if(d>=b.length)e.call(c);else setTimeout(f,0)};f.call(this)},_renderOption:function(b,c){var d=this,e=c||this.$selection,f,g=a('<div class="sol-label-text"/>').html(b.label.trim().length===0?"&nbsp;":b.label).addClass(b.cssClass),h,i,j=this._getNameAttribute();if(this.config.multiple){f=a('<input type="checkbox" class="sol-checkbox"/>');if(this.config.useBracketParameters)j+="[]"}else f=a('<input type="radio" class="sol-radio"/>').on("change",function(){d.$selectionContainer.find('input[type="radio"][name="'+j+'"]').not(a(this)).trigger("sol-deselect")}).on("sol-deselect",function(){d._removeSelectionDisplayItem(a(this))});f.on("change",function(b,c){a(this).trigger("sol-change",c)}).on("sol-change",function(b,c){d._selectionChange(a(this),c)}).data("sol-item",b).prop("checked",b.selected).prop("disabled",b.disabled).attr("name",j).val(b.value);h=a('<label class="sol-label"/>').attr("title",b.tooltip).append(f).append(g);i=a('<div class="sol-option"/>').append(h);b.displayElement=i;e.append(i);if(b.selected)this._addSelectionDisplayItem(f)},_renderOptiongroup:function(b){var c=this,d=a('<div class="sol-optiongroup-label"/>').attr("title",b.tooltip).html(b.label),e=a('<div class="sol-optiongroup"/>').append(d);if(b.disabled)e.addClass("disabled");if(a.isArray(b.children))a.each(b.children,function(a,b){c._renderOption(b,e)});b.displayElement=e;this.$selection.append(e)},_initializeSelectAll:function(){if(this.config.showSelectAll===true||a.isFunction(this.config.showSelectAll)&&this.config.showSelectAll.call(this)){var b=this,c=a('<a href="#" class="sol-deselect-all"/>').html(this.config.texts.selectNone).click(function(a){b.deselectAll();a.preventDefault();return false}),d=a('<a href="#" class="sol-select-all"/>').html(this.config.texts.selectAll).click(function(a){b.selectAll();a.preventDefault();return false});this.$actionButtons=a('<div class="sol-action-buttons"/>').append(d).append(c).append('<div class="sol-clearfix"/>');this.$selectionContainer.prepend(this.$actionButtons)}},_selectionChange:function(b,c){if(this.$originalElement&&this.$originalElement.prop("tagName").toLowerCase()==="select"){var d=this;this.$originalElement.find("option").each(function(c,e){var f=a(e);if(f.val()===b.val()){f.prop("selected",b.prop("checked"));d.$originalElement.trigger("change");return}})}
if(b.prop("checked"))this._addSelectionDisplayItem(b);else this._removeSelectionDisplayItem(b);if(this.config.multiple)this.config.scrollTarget.trigger("scroll");else this.close();var e=this.$showSelectionContainer.children(".sol-selected-display-item");if(this.config.maxShow!=0&&e.length>this.config.maxShow){e.hide();var f=this.config.texts.itemsSelected.replace("{$a}",e.length);this.$xItemsSelected.html('<div class="sol-selected-display-item-text">'+f+"<div>");this.$showSelectionContainer.append(this.$xItemsSelected);this.$xItemsSelected.show()}else{e.show();this.$xItemsSelected.hide()}
if(!c&&a.isFunction(this.config.events.onChange))this.config.events.onChange.call(this,this,b);this.$container.removeClass("sol-active");},_addSelectionDisplayItem:function(b){var c=b.data("sol-item"),d=c.displaySelectionItem,e;if(!d){e=a('<span class="sol-selected-display-item-text" />').html(c.label);d=a('<div class="sol-selected-display-item"/>').append(e).attr("title",c.tooltip).appendTo(this.$showSelectionContainer);if((this.config.multiple||this.config.allowNullSelection)&&!b.prop("disabled"))a('<span class="sol-quick-delete"/>').html(this.config.texts.quickDelete).click(function(){b.prop("checked",false).trigger("change")}).prependTo(d);c.displaySelectionItem=d}},_removeSelectionDisplayItem:function(a){var b=a.data("sol-item"),c=b.displaySelectionItem;if(c){c.remove();b.displaySelectionItem=undefined}},_setNoResultsItemVisible:function(a){if(a){this.$noResultsItem.show();this.$selection.hide();if(this.$actionButtons)this.$actionButtons.hide()}else{this.$noResultsItem.hide();this.$selection.show();if(this.$actionButtons)this.$actionButtons.show()}},isOpen:function(){return this.$container.hasClass("sol-active")},isClosed:function(){return!this.isOpen()},toggle:function(){if(this.isOpen())this.close();else this.open()},open:function(){if(this.isClosed()){this.$container.addClass("sol-active");this.config.scrollTarget.bind("scroll",this.internalScrollWrapper).trigger("scroll");a(b).on("resize",this.internalScrollWrapper);if(a.isFunction(this.config.events.onOpen))this.config.events.onOpen.call(this,this)}},close:function(){if(this.isOpen()){this._setKeyBoardNavigationMode(false);this.$container.removeClass("sol-active");this.config.scrollTarget.unbind("scroll",this.internalScrollWrapper);a(b).off("resize");this.$input.val("");this._applySearchTermFilter();this.config.displayContainerAboveInput=undefined;if(a.isFunction(this.config.events.onClose))this.config.events.onClose.call(this,this)}},selectAll:function(){if(this.config.multiple){var b=this.$selectionContainer.find('input[type="checkbox"]:not([disabled], :checked)').prop("checked",true).trigger("change",true);this.close();if(a.isFunction(this.config.events.onChange))this.config.events.onChange.call(this,this,b)}},deselectAll:function(){if(this.config.multiple){var b=this.$selectionContainer.find('input[type="checkbox"]:not([disabled]):checked').prop("checked",false).trigger("change",true);this.close();if(a.isFunction(this.config.events.onChange))this.config.events.onChange.call(this,this,b)}},getSelection:function(){return this.$selection.find("input:checked");}};d.defaults=d.prototype.defaults;b.SearchableOptionList=d;a.fn.searchableOptionList=function(b){var c=[];this.each(function(){var e=a(this),f=e.data(d.prototype.DATA_KEY);if(f)c.push(f);else{var g=new d(e,b);c.push(g);setTimeout(function(){g.init()},0)}});if(c.length===1)return c[0];return c}})(jQuery,window,document);$(document).ready(function(){$(".Select-Md").searchableOptionList({showSelectAll:false,texts:{noItemsAvailable:"No se encontro",quickDelete:"&#xE5CD;"}})})

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -0,0 +1,15 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Generated by IcoMoon</metadata>
<defs>
<font id="raty" horiz-adv-x="512">
<font-face units-per-em="512" ascent="480" descent="-32" />
<missing-glyph horiz-adv-x="512" />
<glyph unicode="&#x20;" d="" horiz-adv-x="256" />
<glyph unicode="&#xe600;" d="M256 16c-114.88 0-208 93.12-208 208s93.12 208 208 208 208-93.12 208-208-93.12-208-208-208zM351.376 284.656c3.904 3.904 3.904 10.256 0 14.16l-21.248 21.232c-3.904 3.904-10.256 3.904-14.16 0l-60.176-60.176-60.176 60.176c-3.904 3.904-10.256 3.904-14.16 0l-21.248-21.232c-3.904-3.904-3.904-10.256 0-14.16l60.192-60.192-60.192-60.16c-3.904-3.904-3.904-10.256 0-14.16l21.248-21.248c3.904-3.904 10.256-3.904 14.16 0l60.176 60.192 60.176-60.192c3.904-3.904 10.256-3.904 14.16 0l21.248 21.248c3.904 3.904 3.904 10.256 0 14.16l-60.192 60.16 60.192 60.192z" />
<glyph unicode="&#xe601;" d="M256 16c-114.88 0-208 93.12-208 208s93.12 208 208 208 208-93.12 208-208-93.12-208-208-208zM256 384c-88.352 0-160-71.648-160-160s71.648-160 160-160c88.368 0 160 71.648 160 160s-71.632 160-160 160zM328.592 167.44l-16.224-16.224c-2.976-2.976-7.808-2.976-10.8 0l-45.92 45.92-45.92-45.92c-2.992-2.976-7.808-2.976-10.8 0l-16.224 16.224c-2.976 2.976-2.976 7.808 0 10.8l45.936 45.904-45.936 45.92c-2.976 2.992-2.976 7.824 0 10.816l16.224 16.208c2.992 2.992 7.808 2.992 10.8 0l45.92-45.92 45.92 45.92c2.992 2.992 7.824 2.992 10.8 0l16.224-16.208c2.976-2.992 2.976-7.824 0-10.816l-45.936-45.92 45.936-45.904c2.976-2.992 2.976-7.84 0-10.8z" />
<glyph unicode="&#xf005;" d="M475.428 290.572q0-6.286-7.428-13.714l-103.714-101.143 24.572-142.857q0.286-2 0.286-5.714 0-6-3-10.143t-8.714-4.143q-5.428 0-11.428 3.428l-128.286 67.428-128.286-67.428q-6.285-3.428-11.428-3.428-6 0-9 4.143t-3 10.143q0 1.714 0.572 5.714l24.572 142.857-104 101.143q-7.143 7.714-7.143 13.714 0 10.572 16 13.143l143.428 20.857 64.286 130q5.428 11.714 14 11.714t14-11.714l64.286-130 143.429-20.857q16-2.572 16-13.143z" horiz-adv-x="476" />
<glyph unicode="&#xf006;" d="M324.857 188.572l87.428 84.857-120.572 17.715-54 109.143-54-109.143-120.572-17.714 87.428-84.857-20.857-120.286 108 56.857 107.714-56.857zM475.428 290.572q0-6.286-7.428-13.714l-103.714-101.143 24.572-142.857q0.286-2 0.286-5.714 0-14.286-11.714-14.286-5.428 0-11.428 3.428l-128.286 67.428-128.286-67.428q-6.285-3.428-11.428-3.428-6 0-9 4.143t-3 10.143q0 1.714 0.572 5.714l24.572 142.857-104 101.143q-7.143 7.714-7.143 13.714 0 10.572 16 13.143l143.428 20.857 64.286 130q5.428 11.714 14 11.714t14-11.714l64.286-130 143.429-20.857q16-2.572 16-13.143z" horiz-adv-x="476" />
<glyph unicode="&#xf123;" d="M338.857 202l73.428 71.428-120.572 17.714-8.572 17.143-45.428 92v-275.143l16.857-8.857 90.857-48-17.143 101.428-3.428 18.857zM468 276.857l-103.714-101.143 24.572-142.857q1.428-9.428-1.714-14.714t-9.714-5.286q-4.857 0-11.428 3.428l-128.286 67.428-128.286-67.428q-6.572-3.428-11.428-3.428-6.572 0-9.715 5.286t-1.715 14.714l24.572 142.857-104 101.143q-9.143 9.143-6.572 17t15.428 9.857l143.429 20.857 64.286 130q5.714 11.714 14 11.714 8 0 14-11.714l64.286-130 143.429-20.857q12.857-2 15.428-9.857t-6.857-17z" horiz-adv-x="476" />
</font></defs></svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 781 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1,46 @@
.cancel-on-png, .cancel-off-png, .star-on-png, .star-off-png, .star-half-png {
font-size: 2em;
}
@font-face {
font-family: "raty";
font-style: normal;
font-weight: normal;
src: url("./fonts/raty.eot");
src: url("./fonts/raty.eot?#iefix") format("embedded-opentype");
src: url("./fonts/raty.svg#raty") format("svg");
src: url("./fonts/raty.ttf") format("truetype");
src: url("./fonts/raty.woff") format("woff");
}
.cancel-on-png, .cancel-off-png, .star-on-png, .star-off-png, .star-half-png {
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
font-family: "raty";
font-style: normal;
font-variant: normal;
font-weight: normal;
line-height: 1;
speak: none;
text-transform: none;
}
.cancel-on-png:before {
content: "\e600";
}
.cancel-off-png:before {
content: "\e601";
}
.star-on-png:before {
content: "\f005";
}
.star-off-png:before {
content: "\f006";
}
.star-half-png:before {
content: "\f123";
}

View File

@ -0,0 +1,777 @@
/*!
* Raty - A Star Rating Plugin
*
* The MIT License
*
* author: Washington Botelho
* github: wbotelhos/raty
* version: 3.1.0
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof module === 'object' && module.exports) {
module.exports = factory(require('jquery'));
} else {
factory(root.jQuery);
}
}(this, function($) {
'use strict';
$.raty = {
cancelButton: false,
cancelClass: 'raty-cancel',
cancelHint: 'Cancel this rating!',
cancelOff: 'cancel-off.png',
cancelOn: 'cancel-on.png',
cancelPlace: 'left',
click: undefined,
half: false,
halfShow: true,
hints: ['bad', 'poor', 'regular', 'good', 'gorgeous'],
iconRange: undefined,
iconRangeSame: false,
mouseout: undefined,
mouseover: undefined,
noRatedMsg: 'Not rated yet!',
number: 5,
numberMax: 20,
path: undefined,
precision: false,
readOnly: false,
round: { down: 0.25, full: 0.6, up: 0.76 },
score: undefined,
scoreName: 'score',
single: false,
space: true,
starHalf: 'star-half.png',
starOff: 'star-off.png',
starOn: 'star-on.png',
starType: 'img',
target: undefined,
targetFormat: '{score}',
targetKeep: false,
targetScore: undefined,
targetText: '',
targetType: 'hint'
};
$.fn.raty = function(options) {
return this.each(function() {
var instance = new $.raty.Raty(this, options);
return instance._create();
});
};
$.raty.Raty = (function() {
var Raty = function(element, options) {
this.element = element;
this.self = $(element);
this.opt = $.extend(true, {}, $.raty, options, this.self.data());
};
Raty.prototype = {
_create: function() {
this._executeCallbacks();
this._adjustNumber();
this._adjustHints();
this.opt.score = this._adjustedScore(this.opt.score);
if (this.opt.starType !== 'img') {
this._adjustStarName();
}
this._setPath();
this._createStars();
if (this.opt.cancelButton) {
this._createCancel();
}
if (this.opt.precision) {
this._adjustPrecision();
}
this._createScore();
this._apply(this.opt.score);
this._setTitle(this.opt.score);
this._target(this.opt.score);
if (this.opt.readOnly) {
this._lock();
} else {
this.element.style.cursor = 'pointer';
this._binds();
}
this.self.data('raty', this);
},
// TODO: model spec
_adjustedScore: function(score) {
if (score || score === 0) {
return this._between(score, 0, this.opt.number);
}
},
_adjustHints: function() {
if (!this.opt.hints) {
this.opt.hints = [];
}
if (!this.opt.halfShow && !this.opt.half) {
return;
}
var steps = this.opt.precision ? 10 : 2;
for (var i = 0; i < this.opt.number; i++) {
var group = this.opt.hints[i];
if (Object.prototype.toString.call(group) !== '[object Array]') {
group = [group];
}
this.opt.hints[i] = [];
for (var j = 0; j < steps; j++) {
var hint = group[j];
var last = group[group.length - 1];
if (last === undefined) {
last = null;
}
this.opt.hints[i][j] = hint === undefined ? last : hint;
}
}
},
_adjustNumber: function() {
this.opt.number = this._between(this.opt.number, 1, this.opt.numberMax);
},
_adjustPrecision: function() {
this.opt.half = true;
},
_adjustStarName: function() {
var replaces = ['cancelOff', 'cancelOn', 'starHalf', 'starOff', 'starOn'];
this.opt.path = '';
for (var i = 0; i < replaces.length; i++) {
this.opt[replaces[i]] = this.opt[replaces[i]].replace('.', '-');
}
},
// TODO: model spec
_apply: function(score) {
this._fill(score);
if (score) {
if (score > 0) {
this.scoreField.val(score);
}
this._roundStars(score);
}
},
_attributesForIndex: function(i) {
var name = this._nameForIndex(i);
var attributes = { alt: i, src: this.opt.path + this.opt[name] };
if (this.opt.starType !== 'img') {
attributes = { 'data-alt': i, 'class': this.opt[name] };
}
attributes.title = this._getHint(i);
return attributes;
},
_between: function(value, min, max) {
return Math.min(Math.max(parseFloat(value), min), max);
},
// TODO: model spec
_binds: function() {
if (this.cancelButton) {
this._bindOverCancel();
this._bindClickCancel();
this._bindOutCancel();
}
this._bindOver();
this._bindClick();
this._bindOut();
},
// TODO: model spec
_bindClick: function() {
var that = this;
this.stars.on('click.raty', function(evt) {
if (that.self.data('readonly')) {
return;
}
var execute = true;
var score = (that.opt.half || that.opt.precision) ? that.self.data('score') : (this.alt || $(this).data('alt'));
if (that.opt.half && !that.opt.precision) {
score = that._roundHalfScore(score);
}
if (that.opt.click) {
execute = that.opt.click.call(that.element, +score, evt);
}
if (execute || execute === undefined) {
that._apply(+score);
}
});
},
// TODO: model spec
_bindClickCancel: function() {
this.cancelButton.on('click.raty', function(evt) {
this.scoreField.removeAttr('value');
if (this.opt.click) {
this.opt.click.call(this.element, null, evt);
}
}.bind(this));
},
// TODO: model spec
_bindOut: function() {
this.self.on('mouseleave.raty', function(evt) {
var score = +this.scoreField.val() || undefined;
this._apply(score);
this._target(score, evt);
this._resetTitle();
if (this.opt.mouseout) {
this.opt.mouseout.call(this.element, score, evt);
}
}.bind(this));
},
// TODO: model spec
_bindOutCancel: function() {
var that = this;
this.cancelButton.on('mouseleave.raty', function(evt) {
var icon = that.opt.cancelOff;
if (that.opt.starType !== 'img') {
icon = that.opt.cancelClass + ' ' + icon;
}
that._setIcon(this, icon);
if (that.opt.mouseout) {
var score = +that.scoreField.val() || undefined;
that.opt.mouseout.call(that.element, score, evt);
}
});
},
// TODO: model spec
_bindOver: function() {
var that = this;
var action = that.opt.half ? 'mousemove.raty' : 'mouseover.raty';
this.stars.on(action, function(evt) {
var score = that._getScoreByPosition(evt, this);
that._fill(score);
if (that.opt.half) {
that._roundStars(score, evt);
that._setTitle(score, evt);
that.self.data('score', score);
}
that._target(score, evt);
if (that.opt.mouseover) {
that.opt.mouseover.call(that.element, score, evt);
}
});
},
// TODO: model spec
_bindOverCancel: function() {
var that = this;
this.cancelButton.on('mouseover.raty', function(evt) {
if (that.self.data('readonly')) {
return;
}
var starOff = that.opt.path + that.opt.starOff;
var icon = that.opt.cancelOn;
if (that.opt.starType === 'img') {
that.stars.attr('src', starOff);
} else {
icon = that.opt.cancelClass + ' ' + icon;
that.stars.attr('class', starOff);
}
that._setIcon(this, icon);
that._target(null, evt);
if (that.opt.mouseover) {
that.opt.mouseover.call(that.element, null);
}
});
},
// TODO: model spec
_buildScoreField: function() {
return $('<input />', { name: this.opt.scoreName, type: 'hidden' }).appendTo(this.self);
},
// TODO: model spec
_createCancel: function() {
var icon = this.opt.path + this.opt.cancelOff;
var button = $('<' + this.opt.starType + ' />', { title: this.opt.cancelHint, 'class': this.opt.cancelClass });
if (this.opt.starType === 'img') {
button.attr({ src: icon, alt: 'x' });
} else {
// TODO: use $.data
button.attr('data-alt', 'x').addClass(icon);
}
if (this.opt.cancelPlace === 'left') {
this.self.prepend('&#160;').prepend(button);
} else {
this.self.append('&#160;').append(button);
}
this.cancelButton = button;
},
// TODO: model spec
_createScore: function() {
var score = $(this.opt.targetScore);
this.scoreField = score.length ? score : this._buildScoreField();
},
_createStars: function() {
for (var i = 1; i <= this.opt.number; i++) {
var attributes = this._attributesForIndex(i);
$('<' + this.opt.starType + ' />', attributes).appendTo(this.element);
if (this.opt.space && i < this.opt.number) {
this.self.append('&#160;');
}
}
this.stars = this.self.children(this.opt.starType);
},
// TODO: model spec
_error: function(message) {
$(this).text(message);
$.error(message);
},
_executeCallbacks: function() {
var options = ['number', 'readOnly', 'score', 'scoreName', 'target', 'path'];
for (var i = 0; i < options.length; i++) {
if (typeof this.opt[options[i]] === 'function') {
var value = this.opt[options[i]].call(this.element);
if (value) {
this.opt[options[i]] = value;
} else {
delete this.opt[options[i]];
}
}
}
},
// TODO: model spec
_fill: function(score) {
var hash = 0;
if (this.opt.iconRangeSame && this.opt.iconRange) {
while (hash < this.opt.iconRange.length && this.opt.iconRange[hash].range < score) {
hash++;
}
}
for (var i = 1; i <= this.stars.length; i++) {
var icon;
var star = this.stars[i - 1];
var turnOn = this._turnOn(i, score);
if (this.opt.iconRange && this.opt.iconRange.length > hash) {
var irange = this.opt.iconRange[hash];
icon = this._getRangeIcon(irange, turnOn);
if (i <= irange.range) {
this._setIcon(star, icon);
}
if (i === irange.range) {
hash++;
}
} else {
icon = this.opt[turnOn ? 'starOn' : 'starOff'];
this._setIcon(star, icon);
}
}
},
_getDecimal: function(number, fractions) {
var decimal = number.toString().split('.')[1];
var result = 0;
if (decimal) {
result = parseInt(decimal.slice(0, fractions), 10);
if (decimal.slice(1, 5) === '9999') {
result++;
}
}
return result;
},
// TODO: model spec
_getRangeIcon: function(irange, turnOn) {
return turnOn ? irange.on || this.opt.starOn : irange.off || this.opt.starOff;
},
// TODO: model spec
_getScoreByPosition: function(evt, icon) {
var score = parseInt(icon.alt || icon.getAttribute('data-alt'), 10);
if (this.opt.half) {
var size = this._getWidth();
var percent = parseFloat((evt.pageX - $(icon).offset().left) / size);
score = score - 1 + percent;
}
return score;
},
// TODO: model spec
_getHint: function(score, evt) {
if (score !== 0 && !score) {
return this.opt.noRatedMsg;
}
var decimal = this._getDecimal(score, 1);
var integer = Math.ceil(score);
var group = this.opt.hints[(integer || 1) - 1];
var hint = group;
var set = !evt || this.isMove;
if (this.opt.precision) {
if (set) {
decimal = decimal === 0 ? 9 : decimal - 1;
}
hint = group[decimal];
} else if (this.opt.halfShow || this.opt.half) {
decimal = set && decimal === 0 ? 1 : decimal > 5 ? 1 : 0;
hint = group[decimal];
}
return hint === '' ? '' : hint || score;
},
// TODO: model spec
_getWidth: function() {
var width = this.stars[0].width || parseFloat(this.stars.eq(0).css('font-size'));
if (!width) {
this._error('Could not get the icon width!');
}
return width;
},
// TODO: model spec
_lock: function() {
var hint = this._getHint(this.scoreField.val());
this.element.style.cursor = '';
this.element.title = hint;
this.scoreField.prop('readonly', true);
this.stars.prop('title', hint);
if (this.cancelButton) {
this.cancelButton.hide();
}
this.self.data('readonly', true);
},
_nameForIndex: function(i) {
return this.opt.score && this.opt.score >= i ? 'starOn' : 'starOff';
},
// TODO: model spec
_resetTitle: function() {
for (var i = 0; i < this.opt.number; i++) {
this.stars[i].title = this._getHint(i + 1);
}
},
// TODO: model spec
_roundHalfScore: function(score) {
var integer = parseInt(score, 10);
var decimal = this._getDecimal(score, 1);
if (decimal !== 0) {
decimal = decimal > 5 ? 1 : 0.5;
}
return integer + decimal;
},
// TODO: model spec
_roundStars: function(score, evt) {
var name = this._starName(score, evt);
if (name) {
var icon = this.opt[name];
var star = this.stars[Math.ceil(score) - 1];
this._setIcon(star, icon);
} // Full down: [x.00 .. x.25]
},
// TODO: model spec
_setIcon: function(star, icon) {
star[this.opt.starType === 'img' ? 'src' : 'className'] = this.opt.path + icon;
},
_setPath: function() {
this.opt.path = this.opt.path || '';
if (this.opt.path && this.opt.path.slice(-1)[0] !== '/') {
this.opt.path += '/';
}
},
// TODO: model spec
_setTarget: function(target, score) {
if (score) {
score = this.opt.targetFormat.toString().replace('{score}', score);
}
if (target.is(':input')) {
target.val(score);
} else {
target.html(score);
}
},
// TODO: model spec
_setTitle: function(score, evt) {
if (score) {
var integer = parseInt(Math.ceil(score), 10);
var star = this.stars[integer - 1];
star.title = this._getHint(score, evt);
}
},
_starName: function(score, evt) {
var decimal = +(score % 1).toFixed(2);
if (evt || this.isMove) {
return decimal > 0.5 ? 'starOn' : 'starHalf';
}
if (decimal <= this.opt.round.down) { // Down: [x.00 ... x.25]
return;
}
if (this.opt.halfShow && decimal < this.opt.round.up) { // Half: [x.26 ... x.75]
return 'starHalf';
}
if (decimal < this.opt.round.full) { // Off: [x.26 .. x.6]
return 'starOff';
}
return 'starOn'; // Up: [x.26 ...] || [x.6 ...]
},
// TODO: model spec
_target: function(score, evt) {
if (this.opt.target) {
var target = $(this.opt.target);
if (!target.length) {
this._error('Target selector invalid or missing!');
}
var mouseover = evt && evt.type === 'mouseover';
if (score === undefined) {
score = this.opt.targetText;
} else if (score === null) {
score = mouseover ? this.opt.cancelHint : this.opt.targetText;
} else {
if (this.opt.targetType === 'hint') {
score = this._getHint(score, evt);
} else if (this.opt.precision) {
score = parseFloat(score).toFixed(1);
}
var mousemove = evt && evt.type === 'mousemove';
if (!mouseover && !mousemove && !this.opt.targetKeep) {
score = this.opt.targetText;
}
}
this._setTarget(target, score);
}
},
// TODO: model spec
_turnOn: function(i, score) {
return this.opt.single ? (i === score) : (i <= score);
},
// TODO: model spec
_unlock: function() {
this.element.style.cursor = 'pointer';
this.element.removeAttribute('title');
this.scoreField.removeAttr('readonly');
this.self.data('readonly', false);
this._resetTitle();
if (this.cancelButton) {
this.cancelButton.css('display', '');
}
},
// TODO: model spec
cancel: function(click) {
if (this.self.data('readonly') !== true) {
this[click ? 'click' : 'score'].call(this, null);
this.scoreField.removeAttr('value');
}
},
// TODO: model spec
click: function(score) {
if (this.self.data('readonly') !== true) {
score = this._adjustedScore(score);
this._apply(score);
if (this.opt.click) {
this.opt.click.call(this.element, score, $.Event('click'));
}
this._target(score);
}
},
// TODO: model spec
getScore: function() {
var score = [];
var value ;
value = this.scoreField.val();
score.push(value ? +value : undefined);
return (score.length > 1) ? score : score[0];
},
// TODO: model spec
move: function(score) {
var integer = parseInt(score, 10);
var decimal = this._getDecimal(score, 1);
if (integer >= this.opt.number) {
integer = this.opt.number - 1;
decimal = 10;
}
var width = this._getWidth();
var steps = width / 10;
var star = $(this.stars[integer]);
var percent = star.offset().left + steps * decimal;
var evt = $.Event('mousemove', { pageX: percent });
this.isMove = true;
star.trigger(evt);
this.isMove = false;
},
// TODO: model spec
readOnly: function(readonly) {
if (this.self.data('readonly') !== readonly) {
if (readonly) {
this.self.off('.raty').children(this.opt.starType).off('.raty');
this._lock();
} else {
this._binds();
this._unlock();
}
this.self.data('readonly', readonly);
}
},
// TODO: model spec
score: function() {
return arguments.length ? this.setScore.apply(this, arguments) : this.getScore();
},
setScore: function(score) {
if (this.self.data('readonly') !== true) {
score = this._adjustedScore(score);
this._apply(score);
this._target(score);
}
}
};
return Raty;
})();
}));

View File

@ -0,0 +1,18 @@
@extends('themes::themetoro.layout')
@section('content')
<section>
<div class="Top AAIco-movie_filter"><h2 class="Title">{{$section_name}}</h2></div>
@if(!count($data))
<p class="comment-notes">
<span id="email-notes">Thông báo!</span>
<span class="required-field-message">Không nội dung cho mục này. </span>
</p>
@endif
<ul class="MovieList Rows AX A04 B03 C20 D03 E20 Alt">
@foreach($data as $movie)
@include("themes::themetoro.inc.section.section_thumb_item")
@endforeach
</ul>
{{ $data->appends(request()->all())->links('themes::themetoro.inc.pagination') }}
</section>
@endsection

View File

@ -0,0 +1,471 @@
@extends('themes::themetoro.layout')
@push('header')
<style>
.jwplayer {
position: unset !important;
}
</style>
@endpush
@section('single_top')
<div class="TPost A D">
<div class="Container">
<div class="optns-bx">
<div class="drpdn">
<button class="bstd Button">
<span>Đổi server khi lỗi<span>2 server</span></span>
<i class="fa-chevron-down"></i>
</button>
<ul class="optnslst trsrcbx">
@foreach ($currentMovie->episodes->where('slug', $episode->slug)->where('server', $episode->server) as $server)
<li>
<a onclick="chooseStreamingServer(this)" data-type="{{ $server->type }}" data-id="{{ $server->id }}" data-link="{{ $server->link }}" class="streaming-server Button sgty">
<span class="nmopt">0{{ $loop->index + 1 }}</span>
<span>Nguồn Phát <span>#0{{ $loop->index + 1 }}</span></span>
</a>
</li>
@endforeach
</ul>
</div>
</div>
<div class="VideoPlayer">
<div id="VideoOption01" class="Video on">
</div>
<span class="BtnLight AAIco-lightbulb_outline lgtbx-lnk"></span>
<span class="lgtbx"></span>
<div class="navepi tagcloud">
</div>
</div>
<div class="Image">
<figure class="Objf"><img src="{{$currentMovie->getPosterUrl()}}" alt="{{$currentMovie->name}}"></figure>
</div>
</div>
</div>
<div class="Main Container">
@foreach ($currentMovie->episodes->sortBy([['server', 'asc']])->groupBy('server') as $server => $data)
<section class="SeasonBx AACrdn">
<div class="Top AAIco-playlist_play AALink episodes-view episodes-load">
<div class="Title"><a href="#">Danh sách tập <span>{{ $server }}</span></a></div>
</div>
<ul class="AZList">
@foreach ($data->sortByDesc('name', SORT_NATURAL)->groupBy('name') as $name => $item)
<li class="@if ($item->contains($episode)) Current @endif"><a href="{{ $item->sortByDesc('type')->first()->getUrl() }}" title="{{ $name }}">{{ $name }}</a></li>
@endforeach
</ul>
</section>
@endforeach
</div>
@endsection
@section('content')
<article class="TPost A">
<header class="Container">
<div class="TPMvCn">
<a href="javascript:void(0)"><h1 class="Title">{{$currentMovie->name}}</h1></a>
<ul class="ShareList">
<li><a href="javascript:void(0)"
title="Chia sẻ lên facebook"
onclick="window.open ('http://www.facebook.com/sharer.php?u={{$currentMovie->getUrl()}}', 'Facebook', 'toolbar=0, status=0, width=650, height=450');"
class="fa-facebook"></a></li>
<li><a href="javascript:void(0)"
title="Chia sẻ lên twitter"
onclick="javascript:window.open('https://twitter.com/intent/tweet?original_referer={{$currentMovie->getUrl()}}&amp;text={{$currentMovie->name}}&amp;tw_p=tweetbutton&amp;url={{$currentMovie->getUrl()}}', 'Twitter', 'toolbar=0, status=0, width=650, height=450');"
class="fa-twitter"></a></li>
</ul>
<div class="Info">
<div class="Vote">
<div class="post-ratings">
<img src="{{asset('themes/toro/img/cnt/rating_on.gif')}}" alt="img"><span
style="font-size: 12px;">{{$currentMovie->getRatingStar()}}</span>
</div>
</div>
<span class="Date">{{ $currentMovie->publish_year }}</span>
<span class="Qlty">
@switch($currentMovie->status)
@case("ongoing")
Đang chiếu
@break
@case("completed")
Trọn bộ
@break
@default
Trailer
@endswitch
</span>
<span class="Time">{{$currentMovie->episode_time}}</span>
<span class="Views AAIco-remove_red_eye">{{$currentMovie->view_total}}</span>
{!! $currentMovie->regions->map(function ($region) {
return '<span class="Qlty"><a href="'.$region->getUrl().'">'.$region->name.'</a></span>';
})->implode(' ') !!}
</div>
<div class="Description">
<p>{!! strip_tags($currentMovie->content) !!}</p>
<p class="Director">
<span>Đạo diễn:</span>
{!! $currentMovie->directors->map(function ($director) {
return '<span class="tt-at"><a href="'.$director->getUrl().'">'.$director->name.'</a></span>';
})->implode(',') !!}
</p>
<p class="Genre"><span>Thể loại:</span>
{!! $currentMovie->categories->map(function ($category) {
return '<a href="'.$category->getUrl().'">'.$category->name.'</a>';
})->implode(', ') !!}
</p>
<p class="Cast">
<span>Diễn viên:</span>
{!! $currentMovie->actors->map(function ($actor) {
return '<a href="'.$actor->getUrl().'">'.$actor->name.'</a>';
})->implode('<span class="dot-sh">,</span> ') !!}
</p>
</div>
@if ($currentMovie->trailer_url && strpos($currentMovie->trailer_url, 'youtube'))
<a href="javascript:void(0)" id="watch-trailer" class="Button TPlay AAIco-play_circle_outline"><strong>Xem Trailer</strong></a>
@endif
<div class="rating-content">
<div id="movies-rating-star" style="height: 18px;"></div>
<div>
({{ $currentMovie->getRatingStar() }}
sao
/
{{$currentMovie->getRatingCount()}} đánh giá)
</div>
<div id="movies-rating-msg"></div>
</div>
</div>
</header>
</article>
<section>
<div class="Top AAIco-chat">
<div class="Title">Bình luận</div>
</div>
<ul class="CommentsList">
<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>
</ul>
</section>
<section>
<div class="Top AAIco-star_border">
<h3 class="Title"> thể bạn muốn xem?</h3>
</div>
<div class="MovieListTop owl-carousel">
@foreach($movie_related as $movie)
<div class="TPostMv">
<div class="TPost B">
<a href="{{$movie->getUrl()}}">
<div class="Image">
<figure class="Objf TpMvPlay AAIco-play_arrow">
<img loading="lazy" class="owl-lazy"
data-src="{{$movie->getThumbUrl()}}"
alt="{{$movie->name}}">
</figure>
<span class="Qlty">{{$movie->episode_current}}</span>
</div>
<h2 class="Title">{{$movie->name}}</h2>
</a>
</div>
</div>
@endforeach
</div>
</section>
@endsection
@push('scripts')
<script src="/themes/toro/player/js/p2p-media-loader-core.min.js"></script>
<script src="/themes/toro/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('VideoOption01');
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('on');
})
el.classList.add('on');
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/toro/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>
@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'];
@endphp
<script>
toroflixPublic.trailer = "<iframe width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/{{$video_id}}\" frameborder=\"0\" allow=\"autoplay\" allow=\"encrypted-media\" allowfullscreen><\/iframe>"
</script>
<div class="Modal-Box Ttrailer">
<div class="Modal-Content">
<span class="Modal-Close Button AAIco-clear"></span>
</div>
<i class="AAOverlay"></i>
</div>
@endif
<script src="/themes/toro/plugins/jquery-raty/jquery.raty.js"></script>
<link href="/themes/toro/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/toro/plugins/jquery-raty/images/star-off.png',
starOn: '/themes/toro/plugins/jquery-raty/images/star-on.png',
starHalf: '/themes/toro/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>
{!! setting('site_scripts_facebook_sdk') !!}
@endpush

View File

@ -0,0 +1,53 @@
@php
$logo = setting('site_logo', '');
$brand = setting('site_brand', '');
$title = isset($title) ? $title : setting('site_homepage_title', '');
@endphp
<header id="Hd" class="Header">
<div class="Container">
<div id="HdTop" class="Top">
<span class="MenuBtn AATggl CXHd" data-tggl="Tf-Wp"><i></i><i></i><i></i></span>
<div class="Search">
<form method="get" action="/">
<input type="text" placeholder="Tìm kiếm phim..." name="search" value="{{ request('search') }}">
<label for="Tf-Search" class="SearchBtn fa-search AATggl" data-tggl="HdTop">
<i class="AAIco-clear"></i>
</label>
</form>
</div>
<figure class="Logo">
<a href="/" title="{{ $title }}" rel="home">
@if ($logo)
{!! $logo !!}
@else
{!! $brand !!}
@endif
</a>
</figure>
<nav class="Menu">
<ul>
@foreach ($menu as $item)
@if (count($item['children']))
<li id="menu-item-{{ $item['id'] }}"
class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-134">
<a href="{{ $item['link'] }}">{{ $item['name'] }}</a>
<ul class="sub-menu">
@foreach ($item['children'] as $children)
<li id="menu-item-{{ $children['id'] }}" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-135">
<a href="{{ $children['link'] }}">{{ $children['name'] }}</a>
</li>
@endforeach
</ul>
</li>
@else
<li id="menu-item-{{ $item['id'] }}"
class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-home menu-item-131">
<a href="{{ $item['link'] }}" aria-current="page">{{ $item['name'] }}</a></li>
@endif
@endforeach
</ul>
</nav>
</div>
</div>
</header>

View File

@ -0,0 +1,87 @@
<div class="MovieListSldCn" style="height: 589px;">
<div class="MovieListSld owl-carousel">
@foreach($home_page_slider_poster['data'] as $movie)
<div class="TPostMv">
<article class="TPost A">
<header class="Container">
<div class="TPMvCn">
<a href="{{$movie->getUrl()}}">
<div class="Title">{{$movie->name}}</div>
</a>
<div class="Info">
<div class="Vote">
<div class="post-ratings">
<img src="{{asset('themes/toro/img/cnt/rating_on.gif')}}">
<span class="st-vote">{{$movie->getRatingStar()}}</span>
</div>
</div>
<span class="Date">{{$movie->publish_year}}</span>
<span class="Qlty">
@if($movie->type == 'single')
Phim lẻ
@else
Phim bộ
@endif
</span>
<span class="Time">{{$movie->episode_time}}</span> <span
class="Views AAIco-remove_red_eye">{{$movie->view_total}}</span>
</div>
<div class="Description">
<p>
{!! mb_substr(strip_tags($movie->content),0,160, "utf-8") !!}...
</p>
<p class="Director"><span>Đạo diễn:</span>
@if(count($movie->directors))
{!! $movie->directors->map(function ($director) {
return '<a href="' .
$director->getUrl() .
'" tite="Đạo diễn ' .
$director->name .
'">' .
$director->name .
'</a>';
})->implode(', ') !!}
@endif
</p>
<p class="Genre"><span>Thể loại:</span>
@if(count($movie->categories))
{!! $movie->categories->map(function ($category) {
return '<a href="' .
$category->getUrl() .
'" tite="Thể loại ' .
$category->name .
'">' .
$category->name .
'</a>';
})->implode(', ') !!}
@endif
</p>
<p class="Cast"><span>Diễn viên:</span>
@if(count($movie->actors))
{!! $movie->actors->take(3)->map(function ($actor) {
return '<a href="' .
$actor->getUrl() .
'" tite="Diễn viên ' .
$actor->name .
'">' .
$actor->name .
'</a>';
})->implode(', ') !!}
...
@endif
</p>
</div>
<a href="{{$movie->getUrl()}}"
class="Button TPlay AAIco-play_circle_outline"><strong>Xem phim</strong></a>
</div>
<div class="Image">
<figure class="Objf">
<img loading="lazy" class="TPostBg" src="{{$movie->getPosterUrl()}}" alt="Background">
</figure>
</div>
</header>
</article>
</div>
@endforeach
</div>
</div>

View File

@ -0,0 +1,24 @@
<section>
<div class="Top AAIco-star_border">
<h1 class="Title">{{$home_page_slider_thumb['label']}}</h1>
</div>
<div class="MovieListTop owl-carousel">
@foreach($home_page_slider_thumb['data'] as $movie)
<div class="TPostMv">
<div class="TPost B">
<a href="{{$movie->getUrl()}}">
<div class="Image">
<figure class="Objf TpMvPlay AAIco-play_arrow">
<img loading="lazy" class="owl-lazy"
data-src="{{$movie->getThumbUrl()}}"
alt="{{$movie->name}}">
</figure>
<span class="Qlty">{{$movie->episode_current}}</span>
</div>
<h2 class="Title">{{$movie->name}}</h2>
</a>
</div>
</div>
@endforeach
</div>
</section>

View File

@ -0,0 +1,36 @@
@if ($paginator->hasPages())
<nav class="wp-pagenavi">
<div class="nav-links">
{{-- Previous Page Link --}}
@if ($paginator->onFirstPage())
@else
<a class="page-link" title="Trang trước" href="{{ $paginator->previousPageUrl() }}"><i class="fa-arrow-left"></i></a>
@endif
{{-- Pagination Elements --}}
@foreach ($elements as $element)
{{-- "Three Dots" Separator --}}
@if (is_string($element))
<a class="page-link disabled" href="#">{{ $element }}</a>
@endif
{{-- Array Of Links --}}
@if (is_array($element))
@foreach ($element as $page => $url)
@if ($page == $paginator->currentPage())
<a class="page-link current" title="Trang {{$page}}" href="#">{{$page}}</a>
@else
<a class="page-link" title="Trang {{$page}}" href="{{$url}}"> {{$page}}</a>
@endif
@endforeach
@endif
@endforeach
{{-- Next Page Link --}}
@if ($paginator->hasMorePages())
<a class="page larger" title="Trang tiếp" href="{{ $paginator->nextPageUrl() }}"><i class="fa-arrow-right"></i></a>
@else
@endif
</div>
</nav>
@endif

View File

@ -0,0 +1,5 @@
<aside>
@foreach($tops as $top)
@include("themes::themetoro.inc.rightbar." . $top['template'])
@endforeach
</aside>

View File

@ -0,0 +1,8 @@
<div id="toroflix_genres_widget-3" class="Wdgt widget_categories">
<div class="Title">{{$top['label']}}</div>
<ul>
@foreach($top['data'] as $movie)
<li><a href="{{$movie->getUrl()}}">{{$movie->name}}</a> {{$movie->publish_year}}</li>
@endforeach
</ul>
</div>

View File

@ -0,0 +1,42 @@
<div id="widget_post_toroflix-2" class="Wdgt widget_postlist">
<div class="Title">{{$top['label']}}</div>
<ul class="MovieList ">
@foreach($top['data'] as $key => $movie)
<li>
<div class="TPost C">
<a href="{{$movie->getUrl()}}">
<span class="Top">{{$key + 1}}</span>
<div class="Image">
<figure class="Objf TpMvPlay AAIco-play_arrow">
<img loading="lazy"
src="{{$movie->getThumbUrl()}}"
alt="{{$movie->name}}">
</figure>
</div>
<div class="Title">
{{$movie->name}}
</div>
</a>
<div class="Info">
<div>
<span class="TpTv BgA">
{{$movie->language}}
</span>
<span class="TpTv BgA">
{{$movie->quality}}
</span>
</div>
<div class="Vote">
<div class="post-ratings">
<img loading="lazy"
src="{{asset('themes/toro/img/cnt/rating_on.gif')}}"
alt="img"><span style="font-size: 12px;">{{$movie->getRatingStar()}}</span>
</div>
</div>
<span class="Date">{{$movie->publish_year}}</span> <span class="Time">{{$movie->episode_time}}</span> <span
class="Views AAIco-remove_red_eye">{{$movie->view_week}}</span></div>
</div>
</li>
@endforeach
</ul>
</div>

View File

@ -0,0 +1,21 @@
<div id="widget_post_toroflix-3" class="Wdgt widget_postlist">
<div class="Title">{{$top['label']}}</div>
<ul class="MovieList MovieList Rows AF A04">
@foreach($top['data'] as $movie)
<li>
<div class="TPost B">
<a href="{{$movie->getUrl()}}">
<div class="Image">
<figure class="Objf TpMvPlay AAIco-play_arrow">
<img loading="lazy"
src="{{$movie->getThumbUrl()}}"
alt="{{$movie->name}}">
</figure>
<span class="TpTv BgA">{{$movie->quality}}</span></div>
<div class="Title">{{$movie->name}}</div>
</a>
</div>
</li>
@endforeach
</ul>
</div>

View File

@ -0,0 +1,24 @@
<section>
<div class="Top">
<div class="Title">{{$item['label']}}</div>
</div>
<ul class="MovieList Rows BX B06 C04 E03 Episodes">
@foreach($item['data'] as $movie)
<li class="TPostMv">
<article class="TPost B">
<a href="{{$movie->getUrl()}}">
<div class="Image">
<figure class="Objf TpMvPlay AAIco-play_arrow">
<img class="TPostBg"
src="{{$movie->getPosterUrl()}}"
alt="Background">
</figure>
<span class="Qlty">{{$movie->episode_current}} {{$movie->language}}</span>
</div>
<h2 class="Title" data-subtitle="{{$movie->origin_name}}">{{$movie->name}}</h2>
</a>
</article>
</li>
@endforeach
</ul>
</section>

View File

@ -0,0 +1,11 @@
<section data-id="movies">
<div class="Top AAIco-movie_filter">
<h2 class="Title">{{$item['label']}}</h2>
<a href="{{$item['link']}}" class="Button Sm">Xem thêm</a>
</div>
<ul class="MovieList Rows AX A04 B03 C20 D03 E20 Alt">
@foreach($item['data'] as $movie)
@include("themes::themetoro.inc.section.section_thumb_item")
@endforeach
</ul>
</section>

View File

@ -0,0 +1,35 @@
<li class="TPostMv post-66 movies type-movies status-publish hentry category-comedy category-drama category-romance country-united-states-of-america annee-360 directors-diane-durant directors-greg-berlanti directors-katye-kalivoda directors-kevin-breen directors-meaghan-f-mclaughlin directors-richard-graves directors-ryan-j-pezdirc cast-abigail-houck cast-alex-sgambati cast-alexandra-shipp cast-baz-ma cast-briana-estevez cast-bryson-pitts cast-campbell-godfrey cast-carsen-rowe cast-cassady-mcclincy cast-chantell-d-christopher cast-christian-ojore-mayfield cast-christopher-l-plunkett cast-clark-moore cast-collin-mchugh cast-danni-heverin cast-david-copeland-brown-jr cast-drew-starkey cast-dylan-cheek cast-emily-jordan cast-haroon-khan cast-jaidi-ventura cast-james-sterling cast-jamila-thompson cast-jennifer-garner cast-jessi-peralta cast-jodi-houck cast-joey-pollari cast-jonah-blaine-bowling cast-jonathan-fritschi cast-jorge-lendeborg-jr cast-josh-duhamel cast-josh-royston cast-joshua-mikel cast-katherine-langford cast-keiynan-lonsdale cast-logan-miller cast-mackenzie-lintz cast-mandy-fason cast-matthew-laraway cast-miles-heizer cast-nancy-de-mayo cast-natalia-tureta cast-natasha-rothwell cast-nicholas-stargel cast-nick-robinson cast-nye-reynolds cast-patrick-donohue cast-philip-covin cast-robbie-rogers cast-samantha-bulka cast-sean-odonnell cast-skye-mowbray cast-talitha-bateman cast-terayle-hill cast-tony-hale cast-tyler-chase cast-tyson-love">
<article class="TPost B">
<a href="{{$movie->getUrl()}}">
<div class="Image">
<figure class="Objf TpMvPlay AAIco-play_arrow">
<img loading="lazy" src="{{$movie->getThumbUrl()}}"
alt="{{$movie->name}}">
</figure>
<span class="MvIC"><span class="Qlty Yr">{{$movie->publish_year}}</span></span>
</div>
<h2 class="Title">{{$movie->name}}</h2>
</a>
<div class="TPMvCn">
<a href="{{$movie->getUrl()}}">
<div class="Title">{{$movie->name}}</div>
</a>
<p>{{$movie->origin_name}}</p>
<div class="Info">
<div class="Vote">
<div class="post-ratings">
<img src="{{ asset('themes/toro/img/cnt/rating_on.gif') }}" alt="img"><span style="font-size: 12px;">{{$movie->getRatingStar()}}</span>
</div>
</div>
<span class="Date">{{$movie->publish_year}}</span>
<span class="Qlty">{{$movie->quality}}</span>
<span class="Qlty">{{$movie->language}}</span>
<span class="Time">{{$movie->episode_time}}</span>
<span class="Views AAIco-remove_red_eye">{{$movie->view_total}}</span>
</div>
<div class="Description">
<p>{!! mb_substr(strip_tags($movie->content),0,100, "utf-8") !!}...</p>
<a href="{{$movie->getUrl()}}" class="TPlay AAIco-play_circle_outline"><strong>Xem phim</strong></a>
</div>
</article>
</li>

View File

@ -0,0 +1,112 @@
@extends('themes::themetoro.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] = 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()
];
} 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(),
'link' => $link ?: '#',
];
} catch (\Exception $e) {
}
}
}
return $data;
});
@endphp
@section('home_page_slider_poster')
@if(count($home_page_slider_poster['data']))
@include('themes::themetoro.inc.home_page_slider_poster')
@endif
@endsection
@section('home_page_slider_thumb')
@if(count($home_page_slider_thumb))
@include('themes::themetoro.inc.home_page_slider_thumb')
@endif
@endsection
@section('content')
@foreach($data as $item)
@include("themes::themetoro.inc.section." . $item["show_template"])
@endforeach
@endsection
@push('scripts')
@endpush

View File

@ -0,0 +1,105 @@
@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 rel='stylesheet' id='global-styles-inline-css' href='{{asset('themes/toro/css/global-styles.css')}}?ver=1.0.0' type='text/css'/>
<link rel='stylesheet' id='TOROFLIX_Theme-css' href='{{asset('themes/toro/css/toroflix-public.css')}}?ver=1.0.0' type='text/css' media='all'/>
<link rel='stylesheet' id='tp_style_css' href='{{asset('themes/toro/css/tp_style.css')}}?ver=1.0.0' type='text/css' media='all'/>
@endpush
@section('body')
<div class="Tf-Wp">
@include("themes::themetoro.inc.header")
<div class="Body">
@if (get_theme_option('ads_header'))
<div class="Main Container">
{!! get_theme_option('ads_header') !!}
</div>
@endif
@yield('home_page_slider_poster')
@yield('single_top')
<div class="Main Container">
@yield('home_page_slider_thumb')
<div class="TpRwCont ">
<main>
@yield('content')
</main>
@include('themes::themetoro.inc.rightbar')
</div>
</div>
</div>
</div>
@endsection
@push('scripts')
@endpush
@section('footer')
{!! get_theme_option('footer') !!}
@if (get_theme_option('ads_catfish'))
{!! get_theme_option('ads_catfish') !!}
@endif
<link rel='stylesheet' id='font-awesome-public_css-css'
href='{{asset('themes/toro/css/font-awesome.css')}}?ver=1.0.0'
type='text/css' media='all'/>
<link rel='stylesheet' id='material-public-css-css'
href='{{asset('themes/toro/css/material.css')}}?ver=1.0.0'
type='text/css' media='all'/>
<link rel='stylesheet' id='font-source-sans-pro-public-css-css'
href='https://fonts.googleapis.com/css?family=Source+Sans+Pro%3A300%2C400%2C600%2C700&#038;ver=1.0.0'
type='text/css' media='all'/>
<script type="text/javascript"
src='{{asset('themes/toro/js/jquery.js')}}?ver=3.0.0'
id='funciones_public_jquery-js'></script>
<script type="text/javascript"
src='{{asset('themes/toro/js/owl.carousel.min.js')}}?ver=1.0.0'
id='funciones_public_carousel-js'></script>
<script type="text/javascript" id='funciones_public_sol-js-extra'>
var toroflixPublic = {"url":"/","nonce":"7a0fde296e","trailer":"","noItemsAvailable":"No entries found","selectAll":"Select all","selectNone":"Select none","searchplaceholder":"Click here to search","loadingData":"Still loading data...","viewmore":"View more","id":"","type":"","report_text_reportForm":"Report Form","report_text_message":"Message","report_text_send":"SEND","report_text_has_send":"the report has been sent","playerAutomaticSlider":"1"};
</script>
<script type="text/javascript"
src='{{asset('themes/toro/js/sol.js')}}?ver=1.0.0'
id='funciones_public_sol-js'></script>
<script type="text/javascript"
src='{{asset('themes/toro/js/functions.js')}}?ver=1.0.0'
id='funciones_public_functions-js'></script>
{!! setting('site_scripts_google_analytics') !!}
@endsection

View File

@ -0,0 +1,233 @@
@extends('themes::themetoro.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('single_top')
<div class="MovieListSldCn">
<article class="TPost A">
<header class="Container">
<div class="TPMvCn">
<h1 class="Title">{{ $currentMovie->name }}</h1>
<p class="SubTitle"><span>{{ $currentMovie->origin_name }}</span></p>
<div class="Info">
<div class="Vote">
<div class="post-ratings">
<img src="{{asset('themes/toro/img/cnt/rating_on.gif')}}" alt="img"><span
style="font-size: 12px;">{{$currentMovie->getRatingStar()}}</span>
</div>
</div>
<span class="Date">{{ $currentMovie->publish_year }}</span>
<span class="Qlty">
@switch($currentMovie->status)
@case("ongoing")
Đang chiếu
@break
@case("completed")
Trọn bộ
@break
@default
Trailer
@endswitch
</span>
<span class="Time">{{$currentMovie->episode_time}}</span>
<span class="Views AAIco-remove_red_eye">{{$currentMovie->view_total}}</span>
{!! $currentMovie->regions->map(function ($region) {
return '<span class="Qlty"><a href="'.$region->getUrl().'">'.$region->name.'</a></span>';
})->implode(' ') !!}
</div>
<div class="Description">
<p>{!! strip_tags($currentMovie->content) !!}</p>
<p class="Director">
<span>Đạo diễn:</span>
{!! $currentMovie->directors->map(function ($director) {
return '<span class="tt-at"><a href="'.$director->getUrl().'">'.$director->name.'</a></span>';
})->implode(',') !!}
</p>
<p class="Genre"><span>Thể loại:</span>
{!! $currentMovie->categories->map(function ($category) {
return '<a href="'.$category->getUrl().'">'.$category->name.'</a>';
})->implode(', ') !!}
</p>
<p class="Cast">
<span>Diễn viên:</span>
{!! $currentMovie->actors->map(function ($actor) {
return '<a href="'.$actor->getUrl().'">'.$actor->name.'</a>';
})->implode('<span class="dot-sh">,</span> ') !!}
</p>
</div>
@if($watch_url)
<a href="{{$watch_url}}" class="Button TPlay AAIco-play_circle_outline"><strong>Xem Phim</strong></a>
@endif
<ul class="ShareList">
@if ($currentMovie->trailer_url && strpos($currentMovie->trailer_url, 'youtube'))
<li><a href="javascript:void(0)" id="watch-trailer" class="fa-youtube" title="Xem Trailer"></a></li>
@endif
<li><a href="javascript:void(0)"
title="Chia sẻ lên facebook"
onclick="window.open ('http://www.facebook.com/sharer.php?u={{$currentMovie->getUrl()}}', 'Facebook', 'toolbar=0, status=0, width=650, height=450');"
class="fa-facebook"></a></li>
<li><a href="javascript:void(0)"
title="Chia sẻ lên twitter"
onclick="javascript:window.open('https://twitter.com/intent/tweet?original_referer={{$currentMovie->getUrl()}}&amp;text={{$currentMovie->name}}&amp;tw_p=tweetbutton&amp;url={{$currentMovie->getUrl()}}', 'Twitter', 'toolbar=0, status=0, width=650, height=450');"
class="fa-twitter"></a></li>
</ul>
<div class="rating-content">
<div id="movies-rating-star" style="height: 18px;"></div>
<div>
({{ $currentMovie->getRatingStar() }}
sao
/
{{$currentMovie->getRatingCount()}} đánh giá)
</div>
<div id="movies-rating-msg"></div>
</div>
</div>
<div class="Image">
<figure class="Objf">
<img loading="lazy" class="TPostBg"
src="{{$currentMovie->getPosterUrl()}}" alt="Background">
</figure>
</div>
</header>
</article>
</div>
@endsection
@section('content')
@if ($currentMovie->showtimes && $currentMovie->showtimes != '')
<p class="comment-notes">
<span id="email-notes">Lịch chiếu</span>
<span class="required-field-message">{!! $currentMovie->showtimes !!}</span>
</p>
@endif
@if ($currentMovie->notify && $currentMovie->notify != '')
<p class="comment-notes">
<span id="email-notes">Thông báo</span>
<span class="required-field-message">{!! $currentMovie->notify !!}</span>
</p>
@endif
@foreach ($currentMovie->episodes->sortBy([['server', 'asc']])->groupBy('server') as $server => $data)
<section class="SeasonBx AACrdn">
<div class="Top AAIco-playlist_play AALink episodes-view episodes-load">
<div class="Title"><a href="#">Danh sách tập <span>{{ $server }}</span></a></div>
</div>
<ul class="AZList">
@foreach ($data->sortByDesc('name', SORT_NATURAL)->groupBy('name') as $name => $item)
<li><a href="{{ $item->sortByDesc('type')->first()->getUrl() }}" title="{{ $name }}">{{ $name }}</a></li>
@endforeach
</ul>
</section>
@endforeach
<section>
<div class="Top AAIco-chat">
<div class="Title">Bình luận</div>
</div>
<ul class="CommentsList">
<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>
</ul>
</section>
<section>
<div class="Top AAIco-star_border">
<h3 class="Title"> thể bạn muốn xem?</h3>
</div>
<div class="MovieListTop owl-carousel">
@foreach($movie_related as $movie)
<div class="TPostMv">
<div class="TPost B">
<a href="{{$movie->getUrl()}}">
<div class="Image">
<figure class="Objf TpMvPlay AAIco-play_arrow">
<img loading="lazy" class="owl-lazy"
data-src="{{$movie->getThumbUrl()}}"
alt="{{$movie->name}}">
</figure>
<span class="Qlty">{{$movie->episode_current}}</span>
</div>
<h2 class="Title">{{$movie->name}}</h2>
</a>
</div>
</div>
@endforeach
</div>
</section>
@endsection
@push('scripts')
@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'];
@endphp
<script>
toroflixPublic.trailer = "<iframe width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/{{$video_id}}\" frameborder=\"0\" allow=\"autoplay\" allow=\"encrypted-media\" allowfullscreen><\/iframe>"
</script>
<div class="Modal-Box Ttrailer">
<div class="Modal-Content">
<span class="Modal-Close Button AAIco-clear"></span>
</div>
<i class="AAOverlay"></i>
</div>
@endif
<script src="/themes/toro/plugins/jquery-raty/jquery.raty.js"></script>
<link href="/themes/toro/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/toro/plugins/jquery-raty/images/star-off.png',
starOn: '/themes/toro/plugins/jquery-raty/images/star-on.png',
starHalf: '/themes/toro/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>
{!! setting('site_scripts_facebook_sdk') !!}
@endpush

54
routes/web.php Normal file
View File

@ -0,0 +1,54 @@
<?php
use Illuminate\Support\Facades\Route;
use VsMov\ThemeToro\Controllers\ThemeToroController;
// --------------------------
// Custom Backpack Routes
// --------------------------
// This route file is loaded automatically by Backpack\Base.
// Routes you generate using Backpack\Generators will be placed here.
Route::group([
'middleware' => array_merge(
(array) config('backpack.base.web_middleware', 'web'),
),
], function () {
Route::get('/', [ThemeToroController::class, 'index']);
Route::get(setting('site_routes_category', '/the-loai/{category}'), [ThemeToroController::class, 'getMovieOfCategory'])
->where(['category' => '.+', 'id' => '[0-9]+'])
->name('categories.movies.index');
Route::get(setting('site_routes_region', '/quoc-gia/{region}'), [ThemeToroController::class, 'getMovieOfRegion'])
->where(['region' => '.+', 'id' => '[0-9]+'])
->name('regions.movies.index');
Route::get(setting('site_routes_tag', '/tu-khoa/{tag}'), [ThemeToroController::class, 'getMovieOfTag'])
->where(['tag' => '.+', 'id' => '[0-9]+'])
->name('tags.movies.index');
Route::get(setting('site_routes_types', '/danh-sach/{type}'), [ThemeToroController::class, 'getMovieOfType'])
->where(['type' => '.+', 'id' => '[0-9]+'])
->name('types.movies.index');
Route::get(setting('site_routes_actors', '/dien-vien/{actor}'), [ThemeToroController::class, 'getMovieOfActor'])
->where(['actor' => '.+', 'id' => '[0-9]+'])
->name('actors.movies.index');
Route::get(setting('site_routes_directors', '/dao-dien/{director}'), [ThemeToroController::class, 'getMovieOfDirector'])
->where(['director' => '.+', 'id' => '[0-9]+'])
->name('directors.movies.index');
Route::get(setting('site_routes_episode', '/phim/{movie}/{episode}-{id}'), [ThemeToroController::class, 'getEpisode'])
->where(['movie' => '.+', 'movie_id' => '[0-9]+', 'episode' => '.+', 'id' => '[0-9]+'])
->name('episodes.show');
Route::post(sprintf('/%s/{movie}/{episode}/report', config('vsmov.routes.movie', 'phim')), [ThemeToroController::class, 'reportEpisode'])->name('episodes.report');
Route::post(sprintf('/%s/{movie}/rate', config('vsmov.routes.movie', 'phim')), [ThemeToroController::class, 'rateMovie'])->name('movie.rating');
Route::get(setting('site_routes_movie', '/phim/{movie}'), [ThemeToroController::class, 'getMovieOverview'])
->where(['movie' => '.+', 'id' => '[0-9]+'])
->name('movies.show');
});

View File

@ -0,0 +1,290 @@
<?php
namespace VsMov\ThemeToro\Controllers;
use Backpack\Settings\app\Models\Setting;
use Illuminate\Http\Request;
use VsMov\Core\Models\Actor;
use VsMov\Core\Models\Catalog;
use VsMov\Core\Models\Category;
use VsMov\Core\Models\Director;
use VsMov\Core\Models\Episode;
use VsMov\Core\Models\Movie;
use VsMov\Core\Models\Region;
use VsMov\Core\Models\Tag;
use Illuminate\Support\Facades\Cache;
class ThemeToroController
{
public function index(Request $request)
{
if ($request['search'] || $request['filter']) {
$data = Movie::when(!empty($request['filter']['category']), function ($movie) {
$movie->whereHas('categories', function ($categories) {
$categories->where('id', request('filter')['category']);
});
})->when(!empty($request['filter']['region']), function ($movie) {
$movie->whereHas('regions', function ($regions) {
$regions->where('id', request('filter')['region']);
});
})->when(!empty($request['filter']['year']), function ($movie) {
$movie->where('publish_year', request('filter')['year']);
})->when(!empty($request['filter']['type']), function ($movie) {
$movie->where('type', request('filter')['type']);
})->when(!empty($request['search']), function ($query) {
$query->where(function ($query) {
$query->where('name', 'like', '%' . request('search') . '%')
->orWhere('origin_name', 'like', '%' . request('search') . '%');
})->orderBy('name', 'desc');
})->when(!empty($request['filter']['sort']), function ($movie) {
if (request('filter')['sort'] == 'create') {
return $movie->orderBy('created_at', 'desc');
}
if (request('filter')['sort'] == 'update') {
return $movie->orderBy('updated_at', 'desc');
}
if (request('filter')['sort'] == 'year') {
return $movie->orderBy('publish_year', 'desc');
}
if (request('filter')['sort'] == 'view') {
return $movie->orderBy('view_total', 'desc');
}
})->paginate(get_theme_option('per_page_limit'));
return view('themes::themetoro.catalog', [
'data' => $data,
'search' => $request['search'],
'section_name' => "Tìm kiếm phim: $request->search"
]);
}
return view('themes::themetoro.index', [
'title' => Setting::get('site_homepage_title')
]);
}
public function getMovieOverview(Request $request)
{
/** @var Movie */
$movie = Movie::fromCache()->find($request->movie ?: $request->id);
if (is_null($movie)) abort(404);
$movie->generateSeoTags();
$movie->increment('view_total', 1);
$movie->increment('view_day', 1);
$movie->increment('view_week', 1);
$movie->increment('view_month', 1);
$movie_related_cache_key = 'movie_related:' . $movie->id;
$movie_related = Cache::get($movie_related_cache_key);
if(is_null($movie_related)) {
$movie_related = $movie->categories[0]->movies()->inRandomOrder()->limit(get_theme_option('movie_related_limit', 10))->get();
Cache::put($movie_related_cache_key, $movie_related, setting('site_cache_ttl', 5 * 60));
}
return view('themes::themetoro.single', [
'currentMovie' => $movie,
'title' => $movie->getTitle(),
'movie_related' => $movie_related
]);
}
public function getEpisode(Request $request)
{
$movie = Movie::fromCache()->find($request->movie ?: $request->movie_id)->load('episodes');
if (is_null($movie)) abort(404);
/** @var Episode */
$episode_id = $request->id;
$episode = $movie->episodes->when($episode_id, function ($collection, $episode_id) {
return $collection->where('id', $episode_id);
})->firstWhere('slug', $request->episode);
if (is_null($episode)) abort(404);
$episode->generateSeoTags();
$movie->increment('view_total', 1);
$movie->increment('view_day', 1);
$movie->increment('view_week', 1);
$movie->increment('view_month', 1);
$movie_related_cache_key = 'movie_related:' . $movie->id;
$movie_related = Cache::get($movie_related_cache_key);
if(is_null($movie_related)) {
$movie_related = $movie->categories[0]->movies()->inRandomOrder()->limit(get_theme_option('movie_related_limit', 10))->get();
Cache::put($movie_related_cache_key, $movie_related, setting('site_cache_ttl', 5 * 60));
}
return view('themes::themetoro.episode', [
'currentMovie' => $movie,
'movie_related' => $movie_related,
'episode' => $episode,
'title' => $episode->getTitle()
]);
}
public function getMovieOfCategory(Request $request)
{
/** @var Category */
$category = Category::fromCache()->find($request->category ?: $request->id);
if (is_null($category)) abort(404);
$category->generateSeoTags();
$movies = $category->movies()->orderBy('created_at', 'desc')->paginate(get_theme_option('per_page_limit'));
return view('themes::themetoro.catalog', [
'data' => $movies,
'category' => $category,
'title' => $category->seo_title ?: $category->getTitle(),
'section_name' => "Phim thể loại $category->name"
]);
}
public function getMovieOfRegion(Request $request)
{
/** @var Region */
$region = Region::fromCache()->find($request->region ?: $request->id);
if (is_null($region)) abort(404);
$region->generateSeoTags();
$movies = $region->movies()->orderBy('created_at', 'desc')->paginate(get_theme_option('per_page_limit'));
return view('themes::themetoro.catalog', [
'data' => $movies,
'region' => $region,
'title' => $region->seo_title ?: $region->getTitle(),
'section_name' => "Phim quốc gia $region->name"
]);
}
public function getMovieOfActor(Request $request)
{
/** @var Actor */
$actor = Actor::fromCache()->find($request->actor ?: $request->id);
if (is_null($actor)) abort(404);
$actor->generateSeoTags();
$movies = $actor->movies()->orderBy('created_at', 'desc')->paginate(get_theme_option('per_page_limit'));
return view('themes::themetoro.catalog', [
'data' => $movies,
'person' => $actor,
'title' => $actor->getTitle(),
'section_name' => "Diễn viên $actor->name"
]);
}
public function getMovieOfDirector(Request $request)
{
/** @var Director */
$director = Director::fromCache()->find($request->director ?: $request->id);
if (is_null($director)) abort(404);
$director->generateSeoTags();
$movies = $director->movies()->orderBy('created_at', 'desc')->paginate(get_theme_option('per_page_limit'));
return view('themes::themetoro.catalog', [
'data' => $movies,
'person' => $director,
'title' => $director->getTitle(),
'section_name' => "Đạo diễn $director->name"
]);
}
public function getMovieOfTag(Request $request)
{
/** @var Tag */
$tag = Tag::fromCache()->find($request->tag ?: $request->id);
if (is_null($tag)) abort(404);
$tag->generateSeoTags();
$movies = $tag->movies()->orderBy('created_at', 'desc')->paginate(get_theme_option('per_page_limit'));
return view('themes::themetoro.catalog', [
'data' => $movies,
'tag' => $tag,
'title' => $tag->getTitle(),
'section_name' => "Tags: $tag->name"
]);
}
public function getMovieOfType(Request $request)
{
/** @var Catalog */
$catalog = Catalog::fromCache()->find($request->type ?: $request->id);
if (is_null($catalog)) abort(404);
$catalog->generateSeoTags();
$cache_key = 'catalog:' . $catalog->id . ':page:' . ($request['page'] ?: 1);
$movies = Cache::get($cache_key);
if(is_null($movies)) {
$value = explode('|', trim($catalog->value));
[$relation_config, $field, $val, $sortKey, $alg] = array_merge($value, ['', 'is_copyright', 0, 'created_at', 'desc']);
$relation_config = explode(',', $relation_config);
[$relation_table, $relation_field, $relation_val] = array_merge($relation_config, ['', '', '']);
try {
$movies = \VsMov\Core\Models\Movie::when($relation_table, function ($query) use ($relation_table, $relation_field, $relation_val, $field, $val) {
$query->whereHas($relation_table, function ($rel) use ($relation_field, $relation_val, $field, $val) {
$rel->where($relation_field, $relation_val)->where(array_combine(explode(",", $field), explode(",", $val)));
});
})->when(!$relation_table, function ($query) use ($field, $val) {
$query->where(array_combine(explode(",", $field), explode(",", $val)));
})
->orderBy($sortKey, $alg)
->paginate($catalog->paginate);
Cache::put($cache_key, $movies, setting('site_cache_ttl', 5 * 60));
} catch (\Exception $e) {}
}
return view('themes::themetoro.catalog', [
'data' => $movies,
'section_name' => "Danh sách $catalog->name"
]);
}
public function reportEpisode(Request $request, $movie, $slug)
{
$movie = Movie::fromCache()->find($movie)->load('episodes');
$episode = $movie->episodes->when(request('id'), function ($collection) {
return $collection->where('id', request('id'));
})->firstWhere('slug', $slug);
$episode->update([
'report_message' => request('message', ''),
'has_report' => true
]);
return response([], 204);
}
public function rateMovie(Request $request, $movie)
{
$movie = Movie::fromCache()->find($movie);
$movie->refresh()->increment('rating_count', 1, [
'rating_star' => $movie->rating_star + ((int) request('rating') - $movie->rating_star) / ($movie->rating_count + 1)
]);
return response([], 204);
}
}

View File

@ -0,0 +1,173 @@
<?php
namespace VsMov\ThemeToro;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
class ThemeToroServiceProvider extends ServiceProvider
{
public function register()
{
$this->setupDefaultThemeCustomizer();
}
public function boot()
{
$this->loadViewsFrom(__DIR__ . '/../resources/views/', 'themes');
$this->publishes([
__DIR__ . '/../resources/assets' => public_path('themes/toro')
], 'toro-assets');
}
protected function setupDefaultThemeCustomizer()
{
config(['themes' => array_merge(config('themes', []), [
'toro' => [
'name' => 'Theme Toro',
'author' => 'vsmov@gmail.com',
'package_name' => 'vsmov/theme-toro',
'publishes' => ['toro-assets'],
'preview_image' => '',
'options' => [
[
'name' => 'per_page_limit',
'label' => 'Pages limit',
'type' => 'number',
'value' => 40,
'wrapperAttributes' => [
'class' => 'form-group col-md-6',
],
'tab' => 'List'
],
[
'name' => 'movie_related_limit',
'label' => 'Movies related limit',
'type' => 'number',
'value' => 16,
'wrapperAttributes' => [
'class' => 'form-group col-md-6',
],
'tab' => 'List'
],
[
'name' => 'home_page_slider_poster',
'label' => 'Home page slider poster',
'type' => 'text',
'hint' => 'Label|relation|find_by_field|value|sort_by_field|sort_algo|limit',
'value' => 'Phim đề cử||is_recommended|1|updated_at|desc|10',
'tab' => 'List'
],
[
'name' => 'home_page_slider_thumb',
'label' => 'Home page slider thumb',
'type' => 'text',
'hint' => 'Label|relation|find_by_field|value|sort_by_field|sort_algo|limit',
'value' => 'Phim mới cập nhật||is_copyright|0|updated_at|desc|24',
'tab' => 'List'
],
[
'name' => 'latest',
'label' => 'Home Page Main',
'type' => 'code',
'hint' => 'display_label|relation|find_by_field|value|sort_by_field|sort_algo|limit|show_more_url|show_template (section_thumb|section_poster)',
'value' => <<<EOT
Phim chiếu rạp mới||is_shown_in_theater|1|created_at|desc|6|/danh-sach/phim-chieu-rap|section_poster
Phim bộ mới||type|series|updated_at|desc|16|/danh-sach/phim-bo|section_thumb
Phim lẻ mới||type|single|updated_at|desc|16|/danh-sach/phim-le|section_thumb
Phim hoạt hình mới|categories|slug|hoat-hinh|updated_at|desc|12|/the-loai/hoat-hinh|section_poster
EOT,
'attributes' => [
'rows' => 5
],
'tab' => 'List'
],
[
'name' => 'hotest',
'label' => 'Rightbar',
'type' => 'code',
'hint' => 'Label|relation|find_by_field|value|sort_by_field|sort_algo|limit|show_template (rightbar_text|rightbar_thumb|rightbar_thumb_2)',
'value' => <<<EOT
Sắp chiếu||status|trailer|publish_year|desc|5|rightbar_text
Top phim lẻ||type|single|view_week|desc|5|rightbar_thumb
Top phim bộ||type|series|view_week|desc|6|rightbar_thumb_2
EOT,
'attributes' => [
'rows' => 5
],
'tab' => 'List'
],
[
'name' => 'additional_css',
'label' => 'Additional CSS',
'type' => 'code',
'value' => "",
'tab' => 'Custom CSS'
],
[
'name' => 'body_attributes',
'label' => 'Body attributes',
'type' => 'text',
'value' => 'id="Tf-Wp" class="home blog BdGradient"',
'tab' => 'Custom CSS'
],
[
'name' => 'additional_header_js',
'label' => 'Header JS',
'type' => 'code',
'value' => "",
'tab' => 'Custom JS'
],
[
'name' => 'additional_body_js',
'label' => 'Body JS',
'type' => 'code',
'value' => "",
'tab' => 'Custom JS'
],
[
'name' => 'additional_footer_js',
'label' => 'Footer JS',
'type' => 'code',
'value' => "",
'tab' => 'Custom JS'
],
[
'name' => 'footer',
'label' => 'Footer',
'type' => 'code',
'value' => <<<EOT
<footer class="Footer">
<div class="Bot">
<div class="Container">
<p>Toroflix is the evolution of toroplay, we put the best of us in this theme that you love, we
promise</p>
</div>
</div>
</footer>
EOT,
'tab' => 'Custom HTML'
],
[
'name' => 'ads_header',
'label' => 'Ads header',
'type' => 'code',
'value' => <<<EOT
EOT,
'tab' => 'Ads'
],
[
'name' => 'ads_catfish',
'label' => 'Ads catfish',
'type' => 'code',
'value' => <<<EOT
EOT,
'tab' => 'Ads'
]
],
]
])]);
}
}

BIN
src/screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 615 KiB