ソースを参照

JSのないpeertubeの開発開始&視聴ページは機能している

peertube
コミット
cc54f65d53
  1. 69
      app/Http/Controllers/Peertube/Common.php
  2. 78
      app/Http/Controllers/Peertube/Watch.php
  3. 13
      resources/views/pages/peertube/w.blade.php
  4. 64
      resources/views/theme/techsuwa/component/peertube/parts/header.blade.php
  5. 16
      resources/views/theme/techsuwa/component/peertube/parts/manifest.blade.php
  6. 8
      resources/views/theme/techsuwa/component/peertube/parts/menu.blade.php
  7. 10
      resources/views/theme/techsuwa/component/peertube/parts/menu/footer.blade.php
  8. 5
      resources/views/theme/techsuwa/component/peertube/parts/menu/top.blade.php
  9. 29
      resources/views/theme/techsuwa/component/peertube/parts/menu/top/inmylibrary.blade.php
  10. 45
      resources/views/theme/techsuwa/component/peertube/parts/menu/top/loggedin.blade.php
  11. 7
      resources/views/theme/techsuwa/component/peertube/parts/menu/top/notification.blade.php
  12. 33
      resources/views/theme/techsuwa/component/peertube/parts/menu/top/oninstance.blade.php
  13. 19
      resources/views/theme/techsuwa/component/peertube/parts/meta.blade.php
  14. 1479
      resources/views/theme/techsuwa/component/peertube/parts/style.blade.php
  15. 5
      resources/views/theme/techsuwa/component/peertube/parts/stylelink.blade.php
  16. 9
      resources/views/theme/techsuwa/component/peertube/parts/w/info.blade.php
  17. 53
      resources/views/theme/techsuwa/component/peertube/parts/w/info/attrib.blade.php
  18. 22
      resources/views/theme/techsuwa/component/peertube/parts/w/info/channel.blade.php
  19. 90
      resources/views/theme/techsuwa/component/peertube/parts/w/info/comments.blade.php
  20. 7
      resources/views/theme/techsuwa/component/peertube/parts/w/info/description.blade.php
  21. 27
      resources/views/theme/techsuwa/component/peertube/parts/w/info/first.blade.php
  22. 6
      resources/views/theme/techsuwa/component/peertube/parts/w/info/more.blade.php
  23. 53
      resources/views/theme/techsuwa/component/peertube/parts/w/info/save.blade.php
  24. 6
      resources/views/theme/techsuwa/component/peertube/parts/w/info/share.blade.php
  25. 39
      resources/views/theme/techsuwa/component/peertube/parts/w/info/subscribe.blade.php
  26. 13
      resources/views/theme/techsuwa/component/peertube/parts/w/info/support.blade.php
  27. 14
      resources/views/theme/techsuwa/component/peertube/parts/w/info/videorate.blade.php
  28. 10
      resources/views/theme/techsuwa/component/peertube/parts/w/info/viewsdate.blade.php
  29. 30
      resources/views/theme/techsuwa/component/peertube/parts/w/player.blade.php
  30. 61
      resources/views/theme/techsuwa/component/peertube/parts/w/videorecommend.blade.php
  31. 10
      resources/views/theme/techsuwa/component/peertube/w.blade.php
  32. 13
      resources/views/theme/techsuwa/peertube.blade.php
  33. 5
      routes/view/peertube.php
  34. 1
      routes/web.php

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

@ -0,0 +1,69 @@
<?php
namespace App\Http\Controllers\Peertube;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use App\Http\Controllers\Engine;
// use Illuminate\Support\Facades\Log;
class Common extends Engine {
private $engine;
public function __construct () {
// $this->getLocal();
// $this->getMe();
// $this->getNotify();
$this->engine = new Engine;
}
public function getLocal () {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, env('PEER_URI').'/api/v1/oauth-clients/local');
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$get = curl_exec($ch);
$err = curl_error($ch);
curl_close($ch);
if (!$get) return $err;
$get = json_decode($get);
if (isset($get->status) && $get->status == 404) return [];
return $get;
}
public function getMe () {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, env('PEER_URI').'/api/v1/users/me');
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$get = curl_exec($ch);
$err = curl_error($ch);
curl_close($ch);
if (!$get) return $err;
$get = json_decode($get);
if (isset($get->status) && $get->status == 404) return [];
return $get;
}
public function getNotify () {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, env('PEER_URI').'/api/v1/users/me/notifications?start=0&count=0&unread=true');
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$get = curl_exec($ch);
$err = curl_error($ch);
curl_close($ch);
if (!$get) return $err;
$get = json_decode($get);
if (isset($get->status) && $get->status == 404) return [];
return $get;
}
}

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

@ -0,0 +1,78 @@
<?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 Watch extends Common {
private $common;
public function __construct () {
$this->common = new Common;
}
public function index ($id) {
$res = [];
$res['detail'] = $this->getDetail($id);
$res['comment'] = $this->getComment($id);
$res['recommend'] = $this->getRecommend($res['detail']->tags);
return view('pages.peertube.w', ['res' => $res]);
}
function getDetail ($id) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, env('PEER_URI').'/api/v1/videos/'.$id);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$get = curl_exec($ch);
$err = curl_error($ch);
curl_close($ch);
if (!$get) return $err;
$get = json_decode($get);
return $get;
}
public function getRecommend ($tags) {
$ch = curl_init();
$tag = '';
foreach ($tags as $t) {
$tag .= 'tagsOneOf='.urlencode($t).'&';
}
curl_setopt($ch, CURLOPT_URL, env('PEER_URI').'/api/v1/search/videos?start=0&count=6&nsfw=both&'.$tag.'sort=-publishedAt&searchTarget=local');
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$get = curl_exec($ch);
$err = curl_error($ch);
curl_close($ch);
if (!$get) return $err;
$get = json_decode($get);
if (isset($get->status) && $get->status == 404) return [];
return $get;
}
public function getComment ($id) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, env('PEER_URI').'/api/v1/videos/'.$id.'/comment-threads');
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$get = curl_exec($ch);
$err = curl_error($ch);
curl_close($ch);
if (!$get) return $err;
$get = json_decode($get);
if (isset($get->status) && $get->status == 404) return [];
return $get;
}
}

13
resources/views/pages/peertube/w.blade.php

@ -0,0 +1,13 @@
@extends('theme.'.env('THEME').'.peertube')
@section('content')
<div class="peertube-container user-logged-in">
@include('theme.'.env('THEME').'.component.peertube.parts.header')
<div class="sub-header-container">
@include('theme.'.env('THEME').'.component.peertube.parts.menu')
@include('theme.'.env('THEME').'.component.peertube.w')
</div>
</div>
@endsection

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

@ -0,0 +1,64 @@
<div class="header">
<div class="top-left-block">
<a class="peertube-title c-hand">
<span class="icon icon-logo"></span>
<span class="instance-name">076動画</span>
</a>
<a class="peertube-title c-hand" href="http://{{ env('ONION_HOST') }}">
<span class="icon icon-logo"></span>
<span class="publish-button-label">Tor</span>
</a>
<a class="peertube-title c-hand" href="/feed">
<span class="icon icon-logo"></span>
<span class="publish-button-label">RSS</span>
</a>
</div>
<div class="header-right">
<my-header class="w-100 d-flex justify-content-end">
<my-search-typeahead class="w-100 d-flex justify-content-end">
<div id="typeahead-container" class="d-inline-flex position-relative">
<input type="text" id="search-video" name="search-video" placeholder="動画、プレイリスト、チャンネルを検索する…" aria-label="Search" autocomplete="off" class="ng-untouched ng-pristine ng-valid">
<my-global-icon title="検索" role="button" iconname="search" class="icon icon-search">
<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-search"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>
</my-global-icon>
<!--div class="position-absolute jump-to-suggestions">
<ul role="listbox" class="p-0 m-0" hidden="">
</ul>
<div id="typeahead-instructions" class="overflow-hidden ng-star-inserted">
<span class="text-muted">Your query will be matched against video names or descriptions, channel names.</span>
<div class="d-flex justify-content-between mt-3">
<label class="small-title">高度な検索</label>
<div class="advanced-search-status c-help">
<span title="Determines whether you can resolve any distant content, or if this instance only allows doing so for instances it follows." class="text-success">
<span class="mr-1 ng-star-inserted">any instance</span>
<i class="glyphicon glyphicon-ok-sign"></i>
</span>
</div>
</div>
<ul>
<li>
<em>@channel_id@domain</em>
<span class="flex-auto text-muted">検索にマッチしたチャンネルを表示します</span>
</li>
<li>
<em>URL</em>
<span class="text-muted">検索にマッチしたチャンネルを表示します</span>
</li>
<li>
<em>UUID</em>
<span class="text-muted">検索にマッチした動画を表示します</span>
</li>
</ul>
</div>
</div-->
</div>
</my-search-typeahead>
<a routerlink="/videos/upload" class="publish-button" href="/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>
<span class="publish-button-label">投稿</span>
</a>
</my-header>
</div>
</div>

16
resources/views/theme/techsuwa/component/peertube/parts/manifest.blade.php

@ -0,0 +1,16 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#fff">
<meta property="og:platform" content="PeerTube">
<link rel="manifest" href="https://video.076.ne.jp/manifest.webmanifest?bb691a77622cbc0c1178f4dbf7d7e93daaecb079">
<link rel="icon" type="image/png" href="https://video.076.ne.jp/client/assets/images/favicon.png?2ae0b21b925f546bb206d4f27b690c781b38456b">
<link rel="apple-touch-icon" href="https://video.076.ne.jp/client/assets/images/icons/icon-144x144.png" sizes="144x144">
<link rel="apple-touch-icon" href="https://video.076.ne.jp/client/assets/images/icons/icon-192x192.png" sizes="192x192">
<base href="{{ env('APP_URL') }}/peertube/client/ja-JP/">
<title>{{ $res['detail']->name }} - 076動画</title>
<meta name="description" content="テクニカル諏訪子様の動画サイト" />

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

@ -0,0 +1,8 @@
<my-menu class="ng-star-inserted">
<div class="menu-wrapper">
<menu class="is-logged-in">
@include('theme.'.env('THEME').'.component.peertube.parts.menu.top')
@include('theme.'.env('THEME').'.component.peertube.parts.menu.footer')
</menu>
</div>
</my-menu>

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

@ -0,0 +1,10 @@
<div class="footer">
<div class="footer-block">
<a routerlink="/about" routerlinkactive="active" class="menu-link" href="/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>
このインスタンスについて
</a>
</div>
</div>

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

@ -0,0 +1,5 @@
<div class="top-menu">
@include('theme.'.env('THEME').'.component.peertube.parts.menu.top.loggedin')
@include('theme.'.env('THEME').'.component.peertube.parts.menu.top.inmylibrary')
@include('theme.'.env('THEME').'.component.peertube.parts.menu.top.oninstance')
</div>

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

@ -0,0 +1,29 @@
<div class="in-my-library menu-block ng-star-inserted">
<div class="block-title">
In my library
</div>
<a routerlinkactive="active" class="menu-link ng-star-inserted" href="/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">
<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">
<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">
<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>
履歴
</a>
</div>

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

@ -0,0 +1,45 @@
<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>
</div>
<div class="dropdown-toggle-indicator">
<span class="glyphicon glyphicon-chevron-down"></span>
</div>
</div>
</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">
<my-global-icon iconname="user" 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-user"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>
</my-global-icon>
自分のアカウント
</a>
<a routerlink="/my-library" routerlinkactive="active" class="menu-link" href="/my-library">
<my-global-icon iconname="channel" 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-tv"><rect x="2" y="7" width="20" height="15" rx="2" ry="2"></rect><polyline points="17 2 12 7 7 2"></polyline></svg>
</my-global-icon>
自分のライブラリ
</a>
<a routerlinkactive="active" class="menu-link ng-star-inserted" href="/admin/users">
<my-global-icon iconname="cog" 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-settings"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg>
</my-global-icon>
管理
</a>
<a routerlinkactive="active" class="menu-link ng-star-inserted" href="/admin/users">
<my-global-icon iconname="cog" 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-log-out"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg>
</my-global-icon>
ログアウト
</a>
</div>
</div>

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

@ -0,0 +1,7 @@
<my-notification>
<div autoclose="outside" placement="bottom" container="{this}" popoverclass="popover-notifications" title="通知を表示" class="notification-inbox-popover">
<my-global-icon iconname="bell">
<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-bell"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path><path d="M13.73 21a2 2 0 0 1-3.46 0"></path></svg>
</my-global-icon>
</div>
</my-notification>

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

@ -0,0 +1,33 @@
<div class="on-instance menu-block ng-star-inserted">
<div class="block-title">ON 076動画</div>
<a routerlinkactive="active" class="menu-link ng-star-inserted" href="/home">
<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-home"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline></svg>
</my-global-icon>
ホーム
</a>
<a routerlinkactive="active" class="menu-link ng-star-inserted" href="/videos/overview">
<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-globe"><circle cx="12" cy="12" r="10"></circle><line x1="2" y1="12" x2="22" y2="12"></line><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"></path></svg>
</my-global-icon>
ディスカバー
</a>
<a routerlinkactive="active" class="menu-link ng-star-inserted" href="/videos/trending">
<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-trending-up"><polyline points="23 6 13.5 15.5 8.5 10.5 1 18"></polyline><polyline points="17 6 23 6 23 12"></polyline></svg>
</my-global-icon>
トレンド
</a>
<a routerlinkactive="active" class="menu-link ng-star-inserted" href="/videos/recently-added">
<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-plus-circle"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="16" y2="12"></line></svg>
</my-global-icon>
最近投稿された動画
</a>
<a routerlinkactive="active" class="menu-link ng-star-inserted" href="/videos/local">
<my-global-icon aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8.4666667 8.4666667" x="0px" y="0px" class="misc"><path fill="currentColor" d="m 4.2330754,3.0330699e-4 c -1.9062912,0 -3.45664101,1.55086299301 -3.45663572,3.45715399301 0,1.041342 0.84545222,2.220339 1.65622812,3.201355 0.8107786,0.981014 1.6190225,1.736328 1.6190225,1.736328 a 0.26460984,0.26460984 0 0 0 0.3612197,0 c 0,0 0.8082439,-0.755314 1.6190224,-1.736328 0.810776,-0.981016 1.6582946,-2.160013 1.6582946,-3.201355 0,-1.906291 -1.5508605,-3.45715399301 -3.4571516,-3.45715399301 z m 0,0.52968500301 c 1.6203083,0 2.9279876,1.30716399 2.9279849,2.92746899 0,0.721961 -0.7497154,1.914917 -1.5353056,2.865459 -0.6952271,0.8412 -1.2416102,1.3482 -1.3926793,1.491898 C 4.0825513,7.6716453 3.5360226,7.1646033 2.840396,6.3229163 2.0548058,5.3723743 1.3035373,4.1794183 1.3035373,3.4574573 1.3035347,1.8371523 2.6127671,0.52998831 4.2330754,0.52998831 Z m 0.00878,0.91518899 a 0.26460979,0.26460979 0 0 0 -0.026355,5.16e-4 0.26460979,0.26460979 0 0 0 -0.1405599,0.05116 L 2.444037,2.6998813 a 0.26474432,0.26474432 0 1 0 0.3147086,0.425813 l 0.056327,-0.04134 v 1.224733 a 0.26460979,0.26460979 0 0 0 0.2640673,0.265615 h 2.30632 a 0.26460979,0.26460979 0 0 0 0.2656152,-0.265615 v -1.223698 l 0.054777,0.04031 A 0.2647471,0.2647471 0 1 0 6.0205633,2.6998813 L 5.5513406,2.3536473 a 0.26460979,0.26460979 0 0 0 -0.00775,-0.0057 L 4.3896558,1.4968523 a 0.26460979,0.26460979 0 0 0 -0.1477963,-0.05168 z m -0.00878,0.594278 0.8888333,0.655775 v 0.217556 1.132747 H 4.4971428 v -0.437697 a 0.26460984,0.26460984 0 0 0 -0.2676843,-0.267684 0.26460984,0.26460984 0 0 0 -0.262001,0.267684 v 0.437697 H 3.344758 v -1.132747 -0.219107 z"></path></svg>
</my-global-icon>
ローカル動画
</a>
</div>

19
resources/views/theme/techsuwa/component/peertube/parts/meta.blade.php

@ -0,0 +1,19 @@
<meta property="og:type" content="video" />
<meta property="og:site_name" content="076動画" />
<meta property="og:title" content="{{ $res['detail']->name }}" />
<meta property="og:image" content="https://video.076.ne.jp/lazy-static/previews/8d97cbd1-50bb-4de3-9eb6-914027346996.jpg" />
<meta property="og:url" content="{{ env('APP_URL') }}/peertube/w/b8oKB37kqyCdt7gBtPWeWV" />
<meta property="og:description" content="" />
<meta property="og:video:url" content="https://video.076.ne.jp/videos/embed/52039d41-8b56-4690-b6fa-25dedfedd5c5" />
<meta property="og:video:secure_url" content="https://video.076.ne.jp/videos/embed/52039d41-8b56-4690-b6fa-25dedfedd5c5" />
<meta property="og:video:type" content="text/html" />
<meta property="og:video:width" content="560" />
<meta property="og:video:height" content="315" />
<meta property="name" content="{{ $res['detail']->name }}" />
<meta property="description" content="" />
<meta property="image" content="https://video.076.ne.jp/lazy-static/previews/8d97cbd1-50bb-4de3-9eb6-914027346996.jpg" />
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:site" content="@TechnicalSuwako" />
<meta property="twitter:title" content="{{ $res['detail']->name }}" />
<meta property="twitter:description" content="" />
<meta property="twitter:image" content="https://video.076.ne.jp/lazy-static/previews/8d97cbd1-50bb-4de3-9eb6-914027346996.jpg" />

1479
resources/views/theme/techsuwa/component/peertube/parts/style.blade.php

ファイル差分が大きすぎるため省略します 差分を読み込み

5
resources/views/theme/techsuwa/component/peertube/parts/stylelink.blade.php

@ -0,0 +1,5 @@
<link rel="alternate" type="application/json+oembed" href="https://video.076.ne.jp/services/oembed?url=https%3A%2F%2Fvideo.076.ne.jp%2Fw%2Fb8oKB37kqyCdt7gBtPWeWV" title="{{ $res['detail']->name }}" />
<link rel="canonical" href="https://video.076.ne.jp/videos/watch/52039d41-8b56-4690-b6fa-25dedfedd5c5" />
<link rel="stylesheet" href="https://video.076.ne.jp/styles.b0a7806028b73e54111d.css" media="print" onload="this.media='all'">
<link rel="stylesheet" href="https://video.076.ne.jp/plugins/global.css?hash=ff020a79840a91918b51d4f8667572ba57f7965200454dfd3ec9cb1a3befdead" />

9
resources/views/theme/techsuwa/component/peertube/parts/w/info.blade.php

@ -0,0 +1,9 @@
<div class="margin-content video-bottom ng-star-inserted">
<div class="video-info">
@include('theme.'.env('THEME').'.component.peertube.parts.w.info.first')
@include('theme.'.env('THEME').'.component.peertube.parts.w.info.description')
@include('theme.'.env('THEME').'.component.peertube.parts.w.info.attrib')
@include('theme.'.env('THEME').'.component.peertube.parts.w.info.comments')
</div>
@include('theme.'.env('THEME').'.component.peertube.parts.w.videorecommend')
</div>

53
resources/views/theme/techsuwa/component/peertube/parts/w/info/attrib.blade.php

@ -0,0 +1,53 @@
<my-video-attributes>
<div class="attribute">
<span class="attribute-label">公開設定</span>
<span class="attribute-value ng-star-inserted">{{ $res['detail']->privacy->label }}</span>
</div>
<div class="attribute">
<span class="attribute-label">カテゴリ</span>
@if (is_null($res['detail']->category->id)) <span class="attribute-value ng-star-inserted">{{ $res['detail']->category->label }}</span>
@else <a class="attribute-value ng-star-inserted" href="/peertube/search?categoryOneOf={{ $res['detail']->category->id }}">{{ $res['detail']->category->label }}</a> @endif
</div>
@if (!is_null($res['detail']->originallyPublishedAt))
<div class="attribute">
<span class="attribute-label">投稿日</span>
<span class="attribute-value ng-star-inserted">{{ date('Y年m月d日', strtotime($res['detail']->originallyPublishedAt)) }}</span>
</div>
@endif
<div class="attribute">
<span class="attribute-label">ライセンス</span>
<span class="attribute-value ng-star-inserted">{{ $res['detail']->licence->label }}</span>
</div>
<div class="attribute">
<span class="attribute-label">言語</span>
@if (is_null($res['detail']->language->id)) <span class="attribute-value ng-star-inserted">{{ $res['detail']->language->label }}</span>
@else <a class="attribute-value ng-star-inserted" href="/peertube/search?languageOneOf={{ $res['detail']->language->id }}">{{ $res['detail']->language->label }}</a> @endif
</div>
<div class="attribute attribute-tags">
<span class="attribute-label">タグ</span>
@if (count($res['detail']->tags) > 0)
<span class="attribute-label">
@foreach ($res['detail']->tags as $k => $v)
<a _ngcontent-lhk-c188="" class="attribute-value ng-star-inserted" href="/peertube/search?tagsOneOf={{ $v }}">{{ $v }}</a>{{ count($res['detail']->tags)-1 != $k ? ', ' : '' }}
@endforeach
</span>
@endif
</div>
<div class="attribute ng-star-inserted">
<span class="attribute-label">再生時間</span>
@php
$seconds = $res['detail']->duration;
$hours = floor($seconds / 3600);
$seconds -= $hours * 3600;
$minutes = floor($seconds / 60);
$seconds -= $minutes * 60;
@endphp
<span class="attribute-value">{{ $hours != 0 ? $hours.'時' : '' }}{{ $minutes != 0 ? $minutes.'分' : '' }}{{ $seconds.'秒' }}</span>
</div>
</my-video-attributes>

22
resources/views/theme/techsuwa/component/peertube/parts/w/info/channel.blade.php

@ -0,0 +1,22 @@
<div class="video-info-channel-left d-flex">
<my-video-avatar-channel>
<div class="wrapper">
<my-actor-avatar class="channel">
<a title="{{ $res['detail']->account->name }}{{ $res['detail']->account->host != 'video.076.ne.jp' ? '@'.$res['detail']->account->host : '' }} (チャンネルページへ) " href="/peertube/c/{{ $res['detail']->account->name }}{{ $res['detail']->channel->host != 'video.076.ne.jp' ? '@'.$res['detail']->channel->host : '' }}" class="ng-star-inserted">
<img class="avatar channel ng-star-inserted" src="https://video.076.ne.jp{{ $res['detail']->channel->avatar->path }}" alt="チャンネルのアバター">
</a>
</my-actor-avatar>
<my-actor-avatar class="account">
<a title="{{ $res['detail']->account->name }}{{ $res['detail']->account->host != 'video.076.ne.jp' ? '@'.$res['detail']->account->host : '' }} (アカウントページへ) " href="/peertube/a/{{ $res['detail']->account->name }}{{ $res['detail']->account->host != 'video.076.ne.jp' ? '@'.$res['detail']->account->host : '' }}" class="ng-star-inserted">
<img class="account avatar ng-star-inserted" src="https://video.076.ne.jp{{ $res['detail']->account->avatar->path }}" alt="アカウントのアバター">
</a>
</my-actor-avatar>
</div>
</my-video-avatar-channel>
<div class="video-info-channel-left-links ml-1">
<a title="チャンネルページ" href="/peertube/c/{{ $res['detail']->account->name }}{{ $res['detail']->channel->host != 'video.076.ne.jp' ? '@'.$res['detail']->channel->host : '' }}" class="ng-star-inserted"> {{ $res['detail']->channel->displayName }} </a>
<a title="アカウントページ" href="/peertube/a/{{ $res['detail']->account->name }}{{ $res['detail']->account->host != 'video.076.ne.jp' ? '@'.$res['detail']->account->host : '' }}" class="ng-star-inserted">
<span>{{ $res['detail']->account->name }}{{ $res['detail']->account->host != 'video.076.ne.jp' ? '@'.$res['detail']->account->host : '' }} 制作</span>
</a>
</div>
</div>

90
resources/views/theme/techsuwa/component/peertube/parts/w/info/comments.blade.php

@ -0,0 +1,90 @@
<my-video-comments class="border-top">
<div>
<div class="title-block">
<h2 class="title-page title-page-single"> {{ $res['comment']->totalNotDeletedComments }} コメント </h2>
<my-feed>
<div class="feed">
<my-global-icon role="button" aria-label="Open syndication dropdown" placement="bottom left auto" iconname="syndication" class="icon-syndication ng-star-inserted">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="feather feather-rss"><path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle></svg>
</my-global-icon>
</div>
</my-feed>
<!--div class="d-inline-block ml-4 dropdown-root dropdown">
<button id="dropdown-sort-comments" class="dropdown-toggle btn btn-sm btn-outline-secondary" aria-expanded="false">並べ替え</button>
<div aria-labelledby="dropdown-sort-comments" x-placement="bottom-left" class="dropdown-menu">
<button class="dropdown-item">新しい順(デフォルト)</button>
<button class="dropdown-item">多かった順</button>
</div>
</div-->
</div>
<my-video-comment-add class="ng-star-inserted">
<form novalidate="" class="ng-untouched ng-pristine ng-invalid">
<div class="avatar-and-textarea">
<my-actor-avatar size="25">
<img class="account avatar avatar-25 ng-star-inserted" src="https://video.076.ne.jp/lazy-static/avatars/aa9883c7-d4d0-48c3-8e3a-72a9f2d96784.png" alt="アカウントのアバター">
</my-actor-avatar>
<div class="form-group">
<textarea placeholder="コメントを入力..." myautoresize="" formcontrolname="text" rows="1" class="ng-untouched ng-pristine ng-invalid" style="overflow: hidden; height: 32px;"></textarea>
</div>
</div>
<div class="comment-buttons"></div>
</form>
</my-video-comment-add>
@if (count($res['comment']->data) == 0)
<div class="ng-star-inserted">コメントがありません。</div>
@else
@foreach ($res['comment']->data as $k => $v)
@if (!$v->isDeleted)
<div myinfinitescroller="" class="comment-threads ng-star-inserted">
<div>
<div id="highlighted-comment" class="anchor"></div>
<my-video-comment class="ng-star-inserted">
<div class="root-comment ng-star-inserted">
<div class="left">
<my-actor-avatar class="ng-star-inserted">
<a target="_blank" rel="noopener noreferrer" href="{{ $v->account->url }}" title="{{ $v->account->name }} (アカウントページへ) " class="ng-star-inserted">
<img class="account avatar ng-star-inserted" src="{{ !is_null($v->account->avatar) ? 'https://video.076.ne.jp'.$v->account->avatar->path : '/img/noicon.jpg' }}" alt="アカウントのアバター">
</a>
</my-actor-avatar>
<div class="vertical-border"></div>
</div>
<div class="right mb-3">
<div class="comment">
<div class="highlighted-comment ng-star-inserted">注目のコメント</div>
<div class="comment-account-date ng-star-inserted">
<div class="comment-account">
<a href="/peertube/a/{{ $v->account->name }}{{ $v->account->host != 'video.076.ne.jp' ? '@'.$v->account->host : '' }}">
<span class="comment-account-name"> {{ $v->account->displayName }} </span>
<span class="comment-account-fid ml-1">{{ $v->account->name }}{{ $v->account->host != 'video.076.ne.jp' ? '@'.$v->account->host : '' }}</span>
</a>
</div>
<a class="comment-date" title="{{ date('Y/m/d', strtotime($v->createdAt)) }}" href="/w/{{ request()->route('id') }}#threadId={{ $v->threadId }}">
{{ date('Y年m月d日 H:i:s T', strtotime($v->createdAt)) }}
</a>
</div>
<div mytimestamproutetransformer="" class="comment-html ng-star-inserted">
<?php echo $v->text; ?>
</div>
<div class="comment-actions ng-star-inserted">
<div tabindex="0" class="comment-action-reply">返事</div>
</div>
<div class="ng-star-inserted"></div>
</div>
</div>
</div>
<div class="ng-star-inserted"></div>
</my-video-comment>
</div>
</div>
@endif
@endforeach
@endif
<div myinfinitescroller="" class="comment-threads ng-star-inserted">
<div>
<div id="highlighted-comment" class="anchor"></div>
</div>
</div>
</div>
</my-video-comments>

7
resources/views/theme/techsuwa/component/peertube/parts/w/info/description.blade.php

@ -0,0 +1,7 @@
<my-video-description>
<div class="video-info-description">
<div mytimestamproutetransformer="" class="video-info-description-html">
<?php echo nl2br($res['detail']->description); ?>
</div>
</div>
</my-video-description>

27
resources/views/theme/techsuwa/component/peertube/parts/w/info/first.blade.php

@ -0,0 +1,27 @@
<div class="video-info-first-row">
<div>
<div class="d-flex justify-content-between flex-direction-column">
<div class="d-none d-md-block">
<h1 class="video-info-name">{{ $res['detail']->name }}</h1>
</div>
<div class="video-info-first-row-bottom">
@include('theme.'.env('THEME').'.component.peertube.parts.w.info.viewsdate')
<my-action-buttons>
<div class="video-actions-rates">
<div class="video-actions full-width justify-content-end">
@include('theme.'.env('THEME').'.component.peertube.parts.w.info.videorate')
@include('theme.'.env('THEME').'.component.peertube.parts.w.info.support')
@include('theme.'.env('THEME').'.component.peertube.parts.w.info.share')
@include('theme.'.env('THEME').'.component.peertube.parts.w.info.save')
@include('theme.'.env('THEME').'.component.peertube.parts.w.info.more')
</div>
</div>
</my-action-buttons>
</div>
</div>
<div class="pt-3 border-top video-info-channel d-flex">
@include('theme.'.env('THEME').'.component.peertube.parts.w.info.channel')
@include('theme.'.env('THEME').'.component.peertube.parts.w.info.subscribe')
</div>
</div>
</div>

6
resources/views/theme/techsuwa/component/peertube/parts/w/info/more.blade.php

@ -0,0 +1,6 @@
<button class="action-button">
<my-global-icon iconname="download" 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-download"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>
</my-global-icon>
<span class="icon-text">ダウンロード</span>
</button>

53
resources/views/theme/techsuwa/component/peertube/parts/w/info/save.blade.php

@ -0,0 +1,53 @@
<!--div placement="bottom auto" role="button" autoclose="outside" class="action-dropdown ng-star-inserted dropdown">
<button class="dropdown-toggle action-button action-button-save" aria-expanded="false">
<my-global-icon iconname="playlist-add" aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 426.7 426.7">
<defs></defs>
<path fill="currentColor" d="M0 64h256v42.7H0zM0 149.3h256V192H0zM0 234.7h170.7v42.7H0z"></path>
<path fill="currentColor" d="M341.3 234.7v-85.4h-42.6v85.4h-85.4v42.6h85.4v85.4h42.6v-85.4h85.4v-42.6z"></path>
</svg>
</my-global-icon>
<span class="icon-text">保存する</span>
</button>
<div x-placement="bottom" class="dropdown-menu">
<my-video-add-to-playlist>
<div class="root">
<div class="header">
<div class="first-row">
<div class="title">保存</div>
</div>
</div>
<div class="input-container">
<input type="text" placeholder="再生リストを検索" class="ng-untouched ng-pristine ng-valid">
</div>
<div class="playlists">
<div class="playlist dropdown-item ng-star-inserted">
<div class="primary-row">
<my-peertube-checkbox class="ng-untouched ng-pristine ng-valid">
<div class="root flex-column">
<div class="d-flex">
<label class="form-group-checkbox">
<input type="checkbox" id="in-playlist-primary-4584" class="ng-untouched ng-pristine ng-valid">
<span role="checkbox" aria-checked="false"></span>
</label>
</div>
<div class="ml-4 d-flex flex-column">
<small class="wrapper mt-2 text-muted"></small>
<span class="wrapper mt-3"></span>
</div>
</div>
</my-peertube-checkbox>
<label class="display-name"> 東方夢時空 ~ Phantasmagoria of Dim.Dream 全曲Win風アレンジ </label>
</div>
</div>
</div>
<div class="new-playlist-button dropdown-item">
<my-global-icon iconname="add" 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-plus-circle"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="16" y2="12"></line></svg>
</my-global-icon>
<span>非公開プレイリストを作成</span>
</div>
</div>
</my-video-add-to-playlist>
</div>
</div-->

6
resources/views/theme/techsuwa/component/peertube/parts/w/info/share.blade.php

@ -0,0 +1,6 @@
<button class="action-button">
<my-global-icon iconname="share" 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-share-2"><circle cx="18" cy="5" r="3"></circle><circle cx="6" cy="12" r="3"></circle><circle cx="18" cy="19" r="3"></circle><line x1="8.59" y1="13.51" x2="15.42" y2="17.49"></line><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"></line></svg>
</my-global-icon>
<span class="icon-text">シェアする</span>
</button>

39
resources/views/theme/techsuwa/component/peertube/parts/w/info/subscribe.blade.php

@ -0,0 +1,39 @@
<my-subscribe-button size="small">
<div class="btn-group-subscribe btn-group subscribe-button">
<button type="button" class="btn btn-sm ng-star-inserted">
<span class="ng-star-inserted">チャンネル登録する</span>
</button>
<!--div autoclose="outside" placement="bottom-right bottom-left" role="group" aria-label="Multiple ways to subscribe to the current channel" class="btn-group dropdown">
<button aria-label="チャンネル登録のドロップダウンメニューを開く" class="dropdown-toggle btn btn-sm dropdown-toggle-split" aria-expanded="false"></button>
<div class="dropdown-menu" x-placement="bottom-right">
<h6 class="dropdown-header">ActivityPubアプリケーションのアカウントを使用</h6>
<button class="dropdown-item">
<span class="ng-star-inserted">ローカルアカウントで登録する</span>
</button>
<button class="dropdown-item dropdown-item-neutral">
<div class="mb-1">リモートアカウントで登録する:</div>
<my-remote-subscribe>
<form novalidate="" class="ng-untouched ng-pristine ng-invalid">
<div class="form-group mb-2">
<input type="email" formcontrolname="text" placeholder="jane_doe@example.com" class="form-control ng-untouched ng-pristine ng-invalid">
</div>
<button type="submit" class="btn btn-sm btn-remote-follow" disabled="">
<span class="ng-star-inserted">リモートアカウントで登録</span>
</button>
<my-help class="ng-star-inserted">
<span role="button" container="body" tabindex="0" popoverclass="help-popover" class="help-tooltip-button" title="ヘルプを表示" aria-pressed="false">
<my-global-icon>
SVG
</my-global-icon>
</span>
</my-help>
</form>
</my-remote-subscribe>
</button>
<div class="dropdown-divider"></div>
<h6 class="dropdown-header">フィードを使用</h6>
<a target="_blank" class="dropdown-item" href="/feeds/videos.xml?videoChannelId=4">RSSで登録する</a>
</div>
</div-->
</div>
</my-subscribe-button>

13
resources/views/theme/techsuwa/component/peertube/parts/w/info/support.blade.php

@ -0,0 +1,13 @@
<button placement="bottom auto" class="action-button action-button-support ng-star-inserted" aria-label="この動画への寄付方法">
<my-global-icon iconname="support" aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 947.70386 999.3125" width="947.70386" height="999.3125">
<g transform="translate(2.669496,27.625894)">
<g transform="matrix(0.1,0,0,-0.1,0,511)">
<path d="m 3744.3542,4564.3712 c -217.4,-34.2 -520.3,-200.3 -693.7,-376.2 -263.8,-263.8 -388.4,-571.6 -388.4,-952.6 0,-256.5 44,-437.2 173.4,-684 75.7,-144.1 197.9,-280.9 747.5,-842.7 1106.5,-1133.40001 1138.2,-1165.20001 1253,-1194.50001 188.1,-51.3 214.9,-29.3 1162.7,938.00001 498.3,508.1 911.1,950.2 962.4,1030.8 263.8,415.3 283.3,964.9 48.8,1409.4 -180.8,342 -581.3,620.4 -972.2,676.6 -332.2,48.9 -671.7,-36.6 -967.3,-236.9 l -156.3,-109.9 -119.7,87.9 c -158.8,117.2 -351.8,202.7 -554.5,244.3 -183.1,39.1 -295.4,41.6 -495.7,9.8 z" fill="currentColor"></path>
<path d="m 7991.4051,47.633899 c -39.1,-19.5 -473.9,-437.299999 -964.9,-925.800029 l -891.6,-891.59997 h -830.5 c -757.2,0 -837.8,4.9 -913.6,44 -207.6,112.4 -227.2,415.2 -39.1,561.8 66,53.7 83,53.7 950.2,53.7 989.3,0 1008.8,2.5 1094.3,173.49997 56.2,105 56.2,317.50003 4.9,427.50003 -83.1,175.9 4.8,168.5 -1915.1,168.5 h -1722 l -173.4,-63.5 c -95.3,-34.2 -232.1,-102.6 -305.3,-151.5 -73.3,-48.9 -442.1,-400.60003 -823.2,-779.2 l -688.80006,-693.7 664.40006,-647.3 c 366.4,-354.2 779.2,-754.8 918.4,-889.1 l 251.6,-241.8 481.2,481.2 481.2,481.2 h 1487.6 c 1294.6,0 1494.9,4.9 1565.8,39.1 58.6,26.9 339.6,368.8 1028.4,1248.2 522.8,666.89997 964.9,1243.3 982,1284.9 41.5,92.8 2.5,212.499999 -95.3,297.999999 -66,53.7 -95.3,61.1 -273.6,61.1 -132,-0.1 -224.8,-12.3 -273.6,-39.2 z" fill="currentColor"></path>
</g>
</g>
</svg>
</my-global-icon>
<span class="icon-text">寄付する</span>
</button>

14
resources/views/theme/techsuwa/component/peertube/parts/w/info/videorate.blade.php

@ -0,0 +1,14 @@
<my-video-rate>
<button placement="bottom auto" class="action-button action-button-like" aria-pressed="false" aria-label="動画を高く評価">
<my-global-icon iconname="like">
<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-thumbs-up"><path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path></svg>
</my-global-icon>
@if ($res['detail']->likes > 0) <span class="count ng-star-inserted">{{ $res['detail']->likes }}</span> @endif
</button>
<button placement="bottom auto" class="action-button action-button-dislike" aria-pressed="false" aria-label="動画を低く評価">
<my-global-icon iconname="dislike">
<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-thumbs-down"><path d="M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17"></path></svg>
</my-global-icon>
@if ($res['detail']->dislikes > 0) <span class="count ng-star-inserted">{{ $res['detail']->dislikes }}</span> @endif
</button>
</my-video-rate>

10
resources/views/theme/techsuwa/component/peertube/parts/w/info/viewsdate.blade.php

@ -0,0 +1,10 @@
<div class="d-none d-md-block video-info-date-views">
<my-date-toggle class="ng-star-inserted">
<span class="date-toggle" title="{{ date('Y/m/d', strtotime($res['detail']->publishedAt)) }}">{{ date('Y年m月d日 H:i:s T', strtotime($res['detail']->publishedAt)) }}</span>
</my-date-toggle>
に投稿
<my-video-views-counter class="ng-star-inserted">
<span title="">{{ $res['detail']->views }} 回視聴</span>
</my-video-views-counter>
</div>

30
resources/views/theme/techsuwa/component/peertube/parts/w/player.blade.php

@ -0,0 +1,30 @@
<div id="video-wrapper">
<div id="videojs-wrapper">
<div id="vjs_video_3"
playsinline="true"
tabindex="-1"
lang="ja"
role="region"
aria-label="動画プレーヤー"
style="outline: none;"
>
<video
playsinline="playsinline"
tabindex="-1"
poster="https://video.076.ne.jp{{ $res['detail']->previewPath }}"
style="width: 813px; height: 458px;"
controls=""
>
@if (!empty($res['detail']->streamingPlaylists))
@foreach ($res['detail']->streamingPlaylists[0]->files as $k => $v)
<source src="{{ $v->fileUrl }}">
@endforeach
@else
@foreach ($res['detail']->files as $k => $v)
<source src="{{ $v->fileUrl }}">
@endforeach
@endif
</video>
</div>
</div>
</div>

61
resources/views/theme/techsuwa/component/peertube/parts/w/videorecommend.blade.php

@ -0,0 +1,61 @@
<my-recommended-videos>
<div class="other-videos">
<div class="title-page-container ng-star-inserted">
<h2 class="title-page title-page-single">他の動画</h2>
</div>
@foreach ($res['recommend']->data as $k => $v)
<my-video-miniature actorimagesize="32" class="ng-star-inserted">
<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-label-overlay warning ng-star-inserted"></div>
<div class="video-thumbnail-label-overlay danger ng-star-inserted"></div>
@php
$seconds = $res['detail']->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.':' : '' }}{{ $seconds }}</div>
<div class="play-overlay ng-star-inserted">
<div class="icon"></div>
</div>
</a>
</my-video-thumbnail>
<div class="video-bottom">
<div class="video-miniature-information">
<div class="d-flex video-miniature-meta">
<my-actor-avatar class="ng-star-inserted">
<a title="{{ $v->channel->name }} (チャンネルページへ) " href="/c/{{ $v->channel->name }}" class="ng-star-inserted">
<img class="avatar avatar-32 channel ng-star-inserted" src="{{ !is_null($v->channel->avatar) ? 'https://video.076.ne.jp'.$v->channel->avatar->path : '/img/noicon.jpg' }}" alt="チャンネルのアバター">
</a>
</my-actor-avatar>
<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日 H:i:s T', strtotime($v->createdAt)) }}">{{ date('Y/m/d', 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>
<a tabindex="-1" class="video-miniature-account ng-star-inserted" href="/c/{{ $v->channel->host != 'video.076.ne.jp' ? '@'.$v->channel->host : '' }}"> {{ $v->account->name }}{{ $v->account->host != 'video.076.ne.jp' ? '@'.$v->account->host : '' }} </a>
<div class="video-info-privacy"></div>
</div>
</div>
</div>
<div class="video-actions"></div>
</div>
</div>
</my-video-miniature>
<hr class="ng-star-inserted">
@endforeach
</div>
</my-recommended-videos>

10
resources/views/theme/techsuwa/component/peertube/w.blade.php

@ -0,0 +1,10 @@
<div id="content" tabindex="-1" class="main-col">
<div class="main-row">
<my-video-watch class="ng-star-inserted">
<div class="root">
@include('theme.'.env('THEME').'.component.peertube.parts.w.player')
@include('theme.'.env('THEME').'.component.peertube.parts.w.info')
</div>
</my-video-watch>
</div>
</div>

13
resources/views/theme/techsuwa/peertube.blade.php

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="ja">
<head>
@include('theme.'.env('THEME').'.component.peertube.parts.manifest')
@include('theme.'.env('THEME').'.component.peertube.parts.style')
@include('theme.'.env('THEME').'.component.peertube.parts.meta')
@include('theme.'.env('THEME').'.component.peertube.parts.stylelink')
</head>
<body id="custom-css">
@yield('content')
</body>
</html>

5
routes/view/peertube.php

@ -0,0 +1,5 @@
<?php
Route::group(['prefix' => 'peertube'], function () {
Route::any('/w/{id}', 'Peertube\Watch@index');
});

1
routes/web.php

@ -25,4 +25,5 @@ require(__DIR__.'/api/user.php');
Route::get('/logout', 'User\Logout@index');
require(__DIR__.'/view/bash.php');
require(__DIR__.'/view/peertube.php');
require(__DIR__.'/view/site.php');

読み込み中…
キャンセル
保存