65 行
2.6 KiB
PHP
65 行
2.6 KiB
PHP
<?php
|
|
$name = '';
|
|
$url = '/'.$res['page'];
|
|
$image = '';
|
|
|
|
if (isset($res['page'])) {
|
|
if ($res['page'] == 'watch') {
|
|
$name = $res['detail']->name;
|
|
$url = '/w/'.$res['detail']->shortUUID;
|
|
$image = $res['detail']->previewPath;
|
|
}
|
|
else if ($res['page'] == 'account') {
|
|
$name = $res['owner']->displayName.'さんのチャンネル一覧';
|
|
$url = '/a/'.$res['owner']->name;
|
|
$image = ptAvatar($res['owner']);
|
|
}
|
|
else if ($res['page'] == 'channel') {
|
|
$name = $res['channel']->displayName.'さんのチャンネル';
|
|
$url = '/c/'.$res['channel']->name;
|
|
$image = ptAvatar($res['channel']);
|
|
}
|
|
else if ($res['page'] == 'home') $name = 'トップページ';
|
|
else if ($res['page'] == 'overview') {
|
|
$name = 'ディスカバー';
|
|
$url = '/videos/'.$res['page'];
|
|
}
|
|
else if ($res['page'] == 'trending') {
|
|
$name = 'トレンド';
|
|
$url = '/videos/'.$res['page'];
|
|
}
|
|
else if ($res['page'] == 'recently-added') {
|
|
$name = '最近投稿された動画';
|
|
$url = '/videos/'.$res['page'];
|
|
}
|
|
else if ($res['page'] == 'local') $name = 'ローカル動画';
|
|
else if ($res['page'] == 'about') $name = 'このアプリについて';
|
|
else if ($res['page'] == 'notification') {
|
|
$name = '通知';
|
|
$url = '/my-account/'.$res['page'].'s';
|
|
}
|
|
}
|
|
?>
|
|
|
|
<meta property="og:type" content="video" />
|
|
<meta property="og:site_name" content="{{ $res['userinfo']['config']->instance->name }}" />
|
|
<meta property="og:title" content="{{ $name }}" />
|
|
<meta property="og:image" content="{{ env('PEER_URI').$image }}" />
|
|
<meta property="og:url" content="{{ env('APP_URL').$url }}" />
|
|
<meta property="og:description" content="" />
|
|
@if ($res['page'] == 'watch')
|
|
<meta property="og:video:url" content="{{ env('PEER_URI') }}/videos/embed/{{ $res['detail']->uuid }}" />
|
|
<meta property="og:video:secure_url" content="{{ env('PEER_URI') }}/videos/embed/{{ $res['detail']->uuid }}" />
|
|
<meta property="og:video:type" content="text/html" />
|
|
<meta property="og:video:width" content="560" />
|
|
<meta property="og:video:height" content="315" />
|
|
@endif
|
|
<meta property="name" content="{{ $name }}" />
|
|
<meta property="description" content="" />
|
|
<meta property="image" content="{{ env('PEER_URI').$image }}" />
|
|
<meta property="twitter:card" content="summary_large_image" />
|
|
<meta property="twitter:site" content="@TechnicalSuwako" />
|
|
<meta property="twitter:title" content="{{ $name }}" />
|
|
<meta property="twitter:description" content="{{ $res['userinfo']['config']->instance->shortDescription }}" />
|
|
<meta property="twitter:image" content="{{ env('PEER_URI').$image }}" />
|