最新投稿された動画

このコミットが含まれているのは:
テクニカル諏訪子 2021-02-06 13:06:08 +09:00
コミット cfdd647a67
6個のファイルの変更64行の追加25行の削除

ファイルの表示

@ -21,8 +21,9 @@ class Game {
public function index () {
$res = DB::table('vid_game')->get();
if (!$res) return notfound($this->menu, $this->user, $res);
$new = DB::table('vid_video')->orderBy('publish_date', 'desc')->limit(8)->get();
return view('pages.site.video.game', ['res' => $res, 'menu' => $this->menu, 'user' => $this->user, 'err' => $this->err, 'suc' => $this->suc]);
return view('pages.site.video.game', ['res' => $res, 'new' => $new, 'menu' => $this->menu, 'user' => $this->user, 'err' => $this->err, 'suc' => $this->suc]);
}
public function add (Request $r) {

ファイルの表示

@ -81,3 +81,21 @@
background-color: $ng6;
border-bottom: solid 2px $ng5;
}
.kero-section {
width: 100%;
font-size: 150%;
font-weight: bolder;
text-align: center;
padding: 4px;
margin: 8px 0;
background: linear-gradient(to bottom, $suwa03 0%, $evil4 34%, $suwa02 100%);
color: $white1;
border-bottom-color: $suwa00;
border-right-color: $suwa00;
border-bottom-color: $suwa00;
border-right-color: $suwa00;
border-width: 1px;
border-radius: 25px;
cursor: default;
}

ファイルの表示

@ -58,4 +58,4 @@ a:hover { color: $suwa03; }
// .head > div { margin: 5px 0; }
// .new-head, .new-body { padding: 10px; }
// .new-head { border: 2px solid $suwa03; background-color: $suwa10; }
// .new-body { border-bottom: 2px solid $suwa03; border-left: 2px solid $suwa03; border-right: 2px solid $suwa03; }
// .new-body { border-bottom: 2px solid $suwa03; border-left: 2px solid $suwa03; border-right: 2px solid $suwa03; }

ファイルの表示

@ -8,29 +8,8 @@
<a href="/video/game/add" class="btn btn-block btn-success">追加</a>
<hr />
@endif
<div class="table-responsive">
<table class="table table-hover table-dark">
<thead>
<tr>
<th scope="col" width="70%">ゲーム名</th>
@if (isset($user->perm) && ($user->perm['blg_editpost'] || $user->perm['blg_delpost']))
<th scope="col"></th>
<th scope="col"></th>
@endif
</tr>
</thead>
@foreach ($res as $k => $r)
<tr>
<td scope="row"><a href="/video/{{ $r->slug }}">{{ $r->name }}</a></td>
@if (isset($user->perm) && ($user->perm['blg_editpost'] || $user->perm['blg_delpost']))
<td scope="row"><a href="/video/game/{{$r->slug}}/edit" class="btn btn-block btn-warning">編集</a></td>
<td scope="row"><delete-game slug="{{ $r->slug }}" /></td>
@endif
</tr>
@endforeach
</table>
</div>
</ul>
@include('pages.site.video.game.newest')
@include('pages.site.video.game.all')
</div>
</div>

ファイルの表示

@ -0,0 +1,27 @@
<div class="row">
<div class="col">
<div class="kero-section">動画一覧</div>
</div>
</div>
<div class="table-responsive">
<table class="table table-hover table-dark">
<thead>
<tr>
<th scope="col" width="70%">ゲーム名</th>
@if (isset($user->perm) && ($user->perm['blg_editpost'] || $user->perm['blg_delpost']))
<th scope="col"></th>
<th scope="col"></th>
@endif
</tr>
</thead>
@foreach ($res as $k => $r)
<tr>
<td scope="row"><a href="/video/{{ $r->slug }}">{{ $r->name }}</a></td>
@if (isset($user->perm) && ($user->perm['blg_editpost'] || $user->perm['blg_delpost']))
<td scope="row"><a href="/video/game/{{$r->slug}}/edit" class="btn btn-block btn-warning">編集</a></td>
<td scope="row"><delete-game slug="{{ $r->slug }}" /></td>
@endif
</tr>
@endforeach
</table>
</div>

ファイルの表示

@ -0,0 +1,14 @@
<div class="row">
<div class="col">
<div class="kero-section">最新投稿された動画</div>
</div>
</div>
<div class="row">
@foreach ($new as $n)
<div class="col-3">
<div class="thumb"><a href="/video/play/{{ $n->vid }}"><img width="170" height="96" src="{{ ($n->thumbnail ?: '/img/noicon.jpg') }}" alt="{{ $n->title }}" /></a></div>
<div class="title" style="font-size: 90%;"><a href="/video/play/{{ $n->vid }}">{{ $n->title }}</a></div>
<div class="videodate" style="font-size: 60%; color: #bdc3c7;">{{ date('Y年m月d日 H:i:s', $n->publish_date) }}</div>
</div>
@endforeach
</div>