- 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.
		
			
				
	
	
		
			68 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			68 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| {{ define "main" }}
 | |
|   {{ if .Content }}
 | |
|     <div class="index-content {{ if .Params.framed -}}framed{{- end -}}">
 | |
|       {{ .Content }}
 | |
|     </div>
 | |
|   {{ end }}
 | |
|   <div class="posts">
 | |
|     {{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }}
 | |
|     {{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }}
 | |
| 
 | |
|     {{ $PageContext := . }}
 | |
|     {{ if .IsHome }}
 | |
|       {{ $PageContext = .Site }}
 | |
|     {{ end }}
 | |
|     {{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }}
 | |
| 
 | |
|     {{ range $paginator.Pages }}
 | |
|       <div class="post on-list">
 | |
|         <h1 class="post-title">
 | |
|           <a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a>
 | |
|         </h1>
 | |
|         <div class="post-meta">
 | |
|           {{ with .Date }}
 | |
|           <span class="post-date">
 | |
|             {{ .Format "2006-01-02" }}
 | |
|           </span>
 | |
|           {{ end }}
 | |
|           {{ with .Params.Author }}
 | |
|             <span class="post-author">:: {{ . }}</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" . }}
 | |
| 
 | |
| 
 | |
|         <div class="post-content">
 | |
|           {{ if .Params.showFullContent }}
 | |
|             {{ .Content }}
 | |
|           {{ else if .Description }}
 | |
|             {{ .Description | markdownify }}
 | |
|           {{ else }}
 | |
|             {{ .Summary | markdownify }}
 | |
|           {{ end }}
 | |
|         </div>
 | |
| 
 | |
|         {{ if not .Params.showFullContent }}
 | |
|         <div>
 | |
|           <a class="read-more button"
 | |
|             href="{{.RelPermalink}}">{{ $.Site.Params.ReadMore }} →</a>
 | |
|         </div>
 | |
|         {{ end }}
 | |
|       </div>
 | |
|     {{ end }}
 | |
|     {{ partial "pagination.html" . }}
 | |
|   </div>
 | |
| {{ end }}
 |