diff options
author | vjeantet <valere.jeantet@gmail.com> | 2020-08-25 14:12:00 +0300 |
---|---|---|
committer | vjeantet <valere.jeantet@gmail.com> | 2020-08-25 14:12:00 +0300 |
commit | 24d9aaf51269ad3427bb77cddfd949dba387cab7 (patch) | |
tree | 27a9fa726056e7ff543dbd1d7527174bf1216c8a /layouts | |
parent | efcc6dbdcba64fafbbcc36c0c53c56e28699dfb0 (diff) |
update
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/partials/_pagination.html | 4 | ||||
-rw-r--r-- | layouts/shortcodes/notice.html | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/layouts/partials/_pagination.html b/layouts/partials/_pagination.html index cfa538a..14ac311 100644 --- a/layouts/partials/_pagination.html +++ b/layouts/partials/_pagination.html @@ -1,9 +1,9 @@ <nav class="pagination" role="navigation"> {{if .HasPrev}} - <a class="newer-posts" href="{{ .Prev.RelPermalink }}">← {{T "Previous-Pages"}}</a> + <a class="newer-posts" href="{{ .Prev.URL }}">← {{T "Previous-Pages"}}</a> {{end}} <span class="page-number">{{T "Page"}} {{ .PageNumber }} {{T "pagination-on"}} {{.TotalPages}}</span> {{if .HasNext}} - <a class="older-posts" href="{{ .Next.RelPermalink }}">{{T "Next-Pages"}} →</a> + <a class="older-posts" href="{{ .Next.URL }}">{{T "Next-Pages"}} →</a> {{end}} </nav> diff --git a/layouts/shortcodes/notice.html b/layouts/shortcodes/notice.html index cfe0997..12d8378 100644 --- a/layouts/shortcodes/notice.html +++ b/layouts/shortcodes/notice.html @@ -1,3 +1,8 @@ {{ $_hugo_config := `{ "version": 1 }` }} <link rel="stylesheet" type="text/css" href='{{ (resources.Get "sass/shortcodes/notice.scss" | toCSS).Permalink }}'> -<div class="notices {{ .Get 0 }}" {{ if len .Params | eq 2 }} id="{{ .Get 1 }}" {{ end }}><p>{{ .Inner }}</p></div> +<div class="notices {{ with .Get 0 -}}{{.}}{{else}}primary{{end}}"> + {{- if len .Params | eq 2 -}} + <label>{{- with .Get 1 -}}{{.}}{{- end -}}</label> + {{- end -}} + {{if in .Inner "\n" }}{{.Inner}}{{else}}<p>{{.Inner}}</p>{{end}} +</div> |