- Refactored themes to always load with just a single file. This avoids a round trip on each request. - Locally load font when available on the system, then try to load the woff2 file, then fall back to regular woff. - Update markup to use relative urls where it is safe. RSS feeds still use absolute URLs. - Only set og:image:(height/width) when using the standard color icon. - Fixed styles on the pagination buttons. - Added ability to switch font to Source Code Pro (useSourceCodePro). - Added yellow theme. - Added grey theme. - Bold and remove underline for active page in header. - Removed markdownify on summary. - Only display date if present.
		
			
				
	
	
		
			57 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			57 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| {{ define "main" }}
 | |
| <div class="post">
 | |
|   <h1 class="post-title">
 | |
|     <a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a></h1>
 | |
|   <div class="post-meta">
 | |
|     {{ if .Params.Date }}
 | |
|       <span class="post-date">
 | |
|         {{ .Date.Format "2006-01-02" }}
 | |
|         {{ if $.Site.Params.showLastUpdated }}
 | |
|           [{{or $.Site.Params.updatedDatePrefix "Updated"}}: {{ .Lastmod.Format "2006-01-02" }}]
 | |
|         {{ end }}
 | |
|       </span>
 | |
|     {{ end }}
 | |
|     {{ with .Params.Author }}
 | |
|       <span class="post-author">:: {{ . }}</span>
 | |
|     {{ end }}
 | |
|     {{ if and (.Param "readingTime") (eq (.Param "readingTime") true) }}
 | |
|       <span class="post-reading-time">:: {{ .ReadingTime }} min read ({{ .WordCount }} words)</span>
 | |
|     {{ end }}
 | |
|   </div>
 | |
| 
 | |
|   {{ if .Params.tags }}
 | |
|   <span class="post-tags">
 | |
|     {{ range .Params.tags }}
 | |
|     #<a href="{{ (urlize (printf "tags/%s/" .)) | relLangURL }}">{{ . }}</a> 
 | |
|     {{ end }}
 | |
|   </span>
 | |
|   {{ end }}
 | |
|   {{ partial "cover.html" . }}
 | |
| 
 | |
|   {{ if (.Params.Toc | default .Site.Params.Toc) }}
 | |
|     <div class="table-of-contents">
 | |
|       <h2>
 | |
|         {{ (.Params.TocTitle | default .Site.Params.TocTitle) | default "Table of Contents" }}
 | |
|       </h2>
 | |
|       {{ .TableOfContents }}
 | |
|     </div>
 | |
|   {{ end }}
 | |
| 
 | |
|   <div class="post-content">
 | |
|     {{- with .Content -}}
 | |
|       <div>
 | |
|         {{ . | replaceRE "(<h[1-9] id=\"([^\"]+)\".+)(</h[1-9]+>)" `${1}<a href="#${2}" class="hanchor" ariaLabel="Anchor">⌗</a> ${3}` | safeHTML }}
 | |
|       </div>
 | |
|     {{- end -}}
 | |
|   </div>
 | |
| 
 | |
|   {{ if eq .Type $.Site.Params.contentTypeName }}
 | |
|   {{ partial "posts_pagination.html" . }}
 | |
|   {{ end }}
 | |
| 
 | |
|   {{ if not (.Params.hideComments | default false) }}
 | |
|   {{ partial "comments.html" . }}
 | |
|   {{ end }}
 | |
| </div>
 | |
| {{ end }}
 |