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

github.com/AmazingRise/hugo-theme-diary.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md3
-rw-r--r--layouts/_default/terms.html4
-rw-r--r--layouts/index.html2
-rw-r--r--layouts/partials/extrabar.html50
4 files changed, 30 insertions, 29 deletions
diff --git a/README.md b/README.md
index fcc59df..ae0abc1 100644
--- a/README.md
+++ b/README.md
@@ -17,12 +17,15 @@ This theme is [under construction](https://github.com/AmazingRise/hugo-theme-dia
## Screenshots
![](arts/main.png)
+
Site Main Page
![](arts/essay.png)
+
An essay with picture.
![](arts/m_main.png)
+
Mobile Main Page
## Features
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
index 7a499ec..a35d85c 100644
--- a/layouts/_default/terms.html
+++ b/layouts/_default/terms.html
@@ -12,8 +12,8 @@
</div>
</div>
</a>
-
- {{ range .Pages }}
+
+ {{ range .Paginator.Pages }}
<a href="{{.Permalink}}" class="a-block">
<div class="post-item-wrapper">
<div class="post-item post-item-no-gaps">
diff --git a/layouts/index.html b/layouts/index.html
index d0d34b1..8e06cdb 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -3,7 +3,7 @@
<div ref="streamContainer" class="stream-container">
<div class="post-list-container post-list-container-no-background">
- {{range .Site.Pages}}
+ {{range .Paginator.Pages}}
{{if .IsPage}}
<a href="{{.Permalink}}" class="a-block">
<div class="post-item-wrapper">
diff --git a/layouts/partials/extrabar.html b/layouts/partials/extrabar.html
index c7c2b0d..adb91be 100644
--- a/layouts/partials/extrabar.html
+++ b/layouts/partials/extrabar.html
@@ -5,32 +5,30 @@
keyboard_arrow_up
</i>
</a>
- <!--
- <% if(!config.__noPager) { %>
- <% if(page.current && page.total && page.total > 1) { %>
- <div class="pagination-indicator">
- <span style="text-align: center">
- <%= page.current %><br><div style="display: inline-block; transform: rotate(-28deg)">-</div><br><%= page.total %>
- </span>
- </div>
- <% } %>
+ {{ if .Paginator }}
+ {{ if gt .Paginator.TotalPages 1 }}
+ <div class="pagination-indicator">
+ <span style="text-align: center">
+ {{.Paginator.PageNumber}}<br><div style="display: inline-block; transform: rotate(-28deg)">-</div><br>{{.Paginator.TotalPages}}
+ </span>
+ </div>
+
+ {{ if .Paginator.HasPrev }}
+ <a class="pagination-action" href="{{.Paginator.Prev.URL}}">
+ <i class="material-icons pagination-action-icon">
+ chevron_left
+ </i>
+ </a>
+ {{ end }}
- <% if (page.prev) { %>
- <a class="pagination-action" href="<%- url_for(page.prev_link) %>">
- <i class="material-icons pagination-action-icon">
- chevron_left
- </i>
- </a>
- <% } %>
-
- <% if (page.next) { %>
- <a class="pagination-action" href="<%- url_for(page.next_link) %>">
- <i class="material-icons pagination-action-icon">
- chevron_right
- </i>
- </a>
- <% } %>
- <% } %>
- -->
+ {{ if .Paginator.HasNext }}
+ <a class="pagination-action" href="{{.Paginator.Next.URL}}">
+ <i class="material-icons pagination-action-icon">
+ chevron_right
+ </i>
+ </a>
+ {{ end }}
+ {{ end }}
+ {{ end }}
</div>
</div> \ No newline at end of file