mirror of
https://github.com/naoufalzerai/zerai.xyz.git
synced 2025-12-24 22:43:58 +00:00
change theme again :D
This commit is contained in:
35
themes/notepadium/layouts/partials/note-list.html
Normal file
35
themes/notepadium/layouts/partials/note-list.html
Normal file
@@ -0,0 +1,35 @@
|
||||
{{- $paginator := . -}}
|
||||
|
||||
{{- if gt $paginator.TotalPages 0 -}}
|
||||
{{- $dateFormat := site.Params.dateFormat -}}
|
||||
{{- if not $dateFormat -}}{{- $dateFormat = "2006-01-02" -}}{{- end -}}
|
||||
<ul class="note list">
|
||||
{{- range $paginator.Pages -}}
|
||||
{{- $relURL := replace .RelPermalink "#" "%23" -}}
|
||||
{{- $relURL = replace $relURL "." "%2e" -}}
|
||||
<li class="item"><a class="note" href="{{- $relURL -}}">
|
||||
<p class="note title">{{- .Title | safeHTML -}}</p>
|
||||
{{- if .Date -}}
|
||||
<p class="note date">{{- .Date.Format $dateFormat -}}</p>
|
||||
{{- end -}}
|
||||
{{- if .Summary -}}<p class="note content">{{- .Summary | plainify | safeHTML -}}{{- if .Truncated -}}<span class="mldr">…</span>{{- end -}}</p>{{- end -}}
|
||||
|
||||
{{- $imgs := .Params.imgs -}}
|
||||
{{- with $imgs -}}
|
||||
<span class="note imgs">
|
||||
{{- $imgCount := len $imgs -}}
|
||||
{{- range $imgs -}}
|
||||
{{- $imgurl := lower . -}}
|
||||
{{- if and (not (hasPrefix $imgurl "http://")) (not (hasPrefix $imgurl "https://")) -}}
|
||||
{{- $imgurl = path.Join $relURL . -}}
|
||||
{{- end -}}
|
||||
<img class="img" src="{{- $imgurl -}}" alt />
|
||||
{{- end -}}
|
||||
</span>
|
||||
{{- end -}}
|
||||
</a>
|
||||
{{- partial "note-labels.html" . -}}
|
||||
</li>
|
||||
{{- end -}}
|
||||
</ul>
|
||||
{{- end -}}
|
||||
Reference in New Issue
Block a user