some css tweaks and other minor improvements/fixes

This commit is contained in:
noxy
2019-11-27 15:23:48 +00:00
parent 5fc7bf3036
commit 50ba00431b
35 changed files with 880 additions and 104 deletions

View File

@@ -145,8 +145,8 @@ class UserController extends Controller
$validator = \Validator::make($request->all(), [ $validator = \Validator::make($request->all(), [
'username' => 'required|unique:users|min:3|max:25|alpha_num', 'username' => 'required|unique:users|min:3|max:25|alpha_num',
'email' => 'required|email|unique:users|confirmed', 'email' => 'required|email|unique:users|confirmed',
'password' => 'required|min:6|confirmed' 'password' => 'required|min:6|confirmed',
//'g-recaptcha-response' => 'required|recaptcha' 'captcha' => 'required|captcha'
]); ]);
if($validator->fails()) { if($validator->fails()) {
@@ -368,6 +368,31 @@ class UserController extends Controller
]); ]);
} }
public function bestof() {
$user = UserFavorite::where('username', '=', sirx)->first();
if (!$user) {
return redirect()->back()->with('error', 'Unknown username');
}
$vid = $user->videos()->filtered()->find($id);
if (!$vid) {
return redirect()->back()->with('error', 'Video not found on user');
}
$sfw = $vid->tags->contains(function($key, $tag) {
return $tag->normalized === 'sfw';
});
return view('best', [
'video' => $vid,
'related' => $user,
'banner' => Banner::getRandom($vid->isSfw()),
'sfw' => $sfw,
]);
}
// TODO: Cleanup. less Repetion between random and random_vav/play and play_fav // TODO: Cleanup. less Repetion between random and random_vav/play and play_fav
// Only difference are the redirect urls and the Base Model // Only difference are the redirect urls and the Base Model
public function random_fav($username) { public function random_fav($username) {

View File

@@ -22,6 +22,7 @@ class VideoController extends Controller
* @return Response * @return Response
*/ */
public function index(Request $request) { public function index(Request $request) {
if($request->has('q')){ if($request->has('q')){
$needle = trim($request->input('q')); $needle = trim($request->input('q'));
return view('index', [ return view('index', [
@@ -29,12 +30,13 @@ class VideoController extends Controller
->orderBy('id', 'asc') ->orderBy('id', 'asc')
->paginate(20)->appends(['q' => $needle]), ->paginate(20)->appends(['q' => $needle]),
'categories' => Category::all(), 'categories' => Category::all(),
'q' => $needle 'q' => $needle,
]); ]);
} }
return view('index', [ return view('index', [
'videos' => Video::filtered()->orderBy('id', 'ASC')->paginate(20), 'videos' => Video::filtered()->orderBy('id', 'ASC')->paginate(20),
'categories' => Category::all() 'categories' => Category::all(),
]); ]);
} }
@@ -74,7 +76,8 @@ class VideoController extends Controller
*/ */
public function store(Request $request) public function store(Request $request)
{ {
/*var_dump($request->hasFile('file'));*/ if(!$request->hasFile('file') || !$request->has('category') || !$request->has('tags')) /*var_dump($request->hasFile('file'));*/
if(!$request->hasFile('file') || !$request->has('category') || !$request->has('tags'))
return new JsonResponse(['error' => 'invalid_request']); return new JsonResponse(['error' => 'invalid_request']);
$tags = $request->get('tags'); $tags = $request->get('tags');

View File

@@ -20,6 +20,12 @@ class rulezController extends Controller
return view('rulez', ['rules' => Rulez::all(), 'uploadrules' => Rulez::where('zuordnung', '=', 'Upload')->get(), 'tagrules' => Rulez::where('zuordnung', '=', 'Tagging')->get(), 'generalrules' => Rulez::where('zuordnung', '=', 'General')->get(), 'commentrules' => Rulez::where('zuordnung', '=', 'Commenting')->get()]); return view('rulez', ['rules' => Rulez::all(), 'uploadrules' => Rulez::where('zuordnung', '=', 'Upload')->get(), 'tagrules' => Rulez::where('zuordnung', '=', 'Tagging')->get(), 'generalrules' => Rulez::where('zuordnung', '=', 'General')->get(), 'commentrules' => Rulez::where('zuordnung', '=', 'Commenting')->get()]);
} }
public function gib()
{
$storagePath = storage_path('app/vidz/1572221426860.webm');
return ($storagePath)->response();
}
/** /**
* Show the form for creating a new resource. * Show the form for creating a new resource.
* *

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

After

Width:  |  Height:  |  Size: 134 KiB

View File

@@ -36,11 +36,11 @@ Route::group(['prefix' => 'api'], function() {
// /api/comments // /api/comments
Route::group(['prefix' => 'comments'], function() { Route::group(['prefix' => 'comments'], function() {
Route::get('/', 'CommentController@index'); Route::get('/', 'CommentController@index')->middleware('auth');
Route::get('/{id}', 'CommentController@show')->where('id', '[0-9]+'); Route::get('/{id}', 'CommentController@show')->where('id', '[0-9]+')->middleware('auth');
Route::post('{id}/edit', 'CommentController@update')->where('id', '[0-9]+'); Route::post('{id}/edit', 'CommentController@update')->where('id', '[0-9]+')->middleware('auth');
Route::post('{id}/delete', 'CommentController@destroy')->where('id', '[0-9]+'); Route::post('{id}/delete', 'CommentController@destroy')->where('id', '[0-9]+')->middleware('auth');
Route::post('{id}/restore', 'CommentController@restore')->where('id', '[0-9]+'); Route::post('{id}/restore', 'CommentController@restore')->where('id', '[0-9]+')->middleware('auth');
}); });
// /api/user // /api/user
@@ -55,7 +55,7 @@ Route::group(['prefix' => 'api'], function() {
return \App\Models\Video::getRandom()->with(['category', 'user' => function($query) { return \App\Models\Video::getRandom()->with(['category', 'user' => function($query) {
$query->addSelect('username', 'id'); $query->addSelect('username', 'id');
}])->first(); }])->first();
}); })->middleware('auth');
@@ -79,7 +79,7 @@ Route::group(['prefix' => 'api'], function() {
Route::post('{id}/delete', 'VideoController@destroy')->where('id', '[0-9]+'); Route::post('{id}/delete', 'VideoController@destroy')->where('id', '[0-9]+');
Route::post('{id}/tag', 'VideoController@tag')->where('id', '[0-9]+'); Route::post('{id}/tag', 'VideoController@tag')->where('id', '[0-9]+');
Route::post('{id}/untag', 'VideoController@untag')->where('id', '[0-9]+'); Route::post('{id}/untag', 'VideoController@untag')->where('id', '[0-9]+');
Route::post('upload', 'VideoController@store')->middleware('auth.basic'); Route::post('upload', 'VideoController@store')->middleware('auth');
}); });
Route::post('upload', 'VideoController@store'); Route::post('upload', 'VideoController@store');
@@ -97,13 +97,14 @@ Route::group(["middleware" => "theme"], function() {
Route::get('user/{username}/uploads', 'UserController@random')->middleware('auth'); Route::get('user/{username}/uploads', 'UserController@random')->middleware('auth');
Route::get('user/{username}/uploads/{id}', 'UserController@play')->where('id', '[0-9]+'); Route::get('user/{username}/uploads/{id}', 'UserController@play')->where('id', '[0-9]+');
Route::get('user/{username}/favs', 'UserController@random_fav')->middleware('auth'); Route::get('user/{username}/favs', 'UserController@random_fav')->middleware('auth');
Route::get('best', 'UserController@bestof')->middleware('auth');
Route::get('user/{username}/favs/{id}', 'UserController@play_fav')->where('id', '[0-9]+'); Route::get('user/{username}/favs/{id}', 'UserController@play_fav')->where('id', '[0-9]+');
Route::get('user/{username}/favs/index', 'UserController@show_favs')->middleware('auth'); Route::get('user/{username}/favs/index', 'UserController@show_favs')->middleware('auth');
Route::get('user/{username}/comments', 'UserController@show_comments')->middleware('auth'); Route::get('user/{username}/comments', 'UserController@show_comments')->middleware('auth');
Route::get('logout', 'UserController@logout'); Route::get('logout', 'UserController@logout');
Route::post('login', 'UserController@login'); Route::post('login', 'UserController@login');
Route::get('register', 'UserController@create'); Route::get('register', 'UserController@create');
//Route::post('register', 'UserController@store'); Route::post('register', 'UserController@store');
Route::get('activate/{token}', 'UserController@activate'); Route::get('activate/{token}', 'UserController@activate');
Route::get('index', 'VideoController@index')->middleware('auth'); Route::get('index', 'VideoController@index')->middleware('auth');
Route::get('main', 'VideoController@main')->middleware('auth'); Route::get('main', 'VideoController@main')->middleware('auth');
@@ -113,11 +114,12 @@ Route::group(["middleware" => "theme"], function() {
Route::get('webm', function() { return view('webm'); })->middleware('auth'); Route::get('webm', function() { return view('webm'); })->middleware('auth');
Route::get('about', function() { return view('about'); })->middleware('auth'); Route::get('about', function() { return view('about'); })->middleware('auth');
Route::get('irc', function() { return view('irc'); }); Route::get('irc', function() { return view('irc'); });
Route::get('rules', 'rulezController@index')->middleware('auth'); Route::get('rules', 'rulezController@index');
#Route::get('tos', function() { return view('tos'); });
#Route::get('rulez', 'rulezController@index')->middleware('auth'); #Route::get('rulez', 'rulezController@index')->middleware('auth');
Route::get('todo', function() { return view('todo'); })->middleware('auth'); Route::get('todo', function() { return view('todo'); })->middleware('auth');
Route::get('contact', function() { return view('contact'); }); Route::get('contact', function() { return view('contact'); });
Route::get('terms', function() { return view('tos'); })->middleware('auth'); #Route::get('terms', function() { return view('tos'); })->middleware('auth');
Route::get('privacy', function() { return view('privacy'); })->middleware('auth'); Route::get('privacy', function() { return view('privacy'); })->middleware('auth');
Route::get('stats', function() { Route::get('stats', function() {
return view('stats', [ return view('stats', [
@@ -154,6 +156,29 @@ Route::group(["middleware" => "theme"], function() {
Route::get('{id}/fav', 'VideoController@favorite')->where('id', '[0-9]+'); Route::get('{id}/fav', 'VideoController@favorite')->where('id', '[0-9]+');
Route::post('{id}', 'CommentController@store')->where('id', '[0-9]+'); Route::post('{id}', 'CommentController@store')->where('id', '[0-9]+');
Route::get('{shortname}', 'CategoryController@showVideo')->where('shortname', '[a-z][a-z0-9]+')->middleware('auth'); ##Category View
Route::get('{shortname}/{id}', 'CategoryController@showVideo')->where(['shortname' => '[a-z][a-z0-9]+', 'id' => '[0-9]+'])->middleware('auth'); Route::get('{shortname}', 'CategoryController@showVideo')->where('shortname', '[a-z][a-z0-9]+');
Route::get('{shortname}/{id}', 'CategoryController@showVideo')->where(['shortname' => '[a-z][a-z0-9]+', 'id' => '[0-9]+']);
Route::any('captcha-test', function() {
if (request()->getMethod() == 'POST') {
$rules = ['captcha' => 'required|captcha'];
$validator = validator()->make(request()->all(), $rules);
if ($validator->fails()) {
echo '<p style="color: #ff0000;">Incorrect!</p>';
} else {
echo '<p style="color: #00ff30;">Matched :)</p>';
}
}
$form = '<form method="post" action="captcha-test">';
$form .= '<input type="hidden" name="_token" value="' . csrf_token() . '">';
$form .= '<p>' . captcha_img() . '</p>';
$form .= '<p><input type="text" name="captcha"></p>';
$form .= '<p><button type="submit" name="check">Check</button></p>';
$form .= '</form>';
return $form;
});
}); });

View File

@@ -188,6 +188,38 @@ public function tesThumb() {
} }
} }
public function blurryThumb() {
set_time_limit(9899999999999999);
$dat = $this->file;
#$in = public_path() . "/b"; // webm-input
$in = "/home/sirx/web/devw0bm/w0bm.com/public/b";
$out = public_path() . "/thumbs/blurred"; //thumb-output
$tmpdir = str_replace("public", "app/Http/Controllers/tmp", public_path());
$name = explode(".", $dat);
array_pop($name);
$name = join(".", $name);
#$ffmpegthumbnailer = round(shell_exec("ffmpegthumbnailer -i {$in}/{$dat} -a -o {$out}/{$name}_test.png"));
//$ffmpeg = round(shell_exec("ffmpeg -i {$in}/{$dat} -vf select='eq(pict_type,PICT_TYPE_I)' -vf scale=128:128 {$out}/{$name}_ffmpeg.png"));
$length = round(shell_exec("ffprobe -i {$in}/{$dat} -show_format -v quiet | sed -n 's/duration=//p'"));
$half = $length / 20;
$ffmpeg = exec("ffmpegthumbnailer -i {$in}/{$dat} -o {$out}/{$name}_testblur.png", $output, $return);
if ($return != 0) {
// error
@unlink("{$out}/{$name}_testblur.png");
exec("ffmpeg -i {$in}/{$dat} -vf select='eq(pict_type,PICT_TYPE_I)' -vf scale=128:128:force_original_aspect_ratio=increase,crop=128:128 {$out}/{$name}.png");
exec("convert {$out}/{$name}.png -blur 0x8 {$out}/{$name}_blurred.png");
@unlink("{$out}/{$name}.png");
}else{
// success
@unlink("{$out}/{$name}_testblur.png");
exec("ffmpeg -i {$in}/{$dat} -vf select='eq(pict_type,PICT_TYPE_I)' -vf scale=128:128:force_original_aspect_ratio=increase,crop=128:128 -ss {$half} {$out}/{$name}.png");
exec("convert {$out}/{$name}.png -blur 0x8 {$out}/{$name}_blurred.png");
@unlink("{$out}/{$name}.png");
}
}
public function createThumbnailStatic() { public function createThumbnailStatic() {
$dat = $this->file; $dat = $this->file;
$in = public_path() . "/b"; // webm-input $in = public_path() . "/b"; // webm-input

View File

@@ -22,7 +22,8 @@
"cviebrock/eloquent-taggable": "dev-master", "cviebrock/eloquent-taggable": "dev-master",
"itsgoingd/clockwork": "^1.14", "itsgoingd/clockwork": "^1.14",
"erusev/parsedown": "^1.6", "erusev/parsedown": "^1.6",
"sentry/sentry-laravel": "^0.8.0" "sentry/sentry-laravel": "^0.8.0",
"mews/captcha": "^3.0"
}, },
"require-dev": { "require-dev": {
"fzaninotto/faker": "~1.4", "fzaninotto/faker": "~1.4",

143
composer.lock generated
View File

@@ -1,10 +1,10 @@
{ {
"_readme": [ "_readme": [
"This file locks the dependencies of your project to a known state", "This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "728bab6a86590dd1f02dfe2a520c7379", "content-hash": "cbbccb040f48f4d74c59930694b330ff",
"packages": [ "packages": [
{ {
"name": "barryvdh/laravel-ide-helper", "name": "barryvdh/laravel-ide-helper",
@@ -1090,6 +1090,76 @@
], ],
"time": "2017-03-20T17:10:46+00:00" "time": "2017-03-20T17:10:46+00:00"
}, },
{
"name": "intervention/image",
"version": "2.5.1",
"source": {
"type": "git",
"url": "https://github.com/Intervention/image.git",
"reference": "abbf18d5ab8367f96b3205ca3c89fb2fa598c69e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Intervention/image/zipball/abbf18d5ab8367f96b3205ca3c89fb2fa598c69e",
"reference": "abbf18d5ab8367f96b3205ca3c89fb2fa598c69e",
"shasum": ""
},
"require": {
"ext-fileinfo": "*",
"guzzlehttp/psr7": "~1.1",
"php": ">=5.4.0"
},
"require-dev": {
"mockery/mockery": "~0.9.2",
"phpunit/phpunit": "^4.8 || ^5.7"
},
"suggest": {
"ext-gd": "to use GD library based image processing.",
"ext-imagick": "to use Imagick based image processing.",
"intervention/imagecache": "Caching extension for the Intervention Image library"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.4-dev"
},
"laravel": {
"providers": [
"Intervention\\Image\\ImageServiceProvider"
],
"aliases": {
"Image": "Intervention\\Image\\Facades\\Image"
}
}
},
"autoload": {
"psr-4": {
"Intervention\\Image\\": "src/Intervention/Image"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Oliver Vogel",
"email": "oliver@olivervogel.com",
"homepage": "http://olivervogel.com/"
}
],
"description": "Image handling and manipulation library with support for Laravel integration",
"homepage": "http://image.intervention.io/",
"keywords": [
"gd",
"image",
"imagick",
"laravel",
"thumbnail",
"watermark"
],
"time": "2019-11-02T09:15:47+00:00"
},
{ {
"name": "itsgoingd/clockwork", "name": "itsgoingd/clockwork",
"version": "v1.14.5", "version": "v1.14.5",
@@ -1553,6 +1623,75 @@
], ],
"time": "2018-01-27T16:03:56+00:00" "time": "2018-01-27T16:03:56+00:00"
}, },
{
"name": "mews/captcha",
"version": "3.0.1",
"source": {
"type": "git",
"url": "https://github.com/mewebstudio/captcha.git",
"reference": "bef0db3663f1fe442ae803fb207dbe2bbfa10890"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/mewebstudio/captcha/zipball/bef0db3663f1fe442ae803fb207dbe2bbfa10890",
"reference": "bef0db3663f1fe442ae803fb207dbe2bbfa10890",
"shasum": ""
},
"require": {
"ext-gd": "*",
"illuminate/config": "~5.0|^6.0",
"illuminate/filesystem": "~5.0|^6.0",
"illuminate/hashing": "~5.0|^6.0",
"illuminate/session": "~5.0|^6.0",
"illuminate/support": "~5.0|^6.0",
"intervention/image": "~2.5",
"php": "^7.2"
},
"require-dev": {
"mockery/mockery": "^1.0",
"phpunit/phpunit": "^8.0"
},
"type": "package",
"extra": {
"laravel": {
"providers": [
"Mews\\Captcha\\CaptchaServiceProvider"
],
"aliases": {
"Captcha": "Mews\\Captcha\\Facades\\Captcha"
}
}
},
"autoload": {
"psr-4": {
"Mews\\Captcha\\": "src/"
},
"files": [
"src/helpers.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Muharrem ERİN",
"email": "me@mewebstudio.com",
"homepage": "https://github.com/mewebstudio",
"role": "Developer"
}
],
"description": "Laravel 5 & 6 Captcha Package",
"homepage": "https://github.com/mewebstudio/captcha",
"keywords": [
"captcha",
"laravel5 Security",
"laravel6 Captcha",
"laravel6 Security"
],
"time": "2019-09-05T22:33:04+00:00"
},
{ {
"name": "monolog/monolog", "name": "monolog/monolog",
"version": "1.23.0", "version": "1.23.0",

View File

@@ -137,6 +137,7 @@ return [
Illuminate\Translation\TranslationServiceProvider::class, Illuminate\Translation\TranslationServiceProvider::class,
Illuminate\Validation\ValidationServiceProvider::class, Illuminate\Validation\ValidationServiceProvider::class,
Illuminate\View\ViewServiceProvider::class, Illuminate\View\ViewServiceProvider::class,
Mews\Captcha\CaptchaServiceProvider::class,
/* /*
* Application Service Providers... * Application Service Providers...
@@ -209,7 +210,8 @@ return [
'Form' => Collective\Html\FormFacade::class, 'Form' => Collective\Html\FormFacade::class,
'Html' => Collective\Html\HtmlFacade::class, 'Html' => Collective\Html\HtmlFacade::class,
'Recaptcha' => Greggilbert\Recaptcha\Facades\Recaptcha::class, 'Recaptcha' => Greggilbert\Recaptcha\Facades\Recaptcha::class,
'Sentry' => Sentry\SentryLaravel\SentryFacade::class, 'Sentry' => Sentry\SentryLaravel\SentryFacade::class,
'Captcha' => Mews\Captcha\Facades\Captcha::class,
], ],
]; ];

49
config/captcha.php Normal file
View File

@@ -0,0 +1,49 @@
<?php
return [
'characters' => ['2', '3', '4', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'j', 'm', 'n', 'p', 'q', 'r', 't', 'u', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'M', 'N', 'P', 'Q', 'R', 'T', 'U', 'X', 'Y', 'Z', 'ä', 'Ä', 'ö', 'Ö', 'ü', 'Ü', 'ß', '~', '*', ',', '.', '´', '`' ],
#'characters' => ['Aardvark','Albatross','Alligator','Alpaca','Ant','Anteater','Antelope','Ape','Armadillo','Donkey','Baboon','Badger','Barracuda','Bat','Bear','Beaver','Bee','Bison','Boar','Buffalo','Butterfly','Camel','Capybara','Caribou','Cassowary','Cat','Caterpillar','Cattle','Chamois','Cheetah','Chicken','Chimpanzee','Chinchilla','Chough','Clam','Cobra','Cockroach','Cod','Cormorant','Coyote','Crab','Crane','Crocodile','Crow','Curlew','Deer','Dinosaur','Dog','Dogfish','Dolphin','Dotterel','Dove','Dragonfly','Duck','Dugong','Dunlin','Eagle','Echidna','Eel','Eland','Elephant','Elk','Emu','Falcon','Ferret','Finch','Fish','Flamingo','Fly','Fox','Frog','Gaur','Gazelle','Gerbil','Giraffe','Gnat','Gnu','Goat','Goldfinch','Goldfish','Goose','Gorilla','Goshawk','Grasshopper','Grouse','Guanaco','Gull','Hamster','Hare','Hawk','Hedgehog','Heron','Herring','Hippopotamus','Hornet','Horse','Human','Hummingbird','Hyena','Ibex','Ibis','Jackal','Jaguar','Jay','Jellyfish','Kangaroo','Kingfisher','Koala','Kookabura','Kouprey','Kudu','Lapwing','Lark','Lemur','Leopard','Lion','Llama','Lobster','Locust','Loris','Louse','Lyrebird','Magpie','Mallard','Manatee','Mandrill','Mantis','Marten','Meerkat','Mink','Mole','Mongoose','Monkey','Moose','Mosquito','Mouse','Mule','Narwhal','Newt','Nightingale','Octopus','Okapi','Opossum','Oryx','Ostrich','Otter','Owl','Oyster','Panther','Parrot','Partridge','Peafowl','Pelican','Penguin','Pheasant','Pig','Pigeon','Pony','Porcupine','Porpoise','Quail','Quelea','Quetzal','Rabbit','Raccoon','Rail','Ram','Rat','Raven','Red deer','Red panda','Reindeer','Rhinoceros','Rook','Salamander','Salmon','Sand Dollar','Sandpiper','Sardine','Scorpion','Seahorse','Seal','Shark','Sheep','Shrew','Skunk','Snail','Snake','Sparrow','Spider','Spoonbill','Squid','Squirrel','Starling','Stingray','Stinkbug','Stork','Swallow','Swan','Tapir','Tarsier','Termite','Tiger','Toad','Trout','Turkey','Turtle','Viper','Vulture','Wallaby','Walrus','Wasp','Weasel','Whale','Wildcat','Wolf','Wolverine','Wombat','Woodcock','Woodpecker','Worm','Wren','Yak','Zebra'],
'default' => [
'length' => 4,
'width' => 500,
'height' => 55,
'quality' => 30,
'math' => false,
],
'math' => [
'length' => 9,
'width' => 250,
'height' => 36,
'quality' => 90,
'math' => true,
],
'flat' => [
'length' => 25,
'width' => 500,
'height' => 36,
'quality' => 60,
'lines' => 13,
'bgImage' => false,
'bgColor' => '#131313',
'fontColors' => ['#FF0080', '#DF0101', '#848484', '#c0392b', '#0B3B0B', '#FFFF00', '#FFFFFF', '#DF01D7'],
'contrast' => -3,
],
'mini' => [
'length' => 3,
'width' => 60,
'height' => 32,
],
'inverse' => [
'length' => 5,
'width' => 120,
'height' => 36,
'quality' => 90,
'sensitive' => true,
'angle' => 12,
'sharpen' => 10,
'blur' => 2,
'invert' => true,
'contrast' => -5,
]
];

View File

@@ -3855,3 +3855,4 @@ video#placeholder {
.modal-content { .modal-content {
padding-top: 10px; padding-top: 10px;
} }

View File

@@ -1126,3 +1126,226 @@ div#categories {
.caption { .caption {
padding: 5px; padding: 5px;
} }
.dropdown-menu.show {
top: 80%;
left: 5%;
border-radius: 0;
border: 1px solid black;
}
.dropdown-item {
padding: 5px 0.5rem;
}
.dropdown-item:hover, .dropdown-item:focus {
background-color: #525252;
}
.grid-menu {
display: grid;
grid-template-columns: auto 1fr 1fr 1fr;
grid-template-rows: 1fr;
}
.thumbnail {
margin: 5px;
}
.thumbnail img {
border: 1px solid black;
}
small > b {
text-shadow: 1px 1px 1px black;
}
a.dropdown-item.logout {
text-align: center;
font-weight: bold;
text-shadow: 1px 1px red;
}
/* Modal */
.modal-content {
background: #282828;
border-radius: 0px;
border: 1px solid black;
}
.modal-head {
padding-left: 20px;
padding-right: 20px;
padding-top: 10px;
}
img.icon {
max-height: 20px;
}
span.dlwebm.badge.badge-secondary {
position: absolute;
top: 0;
right: 0;
border-top-left-radius: 0px;
border-bottom-right-radius: 0px;
border-bottom-left-radius: 0px;
}
.bs-popover-bottom>.arrow::after, .bs-popover-auto[x-placement^=bottom]>.arrow::after {
border-bottom-color: #191919;
}
.bs-popover-left>.arrow::after, .bs-popover-auto[x-placement^=left]>.arrow::after {
border-left-color: #191919;
}
a {
transition: .1s;
}
a:hover {
text-shadow: 1px 1px 1px black;
transition: all .1s ease;
text-decoration: none;
}
.uploader > a:hover {
color: #007053 !important;
}
span.badge.badge-sfw {
background: #095809;
}
span.badge.badge-nsfw {
background: #bb0d0d;
}
a.badge.nsfw-text > span {
color: black !important;
font-weight: bold;
}
div#tag-display {
font-size: 1.3rem;
}
i.fa.fa-lg.fa-heart {
color: #ff0076;
}
i.fa.fa-lg.fa-heart-o {
color: #ff0076;
}
button.copylink {
border-radius: 5px;
padding: 5px;
transition: 0s ease;
border: 0;
color: white;
}
button.copylink:focus:after {
content: "✔";
position: relative;
color: lime;
left: 3px;
top: -2px;
transition: all .5s ease;
font-size: 14px;
}
button.copylink:not(:focus) {
transition: all .5s ease-out;
}
button#togglebg, button.bg-toggle, button#fav, button#webm_edit, button#webm_report, button.copylink {
background: #28282800;
margin: 0;
}
button#togglebg:hover, button.bg-toggle:hover, button#fav:hover, button#webm_edit:hover, button#webm_report:hover, button.copylink:hover {
transition: .2s ease-in-out;
background: #3e3d3d00;
text-shadow: 1px 1px 0px #000;
color: #007053;
}
.btn-dark:not(:disabled):not(.disabled):active, .btn-dark:not(:disabled):not(.disabled).active, .show>.btn-dark.dropdown-toggle {
color: #fff;
background-color: transparent;
border-color: transparent;
}
.toggo.tag-panel-body {
max-width: min-content;
overflow-y: hidden;
}
.toggo.tag-panel-body {
max-width: 350px;
overflow-y: auto;
max-height: 50px;
}
.popover-metadata {
min-width: 220px;
}
.monchichi {
display: inherit;
background: #1e1c1c;
border-radius: 5px;
border: 1px solid black;
margin: 5px;
}
.frontendedittags .toggo {
max-width: 100% !important;
max-height: unset;
}
.form-control:focus {
-webkit-box-shadow: unset;
box-shadow: unset;
}
/* Damit der Filesize Button besser aussieht, auch bei längerem Artist Text */
.popover-body {
padding: 1rem .75rem;
}
img#indexthumb {
max-width: 50px;
}
.dropdown-menu.LinksGrid.show {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: 1fr;
}
@media (min-width: 1200px) {
.container {
max-width: 800px;
}
}
@media (min-width: 1500px) {
.container {
max-width: 1000px;
}
}
span.yesmg {
color: #65ff04;
text-shadow: 0px 0px 10px #00ff1f;
}
span.nomsg {
color: #39393a;
text-shadow: 1px 0px 1px #313030;
margin-right: 1px;
}

View File

@@ -214,6 +214,15 @@ if (typeof video !== 'undefined') {
} }
videoElem.addEventListener('play', animationLoop); videoElem.addEventListener('play', animationLoop);
$(window).keypress(function(e) {
if (e.which == 32) {
if (videoElem.paused)
videoElem.play();
else
videoElem.pause();
}
});
} }
}; };
@@ -235,6 +244,16 @@ $("[data-toggle=popover]").popover({
} }
}); });
$('body').on('click', function (e) {
$('[data-toggle="popover"]').each(function () {
//the 'is' for buttons that trigger popups
//the 'has' for icons within a button that triggers a popup
if (!$(this).is(e.target) && $(this).has(e.target).length === 0 && $('.popover').has(e.target).length === 0) {
$(this).popover('hide');
}
});
});
(function ($) { (function ($) {
function updaterow(ctx, video) { function updaterow(ctx, video) {
if($('video').length) { if($('video').length) {
@@ -1286,3 +1305,12 @@ document.querySelectorAll("#layoutSwitcher [id^=layout]").forEach(el => el.addEv
else else
console.warn(response.status, await response.text()); console.warn(response.status, await response.text());
})); }));
// Copy Link
function Copy() {
var Url = document.getElementById("url");
Url.innerHTML = window.location.href;
console.log(Url.innerHTML)
Url.select();
document.execCommand("copy");
}

View File

@@ -1012,3 +1012,131 @@ div#untenlinks {
padding-left: 5px; padding-left: 5px;
padding-bottom: 5px; padding-bottom: 5px;
} }
/* unsauber aber is mir egal :D */
span.avatarBox {
width: 33px;
float: left;
margin: 2px;
margin-right: 5px;
max-height: 33px;
max-width: 33px;
}
div#collapseComments {
background: #292727;
}
.card.panel-default {
padding: 5px;
margin: 0;
border: 0;
}
#commentForm textarea {
background: rgb(16, 22, 23) none repeat scroll 0 0;
}
div#comment_tools {
padding-top: 0;
}
@font-face {
font-family: "VCR";
src: url("/fonts/vcr.ttf");
}
textarea#cinput {
border-radius: 0;
outline: 0!important;
}
button.btn.btn-dark.btn-sm {
background: black;
font-family: vcr;
margin: 5px;
}
.form-control:focus {
box-shadow: none;
}
.comment.panel-body {
padding-left: 0px !important;
}
span.avatarBox {
width: 53px;
float: left;
margin: 2px;
margin-right: 5px;
max-height: 60px;
max-width: 50px;
min-height: 50px;
}
span.avatarBox > img {
max-width: 50px;
}
span.avatarBox > img {
max-width: 50px;
background: #ff00e0;
border: 1px solid black;
border-radius: 5px;
}
div#zomgmenu {
position: fixed;
bottom: 0;
left: 0;
z-index: 1;
background: #0000008f;
}
.zeugs {
position: sticky;
top: 0;
}
img.icon {
width: 16px;
}
.user_name {
color: #0fad8f !important;
text-shadow: 1px 1px black;
}
p.comment {
overflow: auto;
}
a:link, a:visited {
color: #FFFFFF;
text-decoration: none;
font-size: 11px;
font-weight: bold;
text-shadow: 1px 1px black;
}
.commentButton {
background: #040a0a;
}
.commentContent {
overflow: auto;
}
@media (max-width: 786px) {
.container-fluid {
height: unset;
}
div#zomgmenu{
width: 100%;
text-align: center;
background: black;
}
}

View File

@@ -294,3 +294,25 @@ div#categories {
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
grid-gap: 1em; grid-gap: 1em;
} }
.bootstrap-tagsinput {
background-color: #000;
border: 1px solid #ccc0;
}
.modal-content {
background: #131619;
padding: 5px;
border-radius: 0;
border: 1px solid #3c3c3c;
}
div#collapseComments {
background: #040a0a;
padding: 5px;
}
.card.panel-default {
margin-top: 5px;
margin: 5px;
}

View File

@@ -7,20 +7,4 @@
</style> </style>
<h5>Oh shit! Something went wrong!</h5> <h5>Oh shit! Something went wrong!</h5>
<div id="sf-resetcontent" class="sf-reset box"> <p>Please try again later</p>
<h6>Please don't send this fucking text to an admin, we have other problems.</h6>
<?php
$iv = openssl_random_pseudo_bytes(16);
?>
@if(!env('APP_DEBUG'))
<div class="block">
{{bin2hex($iv)}}<br>
{{openssl_encrypt($exception, 'aes128', env('APP_KEY'), 0, $iv)}}
</div>
@else
<div class="block">
<pre>{{$exception}}</pre>
</div>
@endif
</div>

View File

@@ -3,7 +3,7 @@
@include('partials.flash') @include('partials.flash')
<div class="page-header"> <div class="page-header">
<h5>Register your w0bm.com Account</h5> <h5>Register your w0bm.com Account</h5>
<p style="color:red;">Note: We do not reset passwords, make sure to write down your password on paper, otherwise you need create a new account or start to circlejerk in the IRC!</p> <p style="color:red;">Note: I do not reset passwords, make sure to pick a strong password which you can remember, write down/save to your keepass to not lose access, otherwise you would need to create a new account!</p>
</div> </div>
<div class="register"> <div class="register">
<form class="form-horizontal" method="post" action="{{action('UserController@store')}}"> <form class="form-horizontal" method="post" action="{{action('UserController@store')}}">
@@ -15,7 +15,7 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<div class=""> <div class="">
{!! Form::email('email', null, ['class' => 'form-control', 'placeholder' => 'Email']) !!} {!! Form::email('email', null, ['class' => 'form-control', 'placeholder' => 'Email | Must be valid! Confirmation will be sent out']) !!}
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@@ -34,15 +34,14 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<div class=""> {!!captcha_img('flat')!!} <input class="form-control" type="text" name="captcha" placeholder="Verify Captcha">
</div> </div>
</div>
<div class="form-group terms"> <div class="form-group terms">
<div style="text-align: center;"> <div style="text-align: center;">
<p><input type="checkbox" checked required name="terms"> I am at least 18 years or older and I have read and understand the <a href="/rules">Rules</a></p> <p><input type="checkbox" checked required name="terms"> I am at least 18 years or older and I have read and understand the <a href="/rules">Rules</a></p>
</div> </div>
<div class=""> <div class="">
<button type="submit" class="btn btn-primary">Register</button> <button type="submit" class="btn btn-primary">Register</button>
</div> </div>
</div> </div>
</form> </form>

View File

@@ -1,4 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<!--RENDERED IN {{ (microtime(true) - LARAVEL_START) }} SECONDS-->
<html lang="en"> <html lang="en">
<head> <head>
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
@@ -12,7 +13,22 @@
<meta property="og:site_name" content="w0bm.com" /> <meta property="og:site_name" content="w0bm.com" />
<meta property="og:title" content="@if(isset($video)){{$video->videotitle}}@endif"> <meta property="og:title" content="@if(isset($video)){{$video->videotitle}}@endif">
@if(auth()->check())<meta property="og:description" content="Tags:@if(isset($video)) {{ $video->getTagListAttribute() }} @endif">@endif @if(auth()->check())<meta property="og:description" content="Tags:@if(isset($video)) {{ $video->getTagListAttribute() }} @endif">@endif
<meta property="og:image" content="@if(isset($video))/thumbs/beta/{{str_replace(".webm","",$video->file)}}.png"@endif/> @if(isset($video))
@if(count($video->tags))
@foreach($video->tags as $tag)
@if($tag == 'sfw')
<meta property="og:image" content="@if(isset($video))/thumbs/beta/{{str_replace(".webm","",$video->file)}}.png"@endif/>
@elseif($tag == 'nsfw')
@if(file_exists(public_path() . 'thumbs/blurred/{{$video->file}}' . '_blurred.png'))
<meta property="og:image" content="@if(isset($video))/thumbs/blurred/{{str_replace(".webm","",$video->file)}}_blurred.png"@endif/>
@else
{{$video->blurryThumb()}}
<meta property="og:image" content="@if(isset($video))/thumbs/blurred/{{str_replace(".webm","",$video->file)}}_blurred.png"@endif/>
@endif
@endif
@endforeach
@endif
@endif
@if(auth()->check())<meta property="og:video" content="@if(isset($video))/b/{{ $video->file }} @endif">@endif @if(auth()->check())<meta property="og:video" content="@if(isset($video))/b/{{ $video->file }} @endif">@endif
<meta property="og:url" content="@if(isset($video))/{{ $video->id }}@endif"> <meta property="og:url" content="@if(isset($video))/{{ $video->id }}@endif">
<meta property="og:video:type" content="video/webm"> <meta property="og:video:type" content="video/webm">

View File

@@ -44,6 +44,9 @@
<div class=""> <div class="">
<button type="submit" class="btn btn-primary">Register</button> <button type="submit" class="btn btn-primary">Register</button>
</div> </div>
<div>
{!! Recaptcha::render() !!}
</div>
</div> </div>
</form> </form>
</div> </div>

View File

@@ -1,5 +1,11 @@
@extends('profilelayout') @extends('profilelayout')
@section('content') @section('content')
<h5>Terms of Service / AGB</h5> <h5>Terms of Service</h5>
<p>It's a privilege, not a right.</p> <p>It's a privilege, not a right</p>
<p>As of the 25th of November, 2019 I write down the following terms of my service.</p>
<p>w0bm.com is free of charge for the users for as long as I (sirx) will provide this service for you (the users)</p>
<p>w0bm.com can close at any time without any notice.</p>
<p>You are free to make backups of videos you enjoy, I will not enforce any IP blacklisting for downloading all videos, I have enough traffic for now! (This may change if there will ever be a host change with a traffic limit!)</p>
<p>The admin (sirx) decides in which direction it goes according to general video content, direction may change at any time, not following can lead to a temporary account suspension or a simple warning!</p>
<p>Donations will not be accepted any longer since they were a high risk and money fucks up character. I will work for this service, every day with my man power! If you feel like you want to dontate money, please donate money to charity instead or give it to a homeless person!</p>
@endsection @endsection

View File

@@ -139,9 +139,6 @@
{{$video->tesThumb()}} {{$video->tesThumb()}}
<div class="centered"> <div class="centered">
<div class="modal-content col-md-5"> <div class="modal-content col-md-5">
<div class="alert alert-info" role="alert">
Accepting z0rfugees, please visit us in the <a href="/irc">IRC</a>
</div>
<div class="modal-header"> <div class="modal-header">
<h4 class="modal-title" id="filterModalTitle">Login</h4> <span>to watch this webbum</span> <h4 class="modal-title" id="filterModalTitle">Login</h4> <span>to watch this webbum</span>
</div> </div>
@@ -158,7 +155,20 @@
</div> </div>
<div class="media not-logged-in"> <div class="media not-logged-in">
<div class="media-left"> <div class="media-left">
<img class="media-object" src="@if(isset($video))/thumbs/beta/{{str_replace(".webm","",$video->file)}}.png"@endif"> @if(count($video->tags))
@foreach($video->tags as $tag)
@if($tag == 'sfw')
<img class="media-object" src="@if(isset($video))/thumbs/beta/{{str_replace(".webm","",$video->file)}}.png"@endif">
@elseif($tag == 'nsfw')
@if(file_exists(public_path() . 'thumbs/blurred/{{$video->file}}' . '_blurred.png'))
<img class="media-object" src="@if(isset($video))/thumbs/blurred/{{str_replace(".webm","",$video->file)}}_blurred.png"@endif">
@else
{{$video->blurryThumb()}}
<img class="media-object" src="@if(isset($video))/thumbs/blurred/{{str_replace(".webm","",$video->file)}}_blurred.png"@endif">
@endif
@endif
@endforeach
@endif
</div> </div>
<div class="media-koerper"> <div class="media-koerper">
<h4 class="media-heading"> <h4 class="media-heading">
@@ -181,6 +191,9 @@
<a href="/contact">Contact</a> | <a href="/irc">IRC</a> <a href="/contact">Contact</a> | <a href="/irc">IRC</a>
</div> </div>
</div> </div>
<div hidden class="testthumbnailslol">
</div>
</div> </div>
@endif @endif
@endsection @endsection

View File

@@ -12,6 +12,7 @@
<thead> <thead>
<tr> <tr>
<th>ID</th> <th>ID</th>
<th>Thumb</th>
<th>Video Title</th> <th>Video Title</th>
<th>Artist</th> <th>Artist</th>
<th>Songtitle</th> <th>Songtitle</th>
@@ -33,6 +34,9 @@
@if($edit) @if($edit)
<input type="submit" class="btn btn-primary" value="Save" form="edit_{{$video->id}}"> <input type="submit" class="btn btn-primary" value="Save" form="edit_{{$video->id}}">
@endif @endif
</td>
<td>
<img id="indexthumb" src="/thumbs/beta/{{$thumb}}.png">
</td> </td>
<td> <td>
<span class="vinfo vvideotitle">{{$video->videotitle or ''}}</span> <span class="vinfo vvideotitle">{{$video->videotitle or ''}}</span>

View File

@@ -51,10 +51,27 @@
<script type="text/javascript" defer src="/njum/js/popper.min.js"></script> <script type="text/javascript" defer src="/njum/js/popper.min.js"></script>
<script type="text/javascript" defer src="/njum/js/bootstrap.min.js"></script> <script type="text/javascript" defer src="/njum/js/bootstrap.min.js"></script>
<script type="text/javascript" defer src="/njum/js/bootstrap-tagsinput.min.js"></script> <script type="text/javascript" defer src="/njum/js/bootstrap-tagsinput.min.js"></script>
<script type="text/javascript" defer src="/njum/js/newscript.js"></script> <script type="text/javascript" src="/js/clipboard.min.js"></script>
<script type="text/javascript" defer src="/njum/js/newscript.js?v={{ filemtime("njum/js/newscript.js") }}"></script>
<script src="/njum/js/sticky_video.js"></script> <script src="/njum/js/sticky_video.js"></script>
<script> <script>
// Initialize // Initialize
//new StickyVideo('sticky-container') //new StickyVideo('sticky-container')
</script> </script>
<script type="text/javascript">
var clipboard = new ClipboardJS('.copylink');
clipboard.on('success', function(e) {
console.info('Action:', e.action);
console.info('Text:', e.text);
console.info('Trigger:', e.trigger);
e.clearSelection();
});
clipboard.on('error', function(e) {
console.error('Action:', e.action);
console.error('Trigger:', e.trigger);
});
</script>
</html> </html>

View File

@@ -35,15 +35,17 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="tageditor">Add Tags</label> <label for="tageditor">Add Tags</label>
<div class="frontendedittags">
@include('partials.tags') @include('partials.tags')
</div>
</div> </div>
<div class="deleteit"> <div class="deleteit">
@endif @if(auth()->check() && auth()->user()->can('delete_video'))<a class="delete_video" href="#"><i class="fa fa-trash fa-lg"></i> Remove upload</a> @endif @if(auth()->check() && auth()->user()->can('delete_video'))<a class="delete_video" href="#"><i class="fa fa-trash fa-lg"></i> Remove upload</a>
</div> </div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button> <button type="button" class="btn btn-dark" data-dismiss="modal">Close</button>
<button type="submit" class="btn btn-primary">Save changes</button> <button type="submit" class="btn btn-dark">Save changes</button>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -12,7 +12,10 @@
@if(Auth::check()) @if(Auth::check())
<li class="nav-link dropdown"> <li class="nav-link dropdown">
<button id="nav-user" class="btn btn-dark nav-link bg-toggle dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <button id="nav-user" class="btn btn-dark nav-link bg-toggle dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span><i class="fa fa-user fa-lg"></i> {{Auth::user()->username}}</span> <span>
@if(Auth::user()->messagesRecv()->unread()->count() < 1)
<span class="nomsg">|</span>@else
<span class="yesmg">|</span>@endif {{Auth::user()->username}}</span>
</button> </button>
<div class="dropdown-menu" aria-labelledby="navbarDropdown"> <div class="dropdown-menu" aria-labelledby="navbarDropdown">
<div class="grid-menu"> <div class="grid-menu">
@@ -32,10 +35,11 @@
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Links Links
</a> </a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown"> <div class="dropdown-menu LinksGrid" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="/index">Index</a> <a class="dropdown-item" href="/index">Index</a>
<a class="dropdown-item" href="/categories">Categories</a> <a class="dropdown-item" href="/categories">Categories</a>
<a class="dropdown-item" href="/about">About</a> <a class="dropdown-item" href="/about">About</a>
<a class="dropdown-item" href="/rules">Rules</a>
<a class="dropdown-item" href="/stats">Stats</a> <a class="dropdown-item" href="/stats">Stats</a>
</div> </div>
</li> </li>

View File

@@ -30,8 +30,8 @@
<p>Abuse of this form will be awarded with a permanent ban!</p> <p>Abuse of this form will be awarded with a permanent ban!</p>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button> <button type="button" class="btn btn-dark" data-dismiss="modal">Close</button>
<button type="submit" class="btn btn-primary">Send Report</button> <button type="submit" class="btn btn-dark">Send Report</button>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -12,7 +12,7 @@
</div> </div>
</div> </div>
<div class="sendtags"> <div class="sendtags">
<button href="/{{$video->id}}/tag" id="submittags" type="submit" class="btn btn-primary">Submit</button> <button href="/{{$video->id}}/tag" id="submittags" type="submit" class="btn btn-dark">Submit</button>
</div> </div>
</div> </div>
@else @else
@@ -24,11 +24,11 @@
@if(count($video->tags)) @if(count($video->tags))
@foreach($video->tags as $tag) @foreach($video->tags as $tag)
@if($tag == 'sfw') @if($tag == 'sfw')
<span class="badge badge-success"><a href="/index?q={{$tag->normalized}}" class="badge badge-success">{{$tag->name}}</a>@if(Auth::check() && Auth::user()->can('edit_video')) <a class="delete-tag badge badge-success" href="#"><i class="fa fa-times"></i></a></span>@endif <span class="badge badge-sfw"><a href="/index?q={{$tag->normalized}}" class="badge">{{$tag->name}}</a>@if(Auth::check() && Auth::user()->can('edit_video')) <a class="delete-tag badge" href="#"><i class="fa fa-times"></i></a></span>@endif
@elseif($tag == 'nsfw') @elseif($tag == 'nsfw')
<span class="badge badge-danger"><a href="/index?q={{$tag->normalized}}" class="badge badge-danger">{{$tag->name}}</a>@if(Auth::check() && Auth::user()->can('edit_video')) <a class="delete-tag badge badge-danger" href="#"><i class="fa fa-times"></i></a></span>@endif <span class="badge badge-nsfw"><a href="/index?q={{$tag->normalized}}" class="badge nsfw-text">{{$tag->name}}</a>@if(Auth::check() && Auth::user()->can('edit_video')) <a class="delete-tag badge" href="#"><i class="fa fa-times"></i></a></span>@endif
@else @else
<span class="badge badge-secondary"><a href="/index?q={{$tag->normalized}}" class="badge badge-secondary">{{$tag->name}}</a>@if(Auth::check() && Auth::user()->can('edit_video')) <a class="delete-tag badge badge-secondary" href="#"><i class="fa fa-times"></i></a></span>@endif <span class="badge badge-secondary"><a href="/index?q={{$tag->normalized}}" class="badge">{{$tag->name}}</a>@if(Auth::check() && Auth::user()->can('edit_video')) <a class="delete-tag badge" href="#"><i class="fa fa-times"></i></a></span>@endif
@endif @endif
@endforeach @endforeach
@else @else

View File

@@ -7,7 +7,7 @@
</div> </div>
<li class="list-group-item"> <li class="list-group-item">
@include('partials.flash') @include('partials.flash')
<button id="btn-upload" type="button" class="btn btn-primary btn-sm"><span class="laz0r">Fire the laz0r</span> <button id="btn-upload" type="button" class="btn btn-primary btn-sm"><span class="laz0r">Fire the laz0r</span>
<span class="" id="laz0r-fire"></span> <span class="" id="laz0r-fire"></span>
<span class="hidden-xs" id="shoop-laz0r"></span> <span class="hidden-xs" id="shoop-laz0r"></span>
</button> </button>

View File

@@ -1,5 +1,6 @@
<ul class="nav justify-content-center"> <ul class="nav justify-content-center">
<li class="safe-for-rating"> <div class="monchichi">
<li class="safe-for-rating legacy-item">
<a class="badge video-id">{{$video->id}}</a> <a class="badge video-id">{{$video->id}}</a>
<a class="badge video-rating {{$sfw ? 'sfw' : 'nsfw'}}">{{$sfw ? "sfw" : "nsfw"}}</a> <a class="badge video-rating {{$sfw ? 'sfw' : 'nsfw'}}">{{$sfw ? "sfw" : "nsfw"}}</a>
</li> </li>
@@ -19,6 +20,9 @@
@else @else
@endif @endif
</li> </li>
<li class="legacy-item">
<button class="copylink" data-clipboard-text="{{url($video->id)}}" title="Copy URL!"><i class="fa fa-link"></i></button>
</li>
<li class="legacy-item"> <li class="legacy-item">
<button type="button" class="btn btn-dark metadata-button bg-toggle" data-container="body" data-toggle="popover" data-placement="bottom" data-html="true" data-container="body"> <button type="button" class="btn btn-dark metadata-button bg-toggle" data-container="body" data-toggle="popover" data-placement="bottom" data-html="true" data-container="body">
<i class="fa fa-lg fa-info-circle"></i> <i class="fa fa-lg fa-info-circle"></i>
@@ -41,4 +45,5 @@
<li class="legacy-item"> <li class="legacy-item">
<button id="webm_report" class="btn btn-dark" data-toggle="modal" data-target="#webmreportmodal"><i class="fa fa-warning fa-md"></i></button> <button id="webm_report" class="btn btn-dark" data-toggle="modal" data-target="#webmreportmodal"><i class="fa fa-warning fa-md"></i></button>
</li> </li>
</div>
</ul> </ul>

View File

@@ -1,4 +1,7 @@
<div class="popover-metadata"> <div class="popover-metadata">
<div class="filesize">
<span class="dlwebm badge badge-secondary"><a class='file_size' href='{{ '/b/' . $video->file }}' download>{{ HumanReadable::bytesToHuman($video->filesize()) }}</a></span>
</div>
@if($video->videotitle) <div class="artist"> @if($video->videotitle) <div class="artist">
<strong>Videotitle:</strong> {{$video->videotitle}} <strong>Videotitle:</strong> {{$video->videotitle}}
</div>@endif </div>@endif
@@ -20,16 +23,12 @@
<div class="added"> <div class="added">
<strong>Added:</strong> <a id="timestamp" title="{{$video->created_at->toIso8601String()}}">{{$video->created_at->diffForHumans()}}</a> <time class="timeago" data-toggle="tooltip" datetime="{{$video->created_at->toIso8601String()}}" title="{{$video->created_at->toIso8601String()}}"></time> <strong>Added:</strong> <a id="timestamp" title="{{$video->created_at->toIso8601String()}}">{{$video->created_at->diffForHumans()}}</a> <time class="timeago" data-toggle="tooltip" datetime="{{$video->created_at->toIso8601String()}}" title="{{$video->created_at->toIso8601String()}}"></time>
</div> </div>
<div class="filesize"> <div class="toggo tag-panel-body smallfontsize">
<span class="badge badge-secondary">{{ HumanReadable::bytesToHuman($video->filesize()) }}</span> <div id="tag-display " class="tag-panel-body">
<span class="download-webm"><a class='file_size' href='{{ '/b/' . $video->file }}' download>DL</a></span>
</div>
<div class="toggo tag-panel-body">
<div id="tag-display" class="tag-panel-body">
@if(count($video->tags)) @if(count($video->tags))
@foreach($video->tags as $tag) @foreach($video->tags as $tag)
@if($tag == 'sfw') @if($tag == 'sfw')
<span class="badge badge-success"><a href="/index?q={{$tag->normalized}}" class="default-link">{{$tag->name}}</a></span> <span class="badge badge-sfw"><a href="/index?q={{$tag->normalized}}" class="default-link">{{$tag->name}}</a></span>
@elseif($tag == 'nsfw') @elseif($tag == 'nsfw')
<span class="badge badge-danger"><a href="/index?q={{$tag->normalized}}" class="default-link">{{$tag->name}}</a></span> <span class="badge badge-danger"><a href="/index?q={{$tag->normalized}}" class="default-link">{{$tag->name}}</a></span>
@else @else

View File

@@ -24,25 +24,15 @@
@endif @endif
<div class="container-fluid row p-0" id="wrapper"> <div class="container-fluid row p-0" id="wrapper">
<div class="col-sm scrollable hidden-xs p-0"> <div class="col-sm p-0 linkeLeiste">
<div class="zeugs"> <div class="zeugs">
@if(auth()->check() && (auth()->user()->can("edit_video") || auth()->user()->id == $video->user_id)) <a class="edit_video" href="#" data-toggle="modal" data-target="#webmeditmodal">[edit]</a>@endif @if(auth()->check() && auth()->user()->can("delete_video"))<a class="delete_video" href="#">[del]</a>@endif @if(auth()->check() && (auth()->user()->can("edit_video") || auth()->user()->id == $video->user_id)) <a class="edit_video" href="#" data-toggle="modal" data-target="#webmeditmodal">[edit]</a>@endif @if(auth()->check() && auth()->user()->can("delete_video"))<a class="delete_video" href="#">[del]</a>@endif
</div> </div>
</div> <div id="zomgmenu">
<div class="container p-0">
<div class="col-md p-0">
@yield('floatvid')
@include('partials.flash')
@include('partials.comments')
</div>
<div class="col-sm scrollable p-0"></div>
</div>
<wip>
<div id="untenlinks">
<a href="/">Random</a> | <a href="/">Random</a> |
<a href="/index">index</a> | <a href="/main">index</a> |
<a href="/categories">categories</a> | <a href="/categories">categories</a> |
<a href="irc://irc.n0xy.net/w0bm">IRC</a> (<a href="http://webirc.n0xy.net/?channels=%23w0bm?nick=BLAH">Webchat</a>) | <a href="irc://irc.n0xy.net/w0bm">IRC</a> |
<a href="/about">About</a> | <a href="/about">About</a> |
<div class="layoutkek"> <div class="layoutkek">
<li role="presentation" class="layoutChanger" id="layoutSwitcher"> <li role="presentation" class="layoutChanger" id="layoutSwitcher">
@@ -79,11 +69,24 @@
@endif @endif
@else @else
@endif @endif
<br>
<span>v.1.{{ filemtime("z0mb/css/z0mb.css") }} WIP</span>
</div> </div>
</div>
<div class="container p-0">
<div class="col-md p-0">
@yield('floatvid')
@include('partials.flash')
@include('partials.comments')
</div>
<div class="col-sm scrollable p-0"></div>
</div>
<wip>
</wip> </wip>
<div class="col-sm scrollable hidden-xs p-0"></div> <div class="col-sm scrollable hidden-xs p-0"></div>
<work>v.1.{{ filemtime("z0mb/css/z0mb.css") }} WIP</work>
</div> </div>
This page took {{ (microtime(true) - LARAVEL_START) }} seconds to render
</body> </body>
<script type="text/javascript" defer src="/z0mb/js/jquery.min.js"></script> <script type="text/javascript" defer src="/z0mb/js/jquery.min.js"></script>
<script type="text/javascript" defer src="/zßmb/js/jquery.timeago.js"></script> <script type="text/javascript" defer src="/zßmb/js/jquery.timeago.js"></script>

View File

@@ -1,15 +1,22 @@
<div class="card @if($del = !is_null($comment->deleted_at)) panel-danger @else panel-default @endif" data-id="{{$comment->id}}" author="{{$comment->user->username}}"> <div class="card @if($del = !is_null($comment->deleted_at)) panel-danger @else panel-default @endif" data-id="{{$comment->id}}" author="{{$comment->user->username}}">
<div class="comment panel-body" author="{{$comment->user->username}}"> <div class="comment panel-body" author="{{$comment->user->username}}">
@simplemd($comment->content) <div class="Avatar">
</div> <span class="avatarBox"><img src="https://f0ck.it/uploads/2019/11/BCKEXcV.png"></span>
<div class="panel-footer">by <a class="{{$comment->user->username}}" href="/user/{{$comment->user->username}}">{!! $comment->user->displayName() !!}</a> <small><time class="timeago" data-toggle="tooltip" data-placement="top" datetime="{{$comment->created_at}}+0000" title="{{$comment->created_at}}+0000"></time></small> </div>
@if($mod) <a class="{{$comment->user->username}} user_name" href="/user/{{$comment->user->username}}">{!! $comment->user->displayName() !!}</a>
<a id="timestamp" title="{{$video->created_at->toIso8601String()}}">{{$video->created_at->diffForHumans()}}</a>
@if($mod)
@if($del) @if($del)
<a href="#" onclick="restoreComment($(this))"><i style="color:green"; class="fa fa-refresh" aria-hidden="true"></i></a> <a href="#" onclick="restoreComment($(this))"><i style="color:green"; class="fa fa-refresh" aria-hidden="true"></i></a>
@else @else
<a class="delete_comment" href="#" onclick="deleteComment($(this))">[del]</a> <a class="delete_comment" href="#" onclick="deleteComment($(this))">[D]</a>
<a class="edit_comment" href="#" onclick="editComment($(this))">[edit]</a> {{-- <a class="edit_comment" href="#" onclick="editComment($(this))">[E]</a> --}}
@endif @endif
@endif @endif
<div class="commentContent">
@simplemd($comment->content)
</div>
</div>
<div class="panel-footer">
</div> </div>
</div> </div>

View File

@@ -7,7 +7,7 @@
{!! Form::textarea('comment', null, ['placeholder' => 'Write something useful', 'id' => 'cinput', 'class' => 'form-control bg-´dark text-light comment-entry-textarea', 'required' => 'required']) !!} {!! Form::textarea('comment', null, ['placeholder' => 'Write something useful', 'id' => 'cinput', 'class' => 'form-control bg-´dark text-light comment-entry-textarea', 'required' => 'required']) !!}
</div> </div>
<div class="commentButton"> <div class="commentButton">
<div id="comment_tools" class="commentform-panel-footer"><button type="submit" class="btn btn-primary btn-sm">Post</button> <div id="comment_tools" class="commentform-panel-footer"><button type="submit" class="btn btn-dark btn-sm">Post</button>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -1,9 +1,8 @@
<div class="modal fade" id="filterselectmodal" tabindex="-1" role="dialog" aria-labelledby="Select filter"> <div class="modal fade" id="filterselectmodal" tabindex="-1" role="dialog" aria-labelledby="Select filter">
<div class="modal-dialog" role="document"> <div class="modal-dialog" role="document">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="topper">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> <h4 class="modal-title" id="filterModalTitle">Add Tags to filter out</h4>
<h4 class="modal-title" id="filterModalTitle">Add Tags to filter out</h4>
<p>When entering a tag you will no longer see videos with that tag.</p> <p>When entering a tag you will no longer see videos with that tag.</p>
</div> </div>
<div class="modal-body"> <div class="modal-body">
@@ -11,8 +10,8 @@
{{--<input class="form-control" type="text" id="filter" data-role="tagsinput" value="{{ implode(',', auth()->user()->categories) }}">--}} {{--<input class="form-control" type="text" id="filter" data-role="tagsinput" value="{{ implode(',', auth()->user()->categories) }}">--}}
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button> <button type="button" class="btn btn-dark" data-dismiss="modal">Close</button>
<button href="/filter" type="submit" id="submitfilter" class="btn btn-primary" value="Save">Save</button> <button href="/filter" type="submit" id="submitfilter" class="btn btn-dark" value="Save">Save</button>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -20,9 +20,40 @@
@endif @endif
@endif @endif
<div data-simplebar class="container-fluid"> <div data-simplebar class="container-fluid">
<div id="zomgmenu">
<a href="/">Random</a> |
<a href="/index">index</a> |
<a href="/categories">categories</a> |
<a href="irc://irc.n0xy.net/w0bm">IRC</a> |
<a href="/about">About</a> |
<div class="layoutkek">
<li role="presentation" class="layoutChanger" id="layoutSwitcher">
<a data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
<span class="caret"></span> Layout
</a>
<ul class="dropdown-menu">
<div class="layoutblah">
<button id="layout1">w0bm.com</button>
<br>
<button id="layout2">Njum</button>
<br>
<button id="layout4">nojsz0mbie</button>
<br>
<button id="layout5">m0bile</button>
</div>
</ul>
</li>
</div>
<br>
<a href="{{url('user', Auth::user()->username)}}">{{Auth::user()->username}}</a>
<a href="{{url('messages')}}" style="font-size: 10px;">[ {{Auth::user()->messagesRecv()->unread()->count()}} ]</a>
<a href="#" data-toggle="modal" style="font-size: 10px;" data-target="#filterselectmodal">[ filter ]</a>
<a style="font-size: 10px;" href="{{url('logout')}}">[ logout ]</a> |
<a href="{{url('upload')}}">[ upload ]</a>
</div>
<div class="container"> <div class="container">
@yield('novidcontent') @yield('novidcontent')
<wip>v.1.{{ filemtime("z0mb/css/z0mb.css") }} WIP</wip>
</div> </div>
</div> </div>
</body> </body>