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

github.com/uPagge/uBlogger.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruPagge <git@upagge.ru>2021-05-26 20:49:18 +0300
committeruPagge <git@upagge.ru>2021-05-26 20:49:18 +0300
commitf67381e584177f67347e25c44fabaa9b0031ff7b (patch)
tree4d67222fe0c1396455bf934f481e462536a69887 /layouts
parentd8e4e98885ef3f99b11f9fa28a8372d6cbafe736 (diff)
optimization
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/baseof.html6
-rw-r--r--layouts/index.html2
-rw-r--r--layouts/partials/assets.html2
-rw-r--r--layouts/partials/paginator.html34
-rw-r--r--layouts/post/posts-by-lastmod.html2
-rw-r--r--layouts/post/posts-by-views.html2
-rw-r--r--layouts/shortcodes/hr.html1
7 files changed, 17 insertions, 32 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index eead1bc..7d3e493 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -21,7 +21,7 @@
<meta name="twitter:description" content="{{ .Site.Params.Description }}"/>
{{ end -}}
{{- partial "head/meta.html" . -}}
- {{- partial "head/link.html" . -}}
+ {{- partialCached "head/link.html" . -}}
{{- partial "head/seo.html" . -}}
{{- block "dnsPrefetch" . }}
@@ -41,7 +41,7 @@
{{- /* Body wrapper */ -}}
<div class="wrapper">
- {{- partial "header.html" . -}}
+ {{- partialCached "header.html" . -}}
<main class="main">
{{- block "no-content" . }}
<div class="container">
@@ -49,7 +49,7 @@
</div>
{{ end -}}
</main>
- {{- partial "footer.html" . -}}
+ {{- partialCached "footer.html" . -}}
</div>
<aside id="fixed-buttons">
diff --git a/layouts/index.html b/layouts/index.html
index 7662e51..77484c3 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -27,7 +27,7 @@
{{ if (and $profile.onlyToFirstPage (ne $pages.PageNumber 1)) }}
{{/* Do nothing if the pinOnlyToFirstPage flag is set and we're not on page 1. */}}
{{else}}
- {{- partial "home/profile.html" . -}}
+ {{- partialCached "home/profile.html" . -}}
{{- end -}}
{{- end -}}
diff --git a/layouts/partials/assets.html b/layouts/partials/assets.html
index a392d26..5b2159a 100644
--- a/layouts/partials/assets.html
+++ b/layouts/partials/assets.html
@@ -216,4 +216,4 @@
}</script>
{{- end -}}
-{{- partial "plugin/analytics.html" . -}} \ No newline at end of file
+{{- partialCached "plugin/analytics.html" . -}} \ No newline at end of file
diff --git a/layouts/partials/paginator.html b/layouts/partials/paginator.html
index 4ceb3fa..265d3ff 100644
--- a/layouts/partials/paginator.html
+++ b/layouts/partials/paginator.html
@@ -1,34 +1,18 @@
-{{- if gt .Paginator.TotalPages 1 -}}
+{{- with .Paginator -}}
<footer>
<nav>
<h3 class="display-hidden">Пагинация</h3>
<ul class="pagination">
- {{- .Scratch.Set "paginator.ellipsed" false -}}
- {{- range $.Paginator.Pagers -}}
- {{- $right := sub .TotalPages .PageNumber -}}
- {{- $showNumber := or (le .PageNumber 1) (eq $right 0) -}}
- {{- $showNumber := or $showNumber (and (gt .PageNumber (sub $.Paginator.PageNumber 3)) (lt .PageNumber (add $.Paginator.PageNumber 3))) -}}
- {{- if $showNumber -}}
- {{- $.Scratch.Set "paginator.ellipsed" false -}}
- {{- $.Scratch.Set "paginator.shouldEllipse" false -}}
- {{- else -}}
- {{- $.Scratch.Set "paginator.shouldEllipse" (not ($.Scratch.Get "paginator.ellipsed") ) -}}
- {{- $.Scratch.Set "paginator.ellipsed" true -}}
- {{- end -}}
- {{- if $showNumber -}}
- <li class="page-item {{ if eq . $.Paginator }}active{{ end }}">
- <span class="page-link">
- <a href="{{ .URL }}">
- {{- .PageNumber -}}
- </a>
- </span>
+ {{ if .HasPrev }}
+ <li class="page-item">
+ <a class="page-link" aria-hidden="true" href="{{ .Prev.URL }}"><< Next</a>
</li>
- {{- else if ($.Scratch.Get "paginator.shouldEllipse") -}}
- <li class="page-item ">
- <span class="page-link" aria-hidden="true">&hellip;</span>
+ {{end }}
+ {{ if .HasNext }}
+ <li class="page-item">
+ <a class="page-link" aria-hidden="true" href="{{ .Next.URL }}">Prev >></a>
</li>
- {{- end -}}
- {{- end -}}
+ {{end }}
</ul>
</nav>
</footer>
diff --git a/layouts/post/posts-by-lastmod.html b/layouts/post/posts-by-lastmod.html
index 0753c99..90441b5 100644
--- a/layouts/post/posts-by-lastmod.html
+++ b/layouts/post/posts-by-lastmod.html
@@ -6,7 +6,7 @@
<article class="page home"{{ if ne $posts.enable false }} data-home="posts"{{ end }}>
{{- /* Profile */ -}}
{{- if ne $profile.enable false -}}
- {{- partial "home/profile.html" . -}}
+ {{- partialCached "home/profile.html" . -}}
{{- end -}}
{{- /* Content */ -}}
diff --git a/layouts/post/posts-by-views.html b/layouts/post/posts-by-views.html
index ee3ab93..20d3b5b 100644
--- a/layouts/post/posts-by-views.html
+++ b/layouts/post/posts-by-views.html
@@ -6,7 +6,7 @@
<article class="page home"{{ if ne $posts.enable false }} data-home="posts"{{ end }}>
{{- /* Profile */ -}}
{{- if ne $profile.enable false -}}
- {{- partial "home/profile.html" . -}}
+ {{- partialCached "home/profile.html" . -}}
{{- end -}}
{{- /* Content */ -}}
diff --git a/layouts/shortcodes/hr.html b/layouts/shortcodes/hr.html
new file mode 100644
index 0000000..1d6667d
--- /dev/null
+++ b/layouts/shortcodes/hr.html
@@ -0,0 +1 @@
+<hr /> \ No newline at end of file