Show tag header and count
This commit is contained in:
parent
8874e011f9
commit
e84a55bd9a
@ -36,7 +36,12 @@ class TagController extends Controller
|
||||
*/
|
||||
public function show(Tag $tag)
|
||||
{
|
||||
return view('tag.show', [ 'tag' => $tag, ]);
|
||||
return view(
|
||||
'tag.show', [
|
||||
'tag' => $tag->load('bookmarks'),
|
||||
'tag_count' => $tag->bookmarks()->count(),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -12,6 +12,7 @@ body {
|
||||
padding: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Adjusted", "Segoe UI", "Liberation Sans", sans-serif;
|
||||
background-color: #335C67;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
@import 'components/bookmark';
|
||||
|
@ -9,6 +9,8 @@
|
||||
"date tags"
|
||||
"actions actions";
|
||||
|
||||
color: #000;
|
||||
|
||||
form & {
|
||||
grid-template-areas:
|
||||
"title"
|
||||
|
@ -1,6 +1,7 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<h2>Tag: {{ $tag->name }} ({{ $tag_count }})</h2>
|
||||
<div>
|
||||
@foreach ($tag->bookmarks as $bookmark)
|
||||
<x-bookmark :bookmark="$bookmark" />
|
||||
|
Loading…
Reference in New Issue
Block a user