Files
Gw0bm/resources/views/layout69/video.blade.php
2023-12-05 22:43:30 +00:00

126 lines
5.2 KiB
PHP

@extends('layout')
@section('content')
@if(auth()->check())
<?php $related = $related ?? null; ?>
<div class="vertical-align">
<div class="wrapper">
<div class="embed-responsive embed-responsive-16by9">
@if($video->id == '27204')
<iframe src="https://w0bm.com/loop/index.html"></iframe>
@else
<video id="video" loop controls preload="auto" crossorigin="anonymous" loading="lazy">
<source src="/b{{ "/" . $video->file }}">
</video>
@endif
@if($video->category->name === 'Anime' || $video->category->name === 'Otomad')
<div class="anime-thumb-opener hidden-xs"><i title="Generate Anime Thumbnail!" class="fa fa-file-image-o"></i></div>
<div style="display: none;" class="anime-thumb">
<span>Anime Thumbnail Generator v1.0 Alpha</span><br>
<img id="thumbnail_img" alt="Pause video to create thumb!"/><br>
<span>Right click <code>Copy Image</code> and paste it on <a href="https://trace.moe">trace.moe</a></span>
<canvas height="540" width="960" style="display: none;" id="thecanvas"></canvas>
<script src="/js/animethumbnailer.js"></script>
</div>
@endif
</div>
<?php
//$shortfile = str_replace(".webm", "" ,$video->file);
//$mp4 = shell_exec("curl https://fapple.w0bm.com/api/v1/{{$shortfile}} | jq -r .size");
?>
<div class="text-center" style="position: unset;">
@if($related)
@if(($prev = $video->getPrev($related)) === null)
<a class="first" href="#" style="visibility: hidden;">← first</a>
<a id="prev" href="#" style="visibility: hidden;">← prev</a> |
@else
<a class="first" href="{{url($related->baseurl(), $video->getFirstId($related))}}">← first</a>
<a id="prev" href="{{url($related->baseurl(), [$prev->id])}}">← prev</a> |
@endif
<a href="{{url($related->baseurl())}}">{!!$related->displayName()!!}</a>
@if(($next = $video->getNext($related)) === null)
| <a id="next" href="#" style="visibility: hidden;">next →</a>
<a class="last" href="#" style="visibility: hidden;">last →</a>
@else
| <a id="next" href="{{url($related->baseurl(), [$next->id])}}">next →</a>
<a class="last" href="{{url($related->baseurl(), $video->getLastId($related))}}">last →</a>
@endif
@else
@if(($prev = $video->getPrev()) === null)
<a class="first" href="#" style="visibility: hidden;">← first</a>
<a id="prev" href="#" style="visibility: hidden;">← prev</a> |
@else
<a class="first" href="{{url($video->getFirstId())}}">← first</a>
<a id="prev" href="{{url($prev->id)}}">← prev</a> |
@endif
<a href="{{url('/')}}">random</a>
@if(($next = $video->getNext()) === null)
| <a id="next" href="#" style="visibility: hidden;">next →</a>
<a class="last" href="#" style="visibility: hidden;">last →</a>
@else
| <a id="next" href="{{url($next->id)}}">next →</a>
<a class="last" href="{{url($video->getLastId())}}">last →</a>
@endif
@endif
</div>
</div>
</div>
@endsection
@section('aside')
<aside id="sidebar" class="aside panel hidden-xs">
@include('partials.flash')
@include('partials.comments')
@include('partials.tags')
</aside>
@else
<div class="centered">
<div class="modal-content col-md-5">
<div class="modal-header">
<h4 class="modal-title" id="filterModalTitle">Login</h4>
</div>
@include('partials.flash')
<div class="login_wrapper">
<div class="col-md">
<form action="{{action('UserController@login')}}" method="post" class="navbar-form">
{!! csrf_field() !!}
<input type="text" name="identifier" placeholder="Username" class="form-control usernamelogin"><br>
<input type="password" name="password" placeholder="Password" class="form-control passwordlogin"><br>
<button type="submit" class="btn btn-primary">Login</button> <input style="vertical-align: unset;" id="rememberme" checked type="checkbox" name="remember"> <span id="rember">Remember me?</span>
</form>
</div>
</div>
<div class="media not-logged-in">
<div class="media-left">
@if($sfw)
<img class="media-object" src="/thumbs/beta/{{str_replace('.webm','',$video->file)}}.png">
@else
<img class="media-object" src="/thumbs/blurred/{{str_replace('.webm','',$video->file)}}_blurred.png">
@endif
</div>
<div class="media-koerper">
<h4 class="media-heading">
@if($video->videotitle){{$video->videotitle}}
@else
<p><i>No Title</i></p></h4>
@endif</h4>
<div id="tag-display" style="width: auto; height: auto;" class="tag-panel-body">
@if(count($video->tags))
@foreach($video->tags as $tag)
<span class="label label-default"><a class="default-link">{{$tag->name}}</a></span>
@endforeach
@else
No tags yet ...
@endif
</div>
</div>
</div>
<div class="modal-footer">
<a href="/privacy">Privacy</a> | <a href="/contact">Contact</a> | <a href="/irc">IRC</a>
</div>
</div>
</div>
@endif
@endsection