Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kritoke/darksimplicity.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Rhone <matthew.rhone@outlook.com>2017-01-02 03:13:01 +0300
committerMatthew Rhone <matthew.rhone@outlook.com>2017-01-02 03:13:01 +0300
commit95e9153d0068a612be1a826f69d42e6b8fdf287c (patch)
treeeeddc1f0e8d513fea96709811b76a46e4ea72723 /layouts
parente7e7f4a8b9b9db1be0230668d307768030c808fa (diff)
Fixed pagination issues that stil persisted from new Hugo version. Added some new stylings, limited pagination to 5 items. Migrated from SASS/Susy to using PostCSS plugins and the Lost Grid framework.v0.2
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/list.html2
-rw-r--r--layouts/index.html2
-rw-r--r--layouts/partials/header.html2
-rw-r--r--layouts/partials/pagination.html8
4 files changed, 8 insertions, 6 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 8ffbc61..eb16c30 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -1,5 +1,5 @@
{{ partial "header.html" . }}
-{{ range .Paginator.Pages }}{{ if eq .Type "post"}}
+{{ range (.Paginator 5).Pages }}{{ if eq .Type "post"}}
<div class="empty">&nbsp;</div>
<div class="post-title">
<a class="post-title-link" href="{{ .Permalink }}">{{ .Title }}</a>
diff --git a/layouts/index.html b/layouts/index.html
index 1e46f3f..3522783 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,6 +1,6 @@
{{ partial "header.html" . }}
-{{ range (.Paginate (where .Data.Pages "Type" "post")).Pages }}
+{{ range ((.Paginator 5) (where .Data.Pages "Type" "post")).Pages }}
<div class="empty">&nbsp;</div>
<div class="post-title">
<a class="post-title-link" href="{{ .Permalink }}">{{ .Title }}</a>
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index a6ebfd3..4b76175 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -9,7 +9,9 @@
{{ with .Site.Params.role }}<meta name="description" content="{{ . }}">{{ end }}
<base href="{{ .Site.BaseURL }}">
<title>{{ .Title }}</title>
+ <!-- <link rel="stylesheet" href="{{ "/css/style.min.css" | relURL }}"> -->
<link rel="stylesheet" href="{{ "/css/style.min.css" | relURL }}">
+
</head>
<body>
<div class="wrap">
diff --git a/layouts/partials/pagination.html b/layouts/partials/pagination.html
index bde3966..2616e84 100644
--- a/layouts/partials/pagination.html
+++ b/layouts/partials/pagination.html
@@ -1,15 +1,15 @@
-{{ if .Paginator.HasNext }}
+{{ if or ((.Paginator 5).HasNext) ((.Paginator 5).HasPrev) }}
<div class="empty">&nbsp;</div>
<div class="pagination">
<nav role="pagination" class="post-list-pagination">
{{ if .Paginator.HasPrev }}
- <a href="{{.Paginator.Prev.Url}}" class="post-list-pagination-item post-list-pagination-item-prev">
+ <a href="{{ .Paginator.Prev.URL }}" class="post-list-pagination-item post-list-pagination-item-prev">
&nbsp;&laquo;
</a>
{{ end }}
<span class="post-list-pagination-item post-list-pagination-item-current">Page {{.Paginator.PageNumber}} of {{.Paginator.TotalPages}}</span>
- {{ if .Paginator.HasNext }}
- <a href="{{.Paginator.Next.Url}}" class="post-list-pagination-item post-list-pagination-item-next">
+ {{ if (.Paginator 5).HasNext }}
+ <a href="{{ .Paginator.Next.URL }}" class="post-list-pagination-item post-list-pagination-item-next">
&raquo;&nbsp;
</a>
{{ end }}