Skip to content

Commit 97fd357

Browse files
joedixondriesvints
andauthored
Show pinned articles (#546)
* Show pinned articles * Update show-articles.blade.php Co-authored-by: Dries Vints <dries.vints@gmail.com>
1 parent b14fddf commit 97fd357

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

resources/views/livewire/show-articles.blade.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
@foreach($articles as $article)
88
<div class="pb-8 mb-8 border-b-2">
99
<div>
10-
@foreach($article->tags() as $tag)
10+
@foreach ($article->tags() as $tag)
1111
<button class="inline-block focus:outline-none rounded-full {{ $tag->slug() === $selectedTag ? 'bg-green-primary text-white shadow-outline-green' : 'bg-green-light text-green-primary' }}" wire:click="toggleTag('{{ $tag->slug() }}')">
1212
<span class="inline-flex items-center px-3 py-0.5 rounded-full text-sm font-medium leading-5">
1313
{{ $tag->name() }}
@@ -16,9 +16,15 @@
1616
@endforeach
1717
</div>
1818
<a href="{{ route('articles.show', $article->slug()) }}" class="block">
19-
<h3 class="mt-4 text-xl leading-7 font-semibold text-gray-900">
20-
{{ $article->title() }}
21-
</h3>
19+
<span class="mt-4 flex items-center">
20+
@if ($article->isPinned())
21+
<x-zondicon-pin class="w-5 h-5 text-green-primary mr-2"/>
22+
@endif
23+
24+
<h3 class="text-xl leading-7 font-semibold text-gray-900">
25+
{{ $article->title() }}
26+
</h3>
27+
</span>
2228
<p class="mt-3 text-base leading-6 text-gray-500">
2329
{{ $article->excerpt() }}
2430
</p>

0 commit comments

Comments
 (0)