1
0
Fork 0
mirror of https://github.com/archtechx/laravel-tips.git synced 2025-12-12 13:24:03 +00:00
laravel-tips/resources/views/components/feed.blade.php
2021-04-06 18:27:18 +02:00

23 lines
824 B
PHP

@props([
'tips',
])
<section role="feed" class="my-8">
@foreach($tips as $tip)
<article class="border-b-2 border-gray-200 py-16" x-data @click="window.location.href = '{{ route('tip.show', $tip) }}'">
<h1 class="text-3xl font-medium">
<a href="{{ route('tip.show', $tip) }}">🔥 {{ $tip->title }}</a>
</h1>
<div class="mt-4 flex justify-center w-1/2 gap-1 flex-wrap mx-auto">
@foreach($tip->images() as $image)
<img alt="{{ $tip->title }}" src="{{ $image->small() }}">
@endforeach
</div>
<section role="article" class="mt-8 text-xl prose mx-auto">
@markdown{!! $tip->content !!}@endmarkdown
</section>
</article>
@endforeach
</section>