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)
|
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;
|
padding: 0;
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Adjusted", "Segoe UI", "Liberation Sans", sans-serif;
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Adjusted", "Segoe UI", "Liberation Sans", sans-serif;
|
||||||
background-color: #335C67;
|
background-color: #335C67;
|
||||||
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
@import 'components/bookmark';
|
@import 'components/bookmark';
|
||||||
|
@ -9,6 +9,8 @@
|
|||||||
"date tags"
|
"date tags"
|
||||||
"actions actions";
|
"actions actions";
|
||||||
|
|
||||||
|
color: #000;
|
||||||
|
|
||||||
form & {
|
form & {
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"title"
|
"title"
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
@extends('layouts.app')
|
@extends('layouts.app')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
<h2>Tag: {{ $tag->name }} ({{ $tag_count }})</h2>
|
||||||
<div>
|
<div>
|
||||||
@foreach ($tag->bookmarks as $bookmark)
|
@foreach ($tag->bookmarks as $bookmark)
|
||||||
<x-bookmark :bookmark="$bookmark" />
|
<x-bookmark :bookmark="$bookmark" />
|
||||||
|
Loading…
Reference in New Issue
Block a user