diff --git a/app/Http/Controllers/Peertube/About.php b/app/Http/Controllers/Peertube/About.php new file mode 100644 index 0000000..a71a1d8 --- /dev/null +++ b/app/Http/Controllers/Peertube/About.php @@ -0,0 +1,28 @@ +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); + } +} diff --git a/app/Http/Controllers/Peertube/Account.php b/app/Http/Controllers/Peertube/Account.php index a91d2f3..430b73c 100644 --- a/app/Http/Controllers/Peertube/Account.php +++ b/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); diff --git a/app/Http/Controllers/Peertube/Admin/Users.php b/app/Http/Controllers/Peertube/Admin/Users.php new file mode 100644 index 0000000..a310ece --- /dev/null +++ b/app/Http/Controllers/Peertube/Admin/Users.php @@ -0,0 +1,34 @@ +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); + } +} diff --git a/app/Http/Controllers/Peertube/Channel.php b/app/Http/Controllers/Peertube/Channel.php index 0b39b1f..b0386f0 100644 --- a/app/Http/Controllers/Peertube/Channel.php +++ b/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]); diff --git a/app/Http/Controllers/Peertube/Common.php b/app/Http/Controllers/Peertube/Common.php index afbf66f..fb7d8ea 100644 --- a/app/Http/Controllers/Peertube/Common.php +++ b/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; + } } diff --git a/app/Http/Controllers/Peertube/Home.php b/app/Http/Controllers/Peertube/Home.php new file mode 100644 index 0000000..2b73045 --- /dev/null +++ b/app/Http/Controllers/Peertube/Home.php @@ -0,0 +1,28 @@ +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); + } +} diff --git a/app/Http/Controllers/Peertube/Login.php b/app/Http/Controllers/Peertube/Login.php new file mode 100644 index 0000000..21bcc4b --- /dev/null +++ b/app/Http/Controllers/Peertube/Login.php @@ -0,0 +1,32 @@ +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); + } +} diff --git a/app/Http/Controllers/Peertube/Logout.php b/app/Http/Controllers/Peertube/Logout.php new file mode 100644 index 0000000..9e0bc53 --- /dev/null +++ b/app/Http/Controllers/Peertube/Logout.php @@ -0,0 +1,32 @@ +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); + } +} diff --git a/app/Http/Controllers/Peertube/Myaccount.php b/app/Http/Controllers/Peertube/Myaccount.php new file mode 100644 index 0000000..6f1440e --- /dev/null +++ b/app/Http/Controllers/Peertube/Myaccount.php @@ -0,0 +1,32 @@ +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); + } +} diff --git a/app/Http/Controllers/Peertube/Mylibrary.php b/app/Http/Controllers/Peertube/Mylibrary.php new file mode 100644 index 0000000..862d51d --- /dev/null +++ b/app/Http/Controllers/Peertube/Mylibrary.php @@ -0,0 +1,32 @@ +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); + } +} diff --git a/app/Http/Controllers/Peertube/Mylibrary/History/Videos.php b/app/Http/Controllers/Peertube/Mylibrary/History/Videos.php new file mode 100644 index 0000000..1c52b26 --- /dev/null +++ b/app/Http/Controllers/Peertube/Mylibrary/History/Videos.php @@ -0,0 +1,33 @@ +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); + } +} diff --git a/app/Http/Controllers/Peertube/Mylibrary/Subscriptions.php b/app/Http/Controllers/Peertube/Mylibrary/Subscriptions.php new file mode 100644 index 0000000..8c4fdb9 --- /dev/null +++ b/app/Http/Controllers/Peertube/Mylibrary/Subscriptions.php @@ -0,0 +1,33 @@ +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); + } +} diff --git a/app/Http/Controllers/Peertube/Mylibrary/Videochannels.php b/app/Http/Controllers/Peertube/Mylibrary/Videochannels.php new file mode 100644 index 0000000..e381fba --- /dev/null +++ b/app/Http/Controllers/Peertube/Mylibrary/Videochannels.php @@ -0,0 +1,33 @@ +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); + } +} diff --git a/app/Http/Controllers/Peertube/Mylibrary/Videoplaylists.php b/app/Http/Controllers/Peertube/Mylibrary/Videoplaylists.php new file mode 100644 index 0000000..4993dc9 --- /dev/null +++ b/app/Http/Controllers/Peertube/Mylibrary/Videoplaylists.php @@ -0,0 +1,33 @@ +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); + } +} diff --git a/app/Http/Controllers/Peertube/Mylibrary/Videos.php b/app/Http/Controllers/Peertube/Mylibrary/Videos.php new file mode 100644 index 0000000..455cad1 --- /dev/null +++ b/app/Http/Controllers/Peertube/Mylibrary/Videos.php @@ -0,0 +1,33 @@ +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); + } +} diff --git a/app/Http/Controllers/Peertube/Notification.php b/app/Http/Controllers/Peertube/Notification.php new file mode 100644 index 0000000..5f90004 --- /dev/null +++ b/app/Http/Controllers/Peertube/Notification.php @@ -0,0 +1,32 @@ +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); + } +} diff --git a/app/Http/Controllers/Peertube/Signup.php b/app/Http/Controllers/Peertube/Signup.php new file mode 100644 index 0000000..6fe8739 --- /dev/null +++ b/app/Http/Controllers/Peertube/Signup.php @@ -0,0 +1,32 @@ +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); + } +} diff --git a/app/Http/Controllers/Peertube/Videos/Local.php b/app/Http/Controllers/Peertube/Videos/Local.php new file mode 100644 index 0000000..cf49cce --- /dev/null +++ b/app/Http/Controllers/Peertube/Videos/Local.php @@ -0,0 +1,29 @@ +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); + } +} diff --git a/app/Http/Controllers/Peertube/Videos/Overview.php b/app/Http/Controllers/Peertube/Videos/Overview.php new file mode 100644 index 0000000..a0674cb --- /dev/null +++ b/app/Http/Controllers/Peertube/Videos/Overview.php @@ -0,0 +1,29 @@ +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); + } +} diff --git a/app/Http/Controllers/Peertube/Videos/Recentlyadded.php b/app/Http/Controllers/Peertube/Videos/Recentlyadded.php new file mode 100644 index 0000000..e769820 --- /dev/null +++ b/app/Http/Controllers/Peertube/Videos/Recentlyadded.php @@ -0,0 +1,29 @@ +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); + } +} diff --git a/app/Http/Controllers/Peertube/Videos/Subscriptions.php b/app/Http/Controllers/Peertube/Videos/Subscriptions.php new file mode 100644 index 0000000..c156aaf --- /dev/null +++ b/app/Http/Controllers/Peertube/Videos/Subscriptions.php @@ -0,0 +1,33 @@ +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); + } +} diff --git a/app/Http/Controllers/Peertube/Videos/Trending.php b/app/Http/Controllers/Peertube/Videos/Trending.php new file mode 100644 index 0000000..ca7b7f9 --- /dev/null +++ b/app/Http/Controllers/Peertube/Videos/Trending.php @@ -0,0 +1,29 @@ +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); + } +} diff --git a/app/Http/Controllers/Peertube/Videos/Upload.php b/app/Http/Controllers/Peertube/Videos/Upload.php new file mode 100644 index 0000000..7f6de98 --- /dev/null +++ b/app/Http/Controllers/Peertube/Videos/Upload.php @@ -0,0 +1,28 @@ +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); + } +} diff --git a/app/Http/Controllers/Peertube/Watch.php b/app/Http/Controllers/Peertube/Watch.php index f358427..085d82c 100644 --- a/app/Http/Controllers/Peertube/Watch.php +++ b/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); diff --git a/public/css/peertube/common.css b/public/css/peertube/common.css index 72ce94a..618ada7 100644 --- a/public/css/peertube/common.css +++ b/public/css/peertube/common.css @@ -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; diff --git a/public/css/peertube/videoslist.css b/public/css/peertube/videoslist.css new file mode 100644 index 0000000..5c316f3 --- /dev/null +++ b/public/css/peertube/videoslist.css @@ -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; +} \ No newline at end of file diff --git a/resources/views/pages/peertube/notyet.blade.php b/resources/views/pages/peertube/notyet.blade.php new file mode 100644 index 0000000..82d7a24 --- /dev/null +++ b/resources/views/pages/peertube/notyet.blade.php @@ -0,0 +1,7 @@ +@extends('theme.'.env('THEME').'.peertube') + +@section('content') +
+ 開発中 +
+@endsection \ No newline at end of file diff --git a/resources/views/pages/peertube/videos/local.blade.php b/resources/views/pages/peertube/videos/local.blade.php new file mode 100644 index 0000000..e2680bb --- /dev/null +++ b/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 diff --git a/resources/views/pages/peertube/videos/recentlyadded.blade.php b/resources/views/pages/peertube/videos/recentlyadded.blade.php new file mode 100644 index 0000000..c9002ea --- /dev/null +++ b/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 diff --git a/resources/views/theme/techsuwa/component/peertube/parts/c/videos.blade.php b/resources/views/theme/techsuwa/component/peertube/parts/c/videos.blade.php index 639a6fa..42a78f6 100644 --- a/resources/views/theme/techsuwa/component/peertube/parts/c/videos.blade.php +++ b/resources/views/theme/techsuwa/component/peertube/parts/c/videos.blade.php @@ -16,63 +16,7 @@
@foreach ($res['video']->data as $v) -
- - - -
+ @include('theme.'.env('THEME').'.component.peertube.parts.common.videominature') @endforeach
diff --git a/resources/views/theme/techsuwa/component/peertube/parts/common/videominature.blade.php b/resources/views/theme/techsuwa/component/peertube/parts/common/videominature.blade.php new file mode 100644 index 0000000..fc0b605 --- /dev/null +++ b/resources/views/theme/techsuwa/component/peertube/parts/common/videominature.blade.php @@ -0,0 +1,60 @@ +
+ + + +
\ No newline at end of file diff --git a/resources/views/theme/techsuwa/component/peertube/parts/common/videosbydate.blade.php b/resources/views/theme/techsuwa/component/peertube/parts/common/videosbydate.blade.php new file mode 100644 index 0000000..5d77e99 --- /dev/null +++ b/resources/views/theme/techsuwa/component/peertube/parts/common/videosbydate.blade.php @@ -0,0 +1,43 @@ +
+ @if (!empty($res['video']['today'])) +

今日

+ @foreach ($res['video']['today'] as $v) + @include('theme.'.env('THEME').'.component.peertube.parts.common.videominature') + @endforeach + @endif + + @if (!empty($res['video']['yesterday'])) +

今日

+ @foreach ($res['video']['today'] as $v) + @include('theme.'.env('THEME').'.component.peertube.parts.common.videominature') + @endforeach + @endif + + @if (!empty($res['video']['week'])) +

今週

+ @foreach ($res['video']['week'] as $v) + @include('theme.'.env('THEME').'.component.peertube.parts.common.videominature') + @endforeach + @endif + + @if (!empty($res['video']['month'])) +

今月

+ @foreach ($res['video']['month'] as $v) + @include('theme.'.env('THEME').'.component.peertube.parts.common.videominature') + @endforeach + @endif + + @if (!empty($res['video']['lastmonth'])) +

先月

+ @foreach ($res['video']['lastmonth'] as $v) + @include('theme.'.env('THEME').'.component.peertube.parts.common.videominature') + @endforeach + @endif + + @if (!empty($res['video']['moreearly'])) +

もっと前

+ @foreach ($res['video']['moreearly'] as $v) + @include('theme.'.env('THEME').'.component.peertube.parts.common.videominature') + @endforeach + @endif +
\ No newline at end of file diff --git a/resources/views/theme/techsuwa/component/peertube/parts/header.blade.php b/resources/views/theme/techsuwa/component/peertube/parts/header.blade.php index e9689c0..c49fc6f 100644 --- a/resources/views/theme/techsuwa/component/peertube/parts/header.blade.php +++ b/resources/views/theme/techsuwa/component/peertube/parts/header.blade.php @@ -53,7 +53,7 @@ - + diff --git a/resources/views/theme/techsuwa/component/peertube/parts/menu/footer.blade.php b/resources/views/theme/techsuwa/component/peertube/parts/menu/footer.blade.php index 3e815ab..1f3733f 100644 --- a/resources/views/theme/techsuwa/component/peertube/parts/menu/footer.blade.php +++ b/resources/views/theme/techsuwa/component/peertube/parts/menu/footer.blade.php @@ -1,6 +1,6 @@ + + \ No newline at end of file diff --git a/routes/view/peertube.php b/routes/view/peertube.php index 8227c20..17e8815 100644 --- a/routes/view/peertube.php +++ b/routes/view/peertube.php @@ -4,4 +4,36 @@ Route::group(['prefix' => 'peertube'], function () { Route::any('/a/{id}/{cat?}', 'Peertube\Account@index'); Route::any('/c/{id}/{cat?}/{page?}', 'Peertube\Channel@index'); Route::any('/w/{id}', 'Peertube\Watch@index'); + + Route::any('/users', 'Peertube\Logout@index'); + Route::any('/login', 'Peertube\Login@index'); + Route::any('/signup', 'Peertube\Signup@index'); + Route::any('/notification', 'Peertube\Notification@index'); + + Route::any('/about', 'Peertube\About@index'); + + Route::any('/my-account', 'Peertube\Myaccount@index'); + Route::any('/my-library', 'Peertube\Mylibrary@index'); + + Route::group(['prefix' => 'admin'], function () { + Route::any('/users', 'Peertube\Admin\Users@index'); + }); + + Route::group(['prefix' => 'my-library'], function () { + Route::any('/videos', 'Peertube\Mylibrary\Videos@index'); + Route::any('/video-playlists', 'Peertube\Mylibrary\Videoplaylists@index'); + + Route::group(['prefix' => 'history'], function () { + Route::any('/videos', 'Peertube\Mylibrary\History\Videos@index'); + }); + }); + + Route::group(['prefix' => 'videos'], function () { + Route::any('/subscriptions', 'Peertube\Videos\Subscriptions@index'); + Route::any('/overview', 'Peertube\Videos\Overview@index'); + Route::any('/trending', 'Peertube\Videos\Trending@index'); + Route::any('/recently-added', 'Peertube\Videos\Recentlyadded@index'); + Route::any('/local', 'Peertube\Videos\Local@index'); + Route::any('/upload', 'Peertube\Videos\Upload@index'); + }); });