aboutsummaryrefslogblamecommitdiff
path: root/layouts/_default/single.html
blob: 4312eec7e151428093f8cd0d79157f52807f6d36 (plain) (tree)
1
2
3
4
5
6
7
8
9
10

                   
     
 

                     
               
                                            

                          
                                              
            
                                                              

                       
                                                  
            
                                                                             

                       
                                  
           
            
            

                                        
                                                                                 
           

           
 
                    

                                      



                        
         
              


          
 
                    
              



                                    
 
         
{{ define "main" }}

<div>

<h1>{{ .Title }}</h1>

<div id="meta">
  {{- $pub := .Date.Format "Jan 2, 2006" -}}
  {{- $mod := "" -}}
  {{- if (not .GitInfo) }}
  {{- $mod = .Lastmod.Format "Jan 2, 2006" -}}
  {{ else }}
  {{- $mod = .Page.GitInfo.CommitDate.Format "Jan 2, 2006" -}}
  {{ end -}}
  {{ if eq $pub $mod }}
  <span id="meta_date">posted on {{ $pub }}</span>
  {{ else }}
  <span id="meta_date">posted on {{ $pub }} - last modified {{ $mod }}</span>
  {{ end }}
  {{ if .Params.tags }}
  {{ if eq (len .Params.tags) 1 }}
  with tag:
  {{ else }}
  with tags:
  {{ end }}
  {{ range $idx, $tag := .Params.tags }}
  <span id="meta_tags"><a href="/tags/{{ $tag | urlize }}/">{{ $tag }}</a></span>
  {{ end }}
  {{ end }}
</div>

{{ if .Params.toc }}
<div id="toc_small">
  <summary>Table of contents</summary>
  {{ .TableOfContents }}
</div>
{{ end }}

<article>
{{ .Content }}
</article>

</div>

{{ if .Params.toc }}
<div id="toc">
  <strong>Table of contents</strong>
  {{ .TableOfContents }}
</div>
{{ end }}

{{ end }}