summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/content.html14
-rw-r--r--templates/page.html7
2 files changed, 15 insertions, 6 deletions
diff --git a/templates/content.html b/templates/content.html
index 4616a10..9b6d508 100644
--- a/templates/content.html
+++ b/templates/content.html
@@ -4,11 +4,15 @@
{{- inc .Title -}}
<summary>
{{- with .Title -}}
- {{- if $l := lanchor -}}
- <h{{depth}}>{{.}}<a class="sec-link" id="/{{$l}}" href="#/{{$l}}">¶</a>
- {{- if $s := sanchor}}{{if ne $s $l}}<a id="#{{$s}}"></a>{{end}}{{end -}}
- </h{{depth}}>
- {{- end -}}
+ <h{{depth}}>{{.}}
+ {{- if $l := lanchor -}}
+ <a class="sec-link" id="/{{$l}}" href="#/{{$l}}">¶</a>
+ {{- if $s := sanchor}}{{if ne $s $l}}<a id="#{{$s}}"></a>{{end}}{{end -}}
+ <a id="${{ianchor}}"></a>
+ {{- else -}}
+ <a class="sec-link" id="${{ianchor}}" href="#${{ianchor}}">¶</a>
+ {{- end -}}
+ </h{{depth}}>
{{- end -}}
</summary>
{{- range .Children -}}
diff --git a/templates/page.html b/templates/page.html
index 0f89e2d..4a356cb 100644
--- a/templates/page.html
+++ b/templates/page.html
@@ -60,7 +60,11 @@
{{- block "toc" . -}}
{{- inc .Title -}}
<li>
- <a href="#/{{anchor}}">{{.Title}}</a>
+ {{- if $l := lanchor -}}
+ <a href="#/{{$l}}">{{.Title}}</a>
+ {{- else -}}
+ <a href="#${{ianchor}}">{{.Title}}</a>
+ {{- end -}}
{{- with .Children -}}
<ul>
{{- range . -}}
@@ -72,6 +76,7 @@
{{- dec -}}
{{- end -}}
{{- end -}}
+ {{- rst -}}
</ul>
</details>
</nav>