{{ .Title }}
- -{{ .Description | default .Summary }}
-diff --git a/layouts/_default/home.html b/layouts/_default/home.html deleted file mode 100644 index f93f09e..0000000 --- a/layouts/_default/home.html +++ /dev/null @@ -1,123 +0,0 @@ -{{ define "main" }} - {{ $all_posts := where .Site.RegularPages "Section" "post" }} - {{ $all_pinned := where $all_posts "Params.pin" true }} - {{ $all_normal := where $all_posts "Params.pin" "!=" true }} - - {{ $posts := slice }} - {{ $pinned_size := 0 }} - - - {{ $paginator := .Paginate $all_normal }} - {{ $visible_start := sub $paginator.PageNumber 1 | mul $paginator.PagerSize }} - {{ $visible_end := add $visible_start $paginator.PagerSize }} - - {{ if gt (len $all_pinned) $visible_start }} - {{ if gt (len $all_pinned) $visible_end }} - {{ $pinned_size = $paginator.PagerSize }} - {{ else }} - {{ $pinned_size = sub (len $all_pinned) $visible_start }} - {{ end }} - - {{ range first $pinned_size (after $visible_start $all_pinned) }} - {{ $posts = $posts | append . }} - {{ end }} - {{ end }} - - - {{ $normal_size := sub (len $paginator.Pages) $pinned_size }} - - {{ if gt $normal_size 0 }} - {{ $normal_start := 0 }} - {{ if gt $pinned_size 0 }} - {{ $normal_start = 0 }} - {{ else }} - {{ $normal_start = sub $visible_start (len $all_pinned) }} - {{ end }} - - {{ range first $normal_size (after $normal_start $all_normal) }} - {{ $posts = $posts | append . }} - {{ end }} - {{ end }} - -
- - - {{ if gt $paginator.TotalPages 1 }} - {{ partial "pagination.html" . }} - {{ end }} -{{ end }} \ No newline at end of file diff --git a/layouts/index.html b/layouts/index.html index 924d072..f93f09e 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,3 +1,123 @@ {{ define "main" }} -