diff options
author | Alex <onedrawingperday@gmail.com> | 2019-11-22 15:20:18 +0300 |
---|---|---|
committer | Alex <onedrawingperday@gmail.com> | 2019-11-22 15:20:55 +0300 |
commit | f621d4b7041c5249bc5cb9afb77fa0989b5df160 (patch) | |
tree | 47ceff40dd738f51e58ad2179d3bb516b10bc380 | |
parent | 75fc5ff9f309346245a73f705bc11448d4d4e74d (diff) |
Override previous-next-link partial
Remove title case. See: #55
-rw-r--r-- | layouts/partials/previous-next-links.html | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/layouts/partials/previous-next-links.html b/layouts/partials/previous-next-links.html new file mode 100644 index 0000000..5ff7a27 --- /dev/null +++ b/layouts/partials/previous-next-links.html @@ -0,0 +1,25 @@ +{{if .Prev }} + <a href="{{ .Prev.Permalink }}" class="db-l f4 f3-ns link primary-color hover-black fw8 mr4"> + <span class="v-mid dib">{{ partial "svg/ic_chevron_left_black_24px.svg" (dict "size" "30px") }}</span> {{ .Prev.Params.name}} + </a> +{{end}} + +{{if .Next }} + <a href="{{.Next.Permalink }}" class="db-l f4 f3-ns link primary-color hover-black fw8"> + {{ .Next.Params.name }} <span class="v-mid dib">{{ partial "svg/ic_chevron_right_black_24px.svg" (dict "size" "30px") }}</span> + </a> +{{end}} + + +<script> + document.body.onkeyup = function(e){ + if (!(e.ctrlKey || e.shiftKey || e.altKey || e.metaKey)) { + {{- if .Prev }} + if (e.keyCode == '37') { window.location = '{{ .Prev.Permalink }}'; } + {{- end }} + {{- if .Next }} + if (e.keyCode == '39') { window.location = '{{ .Next.Permalink }}'; } + {{- end }} + } + }; +</script> |