main view implemented and some smaller fixe for some of the layouts

This commit is contained in:
noxy
2019-09-08 05:13:28 +00:00
parent 45bab2567a
commit 6ca6ed4080
11 changed files with 89 additions and 23 deletions

View File

@@ -38,6 +38,23 @@ class VideoController extends Controller
]);
}
public function main(Request $request) {
if($request->has('q')){
$needle = trim($request->input('q'));
return view('main', [
'videos' => Video::filtered()->withAnyTagsFuzzy($needle)
->orderBy('id', 'desc')
->paginate(55)->appends(['q' => $needle]),
'categories' => Category::all(),
'q' => $needle
]);
}
return view('main', [
'videos' => Video::filtered()->orderBy('id', 'DESC')->paginate(55),
'categories' => Category::all()
]);
}
/**
* Show the form for creating a new resource.
*

Binary file not shown.

Before

Width:  |  Height:  |  Size: 444 KiB

After

Width:  |  Height:  |  Size: 68 KiB

View File

@@ -99,6 +99,7 @@ Route::group(["middleware" => "theme"], function() {
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');
Route::post('index/{id}', 'VideoController@update')->middleware('auth');
Route::get('upload', 'VideoController@create')->middleware('auth');
Route::get('categories', 'CategoryController@index')->middleware('auth');

BIN
public/small_404.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

View File

@@ -0,0 +1,33 @@
@extends('profilelayout')
@section('content')
<div class="page-header">
<form method="get">
<button type="submit" class="suchbutton"><i style="color:white;" class="fa fa-search"></i></button>
{!! Form::text('q', isset($q) ? $q : null, ['class' => 'suchleiste', 'placeholder' => 'Search w0bm.com']) !!}
</form>
</div>
<div class="items">
@foreach($videos as $video)
<?php
$thumb = str_replace(".webm","",$video->file);
?>
<div class="main-item">
<a href="/{{$video->id}}">
@if(file_exists('/home/sirx/web/devw0bm/w0bm.com/public/thumbs/beta/'.$thumb.'.png'))
<img src="/thumbs/beta/{{$thumb}}.png">
@else
<img src="/small_404.gif" class="nothumb" />
{{$video->tesThumb()}}
@endif
</a>
</div>
@endforeach
</div>
<div class="page">
{!! $videos->render() !!}
</div>
@endsection

View File

@@ -7,7 +7,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">
<a class="navbar-brand" href="/main">
<img src="{{ asset('logo.svg') }}" alt="w0bm.com">
</a>
</div>

View File

@@ -2,6 +2,12 @@
@section('content')
@if(auth()->check())
@if(file_exists(public_path() . 'thumbs/beta/{{$video->file}}' . '.png'))
@else
{{$video->tesThumb()}}
@endif
<?php $related = $related ?? null; ?>
<div class="vertical-align">
<div class="wrapper">
@@ -78,7 +84,7 @@
data-placement="top"
data-trigger="hover"
data-html="true"
title="Download Video"
title="Download"
data-content="
<div class='downloadvid'>
<ul class='downloadlist'>

View File

@@ -1,21 +1,26 @@
@extends('profilelayout')
@section('novidcontent')
<div class="pagination">
<div class="items">
@foreach($videos as $video)
<?php
$thumb = str_replace(".webm","",$video->file);
?>
<div class="main-item">
<a href="/{{$video->id}}">
@if(file_exists('/home/sirx/web/devw0bm/w0bm.com/public/thumbs/beta/'.$thumb.'.png'))
<img src="/thumbs/beta/{{$thumb}}.png">
@else
<img src="/small_404.gif" class="nothumb" />
{{$video->tesThumb()}}
@endif
</a>
</div>
@endforeach
</div>
<div class="page">
{!! $videos->render() !!}
</div>
<div class="gallery">
@foreach($videos as $video)
<?php
$thumb = str_replace(".webm","",$video->file);
?>
<div class="gallery_item"">
<a href="/{{$video->id}}"><img src="/thumbs/beta/{{$thumb}}.png" class="gallery__img" alt="Image 1"></a>
</div>
@endforeach
</div>
@endsection

View File

@@ -6,7 +6,7 @@
<meta name="_token" content="{{csrf_token()}}">
<meta name="keywords" content="Random WebMs, WebMs, Internet Videos">
<link rel="icon" href="/favicon.png">
<title>www</title>
<title>w0bm.com</title>
<link rel="stylesheet" type="text/css" href="/njum/css/bootstrap-dark.css">
<link rel="stylesheet" type="text/css" href="/njum/css/bootstrap-tagsinput.css">
<link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">

View File

@@ -51,11 +51,13 @@
</a>
<ul class="dropdown-menu">
<div class="layoutblah">
<button id="layout1">Standard</button>
<button id="layout1">w0bm.com</button>
<br>
<button id="layout2">Njum</button>
<br>
<button hidden id="layout3">z0mb</button>
<button id="layout4">nojsz0mbie</button>
<br>
<button id="layout5">m0bile</button>
</div>
</ul>
</li>

View File

@@ -43,8 +43,10 @@
Layout
</a>
<div id="layoutSwitcher" class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" id="layout1" href="#">Standard</a>
<a class="dropdown-item" id="layout1" href="#">w0bm.com</a>
<a class="dropdown-item" id="layout2" href="#">Njum</a>
<a class="dropdown-item" id="layout4" href="#">nojsz0mbie</a>
<a class="dropdown-item" id="layout5" href="#">m0bile</a>
</div>
</li>