ソースを参照

おっぱい

peertube
コミット
6c902b323c
  1. 28
      app/Http/Controllers/Peertube/About.php
  2. 8
      app/Http/Controllers/Peertube/Account.php
  3. 34
      app/Http/Controllers/Peertube/Admin/Users.php
  4. 10
      app/Http/Controllers/Peertube/Channel.php
  5. 32
      app/Http/Controllers/Peertube/Common.php
  6. 28
      app/Http/Controllers/Peertube/Home.php
  7. 32
      app/Http/Controllers/Peertube/Login.php
  8. 32
      app/Http/Controllers/Peertube/Logout.php
  9. 32
      app/Http/Controllers/Peertube/Myaccount.php
  10. 32
      app/Http/Controllers/Peertube/Mylibrary.php
  11. 33
      app/Http/Controllers/Peertube/Mylibrary/History/Videos.php
  12. 33
      app/Http/Controllers/Peertube/Mylibrary/Subscriptions.php
  13. 33
      app/Http/Controllers/Peertube/Mylibrary/Videochannels.php
  14. 33
      app/Http/Controllers/Peertube/Mylibrary/Videoplaylists.php
  15. 33
      app/Http/Controllers/Peertube/Mylibrary/Videos.php
  16. 32
      app/Http/Controllers/Peertube/Notification.php
  17. 32
      app/Http/Controllers/Peertube/Signup.php
  18. 29
      app/Http/Controllers/Peertube/Videos/Local.php
  19. 29
      app/Http/Controllers/Peertube/Videos/Overview.php
  20. 29
      app/Http/Controllers/Peertube/Videos/Recentlyadded.php
  21. 33
      app/Http/Controllers/Peertube/Videos/Subscriptions.php
  22. 29
      app/Http/Controllers/Peertube/Videos/Trending.php
  23. 28
      app/Http/Controllers/Peertube/Videos/Upload.php
  24. 6
      app/Http/Controllers/Peertube/Watch.php
  25. 232
      public/css/peertube/common.css
  26. 83
      public/css/peertube/videoslist.css
  27. 7
      resources/views/pages/peertube/notyet.blade.php
  28. 5
      resources/views/pages/peertube/videos/local.blade.php
  29. 5
      resources/views/pages/peertube/videos/recentlyadded.blade.php
  30. 58
      resources/views/theme/techsuwa/component/peertube/parts/c/videos.blade.php
  31. 60
      resources/views/theme/techsuwa/component/peertube/parts/common/videominature.blade.php
  32. 43
      resources/views/theme/techsuwa/component/peertube/parts/common/videosbydate.blade.php
  33. 2
      resources/views/theme/techsuwa/component/peertube/parts/header.blade.php
  34. 2
      resources/views/theme/techsuwa/component/peertube/parts/menu/footer.blade.php
  35. 8
      resources/views/theme/techsuwa/component/peertube/parts/menu/top.blade.php
  36. 8
      resources/views/theme/techsuwa/component/peertube/parts/menu/top/inmylibrary.blade.php
  37. 56
      resources/views/theme/techsuwa/component/peertube/parts/menu/top/loggedin.blade.php
  38. 4
      resources/views/theme/techsuwa/component/peertube/parts/menu/top/loginmenu.blade.php
  39. 8
      resources/views/theme/techsuwa/component/peertube/parts/menu/top/notification.blade.php
  40. 10
      resources/views/theme/techsuwa/component/peertube/parts/menu/top/oninstance.blade.php
  41. 27
      resources/views/theme/techsuwa/component/peertube/videos/local.blade.php
  42. 27
      resources/views/theme/techsuwa/component/peertube/videos/recentlyadded.blade.php
  43. 32
      routes/view/peertube.php

28
app/Http/Controllers/Peertube/About.php

@ -0,0 +1,28 @@
<?php
namespace App\Http\Controllers\Peertube;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use App\Http\Controllers\Peertube\Common;
// use Illuminate\Support\Facades\Log;
class About extends Common {
private $common;
public function __construct () {
$this->common = new Common;
}
public function index () {
$res = [
'page' => 'dummy',
'userinfo' => $this->common->user,
];
// $res['owner'] = $this->getOwner($id);
return view('pages.peertube.notyet', ['res' => $res]);
}
function getOwner ($id) {
return $this->ptapi_get('/api/v1/accounts/'.$id);
}
}

8
app/Http/Controllers/Peertube/Account.php

@ -14,9 +14,11 @@ class Account extends Common {
}
public function index ($id, $cat='video-channels') {
$res = [];
$res['page'] = 'account';
$res['cat'] = $cat;
$res = [
'page' => 'account',
'cat' => $cat,
'userinfo' => $this->common->user,
];
$res['owner'] = $this->getOwner($id);
if (!empty($res['owner'])) $res['owner']->totalVideo = 0;
$res['channel'] = $this->getChannel($id);

34
app/Http/Controllers/Peertube/Admin/Users.php

@ -0,0 +1,34 @@
<?php
namespace App\Http\Controllers\Peertube\Admin;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use App\Http\Controllers\Peertube\Common;
// use Illuminate\Support\Facades\Log;
class Users extends Common {
private $common;
public function __construct () {
$this->common = new Common;
}
public function index () {
if (!isset($this->common->user->me) || is_null($this->common->user->me)) {
if ($this->common->user->me->adminFlags != 1) {
return redirect('/peertube/videos/local');
}
}
$res = [
'page' => 'dummy',
'userinfo' => $this->common->user,
];
// $res['owner'] = $this->getOwner($id);
return view('pages.peertube.notyet', ['res' => $res]);
}
function getOwner ($id) {
return $this->ptapi_get('/api/v1/accounts/'.$id);
}
}

10
app/Http/Controllers/Peertube/Channel.php

@ -16,10 +16,12 @@ class Channel extends Common {
}
public function index ($id, $cat='videos', $page=0) {
$res = [];
$res['page'] = 'channel';
$res['cat'] = $cat;
$res['paginate'] = $page;
$res = [
'page' => 'channel',
'cat' => $cat,
'paginate' => $page,
'userinfo' => $this->common->user,
];
$res['channel'] = $this->getChannel($id);
$res['video'] = $this->getVideo($id, ($page*$this->count), $this->count);
return view('pages.peertube.c', ['res' => $res]);

32
app/Http/Controllers/Peertube/Common.php

@ -7,24 +7,28 @@ use App\Http\Controllers\Engine;
// use Illuminate\Support\Facades\Log;
class Common extends Engine {
public $user = [];
private $engine;
public function __construct () {
// $this->getLocal();
// $this->getMe();
// $this->getNotify();
$this->user['local'] = $this->getLocal();
$this->user['me'] = $this->getMe();
$this->user['notify'] = $this->getNotify();
$this->engine = new Engine;
}
public function getLocal () {
return null;
return $this->ptapi_get('/api/v1/oauth-clients/local');
}
public function getMe () {
return null;
return $this->ptapi_get('/api/v1/users/me');
}
public function getNotify () {
return null;
return $this->ptapi_get('/api/v1/users/me/notifications?start=0&count=0&unread=true');
}
@ -44,4 +48,26 @@ class Common extends Engine {
return $get;
}
public function vidlist ($get) {
$res = [
'today' => [],
'week' => [],
'month' => [],
'lastmonth' => [],
'moreearly' => [],
];
foreach ($get->data as $g) {
$ud = strtotime($g->createdAt);
if ($ud > time() - 86400 && $ud < time() + 86400) $res['today'][] = $g;
else if ($ud > time() - 604800 && $ud < time() + 604800) $res['week'][] = $g;
else if ($ud > time() - 2629800 && $ud < time() + 2629800) $res['month'][] = $g;
else if ($ud > time() - 5259600 && $ud < time() + 5259600) $res['lastmonth'][] = $g;
else $res['moreearly'][] = $g;
}
return $res;
}
}

28
app/Http/Controllers/Peertube/Home.php

@ -0,0 +1,28 @@
<?php
namespace App\Http\Controllers\Peertube;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use App\Http\Controllers\Peertube\Common;
// use Illuminate\Support\Facades\Log;
class Home extends Common {
private $common;
public function __construct () {
$this->common = new Common;
}
public function index () {
$res = [
'page' => 'dummy',
'userinfo' => $this->common->user,
];
// $res['owner'] = $this->getOwner($id);
return view('pages.peertube.notyet', ['res' => $res]);
}
function getOwner ($id) {
return $this->ptapi_get('/api/v1/accounts/'.$id);
}
}

32
app/Http/Controllers/Peertube/Login.php

@ -0,0 +1,32 @@
<?php
namespace App\Http\Controllers\Peertube;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use App\Http\Controllers\Peertube\Common;
// use Illuminate\Support\Facades\Log;
class Login extends Common {
private $common;
public function __construct () {
$this->common = new Common;
}
public function index () {
if (isset($this->common->user->me) && !is_null($this->common->user->me)) {
return redirect('/peertube/videos/local');
}
$res = [
'page' => 'dummy',
'userinfo' => $this->common->user,
];
// $res['owner'] = $this->getOwner($id);
return view('pages.peertube.notyet', ['res' => $res]);
}
function getOwner ($id) {
return $this->ptapi_get('/api/v1/accounts/'.$id);
}
}

32
app/Http/Controllers/Peertube/Logout.php

@ -0,0 +1,32 @@
<?php
namespace App\Http\Controllers\Peertube;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use App\Http\Controllers\Peertube\Common;
// use Illuminate\Support\Facades\Log;
class Logout extends Common {
private $common;
public function __construct () {
$this->common = new Common;
}
public function index () {
if (!isset($this->common->user->me) || is_null($this->common->user->me)) {
return redirect('/peertube/login');
}
$res = [
'page' => 'dummy',
'userinfo' => $this->common->user,
];
// $res['owner'] = $this->getOwner($id);
return view('pages.peertube.notyet', ['res' => $res]);
}
function getOwner ($id) {
return $this->ptapi_get('/api/v1/accounts/'.$id);
}
}

32
app/Http/Controllers/Peertube/Myaccount.php

@ -0,0 +1,32 @@
<?php
namespace App\Http\Controllers\Peertube;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use App\Http\Controllers\Peertube\Common;
// use Illuminate\Support\Facades\Log;
class Myaccount extends Common {
private $common;
public function __construct () {
$this->common = new Common;
}
public function index () {
if (!isset($this->common->user->me) || is_null($this->common->user->me)) {
return redirect('/peertube/login');
}
$res = [
'page' => 'dummy',
'userinfo' => $this->common->user,
];
// $res['owner'] = $this->getOwner($id);
return view('pages.peertube.notyet', ['res' => $res]);
}
function getOwner ($id) {
return $this->ptapi_get('/api/v1/accounts/'.$id);
}
}

32
app/Http/Controllers/Peertube/Mylibrary.php

@ -0,0 +1,32 @@
<?php
namespace App\Http\Controllers\Peertube;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use App\Http\Controllers\Peertube\Common;
// use Illuminate\Support\Facades\Log;
class Mylibrary extends Common {
private $common;
public function __construct () {
$this->common = new Common;
}
public function index () {
if (!isset($this->common->user->me) || is_null($this->common->user->me)) {
return redirect('/peertube/login');
}
$res = [
'page' => 'dummy',
'userinfo' => $this->common->user,
];
// $res['owner'] = $this->getOwner($id);
return view('pages.peertube.notyet', ['res' => $res]);
}
function getOwner ($id) {
return $this->ptapi_get('/api/v1/accounts/'.$id);
}
}

33
app/Http/Controllers/Peertube/Mylibrary/History/Videos.php

@ -0,0 +1,33 @@
<?php
namespace App\Http\Controllers\Peertube\Mylibrary\History;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use App\Http\Controllers\Peertube\Common;
// use Illuminate\Support\Facades\Log;
class Videos extends Common {
private $common;
public function __construct () {
$this->common = new Common;
}
public function index () {
if (!isset($this->common->user->me) || is_null($this->common->user->me)) {
return redirect('/peertube/login');
}
$res = [
'page' => 'dummy',
'userinfo' => $this->common->user,
];
// $res['owner'] = $this->getOwner($id);
return view('pages.peertube.notyet', ['res' => $res]);
}
function getOwner ($id) {
//https://video.076.ne.jp/api/v1/users/me/history/videos?start=0&count=5
return $this->ptapi_get('/api/v1/accounts/'.$id);
}
}

33
app/Http/Controllers/Peertube/Mylibrary/Subscriptions.php

@ -0,0 +1,33 @@
<?php
namespace App\Http\Controllers\Peertube\Mylibrary;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use App\Http\Controllers\Peertube\Common;
// use Illuminate\Support\Facades\Log;
class Subscriptions extends Common {
private $common;
public function __construct () {
$this->common = new Common;
}
public function index () {
if (!isset($this->common->user->me) || is_null($this->common->user->me)) {
return redirect('/peertube/login');
}
$res = [
'page' => 'dummy',
'userinfo' => $this->common->user,
];
// $res['owner'] = $this->getOwner($id);
return view('pages.peertube.notyet', ['res' => $res]);
}
function getOwner ($id) {
//https://video.076.ne.jp/api/v1/users/me/subscriptions?start=0&count=10
return $this->ptapi_get('/api/v1/accounts/'.$id);
}
}

33
app/Http/Controllers/Peertube/Mylibrary/Videochannels.php

@ -0,0 +1,33 @@
<?php
namespace App\Http\Controllers\Peertube\Mylibrary;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use App\Http\Controllers\Peertube\Common;
// use Illuminate\Support\Facades\Log;
class Videochannels extends Common {
private $common;
public function __construct () {
$this->common = new Common;
}
public function index () {
if (!isset($this->common->user->me) || is_null($this->common->user->me)) {
return redirect('/peertube/login');
}
$res = [
'page' => 'dummy',
'userinfo' => $this->common->user,
];
// $res['owner'] = $this->getOwner($id);
return view('pages.peertube.notyet', ['res' => $res]);
}
function getOwner ($id) {
//https://video.076.ne.jp/api/v1/accounts/techsuwako/video-channels?start=0&count=20&sort=-updatedAt&withStats=true
return $this->ptapi_get('/api/v1/accounts/'.$id);
}
}

33
app/Http/Controllers/Peertube/Mylibrary/Videoplaylists.php

@ -0,0 +1,33 @@
<?php
namespace App\Http\Controllers\Peertube\Mylibrary;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use App\Http\Controllers\Peertube\Common;
// use Illuminate\Support\Facades\Log;
class Videoplaylists extends Common {
private $common;
public function __construct () {
$this->common = new Common;
}
public function index () {
if (!isset($this->common->user->me) || is_null($this->common->user->me)) {
return redirect('/peertube/login');
}
$res = [
'page' => 'dummy',
'userinfo' => $this->common->user,
];
// $res['owner'] = $this->getOwner($id);
return view('pages.peertube.notyet', ['res' => $res]);
}
function getOwner ($id) {
//https://video.076.ne.jp/api/v1/users/me/subscriptions/videos?start=0&count=25&sort=-publishedAt&skipCount=true
return $this->ptapi_get('/api/v1/accounts/'.$id);
}
}

33
app/Http/Controllers/Peertube/Mylibrary/Videos.php

@ -0,0 +1,33 @@
<?php
namespace App\Http\Controllers\Peertube\Mylibrary;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use App\Http\Controllers\Peertube\Common;
// use Illuminate\Support\Facades\Log;
class Videos extends Common {
private $common;
public function __construct () {
$this->common = new Common;
}
public function index () {
if (!isset($this->common->user->me) || is_null($this->common->user->me)) {
return redirect('/peertube/login');
}
$res = [
'page' => 'dummy',
'userinfo' => $this->common->user,
];
// $res['owner'] = $this->getOwner($id);
return view('pages.peertube.notyet', ['res' => $res]);
}
function getOwner ($id) {
//https://video.076.ne.jp/api/v1/users/me/videos?start=0&count=10&sort=-publishedAt
return $this->ptapi_get('/api/v1/accounts/'.$id);
}
}

32
app/Http/Controllers/Peertube/Notification.php

@ -0,0 +1,32 @@
<?php
namespace App\Http\Controllers\Peertube;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use App\Http\Controllers\Peertube\Common;
// use Illuminate\Support\Facades\Log;
class Notification extends Common {
private $common;
public function __construct () {
$this->common = new Common;
}
public function index () {
if (!isset($this->common->user->me) || is_null($this->common->user->me)) {
return redirect('/peertube/login');
}
$res = [
'page' => 'dummy',
'userinfo' => $this->common->user,
];
// $res['owner'] = $this->getOwner($id);
return view('pages.peertube.notyet', ['res' => $res]);
}
function getOwner ($id) {
return $this->ptapi_get('/api/v1/accounts/'.$id);
}
}

32
app/Http/Controllers/Peertube/Signup.php

@ -0,0 +1,32 @@
<?php
namespace App\Http\Controllers\Peertube;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use App\Http\Controllers\Peertube\Common;
// use Illuminate\Support\Facades\Log;
class Signup extends Common {
private $common;
public function __construct () {
$this->common = new Common;
}
public function index () {
if (isset($this->common->user->me) && !is_null($this->common->user->me)) {
return redirect('/peertube/videos/local');
}
$res = [
'page' => 'dummy',
'userinfo' => $this->common->user,
];
// $res['owner'] = $this->getOwner($id);
return view('pages.peertube.notyet', ['res' => $res]);
}
function getOwner ($id) {
return $this->ptapi_get('/api/v1/accounts/'.$id);
}
}

29
app/Http/Controllers/Peertube/Videos/Local.php

@ -0,0 +1,29 @@
<?php
namespace App\Http\Controllers\Peertube\Videos;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use App\Http\Controllers\Peertube\Common;
// use Illuminate\Support\Facades\Log;
class Local extends Common {
private $common;
public function __construct () {
$this->common = new Common;
}
public function index () {
$res = [
'page' => 'videoslist',
'userinfo' => $this->common->user,
];
$res['video'] = $this->getVideo();
return view('pages.peertube.videos.local', ['res' => $res]);
}
function getVideo () {
$get = $this->ptapi_get('/api/v1/videos/?start=0&count=50&sort=-publishedAt&filter=local&skipCount=true&nsfw=both');
return $this->vidlist($get);
}
}

29
app/Http/Controllers/Peertube/Videos/Overview.php

@ -0,0 +1,29 @@
<?php
namespace App\Http\Controllers\Peertube\Videos;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use App\Http\Controllers\Peertube\Common;
// use Illuminate\Support\Facades\Log;
class Overview extends Common {
private $common;
public function __construct () {
$this->common = new Common;
}
public function index () {
$res = [
'page' => 'dummy',
'userinfo' => $this->common->user,
];
// $res['owner'] = $this->getOwner($id);
return view('pages.peertube.notyet', ['res' => $res]);
}
function getOwner ($id) {
//https://video.076.ne.jp/api/v1/overviews/videos?page=1
return $this->ptapi_get('/api/v1/accounts/'.$id);
}
}

29
app/Http/Controllers/Peertube/Videos/Recentlyadded.php

@ -0,0 +1,29 @@
<?php
namespace App\Http\Controllers\Peertube\Videos;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use App\Http\Controllers\Peertube\Common;
// use Illuminate\Support\Facades\Log;
class Recentlyadded extends Common {
private $common;
public function __construct () {
$this->common = new Common;
}
public function index () {
$res = [
'page' => 'videoslist',
'userinfo' => $this->common->user,
];
$res['video'] = $this->getVideo();
return view('pages.peertube.videos.recentlyadded', ['res' => $res]);
}
function getVideo () {
$get = $this->ptapi_get('/api/v1/videos/?start=0&count=25&sort=-publishedAt&skipCount=true&nsfw=both');
return $this->vidlist($get);
}
}

33
app/Http/Controllers/Peertube/Videos/Subscriptions.php

@ -0,0 +1,33 @@
<?php
namespace App\Http\Controllers\Peertube\Videos;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use App\Http\Controllers\Peertube\Common;
// use Illuminate\Support\Facades\Log;
class Subscriptions extends Common {
private $common;
public function __construct () {
$this->common = new Common;
}
public function index () {
if (!isset($this->common->user->me) || is_null($this->common->user->me)) {
return redirect('/peertube/login');
}
$res = [
'page' => 'dummy',
'userinfo' => $this->common->user,
];
// $res['owner'] = $this->getOwner($id);
return view('pages.peertube.notyet', ['res' => $res]);
}
function getOwner ($id) {
//https://video.076.ne.jp/api/v1/users/me/subscriptions/videos?start=0&count=25&sort=-publishedAt&skipCount=true
return $this->ptapi_get('/api/v1/accounts/'.$id);
}
}

29
app/Http/Controllers/Peertube/Videos/Trending.php

@ -0,0 +1,29 @@
<?php
namespace App\Http\Controllers\Peertube\Videos;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use App\Http\Controllers\Peertube\Common;
// use Illuminate\Support\Facades\Log;
class Trending extends Common {
private $common;
public function __construct () {
$this->common = new Common;
}
public function index () {
$res = [
'page' => 'dummy',
'userinfo' => $this->common->user,
];
// $res['owner'] = $this->getOwner($id);
return view('pages.peertube.notyet', ['res' => $res]);
}
function getOwner ($id) {
//https://video.076.ne.jp/api/v1/videos/?start=0&count=25&sort=-trending&skipCount=true&nsfw=both
return $this->ptapi_get('/api/v1/accounts/'.$id);
}
}

28
app/Http/Controllers/Peertube/Videos/Upload.php

@ -0,0 +1,28 @@
<?php
namespace App\Http\Controllers\Peertube\Videos;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use App\Http\Controllers\Peertube\Common;
// use Illuminate\Support\Facades\Log;
class Upload extends Common {
private $common;
public function __construct () {
$this->common = new Common;
}
public function index () {
$res = [
'page' => 'dummy',
'userinfo' => $this->common->user,
];
// $res['owner'] = $this->getOwner($id);
return view('pages.peertube.notyet', ['res' => $res]);
}
function getOwner ($id) {
return $this->ptapi_get('/api/v1/accounts/'.$id);
}
}

6
app/Http/Controllers/Peertube/Watch.php

@ -14,8 +14,10 @@ class Watch extends Common {
}
public function index ($id) {
$res = [];
$res['page'] = 'watch';
$res = [
'page' => 'watch',
'userinfo' => $this->common->user,
];
$res['detail'] = $this->getDetail($id);
$res['comment'] = $this->getComment($id);
$res['recommend'] = $this->getRecommend($res['detail']->tags);

232
public/css/peertube/common.css vendored

@ -246,11 +246,69 @@ my-recommended-videos {
height: max-content;
align-items: center;
}
.videos {
display: flex;
grid-column: 1/3;
grid-row: 2;
margin-top: 30px;
position: relative;
overflow: hidden;
}
.videos my-video-miniature {
margin-inline-end: 15px;
min-width: 201px;
max-width: 201px;
}
.video-miniature:not(.display-as-row) {
display: flex;
flex-direction: column;
padding-bottom: 15px;
width: 100%;
}
.video-miniature:not(.display-as-row) my-video-thumbnail {
position: relative;
height: 0;
width: 100%;
padding-top: 56.25%;
}
.video-miniature:not(.display-as-row) my-video-thumbnail .video-thumbnail {
position: absolute;
width: 100%;
height: 100%;
top: 0;
}
.other-videos:not(.display-as-row) my-video-miniature {
min-width: 201px;
max-width: 201px;
}
@media screen and (min-width: 500px) {
.margin-content .videos, .margin-content .playlists {
--miniatureMinWidth: 255px;
--miniatureMaxWidth: 280px;
display: grid;
grid-column-gap: 30px;
column-gap: 30px;
grid-template-columns: repeat(auto-fill,minmax(var(--miniatureMinWidth),1fr));
}
}
@media screen and (min-width: 500px) {
.margin-content .videos .video-wrapper, .margin-content .videos .playlist-wrapper, .margin-content .playlists .video-wrapper, .margin-content .playlists .playlist-wrapper {
margin: 0 auto;
width: 100%;
}
}
@media screen and (min-width: 500px) {
.margin-content .videos .video-wrapper my-video-miniature, .margin-content .videos .video-wrapper my-video-playlist-miniature, .margin-content .videos .playlist-wrapper my-video-miniature, .margin-content .videos .playlist-wrapper my-video-playlist-miniature, .margin-content .playlists .video-wrapper my-video-miniature, .margin-content .playlists .video-wrapper my-video-playlist-miniature, .margin-content .playlists .playlist-wrapper my-video-miniature, .margin-content .playlists .playlist-wrapper my-video-playlist-miniature {
display: block;
min-width: var(--miniatureMinWidth);
max-width: var(--miniatureMaxWidth);
}
}
my-video-miniature {
display: block;
}
@ -338,6 +396,141 @@ my-video-miniature {
width: calc(100% - 40px);
}
.video-miniature:not(.display-as-row) {
display: flex;
flex-direction: column;
padding-bottom: 15px;
width: 100%;
}
.video-miniature:not(.display-as-row) my-video-thumbnail {
position: relative;
height: 0;
width: 100%;
padding-top: 56.25%;
}
.video-miniature:not(.display-as-row) my-video-thumbnail .video-thumbnail {
position: absolute;
width: 100%;
height: 100%;
top: 0;
}
.video-miniature:not(.display-as-row) .video-bottom {
display: flex;
width: 100%;
min-width: 1px;
}
.video-miniature-information {
width: calc(100% - 40px);
}
.video-miniature:not(.display-as-row) .video-miniature-name {
margin-top: 10px;
margin-bottom: 5px;
}
.video-miniature-name {
display: block;
display: -webkit-box;
-webkit-line-clamp: 2;
font-size: 1.1em;
line-height: 1.1em;
overflow: hidden;
text-overflow: ellipsis;
max-height: 2.2em;
word-break: break-word;
word-wrap: break-word;
overflow-wrap: break-word;
transition: color .2s;
font-weight: 600;
color: var(--mainForegroundColor);
}
.video-miniature:not(.display-as-row) .video-miniature-created-at-views {
display: block;
}
.video-miniature-created-at-views {
font-size: 13px;
}
.video-info-privacy, .video-info-blocked .blocked-label, .video-info-nsfw {
font-weight: 600;
}
.video-thumbnail {
display: flex;
flex-direction: column;
position: relative;
border-radius: 3px;
width: 100%;
height: 100%;
overflow: hidden;
background-color: #ececec;
transition: filter .2s ease;
}
.video-thumbnail img {
width: inherit;
height: inherit;
}
.video-thumbnail-label-overlay.warning {
background-color: orange;
}
.video-thumbnail-label-overlay.danger {
background-color: red;
}
.video-thumbnail-label-overlay {
position: absolute;
padding: 0 5px;
left: 5px;
top: 5px;
font-weight: 700;
}
.video-thumbnail-watch-later-overlay, .video-thumbnail-label-overlay, .video-thumbnail-duration-overlay, .video-thumbnail-live-overlay {
display: inline-block;
background-color: #000000b3;
color: #fff;
border-radius: 3px;
font-size: 12px;
font-weight: 600;
line-height: 1.1;
z-index: 10;
}
.video-thumbnail .play-overlay, .video-thumbnail .play-overlay .icon {
transition: all .2s ease;
}
.video-thumbnail .play-overlay {
position: absolute;
right: 0;
bottom: 0;
width: inherit;
height: inherit;
opacity: 0;
background-color: #0000004d;
}
.video-thumbnail .play-overlay .icon {
width: 0;
height: 0;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%) scale(.5);
border-top: 13px solid transparent;
border-bottom: 13px solid transparent;
border-left: 18px solid rgba(255,255,255,.95);
}
.video-actions {
height: 40px;
display: flex;
@ -691,11 +884,50 @@ menu.is-logged-in .block-title {
width: 240px;
}
.login-buttons-block {
margin: 30px 25px 35px;
}
.login-buttons-block > a:not(:last-child) {
margin-bottom: 10px;
}
.login-buttons-block > a {
display: block;
width: 100%;
}
.orange-button, .orange-button:active, .orange-button:focus {
color: #fff;
background-color: var(--mainColor);
}
.peertube-button-link {
padding-inline-end: 17px;
padding-inline-start: 13px;
padding-top: 0;
padding-bottom: 0;
border: 0;
font-weight: 600;
font-size: 15px;
height: 30px;
line-height: 30px;
border-radius: 3px !important;
text-align: center;
cursor: pointer;
display: inline-block;
}
.logged-in-block {
margin-bottom: 20px;
background-color: #ffffff26;
}
.create-account-button {
color: #fff;
background-color: #ffffff40;
}
.logged-in-block > div:first-child {
height: 80px;
display: flex;

83
public/css/peertube/videoslist.css vendored

@ -0,0 +1,83 @@
.margin-content {
margin-inline-end: var(--gridVideosMiniatureMargins)!important;
}
.margin-content {
margin-inline-start: var(--gridVideosMiniatureMargins)!important;
}
.margin-content {
--gridVideosMiniatureMargins: var(--videosHorizontalMarginContent);
}
.main-col .margin-content {
margin: 0 var(--horizontalMarginContent);
flex-grow: 1;
}
.videos-header {
display: grid;
grid-template-columns: auto 1fr auto;
margin-bottom: 30px;
}
.videos-header .title {
font-size: 18px;
color: var(--mainForegroundColor);
display: inline-block;
font-weight: 600;
margin-top: 30px;
margin-bottom: 0;
}
.videos-header .title, .videos-header .title-subscription {
grid-column: 1;
}
.videos-header .title-subscription {
grid-row: 2;
font-size: 14px;
color: var(--greyForegroundColor);
}
.videos-header .title, .videos-header .title-subscription {
grid-column: 1;
}
.videos-header my-feed {
margin-inline-start: 5px;
}
.videos-header my-feed {
display: inline-block;
width: 16px;
color: var(--mainColor);
position: relative;
top: -2px;
}
.feed {
width: 100%;
}
my-global-icon {
cursor: pointer;
width: 100%;
}
[role=button] {
cursor: pointer;
}
.date-title:not(:first-child) {
margin-top: .5rem;
padding-top: 20px;
border-top: 1px solid rgba(0,0,0,.1);
}
.date-title {
font-size: 16px;
font-weight: 600;
margin-bottom: 20px;
grid-column: 1/-1;
}

7
resources/views/pages/peertube/notyet.blade.php

@ -0,0 +1,7 @@
@extends('theme.'.env('THEME').'.peertube')
@section('content')
<div id="content" tabindex="-1" class="main-col">
開発中
</div>
@endsection

5
resources/views/pages/peertube/videos/local.blade.php

@ -0,0 +1,5 @@
@extends('theme.'.env('THEME').'.peertube')
@section('content')
@include('theme.'.env('THEME').'.component.peertube.videos.local')
@endsection

5
resources/views/pages/peertube/videos/recentlyadded.blade.php

@ -0,0 +1,5 @@
@extends('theme.'.env('THEME').'.peertube')
@section('content')
@include('theme.'.env('THEME').'.component.peertube.videos.recentlyadded')
@endsection

58
resources/views/theme/techsuwa/component/peertube/parts/c/videos.blade.php

@ -16,63 +16,7 @@
</div>
<div class="videos">
@foreach ($res['video']->data as $v)
<div class="video-wrapper ng-star-inserted">
<my-video-miniature>
<div class="video-miniature">
<my-video-thumbnail>
<a class="video-thumbnail ng-star-inserted" href="/peertube/w/{{ $v->shortUUID }}">
<img alt="" aria-label="{{ $v->name }}" src="https://video.076.ne.jp{{ $v->thumbnailPath }}" class="ng-star-inserted">
<div class="video-thumbnail-actions-overlay ng-star-inserted">
<div placement="left" container="body" class="video-thumbnail-watch-later-overlay ng-star-inserted">
<my-global-icon iconname="clock" role="button" aria-label="「後で見る」に追加する">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-clock"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg>
</my-global-icon>
</div>
</div>
<div class="video-thumbnail-label-overlay warning ng-star-inserted"></div>
<div class="video-thumbnail-label-overlay danger ng-star-inserted"></div>
@php
$seconds = $v->duration;
$hours = floor($seconds / 3600);
$seconds -= $hours * 3600;
$minutes = floor($seconds / 60);
$seconds -= $minutes * 60;
@endphp
<div class="video-thumbnail-duration-overlay ng-star-inserted">{{ $hours != 0 ? $hours.':' : '' }}{{ $minutes != 0 ? $minutes.':' : '0:' }}{{ $seconds }}</div>
<div class="play-overlay ng-star-inserted">
<div class="icon"></div>
</div>
<div class="progress-bar ng-star-inserted">
<div style="width: 100%;"></div>
</div>
</a>
</my-video-thumbnail>
<div class="video-bottom">
<div class="video-miniature-information">
<div class="d-flex video-miniature-meta">
<div class="w-100 d-flex flex-column">
<my-link tabindex="-1" class="video-miniature-name" style="max-height: 3em;">
<a tabindex="-1" title="{{ $v->name }}" href="/peertube/w/{{ $v->shortUUID }}" class="ng-star-inserted"> {{ $v->name }} </a>
</my-link>
<span class="video-miniature-created-at-views">
<my-date-toggle class="ng-star-inserted">
<span class="date-toggle" title="{{ date('Y/m/d', strtotime($v->createdAt)) }}"> {{ date('Y年m月d日 H:i:s T', strtotime($v->createdAt)) }} </span>
</my-date-toggle>
<span class="views" title="">
<my-video-views-counter class="ng-star-inserted">
<span title=""> {{ $v->views }} 回視聴 </span>
</my-video-views-counter>
</span>
</span>
<div class="video-info-privacy"></div>
</div>
</div>
</div>
<div class="video-actions"></div>
</div>
</div>
</my-video-miniature>
</div>
@include('theme.'.env('THEME').'.component.peertube.parts.common.videominature')
@endforeach
</div>
</div>

60
resources/views/theme/techsuwa/component/peertube/parts/common/videominature.blade.php

@ -0,0 +1,60 @@
<div class="video-wrapper ng-star-inserted">
<my-video-miniature>
<div class="video-miniature">
<my-video-thumbnail>
<a class="video-thumbnail ng-star-inserted" href="/peertube/w/{{ $v->shortUUID }}">
<img alt="" aria-label="{{ $v->name }}" src="https://video.076.ne.jp{{ $v->thumbnailPath }}" class="ng-star-inserted">
<div class="video-thumbnail-actions-overlay ng-star-inserted">
<div placement="left" container="body" class="video-thumbnail-watch-later-overlay ng-star-inserted">
<my-global-icon iconname="clock" role="button" aria-label="「後で見る」に追加する">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-clock"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg>
</my-global-icon>
</div>
</div>
<div class="video-thumbnail-label-overlay warning ng-star-inserted"></div>
<div class="video-thumbnail-label-overlay danger ng-star-inserted"></div>
@php
$seconds = $v->duration;
$hours = floor($seconds / 3600);
$seconds -= $hours * 3600;
$minutes = floor($seconds / 60);
$seconds -= $minutes * 60;
@endphp
<div class="video-thumbnail-duration-overlay ng-star-inserted">{{ $hours != 0 ? $hours.':' : '' }}{{ $minutes != 0 ? $minutes.':' : '0:' }}{{ $seconds }}</div>
<div class="play-overlay ng-star-inserted">
<div class="icon"></div>
</div>
<div class="progress-bar ng-star-inserted">
<div style="width: 100%;"></div>
</div>
</a>
</my-video-thumbnail>
<div class="video-bottom">
<div class="video-miniature-information">
<div class="d-flex video-miniature-meta">
<div class="w-100 d-flex flex-column">
<my-link tabindex="-1" class="video-miniature-name" style="max-height: 3em;">
<a tabindex="-1" title="{{ $v->name }}" href="/peertube/w/{{ $v->shortUUID }}" class="ng-star-inserted"> {{ $v->name }} </a>
</my-link>
<span class="video-miniature-created-at-views">
<my-date-toggle class="ng-star-inserted">
<span class="date-toggle" title="{{ date('Y/m/d', strtotime($v->createdAt)) }}"> {{ date('Y年m月d日 H:i:s T', strtotime($v->createdAt)) }} </span>
</my-date-toggle>
<span class="views" title="">
<my-video-views-counter class="ng-star-inserted">
<span title=""> {{ $v->views }} 回視聴 </span>
</my-video-views-counter>
</span>
</span>
@if ($res['page'] != 'channel')
<a tabindex="-1" class="video-miniature-channel ng-star-inserted" href="/peertube/c/{{ $v->channel->name }}{{ $v->channel->host != 'video.076.ne.jp' ? '@'.$v->channel->host : '' }}"> {{ $v->channel->name }}{{ $v->channel->host != 'video.076.ne.jp' ? '@'.$v->channel->host : '' }} </a>
@endif
<div class="video-info-privacy"></div>
</div>
</div>
</div>
<div class="video-actions"></div>
</div>
</div>
</my-video-miniature>
</div>

43
resources/views/theme/techsuwa/component/peertube/parts/common/videosbydate.blade.php

@ -0,0 +1,43 @@
<div _ngcontent-jba-c163="" class="videos">
@if (!empty($res['video']['today']))
<h2 _ngcontent-jba-c163="" class="date-title ng-star-inserted"> 今日 </h2>
@foreach ($res['video']['today'] as $v)
@include('theme.'.env('THEME').'.component.peertube.parts.common.videominature')
@endforeach
@endif
@if (!empty($res['video']['yesterday']))
<h2 _ngcontent-jba-c163="" class="date-title ng-star-inserted"> 今日 </h2>
@foreach ($res['video']['today'] as $v)
@include('theme.'.env('THEME').'.component.peertube.parts.common.videominature')
@endforeach
@endif
@if (!empty($res['video']['week']))
<h2 _ngcontent-jba-c163="" class="date-title ng-star-inserted"> 今週 </h2>
@foreach ($res['video']['week'] as $v)
@include('theme.'.env('THEME').'.component.peertube.parts.common.videominature')
@endforeach
@endif
@if (!empty($res['video']['month']))
<h2 _ngcontent-jba-c163="" class="date-title ng-star-inserted"> 今月 </h2>
@foreach ($res['video']['month'] as $v)
@include('theme.'.env('THEME').'.component.peertube.parts.common.videominature')
@endforeach
@endif
@if (!empty($res['video']['lastmonth']))
<h2 _ngcontent-jba-c163="" class="date-title ng-star-inserted"> 先月 </h2>
@foreach ($res['video']['lastmonth'] as $v)
@include('theme.'.env('THEME').'.component.peertube.parts.common.videominature')
@endforeach
@endif
@if (!empty($res['video']['moreearly']))
<h2 _ngcontent-jba-c163="" class="date-title ng-star-inserted"> もっと前 </h2>
@foreach ($res['video']['moreearly'] as $v)
@include('theme.'.env('THEME').'.component.peertube.parts.common.videominature')
@endforeach
@endif
</div>

2
resources/views/theme/techsuwa/component/peertube/parts/header.blade.php

@ -53,7 +53,7 @@
</div-->
</div>
</my-search-typeahead>
<a routerlink="/videos/upload" class="publish-button" href="/videos/upload">
<a routerlink="/videos/upload" class="publish-button" href="/peertube/videos/upload">
<my-global-icon iconname="upload" aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-upload-cloud"><polyline points="16 16 12 12 8 16"></polyline><line x1="12" y1="12" x2="12" y2="21"></line><path d="M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3"></path><polyline points="16 16 12 12 8 16"></polyline></svg>
</my-global-icon>

2
resources/views/theme/techsuwa/component/peertube/parts/menu/footer.blade.php

@ -1,6 +1,6 @@
<div class="footer">
<div class="footer-block">
<a routerlink="/about" routerlinkactive="active" class="menu-link" href="/about">
<a routerlink="/about" routerlinkactive="active" class="menu-link" href="/peertube/about">
<my-global-icon iconname="help" aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-help-circle"><circle cx="12" cy="12" r="10"></circle><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>
</my-global-icon>

8
resources/views/theme/techsuwa/component/peertube/parts/menu/top.blade.php

@ -1,5 +1,9 @@
<div class="top-menu">
@include('theme.'.env('THEME').'.component.peertube.parts.menu.top.loggedin')
@include('theme.'.env('THEME').'.component.peertube.parts.menu.top.inmylibrary')
@if (!is_null($res['userinfo']) && (isset($res['userinfo']->me) && !is_null($res['userinfo']->me)))
@include('theme.'.env('THEME').'.component.peertube.parts.menu.top.loggedin')
@include('theme.'.env('THEME').'.component.peertube.parts.menu.top.inmylibrary')
@else
@include('theme.'.env('THEME').'.component.peertube.parts.menu.top.loginmenu')
@endif
@include('theme.'.env('THEME').'.component.peertube.parts.menu.top.oninstance')
</div>

8
resources/views/theme/techsuwa/component/peertube/parts/menu/top/inmylibrary.blade.php

@ -2,25 +2,25 @@
<div class="block-title">
In my library
</div>
<a routerlinkactive="active" class="menu-link ng-star-inserted" href="/my-library/videos">
<a routerlinkactive="active" class="menu-link ng-star-inserted" href="/peertube/my-library/videos">
<my-global-icon aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="material" width="24px" height="24px"><path d="M0 0h24v24H0z" fill="none"></path><path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8 12.5v-9l6 4.5-6 4.5z"></path></svg>
</my-global-icon>
動画
</a>
<a routerlinkactive="active" class="menu-link ng-star-inserted" href="/my-library/video-playlists">
<a routerlinkactive="active" class="menu-link ng-star-inserted" href="/peertube/my-library/video-playlists">
<my-global-icon aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-list"><line x1="8" y1="6" x2="21" y2="6"></line><line x1="8" y1="12" x2="21" y2="12"></line><line x1="8" y1="18" x2="21" y2="18"></line><line x1="3" y1="6" x2="3.01" y2="6"></line><line x1="3" y1="12" x2="3.01" y2="12"></line><line x1="3" y1="18" x2="3.01" y2="18"></line></svg>
</my-global-icon>
再生リスト
</a>
<a routerlinkactive="active" class="menu-link ng-star-inserted" href="/videos/subscriptions">
<a routerlinkactive="active" class="menu-link ng-star-inserted" href="/peertube/videos/subscriptions">
<my-global-icon aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="material" width="24px" height="24px"><path d="M20 8H4V6h16v2zm-2-6H6v2h12V2zm4 10v8c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2v-8c0-1.1.9-2 2-2h16c1.1 0 2 .9 2 2zm-6 4l-6-3.27v6.53L16 16z"></path><path d="M0 0h24v24H0z" fill="none"></path></svg>
</my-global-icon>
登録チャンネル
</a>
<a routerlinkactive="active" class="menu-link ng-star-inserted" href="/my-library/history/videos">
<a routerlinkactive="active" class="menu-link ng-star-inserted" href="/peertube/my-library/history/videos">
<my-global-icon aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="material" width="24px" height="24px"><path d="M0 0h24v24H0z" fill="none"></path><path d="M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"></path></svg>
</my-global-icon>

56
resources/views/theme/techsuwa/component/peertube/parts/menu/top/loggedin.blade.php

@ -1,45 +1,51 @@
<div class="logged-in-block ng-star-inserted">
<div>
<div placement="bottom-left auto" autoclose="outside" class="logged-in-more dropdown">
<div class="dropdown-toggle" aria-expanded="false">
<my-actor-avatar size="34">
<img class="account avatar avatar-34 ng-star-inserted" src="https://video.076.ne.jp/lazy-static/avatars/aa9883c7-d4d0-48c3-8e3a-72a9f2d96784.png" alt="アカウントのアバター">
</my-actor-avatar>
<div class="logged-in-info">
<div class="logged-in-display-name">テクニカル諏訪子</div>
<div class="logged-in-username">@techsuwako</div>
<a href="/peertube/a/techsuwako">
<div class="dropdown-toggle" aria-expanded="false">
<my-actor-avatar size="34">
<img class="account avatar avatar-34 ng-star-inserted" src="https://video.076.ne.jp/lazy-static/avatars/aa9883c7-d4d0-48c3-8e3a-72a9f2d96784.png" alt="アカウントのアバター">
</my-actor-avatar>
<div class="logged-in-info">
<div class="logged-in-display-name">テクニカル諏訪子</div>
<div class="logged-in-username">@techsuwako</div>
</div>
<div class="dropdown-toggle-indicator">
<span class="glyphicon glyphicon-chevron-down"></span>
</div>
</div>
<div class="dropdown-toggle-indicator">
<span class="glyphicon glyphicon-chevron-down"></span>
</div>
</div>
</a>
</div>
@include('theme.'.env('THEME').'.component.peertube.parts.menu.top.notification')
</div>
<div class="logged-in-menu">
<a routerlink="/my-account" routerlinkactive="active" class="menu-link" href="/my-account">
<a routerlink="/my-account" routerlinkactive="active" class="menu-link" href="/peertube/my-account">
<my-global-icon iconname="user" aria-hidden="true">