added comments

This commit is contained in:
constantinos 2023-08-15 18:48:32 +03:00
parent 5d3ac2e058
commit 2237c580a1

View file

@ -12,14 +12,19 @@
{{ $sandnameSingular := "" }}
{{ $mentionLink := "" }}
<!-- item path at the top of the page -->
<div class="{{ $scratch.depth | default "crust" }}title"><span class="supt">{{ substr $currentDir 0 -1 }}{{ substr .Title 0 1 }}</span>{{ substr .Title 1 }}</div></div>
<div class="grid">
<!-- Left Column TOC -->
<div class="leftcolumn">
{{ if ne (trim .Page.TableOfContents "\n") "<nav id=\"TableOfContents\"></nav>" }}
{{ .Page.TableOfContents }}
{{ end }}
</div>
<!-- Right column (has/mentions) -->
<div class="rightcolumn">
{{ $closeDivs := false }}
@ -54,6 +59,7 @@
{{- with $closeDivs -}}</div></div>{{ end }}
{{ end }}
<!-- Mentioned In -->
{{ if in .Page.Site.Params.sandpointsMentionedIn (substr $currentDir 0 -1) }}
<div class="has hasmentionedin">
{{ with $scratch.backlinks }}
@ -96,9 +102,10 @@
</div>
</div>
<!-- Abstract -->
{{ with .Page.Params.abstract }}<div class="abstract"><span class="supt">abstract</span>{{ . | $.Page.RenderString | htmlUnescape | safeHTML }}</div>{{ end }}
<!-- Keywords -->
{{- $vld := false -}}{{- range $k, $v := .Page.Params.keywords -}}{{- if eq $k 0 -}}{{- $vld = true -}}<div class="keywords"><span class="sup">keywords</span><a href="/keywords/{{ urlize $v }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{- $v -}}</a>{{- else -}},&nbsp;<a href="/keywords/{{ urlize $v }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{- $v -}}</a>{{- end -}}{{- end -}}{{- with $vld -}}</div>{{- end -}}
{{ $var := printf "repo={\"frontmatter\": %s, \"content\": %s, \"path\": \"%s\", \"relpermalink\": \"%s\" }" (jsonify .Params) (jsonify .RawContent) .File.Path .RelPermalink | resources.FromString (printf "js/repo/%s.js" .File.UniqueID) }}