taxonomies.html 893 B

1234567891011121314151617181920212223242526272829
  1. <section>
  2. {{ range $taxonomyname, $taxonomy := .Site.Taxonomies }}
  3. {{ if gt (len $taxonomy) 0 }}
  4. {{ if eq $taxonomyname "tags" }}
  5. <h3 class="post-block-title my-4">
  6. <span>標籤</span>
  7. </h3>
  8. {{ else }}
  9. <h3 class="post-block-title my-4">
  10. <span>分類</span>
  11. </h3>
  12. {{ end }}
  13. <p>
  14. {{ range $name, $value := $taxonomy }}
  15. <a class="btn btn-small badge tags" href="{{ printf $taxonomyname | relLangURL }}/{{ $name | urlize }}/">
  16. <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-tag-fill"
  17. viewBox="0 0 16 16">
  18. <path
  19. d="M2 1a1 1 0 0 0-1 1v4.586a1 1 0 0 0 .293.707l7 7a1 1 0 0 0 1.414 0l4.586-4.586a1 1 0 0 0 0-1.414l-7-7A1 1 0 0 0 6.586 1H2zm4 3.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z" />
  20. </svg>
  21. {{ $name }}
  22. </a>
  23. {{ end }}
  24. </p>
  25. {{ end }}
  26. {{ end }}
  27. </section>