26 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
{{- /*
 | 
						|
For a given taxonomy, renders a list of terms assigned to the page.
 | 
						|
 | 
						|
@context {page} page The current page.
 | 
						|
@context {string} taxonomy The taxonomy.
 | 
						|
 | 
						|
@example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
 | 
						|
*/}}
 | 
						|
 | 
						|
{{- $page := .page }}
 | 
						|
{{- $taxonomy := .taxonomy }}
 | 
						|
 | 
						|
{{- with $page.GetTerms $taxonomy }}
 | 
						|
  {{- $label := (index . 0).Parent.LinkTitle }}
 | 
						|
  <div class="tags">
 | 
						|
    <ul>
 | 
						|
      {{- range . }}
 | 
						|
        <li>
 | 
						|
          <svg  xmlns="http://www.w3.org/2000/svg"  width="24"  height="24"  viewBox="0 0 24 24"  fill="none"  stroke="currentColor"  stroke-width="1.5"  stroke-linecap="round"  stroke-linejoin="round"  class="icon icon-tabler icons-tabler-outline icon-tabler-tag"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M7.5 7.5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3z" /></svg>
 | 
						|
          <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
 | 
						|
        </li>
 | 
						|
      {{- end }}
 | 
						|
    </ul>
 | 
						|
  </div>
 | 
						|
{{- end }}
 |