diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index 3581a82..6748648 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -145,8 +145,8 @@ class UserController extends Controller $validator = \Validator::make($request->all(), [ 'username' => 'required|unique:users|min:3|max:25|alpha_num', 'email' => 'required|email|unique:users|confirmed', - 'password' => 'required|min:6|confirmed' - //'g-recaptcha-response' => 'required|recaptcha' + 'password' => 'required|min:6|confirmed', + 'captcha' => 'required|captcha' ]); 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 // Only difference are the redirect urls and the Base Model public function random_fav($username) { diff --git a/app/Http/Controllers/VideoController.php b/app/Http/Controllers/VideoController.php index eeabe1f..5fcc980 100644 --- a/app/Http/Controllers/VideoController.php +++ b/app/Http/Controllers/VideoController.php @@ -22,6 +22,7 @@ class VideoController extends Controller * @return Response */ public function index(Request $request) { + if($request->has('q')){ $needle = trim($request->input('q')); return view('index', [ @@ -29,12 +30,13 @@ class VideoController extends Controller ->orderBy('id', 'asc') ->paginate(20)->appends(['q' => $needle]), 'categories' => Category::all(), - 'q' => $needle + 'q' => $needle, ]); } + return view('index', [ '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) { - /*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']); $tags = $request->get('tags'); diff --git a/app/Http/Controllers/rulezController.php b/app/Http/Controllers/rulezController.php index 757e54c..bf56537 100644 --- a/app/Http/Controllers/rulezController.php +++ b/app/Http/Controllers/rulezController.php @@ -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()]); } + public function gib() + { + $storagePath = storage_path('app/vidz/1572221426860.webm'); + return ($storagePath)->response(); + } + /** * Show the form for creating a new resource. * diff --git a/app/Http/Controllers/tmp/test.png b/app/Http/Controllers/tmp/test.png index 6645ccf..b96ec94 100644 Binary files a/app/Http/Controllers/tmp/test.png and b/app/Http/Controllers/tmp/test.png differ diff --git a/app/Http/routes.php b/app/Http/routes.php index 8ed2ee7..dcf9734 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -36,11 +36,11 @@ Route::group(['prefix' => 'api'], function() { // /api/comments Route::group(['prefix' => 'comments'], function() { - Route::get('/', 'CommentController@index'); - Route::get('/{id}', 'CommentController@show')->where('id', '[0-9]+'); - Route::post('{id}/edit', 'CommentController@update')->where('id', '[0-9]+'); - Route::post('{id}/delete', 'CommentController@destroy')->where('id', '[0-9]+'); - Route::post('{id}/restore', 'CommentController@restore')->where('id', '[0-9]+'); + Route::get('/', 'CommentController@index')->middleware('auth'); + Route::get('/{id}', 'CommentController@show')->where('id', '[0-9]+')->middleware('auth'); + Route::post('{id}/edit', 'CommentController@update')->where('id', '[0-9]+')->middleware('auth'); + Route::post('{id}/delete', 'CommentController@destroy')->where('id', '[0-9]+')->middleware('auth'); + Route::post('{id}/restore', 'CommentController@restore')->where('id', '[0-9]+')->middleware('auth'); }); // /api/user @@ -55,7 +55,7 @@ Route::group(['prefix' => 'api'], function() { return \App\Models\Video::getRandom()->with(['category', 'user' => function($query) { $query->addSelect('username', 'id'); }])->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}/tag', 'VideoController@tag')->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'); @@ -97,13 +97,14 @@ Route::group(["middleware" => "theme"], function() { 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}/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/index', 'UserController@show_favs')->middleware('auth'); Route::get('user/{username}/comments', 'UserController@show_comments')->middleware('auth'); Route::get('logout', 'UserController@logout'); Route::post('login', 'UserController@login'); Route::get('register', 'UserController@create'); - //Route::post('register', 'UserController@store'); + Route::post('register', 'UserController@store'); Route::get('activate/{token}', 'UserController@activate'); Route::get('index', 'VideoController@index')->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('about', function() { return view('about'); })->middleware('auth'); 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('todo', function() { return view('todo'); })->middleware('auth'); 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('stats', function() { return view('stats', [ @@ -154,6 +156,29 @@ Route::group(["middleware" => "theme"], function() { Route::get('{id}/fav', 'VideoController@favorite')->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'); - Route::get('{shortname}/{id}', 'CategoryController@showVideo')->where(['shortname' => '[a-z][a-z0-9]+', 'id' => '[0-9]+'])->middleware('auth'); -}); + ##Category View + 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 '
Incorrect!
'; + } else { + echo 'Matched :)
'; + } + } + + $form = ''; + return $form; + }); + +}); \ No newline at end of file diff --git a/app/Models/Video.php b/app/Models/Video.php index 9168f6d..83ed4f6 100644 --- a/app/Models/Video.php +++ b/app/Models/Video.php @@ -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() { $dat = $this->file; $in = public_path() . "/b"; // webm-input diff --git a/composer.json b/composer.json index 77bbe87..1c796e5 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,8 @@ "cviebrock/eloquent-taggable": "dev-master", "itsgoingd/clockwork": "^1.14", "erusev/parsedown": "^1.6", - "sentry/sentry-laravel": "^0.8.0" + "sentry/sentry-laravel": "^0.8.0", + "mews/captcha": "^3.0" }, "require-dev": { "fzaninotto/faker": "~1.4", diff --git a/composer.lock b/composer.lock index 64e2c87..57bc70d 100644 --- a/composer.lock +++ b/composer.lock @@ -1,10 +1,10 @@ { "_readme": [ "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" ], - "content-hash": "728bab6a86590dd1f02dfe2a520c7379", + "content-hash": "cbbccb040f48f4d74c59930694b330ff", "packages": [ { "name": "barryvdh/laravel-ide-helper", @@ -1090,6 +1090,76 @@ ], "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", "version": "v1.14.5", @@ -1553,6 +1623,75 @@ ], "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", "version": "1.23.0", diff --git a/config/app.php b/config/app.php index c02e253..5ab8d23 100644 --- a/config/app.php +++ b/config/app.php @@ -137,6 +137,7 @@ return [ Illuminate\Translation\TranslationServiceProvider::class, Illuminate\Validation\ValidationServiceProvider::class, Illuminate\View\ViewServiceProvider::class, + Mews\Captcha\CaptchaServiceProvider::class, /* * Application Service Providers... @@ -209,7 +210,8 @@ return [ 'Form' => Collective\Html\FormFacade::class, 'Html' => Collective\Html\HtmlFacade::class, 'Recaptcha' => Greggilbert\Recaptcha\Facades\Recaptcha::class, - 'Sentry' => Sentry\SentryLaravel\SentryFacade::class, + 'Sentry' => Sentry\SentryLaravel\SentryFacade::class, + 'Captcha' => Mews\Captcha\Facades\Captcha::class, ], ]; diff --git a/config/captcha.php b/config/captcha.php new file mode 100644 index 0000000..ee35acb --- /dev/null +++ b/config/captcha.php @@ -0,0 +1,49 @@ + ['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, + ] +]; diff --git a/public/css/w0bmcustom.css b/public/css/w0bmcustom.css index a2178da..64161cf 100644 --- a/public/css/w0bmcustom.css +++ b/public/css/w0bmcustom.css @@ -3854,4 +3854,5 @@ video#placeholder { .modal-content { padding-top: 10px; -} \ No newline at end of file +} + diff --git a/public/njum/css/cstms.css b/public/njum/css/cstms.css index 741b88a..ed3311f 100644 --- a/public/njum/css/cstms.css +++ b/public/njum/css/cstms.css @@ -1125,4 +1125,227 @@ div#categories { .caption { padding: 5px; -} \ No newline at end of file +} + +.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; +} + diff --git a/public/njum/js/newscript.js b/public/njum/js/newscript.js index a0309d3..6d7f6ba 100644 --- a/public/njum/js/newscript.js +++ b/public/njum/js/newscript.js @@ -214,6 +214,15 @@ if (typeof video !== 'undefined') { } 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 updaterow(ctx, video) { if($('video').length) { @@ -1286,3 +1305,12 @@ document.querySelectorAll("#layoutSwitcher [id^=layout]").forEach(el => el.addEv else 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"); +} \ No newline at end of file diff --git a/public/z0mb/css/cstms.css b/public/z0mb/css/cstms.css index 8f485d8..3407cf6 100644 --- a/public/z0mb/css/cstms.css +++ b/public/z0mb/css/cstms.css @@ -1011,4 +1011,132 @@ div#untenlinks { background: #000000d9; padding-left: 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; +} + } \ No newline at end of file diff --git a/public/z0mb/css/z0mb.css b/public/z0mb/css/z0mb.css index abddfde..39f9702 100644 --- a/public/z0mb/css/z0mb.css +++ b/public/z0mb/css/z0mb.css @@ -293,4 +293,26 @@ div#categories { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); 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; } \ No newline at end of file diff --git a/resources/views/errors/500.blade.php b/resources/views/errors/500.blade.php index 27f74d2..fe8fa86 100644 --- a/resources/views/errors/500.blade.php +++ b/resources/views/errors/500.blade.php @@ -7,20 +7,4 @@{{$exception}}-
Please try again later
diff --git a/resources/views/layout1/apply.blade.php b/resources/views/layout1/apply.blade.php index 0314692..f6efa4e 100644 --- a/resources/views/layout1/apply.blade.php +++ b/resources/views/layout1/apply.blade.php @@ -3,7 +3,7 @@ @include('partials.flash')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!
+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!
I am at least 18 years or older and I have read and understand the Rules
By clicking on "Register" you accept our Rules
Note: we do NOT reset passwords for now, make sure to save your password correctly
---> +--> @endsection diff --git a/resources/views/layout1/layout.blade.php b/resources/views/layout1/layout.blade.php index a1602a5..4f04a4f 100644 --- a/resources/views/layout1/layout.blade.php +++ b/resources/views/layout1/layout.blade.php @@ -1,4 +1,5 @@ + @@ -12,7 +13,22 @@ @if(auth()->check())@endif - file)}}.png"@endif/> + @if(isset($video)) + @if(count($video->tags)) + @foreach($video->tags as $tag) + @if($tag == 'sfw') + file)}}.png"@endif/> + @elseif($tag == 'nsfw') + @if(file_exists(public_path() . 'thumbs/blurred/{{$video->file}}' . '_blurred.png')) + file)}}_blurred.png"@endif/> + @else + {{$video->blurryThumb()}} + file)}}_blurred.png"@endif/> + @endif + @endif + @endforeach + @endif + @endif @if(auth()->check())@endif diff --git a/resources/views/layout1/register.blade.php b/resources/views/layout1/register.blade.php index 2da8ce4..5cbd453 100644 --- a/resources/views/layout1/register.blade.php +++ b/resources/views/layout1/register.blade.php @@ -44,6 +44,9 @@It's a privilege, not a right.
+„It's a privilege, not a right“
+As of the 25th of November, 2019 I write down the following terms of my service.
+w0bm.com is free of charge for the users for as long as I (sirx) will provide this service for you (the users)
+w0bm.com can close at any time without any notice.
+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!)
+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!
+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!
@endsection \ No newline at end of file diff --git a/resources/views/layout1/video.blade.php b/resources/views/layout1/video.blade.php index ef2ab87..05d7d2b 100644 --- a/resources/views/layout1/video.blade.php +++ b/resources/views/layout1/video.blade.php @@ -139,9 +139,6 @@ {{$video->tesThumb()}}