81 lines
		
	
	
		
			3.0 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			81 lines
		
	
	
		
			3.0 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| {{ $params := . }}
 | |
| 
 | |
| {{ $fullpages := false }}
 | |
| {{ $page := . }}
 | |
| 
 | |
| {{ if reflect.IsMap $params }}
 | |
|     {{ $fullpages = $params.fullpages }}
 | |
|     {{ $page = $params.page }}
 | |
| {{ end }}
 | |
| 
 | |
| {{ $authors := partial "paige/authors.html" $page }}
 | |
| {{ $categories := $page.Params.categories | default slice | uniq }}
 | |
| {{ $commiturl := "" }}
 | |
| {{ $date := cond (eq ($page.Param "paige.date.source" | default "published") "published") $page.PublishDate $page.Lastmod }}
 | |
| {{ $dateformat := $page.Param "paige.date.format" | default ":date_long" }}
 | |
| {{ $description := $page.Description | markdownify }}
 | |
| {{ $nogap := "mb-0" }}
 | |
| {{ $readingtime := $page.ReadingTime }}
 | |
| {{ $tags := $page.Params.tags | default slice | uniq }}
 | |
| {{ $title := $page.Title | markdownify }}
 | |
| {{ $titlelink := $page.Params.link }}
 | |
| {{ $titlepage := $page.RelPermalink }}
 | |
| 
 | |
| {{ if and ($page.Param "paige.git.commit_url_prefix") $page.GitInfo }}
 | |
|     {{ $commiturl = print ($page.Param "paige.git.commit_url_prefix") $page.GitInfo.Hash }}
 | |
| {{ end }}
 | |
| 
 | |
| <div class="paige-metadata w-100">
 | |
|     {{ with $title }}
 | |
|         <h1 class="display-5 fw-bold paige-title text-center">{{ with $titlelink }}<a href="{{ . }}">{{ . }}</a>{{ else }}{{ . }}{{ end }}{{ if $fullpages }}<a aria-label="{{ i18n `paige_aria_page_link` }}" class="paige-header-link" href="{{ $titlepage }}">#</a>{{ end }}</h1>
 | |
|     {{ end }}
 | |
| 
 | |
|     {{ with $description }}
 | |
|         <p class="lead paige-description text-center">{{ . }}</p>
 | |
|     {{ end }}
 | |
| 
 | |
|     {{ if or $categories $tags }}
 | |
|         <p class="paige-terms text-center">
 | |
|             {{ $terms := slice }}
 | |
| 
 | |
|             {{ range $categories }}
 | |
|                 {{ $terms = $terms | append (dict "name" . "url" (lower . | printf "categories/%v/" | relLangURL)) }}
 | |
|             {{ end }}
 | |
| 
 | |
|             {{ range $tags }}
 | |
|                 {{ $terms = $terms | append (dict "name" . "url" (lower . | printf "tags/%v/" | relLangURL)) }}
 | |
|             {{ end }}
 | |
| 
 | |
|             {{ range sort $terms "name" }}
 | |
|                 <a class="badge paige-term text-bg-secondary text-decoration-none" href="{{ .url | safeURL }}">{{ .name }}</a>
 | |
|             {{ end }}
 | |
|         </p>
 | |
|     {{ end }}
 | |
| 
 | |
|     {{ if or $authors $date $readingtime }}
 | |
|         <div class="mb-3">
 | |
|             {{ with $authors }}
 | |
|                 <p class="mb-0 paige-authors text-center text-secondary">{{ . }}</p>
 | |
|             {{ end }}
 | |
| 
 | |
|             {{ with $date }}
 | |
|                 <p class="mb-0 paige-date text-center text-secondary">
 | |
|                     {{ with $commiturl }}
 | |
|                         <a class="link-secondary text-decoration-none" href="{{ . }}">
 | |
|                     {{ end }}
 | |
| 
 | |
|                     <time datetime="{{ .Format `2006-01-02` }}">{{ time.Format $dateformat . }}</time>
 | |
| 
 | |
|                     {{ if $commiturl }}
 | |
|                         </a>
 | |
|                     {{ end }}
 | |
|                 </p>
 | |
|             {{ end }}
 | |
| 
 | |
|             {{ with $readingtime }}
 | |
|                 <p class="mb-0 paige-reading-time text-center text-secondary">{{ . }} {{ i18n "paige_minutes" . }}</p>
 | |
|             {{ end }}
 | |
|         </div>
 | |
|     {{ end }}
 | |
| </div>
 |