お知らせがpinnedの場合ピン留めの表示をする (#58)
This commit is contained in:
parent
85e9599654
commit
7337f60491
@ -31,6 +31,9 @@
|
||||
<div class="list-group list-group-flush">
|
||||
@foreach($informations as $info)
|
||||
<a class="list-group-item" href="{{ route('info.show', ['id' => $info->id]) }}">
|
||||
@if ($info->pinned)
|
||||
<span class="badge badge-secondary"><span class="oi oi-pin"></span>ピン留め</span>
|
||||
@endif
|
||||
<span class="badge {{ $categories[$info->category]['class'] }}">{{ $categories[$info->category]['label'] }}</span> {{ $info->title }} <small class="text-secondary">- {{ $info->created_at->format('n月j日') }}</small>
|
||||
</a>
|
||||
@endforeach
|
||||
|
@ -34,6 +34,9 @@
|
||||
<div class="list-group list-group-flush">
|
||||
@foreach($informations as $info)
|
||||
<a class="list-group-item" href="{{ route('info.show', ['id' => $info->id]) }}">
|
||||
@if ($info->pinned)
|
||||
<span class="badge badge-secondary"><span class="oi oi-pin"></span>ピン留め</span>
|
||||
@endif
|
||||
<span class="badge {{ $categories[$info->category]['class'] }}">{{ $categories[$info->category]['label'] }}</span> {{ $info->title }} <small class="text-secondary">- {{ $info->created_at->format('n月j日') }}</small>
|
||||
</a>
|
||||
@endforeach
|
||||
|
@ -9,6 +9,9 @@
|
||||
<div class="list-group">
|
||||
@foreach($informations as $info)
|
||||
<a class="list-group-item border-bottom-only pt-3 pb-3" href="{{ route('info.show', ['id' => $info->id]) }}">
|
||||
@if ($info->pinned)
|
||||
<span class="badge badge-secondary"><span class="oi oi-pin"></span>ピン留め</span>
|
||||
@endif
|
||||
<span class="badge {{ $categories[$info->category]['class'] }}">{{ $categories[$info->category]['label'] }}</span> {{ $info->title }} <small class="text-secondary">- {{ $info->created_at->format('n月j日') }}</small>
|
||||
</a>
|
||||
@endforeach
|
||||
|
@ -11,7 +11,12 @@
|
||||
</ol>
|
||||
</nav>
|
||||
<h2><span class="badge {{ $category['class'] }}">{{ $category['label'] }}</span> {{ $info->title }}</h2>
|
||||
<p class="text-secondary"><span class="oi oi-calendar"></span> {{ $info->created_at->format('Y年n月j日') }}</p>
|
||||
<p class="text-secondary">
|
||||
@if ($info->pinned)
|
||||
<span class="badge badge-secondary"><span class="oi oi-pin"></span>ピン留め</span>
|
||||
@endif
|
||||
<span class="oi oi-calendar"></span> {{ $info->created_at->format('Y年n月j日') }}
|
||||
</p>
|
||||
@parsedown($info->content)
|
||||
</div>
|
||||
@endsection
|
Loading…
Reference in New Issue
Block a user