Render likes using templates
This commit is contained in:
parent
acbb958475
commit
bcb9998504
4 changed files with 28 additions and 43 deletions
|
@ -17,7 +17,7 @@
|
||||||
@include('templates.article', ['article' => $item])
|
@include('templates.article', ['article' => $item])
|
||||||
@break
|
@break
|
||||||
@case($item instanceof \App\Models\Like)
|
@case($item instanceof \App\Models\Like)
|
||||||
<p>This is a like</p>
|
@include('templates.like', ['like' => $item])
|
||||||
@break
|
@break
|
||||||
@case($item instanceof \App\Models\Bookmark)
|
@case($item instanceof \App\Models\Bookmark)
|
||||||
<p>This is a bookmark</p>
|
<p>This is a bookmark</p>
|
||||||
|
|
|
@ -3,27 +3,9 @@
|
||||||
@section('title')Likes « @stop
|
@section('title')Likes « @stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="h-feed">
|
<div class="h-feed">
|
||||||
@foreach($likes as $like)
|
@foreach($likes as $like)
|
||||||
<div class="h-entry">
|
@include('templates.like', ['like' => $like])
|
||||||
<div class="h-cite u-like-of">
|
@endforeach
|
||||||
Liked <a class="u-url" href="{{ $like->url }}">a post</a>
|
</div>
|
||||||
@isset($like->author_name)
|
|
||||||
by <span class="p-author h-card">
|
|
||||||
@isset($like->author_url)
|
|
||||||
<a class="u-url p-name" href="{{ $like->author_url }}">{{ $like->author_name }}</a>
|
|
||||||
@else
|
|
||||||
<span class="p-name">{{ $like->author_name }}</span>
|
|
||||||
@endisset
|
|
||||||
</span>
|
|
||||||
@endisset
|
|
||||||
@isset($like->content)
|
|
||||||
<blockquote class="e-content">
|
|
||||||
{!! $like->content !!}
|
|
||||||
</blockquote>
|
|
||||||
@endisset
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endforeach
|
|
||||||
</div>
|
|
||||||
@stop
|
@stop
|
||||||
|
|
|
@ -3,24 +3,8 @@
|
||||||
@section('title')Like « @stop
|
@section('title')Like « @stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="h-entry top-space">
|
@include('templates.like', ['like' => $like])
|
||||||
<div class="h-cite u-like-of">
|
|
||||||
Liked <a class="u-url" href="{{ $like->url }}">a post</a>
|
|
||||||
@isset($like->author_name)
|
|
||||||
by <span class="p-author h-card">
|
|
||||||
@isset($like->author_url)
|
|
||||||
<a class="u-url p-name" href="{{ $like->author_url }}">{{ $like->author_name }}</a>
|
|
||||||
@else
|
|
||||||
<span class="p-name">{{ $like->author_name }}</span>
|
|
||||||
@endisset
|
|
||||||
</span>
|
|
||||||
@endisset
|
|
||||||
<blockquote class="e-content">
|
|
||||||
{!! $like->content !!}
|
|
||||||
</blockquote>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- POSSE to Twitter -->
|
<!-- POSSE to Twitter -->
|
||||||
<a href="https://brid.gy/publish/twitter"></a>
|
<a href="https://brid.gy/publish/twitter"></a>
|
||||||
@stop
|
@stop
|
||||||
|
|
19
resources/views/templates/like.blade.php
Normal file
19
resources/views/templates/like.blade.php
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
<div class="h-entry">
|
||||||
|
<div class="h-cite u-like-of">
|
||||||
|
Liked <a class="u-url" href="{{ $like->url }}">a post</a>
|
||||||
|
@isset($like->author_name)
|
||||||
|
by <span class="p-author h-card">
|
||||||
|
@isset($like->author_url)
|
||||||
|
<a class="u-url p-name" href="{{ $like->author_url }}">{{ $like->author_name }}</a>
|
||||||
|
@else
|
||||||
|
<span class="p-name">{{ $like->author_name }}</span>
|
||||||
|
@endisset
|
||||||
|
</span>
|
||||||
|
@endisset
|
||||||
|
@isset($like->content)
|
||||||
|
<blockquote class="e-content">
|
||||||
|
{!! $like->content !!}
|
||||||
|
</blockquote>
|
||||||
|
@endisset
|
||||||
|
</div>
|
||||||
|
</div>
|
Loading…
Add table
Reference in a new issue