lots of progress
@@ -3,9 +3,15 @@
|
||||
namespace App\Http\Controllers\Forum;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Forum\Category;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class CategoriesController extends Controller
|
||||
{
|
||||
//
|
||||
public function index()
|
||||
{
|
||||
$categories = Category::with('threads')->get();
|
||||
|
||||
return view('forum.index', compact('categories'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@ namespace App\Http\Controllers;
|
||||
use App\Http\Requests\MediaListRequest;
|
||||
use App\Models\MediaList;
|
||||
use App\Models\MediaListItem;
|
||||
use App\Models\Movie;
|
||||
use App\Models\Show;
|
||||
use App\Models\User;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
@@ -12,27 +14,31 @@ use Illuminate\Support\Str;
|
||||
|
||||
class MediaListController extends Controller
|
||||
{
|
||||
public function index()
|
||||
public function index(string $slug)
|
||||
{
|
||||
$lists = MediaList::whereNotIn('name', MediaList::SPECIAL_LISTS)
|
||||
->where('user_id', Auth::user()->id)
|
||||
->get();
|
||||
|
||||
return view('profile.lists.index', compact('lists'));
|
||||
$user = User::where('slug', $slug)->first();
|
||||
|
||||
return view('profile.lists.index', compact('lists', 'user'));
|
||||
}
|
||||
|
||||
public function show(string $userSlug, string $listSlug)
|
||||
{
|
||||
$user = User::where('slug', $userSlug)->first();
|
||||
$list = MediaList::where('user_id', $user->id)->where('slug', $listSlug)->first();
|
||||
$items = MediaListItem::where('media_list_id', $list->id)->paginate(15);
|
||||
$items = MediaListItem::with('item')->where('media_list_id', $list->id)->paginate(15);
|
||||
|
||||
return view('profile.lists.show', compact('list', 'items'));
|
||||
return view('profile.lists.show', compact('list', 'items', 'user'));
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
return view('profile.lists.create');
|
||||
$user = Auth::user();
|
||||
|
||||
return view('profile.lists.create', compact('user'));
|
||||
}
|
||||
|
||||
public function store(MediaListRequest $request)
|
||||
@@ -48,4 +54,49 @@ class MediaListController extends Controller
|
||||
|
||||
return redirect()->route('profile.list.show', [Auth::user()->slug, $slug]);
|
||||
}
|
||||
|
||||
public function toggleListItem(string $listSlug, int $itemId, string $itemType)
|
||||
{
|
||||
$mediaList = MediaList::where('slug', $listSlug)
|
||||
->where('user_id', Auth::user()->id)
|
||||
->first();
|
||||
|
||||
if ($itemType == 'movie') {
|
||||
$item = Movie::find($itemId);
|
||||
} else {
|
||||
$item = Show::find($itemId);
|
||||
}
|
||||
|
||||
if (!$item) {
|
||||
return response()->json([
|
||||
'success' => false
|
||||
]);
|
||||
}
|
||||
|
||||
$mediaListItem = MediaListItem::where('media_list_id', $mediaList->id)
|
||||
->where('item_id', $itemId)
|
||||
->where('item_type', $itemType)
|
||||
->first();
|
||||
|
||||
if ($mediaListItem) {
|
||||
$mediaListItem->delete();
|
||||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'added' => false,
|
||||
]);
|
||||
}
|
||||
|
||||
MediaListItem::create([
|
||||
'media_list_id' => $mediaList->id,
|
||||
'item_id' => $itemId,
|
||||
'item_type' => $itemType,
|
||||
'tmdb_id' => $item->tmdb_id,
|
||||
]);
|
||||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'added' => true,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Rate;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class RatingController extends Controller
|
||||
{
|
||||
public function rate(string $itemType, int $itemId, float $rate)
|
||||
{
|
||||
Rate::updateOrCreate(
|
||||
[
|
||||
'user_id' => auth()->user()->id,
|
||||
'item_id' => $itemId,
|
||||
'item_type' => $itemType,
|
||||
],
|
||||
[
|
||||
'rate' => $rate
|
||||
]
|
||||
);
|
||||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'rate' => $rate,
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -6,5 +6,10 @@ use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Category extends Model
|
||||
{
|
||||
//
|
||||
protected $table = 'forum_categories';
|
||||
|
||||
public function threads()
|
||||
{
|
||||
return $this->hasMany(Thread::class, 'category_id', 'id');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,5 +6,5 @@ use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Thread extends Model
|
||||
{
|
||||
//
|
||||
protected $table = 'forum_threads';
|
||||
}
|
||||
|
||||
@@ -12,4 +12,13 @@ class MediaListItem extends Model
|
||||
'item_type',
|
||||
'tmdb_id',
|
||||
];
|
||||
|
||||
public function item()
|
||||
{
|
||||
if ($this->item_type == 'movie') {
|
||||
return $this->hasOne(Movie::class, 'id', 'item_id');
|
||||
}
|
||||
|
||||
return $this->hasOne(Show::class, 'id', 'item_id');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,6 +32,32 @@ class Movie extends Model
|
||||
'release_date' => 'date'
|
||||
];
|
||||
|
||||
public function wasListedBy(string $listSlug, User $user)
|
||||
{
|
||||
$mediaList = MediaList::where('slug', $listSlug)->where('user_id', $user->id)->first();
|
||||
|
||||
if ($mediaList) {
|
||||
$mediaListItem = MediaListItem::where('media_list_id', $mediaList->id)
|
||||
->where('item_id', $this->id)
|
||||
->where('item_type', 'movie')
|
||||
->first();
|
||||
|
||||
return !empty($mediaListItem);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function ratingBy(User $user)
|
||||
{
|
||||
$rating = Rate::where('user_id', $user->id)
|
||||
->where('item_id', $this->id)
|
||||
->where('item_type', 'movie')
|
||||
->first();
|
||||
|
||||
return $rating ? $rating->rate : null;
|
||||
}
|
||||
|
||||
public function director()
|
||||
{
|
||||
return $this->belongsToMany(Person::class, 'movie_cast', 'movie_id', 'person_id')
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Rate extends Model
|
||||
{
|
||||
protected $table = 'ratings';
|
||||
|
||||
protected $fillable = [
|
||||
'item_id',
|
||||
'item_type',
|
||||
'rate',
|
||||
'user_id',
|
||||
];
|
||||
}
|
||||
@@ -315,10 +315,25 @@ class MovieProcessingService implements ProcessingInterface
|
||||
->where('tmdb_id', $tmdbReview['id'])
|
||||
->first();
|
||||
|
||||
// @todo create user
|
||||
$user = User::where('name', $tmdbReview['author'])->first();
|
||||
|
||||
if (!$user) {
|
||||
$user = User::create([
|
||||
'name' => $tmdbReview['author'],
|
||||
'slug' => Str::slug($tmdbReview['author']),
|
||||
'email' => $tmdbReview['author'].'@nowhere.wtf',
|
||||
'password' => 'no_password_neeeded_here',
|
||||
'is_dummy_account' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
if (!$existingReview) {
|
||||
Comment::create([
|
||||
'entity_id' => $movie->id,
|
||||
'entity_type' => Comment::TYPE_MOVIE,
|
||||
'user_id' => $user->id,
|
||||
'author_name' => $tmdbReview['author'],
|
||||
'author_avatar' => $tmdbReview['author_details']['avatar_path'],
|
||||
'author_rating' => $tmdbReview['author_details']['rating'],
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Service;
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
class ToolService
|
||||
{
|
||||
public static function isCurrentRoute(
|
||||
string $routePath
|
||||
)
|
||||
{
|
||||
$currentPath = Route::getCurrentRequest()->path();
|
||||
$uri = ltrim(str_replace(env('APP_URL'), '', $routePath), '/');
|
||||
|
||||
return $currentPath == $uri;
|
||||
}
|
||||
}
|
||||
@@ -16,8 +16,8 @@ return new class extends Migration
|
||||
$table->unsignedBigInteger('category_id');
|
||||
$table->string('name');
|
||||
$table->string('slug');
|
||||
$table->string('icon');
|
||||
$table->text('description');
|
||||
$table->string('icon')->nullable();
|
||||
$table->text('description')->nullable();
|
||||
$table->integer('order')->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('ratings', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('item_id');
|
||||
$table->enum('item_type', ['movie', 'show']);
|
||||
$table->decimal('rate', 10, 2);
|
||||
$table->unsignedBigInteger('user_id');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('ratings');
|
||||
}
|
||||
};
|
||||
@@ -4,6 +4,9 @@
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"dependencies": {
|
||||
"jquery": "^3.7.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@popperjs/core": "^2.11.6",
|
||||
"autoprefixer": "^10.4.20",
|
||||
@@ -2065,6 +2068,12 @@
|
||||
"jiti": "bin/jiti.js"
|
||||
}
|
||||
},
|
||||
"node_modules/jquery": {
|
||||
"version": "3.7.1",
|
||||
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz",
|
||||
"integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/laravel-vite-plugin": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/laravel-vite-plugin/-/laravel-vite-plugin-1.1.1.tgz",
|
||||
|
||||
@@ -16,5 +16,8 @@
|
||||
"sass": "^1.56.1",
|
||||
"tailwindcss": "^3.4.13",
|
||||
"vite": "^6.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"jquery": "^3.7.1"
|
||||
}
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 528 B |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 34 KiB |
@@ -1 +1,62 @@
|
||||
import './bootstrap';
|
||||
import './star_rating';
|
||||
|
||||
import $ from 'jquery';
|
||||
|
||||
$(".my-rating").starRating({
|
||||
starSize: 20,
|
||||
totalStars: 10,
|
||||
callback: function(currentRating, $el){
|
||||
let type = $($el[0]).data('type');
|
||||
let id = $($el[0]).data('id');
|
||||
|
||||
let url = '/rate/'+type+'/'+id+'/'+currentRating;
|
||||
|
||||
var self = this
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
method: 'GET',
|
||||
success: function(data){
|
||||
$(self).attr('data-rating', currentRating)
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$('.mark-as-seen-btn').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
let url = '/lists/' + $(this).data('list') + '/' + $(this).data('id') + '/' + $(this).data('type');
|
||||
var self = this
|
||||
$.ajax({
|
||||
url: url,
|
||||
method: 'GET',
|
||||
success: function(data){
|
||||
if(data.added) {
|
||||
$(self).addClass('seen');
|
||||
} else {
|
||||
$(self).removeClass('seen');
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.like-btn').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
let url = '/lists/' + $(this).data('list') + '/' + $(this).data('id') + '/' + $(this).data('type');
|
||||
var self = this
|
||||
$.ajax({
|
||||
url: url,
|
||||
method: 'GET',
|
||||
success: function(data){
|
||||
if(data.added) {
|
||||
$(self).addClass('liked');
|
||||
} else {
|
||||
$(self).removeClass('liked');
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
@@ -0,0 +1,343 @@
|
||||
import $ from 'jquery';
|
||||
|
||||
/*
|
||||
* jQuery StarRatingSvg v1.2.0
|
||||
*
|
||||
* http://github.com/nashio/star-rating-svg
|
||||
* Author: Ignacio Chavez
|
||||
* hello@ignaciochavez.com
|
||||
* Licensed under MIT
|
||||
*/
|
||||
|
||||
;(function ( $, window, document, undefined ) {
|
||||
|
||||
'use strict';
|
||||
|
||||
// Create the defaults once
|
||||
var pluginName = 'starRating';
|
||||
var noop = function(){};
|
||||
var defaults = {
|
||||
totalStars: 5,
|
||||
useFullStars: false,
|
||||
starShape: 'straight',
|
||||
emptyColor: 'lightgray',
|
||||
hoverColor: 'orange',
|
||||
activeColor: 'gold',
|
||||
ratedColor: 'crimson',
|
||||
useGradient: true,
|
||||
readOnly: false,
|
||||
disableAfterRate: true,
|
||||
baseUrl: false,
|
||||
starGradient: {
|
||||
start: '#FEF7CD',
|
||||
end: '#FF9511'
|
||||
},
|
||||
strokeWidth: 4,
|
||||
strokeColor: 'black',
|
||||
initialRating: 0,
|
||||
starSize: 40,
|
||||
callback: noop,
|
||||
onHover: noop,
|
||||
onLeave: noop
|
||||
};
|
||||
|
||||
// The actual plugin constructor
|
||||
var Plugin = function( element, options ) {
|
||||
var _rating;
|
||||
var newRating;
|
||||
var roundFn;
|
||||
|
||||
this.element = element;
|
||||
this.$el = $(element);
|
||||
this.settings = $.extend( {}, defaults, options );
|
||||
|
||||
// grab rating if defined on the element
|
||||
_rating = this.$el.data('rating') || this.settings.initialRating;
|
||||
|
||||
// round to the nearest half
|
||||
roundFn = this.settings.forceRoundUp ? Math.ceil : Math.round;
|
||||
newRating = (roundFn( _rating * 2 ) / 2).toFixed(1);
|
||||
this._state = {
|
||||
rating: newRating
|
||||
};
|
||||
|
||||
// create unique id for stars
|
||||
this._uid = Math.floor( Math.random() * 999 );
|
||||
|
||||
// override gradient if not used
|
||||
if( !options.starGradient && !this.settings.useGradient ){
|
||||
this.settings.starGradient.start = this.settings.starGradient.end = this.settings.activeColor;
|
||||
}
|
||||
|
||||
this._defaults = defaults;
|
||||
this._name = pluginName;
|
||||
this.init();
|
||||
};
|
||||
|
||||
var methods = {
|
||||
init: function () {
|
||||
this.renderMarkup();
|
||||
this.addListeners();
|
||||
this.initRating();
|
||||
},
|
||||
|
||||
addListeners: function(){
|
||||
if( this.settings.readOnly ){ return; }
|
||||
this.$stars.on('mouseover', this.hoverRating.bind(this));
|
||||
this.$stars.on('mouseout', this.restoreState.bind(this));
|
||||
this.$stars.on('click', this.handleRating.bind(this));
|
||||
},
|
||||
|
||||
// apply styles to hovered stars
|
||||
hoverRating: function(e){
|
||||
var index = this.getIndex(e);
|
||||
this.paintStars(index, 'hovered');
|
||||
this.settings.onHover(index + 1, this._state.rating, this.$el);
|
||||
},
|
||||
|
||||
// clicked on a rate, apply style and state
|
||||
handleRating: function(e){
|
||||
var index = this.getIndex(e);
|
||||
var rating = index + 1;
|
||||
|
||||
this.applyRating(rating, this.$el);
|
||||
this.executeCallback( rating, this.$el );
|
||||
|
||||
if(this.settings.disableAfterRate){
|
||||
this.$stars.off();
|
||||
}
|
||||
},
|
||||
|
||||
applyRating: function(rating){
|
||||
var index = rating - 1;
|
||||
// paint selected and remove hovered color
|
||||
this.paintStars(index, 'rated');
|
||||
this._state.rating = index + 1;
|
||||
this._state.rated = true;
|
||||
},
|
||||
|
||||
restoreState: function(e){
|
||||
var index = this.getIndex(e);
|
||||
var rating = this._state.rating || -1;
|
||||
// determine star color depending on manually rated
|
||||
var colorType = this._state.rated ? 'rated' : 'active';
|
||||
this.paintStars(rating - 1, colorType);
|
||||
this.settings.onLeave(index + 1, this._state.rating, this.$el);
|
||||
},
|
||||
|
||||
getIndex: function(e){
|
||||
var $target = $(e.currentTarget);
|
||||
var width = $target.width();
|
||||
var side = $(e.target).attr('data-side');
|
||||
var minRating = this.settings.minRating;
|
||||
|
||||
// hovered outside the star, calculate by pixel instead
|
||||
side = (!side) ? this.getOffsetByPixel(e, $target, width) : side;
|
||||
side = (this.settings.useFullStars) ? 'right' : side ;
|
||||
|
||||
// get index for half or whole star
|
||||
var index = $target.index() - ((side === 'left') ? 0.5 : 0);
|
||||
|
||||
// pointer is way to the left, rating should be none
|
||||
index = ( index < 0.5 && (e.offsetX < width / 4) ) ? -1 : index;
|
||||
|
||||
// force minimum rating
|
||||
index = ( minRating && minRating <= this.settings.totalStars && index < minRating ) ? minRating - 1 : index;
|
||||
return index;
|
||||
},
|
||||
|
||||
getOffsetByPixel: function(e, $target, width){
|
||||
var leftX = e.pageX - $target.offset().left;
|
||||
return ( leftX <= (width / 2) && !this.settings.useFullStars) ? 'left' : 'right';
|
||||
},
|
||||
|
||||
initRating: function(){
|
||||
this.paintStars(this._state.rating - 1, 'active');
|
||||
},
|
||||
|
||||
paintStars: function(endIndex, stateClass){
|
||||
var $polygonLeft;
|
||||
var $polygonRight;
|
||||
var leftClass;
|
||||
var rightClass;
|
||||
var s = this.settings;
|
||||
|
||||
$.each(this.$stars, function(index, star){
|
||||
$polygonLeft = $(star).find('[data-side="left"]');
|
||||
$polygonRight = $(star).find('[data-side="right"]');
|
||||
leftClass = rightClass = (index <= endIndex) ? stateClass : 'empty';
|
||||
|
||||
// has another half rating, add half star
|
||||
leftClass = ( index - endIndex === 0.5 ) ? stateClass : leftClass;
|
||||
|
||||
$polygonLeft.attr('class', 'svg-' + leftClass + '-' + this._uid);
|
||||
$polygonRight.attr('class', 'svg-' + rightClass + '-' + this._uid);
|
||||
|
||||
// get color for level
|
||||
var ratedColorsIndex = endIndex >= 0 ? Math.ceil(endIndex) : 0;
|
||||
|
||||
var ratedColor;
|
||||
if (s.ratedColors && s.ratedColors.length && s.ratedColors[ratedColorsIndex]) {
|
||||
ratedColor = s.ratedColors[ratedColorsIndex];
|
||||
} else {
|
||||
ratedColor = this._defaults.ratedColor;
|
||||
}
|
||||
|
||||
// only override colors in rated stars and when rated number is valid
|
||||
if (stateClass === 'rated' && endIndex > -1) {
|
||||
// limit to painting only to rated stars, and specific case for half star
|
||||
if (index <= Math.ceil(endIndex) || (index < 1 && endIndex < 0)) {
|
||||
$polygonLeft.attr('style', 'fill:'+ratedColor);
|
||||
}
|
||||
if (index <= endIndex) {
|
||||
$polygonRight.attr('style', 'fill:'+ratedColor);
|
||||
}
|
||||
}
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
renderMarkup: function () {
|
||||
var s = this.settings;
|
||||
var baseUrl = s.baseUrl ? location.href.split('#')[0] : '';
|
||||
|
||||
// inject an svg manually to have control over attributes
|
||||
var star = '<div class="jq-star" style="width:' + s.starSize+ 'px; height:' + s.starSize + 'px;"><svg version="1.0" class="jq-star-svg" shape-rendering="geometricPrecision" xmlns="http://www.w3.org/2000/svg" ' + this.getSvgDimensions(s.starShape) + ' stroke-width:' + s.strokeWidth + 'px;" xml:space="preserve"><style type="text/css">.svg-empty-' + this._uid + '{fill:url(' + baseUrl + '#' + this._uid + '_SVGID_1_);}.svg-hovered-' + this._uid + '{fill:url(' + baseUrl + '#' + this._uid + '_SVGID_2_);}.svg-active-' + this._uid + '{fill:url(' + baseUrl + '#' + this._uid + '_SVGID_3_);}.svg-rated-' + this._uid + '{fill:' + s.ratedColor + ';}</style>' +
|
||||
|
||||
this.getLinearGradient(this._uid + '_SVGID_1_', s.emptyColor, s.emptyColor, s.starShape) +
|
||||
this.getLinearGradient(this._uid + '_SVGID_2_', s.hoverColor, s.hoverColor, s.starShape) +
|
||||
this.getLinearGradient(this._uid + '_SVGID_3_', s.starGradient.start, s.starGradient.end, s.starShape) +
|
||||
this.getVectorPath(this._uid, {
|
||||
starShape: s.starShape,
|
||||
strokeWidth: s.strokeWidth,
|
||||
strokeColor: s.strokeColor
|
||||
} ) +
|
||||
'</svg></div>';
|
||||
|
||||
// inject svg markup
|
||||
var starsMarkup = '';
|
||||
for( var i = 0; i < s.totalStars; i++){
|
||||
starsMarkup += star;
|
||||
}
|
||||
this.$el.append(starsMarkup);
|
||||
this.$stars = this.$el.find('.jq-star');
|
||||
},
|
||||
|
||||
getVectorPath: function(id, attrs){
|
||||
return (attrs.starShape === 'rounded') ?
|
||||
this.getRoundedVectorPath(id, attrs) : this.getSpikeVectorPath(id, attrs);
|
||||
},
|
||||
|
||||
getSpikeVectorPath: function(id, attrs){
|
||||
return '<polygon data-side="center" class="svg-empty-' + id + '" points="281.1,129.8 364,55.7 255.5,46.8 214,-59 172.5,46.8 64,55.4 146.8,129.7 121.1,241 212.9,181.1 213.9,181 306.5,241 " style="fill: transparent; stroke: ' + attrs.strokeColor + ';" />' +
|
||||
'<polygon data-side="left" class="svg-empty-' + id + '" points="281.1,129.8 364,55.7 255.5,46.8 214,-59 172.5,46.8 64,55.4 146.8,129.7 121.1,241 213.9,181.1 213.9,181 306.5,241 " style="stroke-opacity: 0;" />' +
|
||||
'<polygon data-side="right" class="svg-empty-' + id + '" points="364,55.7 255.5,46.8 214,-59 213.9,181 306.5,241 281.1,129.8 " style="stroke-opacity: 0;" />';
|
||||
},
|
||||
|
||||
getRoundedVectorPath: function(id, attrs){
|
||||
var fullPoints = 'M520.9,336.5c-3.8-11.8-14.2-20.5-26.5-22.2l-140.9-20.5l-63-127.7 c-5.5-11.2-16.8-18.2-29.3-18.2c-12.5,0-23.8,7-29.3,18.2l-63,127.7L28,314.2C15.7,316,5.4,324.7,1.6,336.5S1,361.3,9.9,370 l102,99.4l-24,140.3c-2.1,12.3,2.9,24.6,13,32c5.7,4.2,12.4,6.2,19.2,6.2c5.2,0,10.5-1.2,15.2-3.8l126-66.3l126,66.2 c4.8,2.6,10,3.8,15.2,3.8c6.8,0,13.5-2.1,19.2-6.2c10.1-7.3,15.1-19.7,13-32l-24-140.3l102-99.4 C521.6,361.3,524.8,348.3,520.9,336.5z';
|
||||
|
||||
return '<path data-side="center" class="svg-empty-' + id + '" d="' + fullPoints + '" style="stroke: ' + attrs.strokeColor + '; fill: transparent; " /><path data-side="right" class="svg-empty-' + id + '" d="' + fullPoints + '" style="stroke-opacity: 0;" /><path data-side="left" class="svg-empty-' + id + '" d="M121,648c-7.3,0-14.1-2.2-19.8-6.4c-10.4-7.6-15.6-20.3-13.4-33l24-139.9l-101.6-99 c-9.1-8.9-12.4-22.4-8.6-34.5c3.9-12.1,14.6-21.1,27.2-23l140.4-20.4L232,164.6c5.7-11.6,17.3-18.8,30.2-16.8c0.6,0,1,0.4,1,1 v430.1c0,0.4-0.2,0.7-0.5,0.9l-126,66.3C132,646.6,126.6,648,121,648z" style="stroke: ' + attrs.strokeColor + '; stroke-opacity: 0;" />';
|
||||
},
|
||||
|
||||
getSvgDimensions: function(starShape){
|
||||
return (starShape === 'rounded') ? 'width="550px" height="500.2px" viewBox="0 146.8 550 500.2" style="enable-background:new 0 0 550 500.2;' : 'x="0px" y="0px" width="305px" height="305px" viewBox="60 -62 309 309" style="enable-background:new 64 -59 305 305;';
|
||||
},
|
||||
|
||||
getLinearGradient: function(id, startColor, endColor, starShape){
|
||||
var height = (starShape === 'rounded') ? 500 : 250;
|
||||
return '<linearGradient id="' + id + '" gradientUnits="userSpaceOnUse" x1="0" y1="-50" x2="0" y2="' + height + '"><stop offset="0" style="stop-color:' + startColor + '"/><stop offset="1" style="stop-color:' + endColor + '"/> </linearGradient>';
|
||||
},
|
||||
|
||||
executeCallback: function(rating, $el){
|
||||
var callback = this.settings.callback;
|
||||
callback(rating, $el);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
var publicMethods = {
|
||||
|
||||
unload: function() {
|
||||
var _name = 'plugin_' + pluginName;
|
||||
var $el = $(this);
|
||||
var $starSet = $el.data(_name).$stars;
|
||||
$starSet.off();
|
||||
$el.removeData(_name).remove();
|
||||
},
|
||||
|
||||
setRating: function(rating, round) {
|
||||
var _name = 'plugin_' + pluginName;
|
||||
var $el = $(this);
|
||||
var $plugin = $el.data(_name);
|
||||
if( rating > $plugin.settings.totalStars || rating < 0 ) { return; }
|
||||
if( round ){
|
||||
rating = Math.round(rating);
|
||||
}
|
||||
$plugin.applyRating(rating);
|
||||
},
|
||||
|
||||
getRating: function() {
|
||||
var _name = 'plugin_' + pluginName;
|
||||
var $el = $(this);
|
||||
var $starSet = $el.data(_name);
|
||||
return $starSet._state.rating;
|
||||
},
|
||||
|
||||
resize: function(newSize) {
|
||||
var _name = 'plugin_' + pluginName;
|
||||
var $el = $(this);
|
||||
var $starSet = $el.data(_name);
|
||||
var $stars = $starSet.$stars;
|
||||
|
||||
if(newSize <= 1 || newSize > 200) {
|
||||
console.error('star size out of bounds');
|
||||
return;
|
||||
}
|
||||
|
||||
$stars = Array.prototype.slice.call($stars);
|
||||
$stars.forEach(function(star){
|
||||
$(star).css({
|
||||
'width': newSize + 'px',
|
||||
'height': newSize + 'px'
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
setReadOnly: function(flag) {
|
||||
var _name = 'plugin_' + pluginName;
|
||||
var $el = $(this);
|
||||
var $plugin = $el.data(_name);
|
||||
if(flag === true){
|
||||
$plugin.$stars.off('mouseover mouseout click');
|
||||
} else {
|
||||
$plugin.settings.readOnly = false;
|
||||
$plugin.addListeners();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
// Avoid Plugin.prototype conflicts
|
||||
$.extend(Plugin.prototype, methods);
|
||||
|
||||
$.fn[ pluginName ] = function ( options ) {
|
||||
|
||||
// if options is a public method
|
||||
if( !$.isPlainObject(options) ){
|
||||
if( publicMethods.hasOwnProperty(options) ){
|
||||
return publicMethods[options].apply(this, Array.prototype.slice.call(arguments, 1));
|
||||
} else {
|
||||
$.error('Method '+ options +' does not exist on ' + pluginName + '.js');
|
||||
}
|
||||
}
|
||||
|
||||
return this.each(function() {
|
||||
// preventing against multiple instantiations
|
||||
if ( !$.data( this, 'plugin_' + pluginName ) ) {
|
||||
$.data( this, 'plugin_' + pluginName, new Plugin( this, options ) );
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
})( $, window, document );
|
||||
@@ -16,6 +16,94 @@ body.light-mode{
|
||||
}
|
||||
|
||||
.light-mode{
|
||||
.forums{
|
||||
.category{
|
||||
.title{
|
||||
font-size: 20px;
|
||||
line-height: 1;
|
||||
margin-bottom: 0;
|
||||
small{
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.medium-info-box{
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 15px;
|
||||
padding: 15px;
|
||||
text-align: center;
|
||||
margin-top: 45px;
|
||||
}
|
||||
.profile-page{
|
||||
background: #ccc;
|
||||
padding: 15px 0;
|
||||
margin-top: -50px;
|
||||
.user-avatar{
|
||||
width: 125px;
|
||||
border-radius: 50%;
|
||||
border: 2px solid white;
|
||||
box-shadow: 1px 1px 1px #b5b3b3;
|
||||
}
|
||||
h1{
|
||||
display: inline-block;
|
||||
margin-right: 15px;
|
||||
}
|
||||
&.pattern1{
|
||||
background: url("/public/img/email-pattern.webp");
|
||||
}
|
||||
&.pattern2{
|
||||
background: url("/public/img/greek-vase.webp");
|
||||
}
|
||||
&.pattern3{
|
||||
background: url("/public/img/hypnotize.webp");
|
||||
}
|
||||
&.pattern4{
|
||||
background: url("/public/img/funky-lines.webp");
|
||||
}
|
||||
&.pattern5{
|
||||
background: url("/public/img/leaves-pattern.webp");
|
||||
}
|
||||
&.pattern6{
|
||||
background: url("/public/img/folk-pattern.webp");
|
||||
}
|
||||
}
|
||||
.profile-page-menu{
|
||||
background: rgba(255, 255, 255, .3);
|
||||
ul{
|
||||
margin: 0;
|
||||
li{
|
||||
padding: 5px;
|
||||
a{
|
||||
text-decoration: none;
|
||||
&:hover{}
|
||||
&.active{
|
||||
color: black;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.large-list-item{
|
||||
margin: 15px 0;
|
||||
border-radius: 5px;
|
||||
background: white;
|
||||
border: 1px solid #ccc;
|
||||
box-shadow: 0px 0px 5px #ccc;
|
||||
.poster{
|
||||
border-bottom-left-radius: 5px;
|
||||
border-top-left-radius: 5px;
|
||||
}
|
||||
}
|
||||
.jq-star{
|
||||
display: inline-block;
|
||||
svg{
|
||||
max-width: 20px;
|
||||
max-height: 20px;
|
||||
}
|
||||
}
|
||||
header{
|
||||
background: white;
|
||||
padding-right: 1rem;
|
||||
@@ -70,4 +158,55 @@ body.light-mode{
|
||||
}
|
||||
}
|
||||
}
|
||||
.user-actions{
|
||||
padding: 5px;
|
||||
.mark-as-seen-btn{
|
||||
margin-top: 5px;
|
||||
display: block;
|
||||
border: 1px solid #903eb3;
|
||||
padding: 7px 10px;
|
||||
text-decoration: none;
|
||||
&:hover{
|
||||
color: white;
|
||||
transition: all .5s;
|
||||
background: #903eb3;
|
||||
}
|
||||
&.seen{
|
||||
color: white;
|
||||
background: #903eb3;
|
||||
}
|
||||
}
|
||||
.like-btn{
|
||||
display: block;
|
||||
margin-top: 5px;
|
||||
padding: 7px 10px;
|
||||
text-decoration: none;
|
||||
border: 1px solid #16a085;
|
||||
&:hover{
|
||||
color: white;
|
||||
transition: all .5s;
|
||||
background: #16a085;
|
||||
}
|
||||
&.liked{
|
||||
color: white;
|
||||
background: #16a085;
|
||||
}
|
||||
}
|
||||
.add-to-list-btn{
|
||||
display: block;
|
||||
margin-top: 5px;
|
||||
padding: 7px 10px;
|
||||
text-decoration: none;
|
||||
border: 1px solid #ff5f06;
|
||||
&:hover{
|
||||
color: white;
|
||||
transition: all .5s;
|
||||
background: #ff5f06;
|
||||
}
|
||||
&.listed{
|
||||
color: white;
|
||||
background: #ff5f06;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,11 +14,27 @@
|
||||
<img src="http://image.tmdb.org/t/p/w185/{{ $celebrity->profile_path }}" alt="">
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
birth / death
|
||||
@if($celebrity->birtday)
|
||||
<strong>Birthday</strong> {{ $celebrity->birtday }} @if($celebrity->palce_of_birth) ({{ $celebrity->palce_of_birth }}) @endif
|
||||
@endif
|
||||
@if($celebrity->deathday)
|
||||
<strong>Deathday</strong> {{ $celebrity->deathday }}
|
||||
@endif
|
||||
<p>
|
||||
{{ $celebrity->biography }}
|
||||
</p>
|
||||
info movies
|
||||
@if($celebrity->also_known_as)
|
||||
<p>
|
||||
<strong>Also known as:</strong>
|
||||
@foreach(json_decode($celebrity->also_known_as ?? "{}", true) as $alsoKnown)
|
||||
{{ $alsoKnown }}
|
||||
@if(!$loop->last), @endif
|
||||
@endforeach
|
||||
</p>
|
||||
@endif
|
||||
popularity / <br>
|
||||
tmdb/imdb/homepage <br>
|
||||
movies
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container-fluid celebrity-page">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-10 forums">
|
||||
@foreach($categories as $category)
|
||||
<div class="card category">
|
||||
<div class="card-header">
|
||||
<h1 class="title">
|
||||
<div class="row">
|
||||
@if($category->icon)
|
||||
<div class="col-md-1">
|
||||
<div class="text-center">
|
||||
<img src="{{ asset($category->icon) }}" alt="" width="36">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
{{ $category->name }} <br>
|
||||
<small>{{ $category->description }}</small>
|
||||
</div>
|
||||
@else
|
||||
<div class="col-md-12">
|
||||
{{ $category->name }} <br>
|
||||
<small>{{ $category->description }}</small>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</h1>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@foreach($category->threads as $thread)
|
||||
<div class="row">
|
||||
<div class="col-md-1">
|
||||
i
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<a href="">{{ $thread->name }}</a>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
last
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="card">
|
||||
<div class="user-actions">
|
||||
<ul>
|
||||
<li>
|
||||
<a href=""><span class="iconify" data-icon="mdi-eye-check-outline"></span> Mark as seen</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href=""><span class="iconify" data-icon="mdi-thumb-up-outline"></span> Like</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href=""><span class="iconify" data-icon="mdi-playlist-check"></span> add to list</a>
|
||||
</li>
|
||||
</ul>
|
||||
<hr>
|
||||
rate
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -16,7 +16,7 @@
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Lobster&display=swap" rel="stylesheet">
|
||||
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css"/>
|
||||
<!-- Scripts -->
|
||||
@vite(['resources/sass/app.scss', 'resources/js/app.js'])
|
||||
@livewireStyles
|
||||
@@ -30,5 +30,6 @@
|
||||
</main>
|
||||
</div>
|
||||
@livewireScripts
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/js/fontawesome.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
<input type="search" class="form-control form-control-dark text-bg-dark" placeholder="Search..." aria-label="Search">
|
||||
</form>
|
||||
<ul class="nav nav-pills">
|
||||
<li class="nav-item"><a href="#" class="nav-link">Home</a></li>
|
||||
<li class="nav-item"><a href="/" class="nav-link">Home</a></li>
|
||||
<li class="nav-item"><a href="{{ route('movie.index') }}" class="nav-link">Movies</a></li>
|
||||
<li class="nav-item"><a href="#" class="nav-link">Tv Shows</a></li>
|
||||
<li class="nav-item"><a href="#" class="nav-link">Celebrities</a></li>
|
||||
<li class="nav-item"><a href="#" class="nav-link">Forums</a></li>
|
||||
<li class="nav-item"><a href="{{ route('forums.index') }}" class="nav-link">Forums</a></li>
|
||||
<li class="nav-item"><a href="#" class="nav-link">Contact</a></li>
|
||||
@guest
|
||||
@if (Route::has('login'))
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
<div class="ratings">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="row">
|
||||
<div class="col-md-3 offset-2">
|
||||
<img src="{{ asset('/img/star_rating.png') }}" alt="">
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
{{ $movie->vote_average }} <br>
|
||||
<small>{{ $movie->vote_count }} votes</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="text-center">
|
||||
<div class="my-rating" data-id="{{ $movie->id }}" data-type="movie" {{ auth()->check() ? ($movie->ratingBy(auth()->user()) ? 'data-rating='.$movie->ratingBy(auth()->user()) : '') : '' }}></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -38,7 +38,7 @@
|
||||
<ul>
|
||||
@foreach($alternativeTitles as $alternativeTitle)
|
||||
<li>
|
||||
{{ $alternativeTitle->title }}
|
||||
[{{ $alternativeTitle->iso }}] {{ $alternativeTitle->title }}
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Certification</th>
|
||||
<th>Date</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -15,6 +16,9 @@
|
||||
<td>
|
||||
{{ $release->certification }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $release->release_date }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
@@ -111,20 +111,20 @@
|
||||
<div class="col-md-2">
|
||||
<div class="card">
|
||||
<div class="user-actions">
|
||||
<ul>
|
||||
<li>
|
||||
<a href=""><span class="iconify" data-icon="mdi-eye-check-outline"></span> Mark as seen</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href=""><span class="iconify" data-icon="mdi-thumb-up-outline"></span> Like</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href=""><span class="iconify" data-icon="mdi-playlist-check"></span> add to list</a>
|
||||
</li>
|
||||
</ul>
|
||||
<hr>
|
||||
rate
|
||||
<a href="" class="mark-as-seen-btn {{ auth()->check() ? ($movie->wasListedBy('watched', auth()->user()) ? 'seen' : '') : '' }}" data-id="{{ $movie->id }}" data-type="movie" data-list="watched">
|
||||
<span class="iconify" data-icon="mdi-eye-check-outline"></span> Mark as seen
|
||||
</a>
|
||||
<a href="" class="like-btn {{ auth()->check() ? ($movie->wasListedBy('liked', auth()->user()) ? 'liked' : '') : '' }}" data-id="{{ $movie->id }}" data-type="movie" data-list="liked">
|
||||
<span class="iconify" data-icon="mdi-thumb-up-outline"></span> Like
|
||||
</a>
|
||||
<a href="" class="add-to-list-btn">
|
||||
<span class="iconify" data-icon="mdi-playlist-check"></span> add to list
|
||||
<span class="arrow float-end">
|
||||
↓
|
||||
</span>
|
||||
</a>
|
||||
<hr>
|
||||
@include('layouts.rating')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
@extends('profile.profile')
|
||||
|
||||
@section('page_content')
|
||||
<br>
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
@extends('profile.profile')
|
||||
|
||||
@section('page_content')
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-12">
|
||||
@foreach($items as $item)
|
||||
<div class="large-list-item">
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<a href="{{ route('movie.show', $item->item()->first()->slug) }}">
|
||||
<img src="http://image.tmdb.org/t/p/w185{{ $item->item()->first()->poster_path }}" alt="" class="poster">
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<div class="row">
|
||||
<div class="col-md-1 text-center">
|
||||
<img src="{{ asset('/img/star_rating.png') }}" alt="">
|
||||
{{ $item->item()->first()->vote_average }}
|
||||
</div>
|
||||
<div class="col-md-11">
|
||||
<h3>
|
||||
<a href="{{ route('movie.show', $item->item()->first()->slug) }}">
|
||||
{{ $item->item()->first()->title }}
|
||||
</a>
|
||||
</h3>
|
||||
<small>{{ $item->item()->first()->release_date->format('F Y') }}</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<span>
|
||||
{{ $item->item()->first()->overview }}
|
||||
</span>
|
||||
<div class="meta">
|
||||
Rate | favorite | add to list | remove
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -1,22 +1,94 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<div class="profile-page pattern{{ rand(1,6) }}">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-2 text-center">
|
||||
<img src="{{ asset('/img/user_no_avatar.png') }}" alt="" class="user-avatar">
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<h1>{{ $user->name }}</h1><span class="register-date">Member since {{ $user->created_at->format('F Y') }}</span>
|
||||
<br>
|
||||
2 Followers 3 Following average movie score average tv series score
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="profile-page-menu">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
<div class="col-md-10">
|
||||
<div class="profile-nav">
|
||||
avatar/name/etc <br>
|
||||
<div class="menu-nav">
|
||||
<ul class="list-inline">
|
||||
<li class="float-start"><a href="">Profile</a></li>
|
||||
<li class="float-start"><a href="">History</a></li>
|
||||
<li class="float-start"><a href="">Watchlist</a></li>
|
||||
<li class="float-start"><a href="">Collection</a></li>
|
||||
<li class="float-start"><a href="">Ratings</a></li>
|
||||
<li class="float-start"><a href="">Reviews</a></li>
|
||||
<li class="float-start"><a href="">Likes</a></li>
|
||||
<li class="float-start"><a href="">Network</a></li>
|
||||
<li class="float-start"><a href="">Stats</a></li>
|
||||
<li class="float-start">
|
||||
<a href="">
|
||||
Profile
|
||||
</a>
|
||||
</li>
|
||||
<li class="float-start">
|
||||
<a
|
||||
href="{{ route('profile.list.index', $user->slug) }}"
|
||||
class="{{ \App\Service\ToolService::isCurrentRoute(route('profile.list.index', $user->slug)) ? 'active' : '' }}"
|
||||
>
|
||||
Lists
|
||||
</a>
|
||||
</li>
|
||||
<li class="float-start">
|
||||
<a
|
||||
href="{{ route('profile.list.show', [$user->slug, 'watched']) }}"
|
||||
class="{{ \App\Service\ToolService::isCurrentRoute(route('profile.list.show', [$user->slug, 'watched'])) ? 'active' : '' }}"
|
||||
>
|
||||
History
|
||||
</a>
|
||||
</li>
|
||||
<li class="float-start">
|
||||
<a
|
||||
href="{{ route('profile.list.show', [$user->slug, 'watchlist']) }}"
|
||||
class="{{ \App\Service\ToolService::isCurrentRoute(route('profile.list.show', [$user->slug, 'watchlist'])) ? 'active' : '' }}"
|
||||
>
|
||||
Watchlist
|
||||
</a>
|
||||
</li>
|
||||
<li class="float-start">
|
||||
<a
|
||||
href="{{ route('profile.list.show', [$user->slug, 'collection']) }}"
|
||||
class="{{ \App\Service\ToolService::isCurrentRoute(route('profile.list.show', [$user->slug, 'collection'])) ? 'active' : '' }}"
|
||||
>
|
||||
Collection
|
||||
</a>
|
||||
</li>
|
||||
<li class="float-start">
|
||||
<a href="">
|
||||
Ratings
|
||||
</a>
|
||||
</li>
|
||||
<li class="float-start">
|
||||
<a href="">
|
||||
Reviews
|
||||
</a>
|
||||
</li>
|
||||
<li class="float-start">
|
||||
<a
|
||||
href="{{ route('profile.list.show', [$user->slug, 'liked']) }}"
|
||||
class="{{ \App\Service\ToolService::isCurrentRoute(route('profile.list.show', [$user->slug, 'liked'])) ? 'active' : '' }}"
|
||||
>
|
||||
Likes
|
||||
</a>
|
||||
</li>
|
||||
<li class="float-start">
|
||||
<a href="">
|
||||
Network
|
||||
</a>
|
||||
</li>
|
||||
<li class="float-start">
|
||||
<a href="">
|
||||
Stats
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -20,10 +20,19 @@ Route::prefix('celebrities')->group(function () {
|
||||
Route::get('/{slug}', [\App\Http\Controllers\CelebrityController::class, 'show'])->name('celebrity.show');
|
||||
});
|
||||
|
||||
Route::prefix('profile/{slug}')->group(function () {
|
||||
Route::prefix('forums')->group(function () {
|
||||
Route::get('/', [\App\Http\Controllers\Forum\CategoriesController::class, 'index'])->name('forums.index');
|
||||
});
|
||||
|
||||
Route::prefix('lists')->group(function () {
|
||||
Route::get('/{listSlug}/{itemId}/{itemType}', [\App\Http\Controllers\MediaListController::class, 'toggleListItem'])->name('list.toggle');
|
||||
});
|
||||
|
||||
Route::get('/rate/{itemType}/{itemId}/{rating}', [\App\Http\Controllers\RatingController::class, 'rate'])->name('rating.process');
|
||||
|
||||
Route::prefix('profile/{userSlug}')->group(function () {
|
||||
Route::get('/lists', [\App\Http\Controllers\MediaListController::class, 'index'])->name('profile.list.index');
|
||||
Route::get('/lists/create', [\App\Http\Controllers\MediaListController::class, 'create'])->name('profile.list.create');
|
||||
Route::post('/lists/store', [\App\Http\Controllers\MediaListController::class, 'store'])->name('profile.list.store');
|
||||
Route::get('/lists/view/{slug}', [\App\Http\Controllers\MediaListController::class, 'show'])->name('profile.list.show');
|
||||
|
||||
Route::get('/lists/view/{listSlug}', [\App\Http\Controllers\MediaListController::class, 'show'])->name('profile.list.show');
|
||||
});
|
||||
|
||||