@include(snippets/header)
<div id="main">
  <div class="container">
    <h3 style="text-align: center;">☯</h3>
    <div class="tags-grid">
      @if(session)
      @each(toptags_regged as toptag)
      <a href="/tag/{!! toptag.tag !!}" class="tag-card">
        <div class="tag-card-image">
          <img src="/tag_image/{!! toptag.tag !!}" loading="lazy" alt="{!! toptag.tag !!}">
        </div>
        <div class="tag-card-content">
          <span class="tag-name">#{!! toptag.tag !!}</span>
          <span class="tag-count">{{ toptag.total_items }} posts</span>
        </div>
      </a>
      @endeach
      @else
      @each(toptags as toptag)
      <a href="/tag/{!! toptag.tag !!}" class="tag-card">
        <div class="tag-card-image">
          <img src="/tag_image/{!! toptag.tag !!}" loading="lazy" alt="{!! toptag.tag !!}">
        </div>
        <div class="tag-card-content">
          <span class="tag-name">#{!! toptag.tag !!}</span>
          <span class="tag-count">{{ toptag.total_items }} posts</span>
        </div>
      </a>
      @endeach
      @endif
    </div>
  </div>
</div>
@include(snippets/footer)