Skip to content

Commit 6c6fd43

Browse files
committed
verified badge component
1 parent b608539 commit 6c6fd43

File tree

6 files changed

+11
-19
lines changed

6 files changed

+11
-19
lines changed

resources/views/articles/overview.blade.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,7 @@
161161
</a>
162162

163163
@if ($author->isVerifiedAuthor())
164-
<span title="This is a verified author">
165-
@svg('heroicon-s-check-badge', 'w-5 h-5 text-lio-500')
166-
</span>
164+
<x-badges.verified />
167165
@endif
168166
</span>
169167

resources/views/articles/show.blade.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,7 @@ class="w-full bg-center bg-gray-800"
7777
</a>
7878

7979
@if ($article->author()->isVerifiedAuthor())
80-
<span title="This is a verified author">
81-
@svg('heroicon-o-check-badge', 'w-5 h-5 text-white')
82-
</span>
80+
<x-badges.verified type="o" color="text-white" />
8381
@endif
8482
</div>
8583

@@ -161,9 +159,7 @@ class="prose prose-lg text-gray-800 prose-lio"
161159
</a>
162160

163161
@if ($article->author()->isVerifiedAuthor())
164-
<span title="This is a verified author">
165-
@svg('heroicon-s-check-badge', 'w-6 h-6 text-lio-500')
166-
</span>
162+
<x-badges.verified color="text-lio-500" />
167163
@endif
168164
</span>
169165

resources/views/components/articles/overview-summary.blade.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@
2828
</a>
2929

3030
@if ($article->author()->isVerifiedAuthor())
31-
<span title="This is a verified author">
32-
@svg('heroicon-s-check-badge', 'w-5 h-5 text-lio-500')
33-
</span>
31+
<x-badges.verified />
3432
@endif
3533
</div>
3634

resources/views/components/articles/user-summary.blade.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@
2323
<span class="text-gray-900">{{ $article->author()->username() }}</span>
2424

2525
@if ($article->author()->isVerifiedAuthor())
26-
<span title="This is a verified author">
27-
@svg('heroicon-s-check-badge', 'w-5 h-5 text-lio-500')
28-
</span>
26+
<x-badges.verified />
2927
@endif
3028
</div>
3129

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@props(['type' => 's', 'color' => 'text-lio-500'])
2+
3+
<span title="This is a verified author">
4+
@svg("heroicon-$type-check-badge", "w-5 h-5 $color")
5+
</span>

resources/views/users/profile.blade.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,8 @@ class="w-full bg-center bg-gray-800 h-60 container mx-auto"
2525
<span class="border border-lio-500 text-lio-500 rounded-sm px-3 py-1">
2626
{{ $user->isAdmin() ? 'Admin' : 'Moderator' }}
2727
</span>
28-
2928
@elseif ($user->isVerifiedAuthor())
30-
<span title="This is a verified author">
31-
@svg('heroicon-s-check-badge', 'w-5 h-5 text-lio-500')
32-
</span>
29+
<x-badges.verified />
3330
@endif
3431
</div>
3532

0 commit comments

Comments
 (0)