hugo/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/previous-next-links.html
Bjørn Erik Pedersen 5ac0f751aa Squashed 'docs/' changes from 0584815c8..723da4a37
723da4a37 Vendor the theme

git-subtree-dir: docs
git-subtree-split: 723da4a3769ee8a6c02758b553618143f92fccef
2019-10-21 10:52:23 +02:00

25 lines
853 B
HTML

{{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.Title }}
</a>
{{end}}
{{if .Next }}
<a href="{{.Next.Permalink }}" class="db-l f4 f3-ns link primary-color hover-black fw8">
{{ .Next.Title }} <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>