{{- define "main" }}

{{- if .Title }}
<header class="page-header">
  <h1>{{ .Title }}</h1>
  {{- if .Description }}
  <div class="post-description">
    {{ .Description }}
  </div>
  {{- end }}
  {{ if eq .Title "Tags" }}
  <div class="ai-project-link">
    <a href="{{ "/projects/" | relLangURL }}" class="ai-project-button">
      🤖 探索AI开源项目学习笔记
    </a>
  </div>
  {{ end }}
</header>
{{- end }}

<ul class="terms-tags">
  {{- $type := .Type }}
  {{- range $key, $value := .Data.Terms.Alphabetical }}
  {{- $name := .Name }}
  {{- $count := .Count }}
  {{- with site.GetPage (printf "/%s/%s" $type $name) }}
  <li>
    <a href="{{ .Permalink }}">{{ .Name }} <sup><strong><sup>{{ $count }}</sup></strong></sup> </a>
  </li>
  {{- end }}
  {{- end }}
</ul>

{{- end }}{{/* end main */}} 
