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