{{define "content"}}
<section class="hero">
  <p class="eyebrow">{{.Eyebrow}}</p>
  <h1>{{.Heading}}</h1>
  <p class="lede">{{.Description}}</p>
</section>

<section class="toolbar">
  <a class="button" href="/admin/tags/new">Create tag</a>
</section>

{{if .Tags}}
<section class="resource-grid">
  {{range .Tags}}
  <article class="resource-card">
    <div class="resource-header">
      <div>
        <h2><a href="/admin/tags/{{.Tag.ID}}">{{.Tag.Name}}</a></h2>
        <p class="resource-slug">{{.Tag.Slug}}</p>
      </div>
      <span class="pill pill-soft">{{.ProjectCount}} projects</span>
    </div>

    <p class="resource-description">{{if .Tag.Description}}{{.Tag.Description}}{{else}}No description yet.{{end}}</p>
    <p class="meta-line"><strong>Updated:</strong> {{.Tag.UpdatedAt.Format "2006-01-02 15:04 UTC"}}</p>
    <a class="text-link" href="/admin/tags/{{.Tag.ID}}">Open tag</a>
  </article>
  {{end}}
</section>
{{else}}
<section class="empty-state">
  <h2>No tags yet</h2>
  <p>Create the first tag so projects can be grouped from day one.</p>
</section>
{{end}}
{{end}}
