category.blade.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. @extends('blog.layouts.app')
  2. @section('title', $user["nickName"])
  3. @section('content')
  4. <header>
  5. <h3 class="section-title">Categories</h3>
  6. <div class="section-card">
  7. <div class="section-details">
  8. <h3 class="section-count">{{ $count }} page</h3>
  9. <h1 class="section-term">
  10. @foreach ($current as $category)
  11. /<a href="{{ route('blog.category', ['user' => $user['userName'],'category1' => $category['id'],]) }}">
  12. {{ $category['label'] }}
  13. </a>
  14. @endforeach
  15. </h1>
  16. <section class="widget tagCloud">
  17. <div class="tagCloud-tags">
  18. @foreach($tagOptions as $id => $tag)
  19. @if($tag['count'] < $count)
  20. <a href="{{ rtrim(url()->current(), '/') . '/' . $tag['tag']->name }}">{{ $tag['tag']->name }}({{ $tag['count'] }})</a>
  21. @endif
  22. @endforeach
  23. </div>
  24. </section>
  25. </div>
  26. </div>
  27. </header>
  28. <section class="article-list--compact">
  29. @foreach ($posts as $post)
  30. <article>
  31. <a href="{{ route('library.book.read', $post['uid']) }}">
  32. <div class="article-details">
  33. <h2 class="article-title">{{ $post->title }}</h2>
  34. <footer class="article-time">
  35. <time datetime="2022-03-06T00:00:00Z">{{ $post->formatted_updated_at }}</time>
  36. </footer>
  37. </div>
  38. <div class="article-image">
  39. <img
  40. src="./Category_ Example Category - Hugo Theme Stack Starter_files/cover_hu6307248181568134095.jpg"
  41. width="120"
  42. height="120"
  43. alt="Hello World"
  44. loading="lazy" />
  45. </div>
  46. </a>
  47. </article>
  48. @endforeach
  49. </section>
  50. @endsection