Skip to content

Commit 3f59475

Browse files
committed
✨ ajout du badge sponsor
1 parent ba03167 commit 3f59475

File tree

3 files changed

+32
-23
lines changed

3 files changed

+32
-23
lines changed

resources/views/articles/show.blade.php

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,16 @@
9393
<div class="lg:col-span-5">
9494
<header class="space-y-4">
9595
<div class="sm:flex sm:items-center sm:flex-row sm:justify-between">
96-
@if ($article->tags->isNotEmpty())
97-
<div class="flex items-center space-x-2">
98-
@foreach ($article->tags as $tag)
99-
<x-tag :tag="$tag" />
100-
@endforeach
101-
</div>
102-
@endif
96+
<div class="flex items-center space-x-3">
97+
@if ($article->tags->isNotEmpty())
98+
<div class="flex items-center space-x-2">
99+
@foreach ($article->tags as $tag)
100+
<x-tag :tag="$tag" />
101+
@endforeach
102+
</div>
103+
@endif
104+
<x-articles.sponsored :isSponsored="$article->isSponsored()" />
105+
</div>
103106

104107
<div class="mt-2 flex space-x-1 text-sm text-skin-base sm:mt-0">
105108
<time datetime="{{ $article->createdAt()->format('Y-m-d') }}">{{ $article->createdAt()->format('j M, Y') }}</time>

resources/views/components/articles/card.blade.php

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<img class="object-cover shadow-lg rounded-lg group-hover:opacity-75" src="{{ $article->getFirstMediaUrl('media') }}" alt="{{ $article->title }}" />
77
</div>
88
</a>
9-
<div>
9+
<div class="space-y-4">
1010
<div>
1111
<time datetime="{{ $article->created_at->format('Y-m-d') }}" class="font-sans text-sm leading-5 text-skin-base capitalize">
1212
{{ $article->created_at->isoFormat('LL') }}
@@ -19,12 +19,15 @@
1919
{!! $article->excerpt(150) !!}
2020
</p>
2121
</div>
22-
@if ($article->tags->isNotEmpty())
23-
<div class="mt-4 flex items-center space-x-2">
24-
@foreach ($article->tags as $tag)
25-
<x-tag :tag="$tag" />
26-
@endforeach
27-
</div>
28-
@endif
22+
<div class="flex items-center space-x-3">
23+
@if ($article->tags->isNotEmpty())
24+
<div class="flex items-center space-x-2">
25+
@foreach ($article->tags as $tag)
26+
<x-tag :tag="$tag" />
27+
@endforeach
28+
</div>
29+
@endif
30+
<x-articles.sponsored :isSponsored="$article->isSponsored()" />
31+
</div>
2932
</div>
3033
</div>

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

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<img class="object-cover shadow-lg rounded-lg group-hover:opacity-75" src="{{ $article->getFirstMediaUrl('media') }}" alt="{{ $article->title }}" />
77
</div>
88
</a>
9-
<div class="sm:col-span-2">
9+
<div class="sm:col-span-2 space-y-2">
1010
<div>
1111
<time datetime="{{ $article->created_at->format('Y-m-d') }}" class="font-sans text-sm leading-5 text-skin-base capitalize">
1212
{{ $article->created_at->isoFormat('LL') }}
@@ -18,12 +18,15 @@
1818
{!! $article->excerpt() !!}
1919
</p>
2020
</div>
21-
@if ($article->tags->isNotEmpty())
22-
<div class="mt-2 flex items-center space-x-2">
23-
@foreach ($article->tags as $tag)
24-
<x-tag :tag="$tag" />
25-
@endforeach
26-
</div>
27-
@endif
21+
<div class="flex items-center space-x-3">
22+
@if ($article->tags->isNotEmpty())
23+
<div class="flex items-center space-x-2">
24+
@foreach ($article->tags as $tag)
25+
<x-tag :tag="$tag" />
26+
@endforeach
27+
</div>
28+
@endif
29+
<x-articles.sponsored :isSponsored="$article->isSponsored()" />
30+
</div>
2831
</div>
2932
</div>

0 commit comments

Comments
 (0)