aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/docs/shared.html
diff options
context:
space:
mode:
authorAlex Shpak <alex-shpak@users.noreply.github.com>2019-07-15 18:25:21 +0200
committerAlex Shpak <alex-shpak@users.noreply.github.com>2019-08-06 11:33:42 +0200
commitdda0a0eab19457598b71f2b2b2f978b09d3f95c7 (patch)
tree035ca254fe7a8c7c7df316bce0b777f9a9dd06fe /layouts/partials/docs/shared.html
parentb199d72e5fd7ec76b3c17fc9a6368868978d6328 (diff)
Start work on search feature with lunr
Diffstat (limited to 'layouts/partials/docs/shared.html')
-rw-r--r--layouts/partials/docs/shared.html40
1 files changed, 0 insertions, 40 deletions
diff --git a/layouts/partials/docs/shared.html b/layouts/partials/docs/shared.html
deleted file mode 100644
index 2545dea..0000000
--- a/layouts/partials/docs/shared.html
+++ /dev/null
@@ -1,40 +0,0 @@
-{{/*These templates contains some more complex logic and shared between partials*/}}
-{{ define "title" }}
- {{ if and .IsSection .File }}
- {{ $sections := split (trim .File.Dir "/") "/" }}
- {{ $title := index ($sections | last 1) 0 | humanize | title }}
- {{ default $title .Title }}
- {{ else if and .IsPage .File }}
- {{ $title := .File.BaseFileName | humanize | title }}
- {{ default $title .Title }}
- {{ else }}
- {{ .Title }}
- {{ end }}
-{{ end }}
-
-{{ define "hrefhack" }}
- {{ $attrEq := "$=" }}
- {{ $attrVal := .RelPermalink }}
- {{ if eq .RelPermalink "/" }}
- {{ $attrEq = "=" }}
- {{ $attrVal = .Permalink }}
- {{ end }}
-
- <style>
- nav ul a[href{{ $attrEq }}"{{ $attrVal }}"] {
- color: {{ default "#004ed0" .Site.Params.BookMenuBundleActiveLinkColor }};
- }
- </style>
-{{ end }}
-
-{{ define "jsmenu" }}
-<script>
-(function() {
- var menu = document.querySelector('aside.book-menu nav')
- addEventListener('beforeunload', function(event) {
- localStorage.setItem('menu.scrollTop', menu.scrollTop)
- });
- menu.scrollTop = localStorage.getItem('menu.scrollTop')
-})()
-</script>
-{{ end }}