diff options
author | clsr <clsr@clsr.net> | 2017-08-25 16:02:01 +0200 |
---|---|---|
committer | clsr <clsr@clsr.net> | 2017-08-25 16:02:06 +0200 |
commit | c626ecdc562f99fbaf2130f7136d7f9b0ea7b58a (patch) | |
tree | bb1c5ee6b1fcc19d195f6ebca05e226be00cd1a6 /templates/page.html | |
parent | ed64d2fb11b4833a8dcbe29225f90bf6462dc8ad (diff) | |
download | cn-http-0.1.5.tar.gz cn-http-0.1.5.zip |
Implement draft/cnm-selector hash fragment anchorsv0.1.5
Diffstat (limited to 'templates/page.html')
-rw-r--r-- | templates/page.html | 7 |
1 files changed, 6 insertions, 1 deletions
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> |