diff --git a/themes/Ying/layouts/_default/home.html b/themes/Ying/layouts/_default/home.html index 19b1b4dc..1963a86f 100644 --- a/themes/Ying/layouts/_default/home.html +++ b/themes/Ying/layouts/_default/home.html @@ -5,28 +5,34 @@

随笔

- {{ $posts := sort (where (where .Site.RegularPages "Type" "post") "Params.status" "ne" "hidden") "Weight" }} + {{ $posts := sort (where (where .Site.RegularPages "Type" "post") "Params.status" "ne" "hidden") + "Weight" }} {{ $paginator := .Paginate $posts }} - + {{ range $paginator.Pages }}
{{ .Date.Format "January 2, 2006" }}
{{ .Title }} - + {{ $publishDate := .Date }} {{ $currentTime := now }} {{ $timeDiff := div (sub $currentTime.Unix $publishDate.Unix) 3600 }} - - - {{ if lt $timeDiff 24 }} + + + {{ if and (lt $timeDiff 24) (not .Params.weight) }} {{ end }} + + {{ if .Params.weight }} + + + {{ end }}
{{ end }}
- +