1
0
Fork 0
mirror of https://github.com/archtechx/laravel-tips.git synced 2025-12-12 05:14:04 +00:00

livewire thread

This commit is contained in:
Samuel Štancl 2021-04-09 18:47:19 +02:00
parent a60370fbc9
commit 57ab16675e
18 changed files with 244 additions and 25 deletions

View file

@ -1,4 +1,7 @@
@props(['tip'])
@props([
'tip',
'links' => [],
])
<div class="flex w-full p-6 space-x-6 bg-gray-50 rounded-2xl">
<a href="{{ $tip->author->profile_url }}" target="_blank">
@ -23,15 +26,30 @@
</div>
@endif
<div>
<dt class="text-sm text-gray-500">Tweet</dt>
@if($tip->tweet_id)
<div>
<dt class="text-sm text-gray-500">Tweet</dt>
<dd>
<x-link href="{{ $tip->tweet_url }}" target="_blank">
twitter.com/...
</x-link>
</dd>
</div>
@endif
<dd>
<x-link href="{{ $tip->tweet_url }}" target="_blank">
twitter.com/...
</x-link>
</dd>
</div>
@if($links)
<div>
<dt class="text-sm text-gray-500">Links</dt>
<dd>
@foreach($links as $link)
<x-link href="{{ $link['url'] }}" target="_blank">
{{ ucfirst($link['name']) }}
</x-link>
@endforeach
</dd>
</div>
@endif
</dl>
</aside>
</div>

View file

@ -1,4 +1,4 @@
<x:layout :title="$thread->title">
<x:layout :title="$thread->title" :preview="$thread->title">
<header class="relative py-24">
<div
class="absolute w-full transform skew-y-12 pointer-events-none h-72 md:h-96 -translate-y-1/4 bg-gradient-to-br from-yellow-300 to-pink-400 mix-blend-multiply">
@ -24,7 +24,7 @@
<section class="py-12 bg-white md:py-24">
<x:container>
<x:author-card :tip="$thread" />
<x:author-card :tip="$thread" :links="$thread->links" />
</x:container>
</section>
</main>