changes in templates so has_sessions/topics now requires the full markdown file name
This commit is contained in:
parent
673c687ac9
commit
7091f52791
|
@ -21,8 +21,8 @@
|
|||
<label for="toggly" class="sidebar-title mb-1" tabindex="1">▒▒ has topics ▽</label>
|
||||
<div class="hiddendiv">
|
||||
<ul class="mt-4">
|
||||
{{ range split .Params.has_topics "," }}
|
||||
{{ with $.GetPage (printf "%s%s" "/topic/" (trim . " ")) }}
|
||||
{{ range .Params.has_topics }}
|
||||
{{ with $.GetPage (printf "%s%s" "/topic/" . ) }}
|
||||
<li><a class="sidebar-list text-base" href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">> {{ .Title }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
|
@ -19,13 +19,12 @@
|
|||
<input id="toggly-isin" type="checkbox">
|
||||
<label for="toggly-isin" class="sidebar-title mt-4 mb-1" tabindex="1">▒▒ is in ▽</label>
|
||||
<div class="hiddendiv">
|
||||
|
||||
<ul class="mt-4">
|
||||
{{ $currentNode := . }}
|
||||
{{ range (where $.Site.RegularPages ".Section" "topic") }}
|
||||
{{ if in .Params.has_sessions $currentNode.File.BaseFileName }}
|
||||
{{ $currentSession := . }}
|
||||
{{ range where $.Site.RegularPages ".Section" "topic" }}
|
||||
{{ if in .Params.has_sessions $currentSession.File.LogicalName }}
|
||||
<li><a class="sidebar-list text-base" href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">↖ topic ⦚ {{ .Title }}</a></li>
|
||||
{{ else if eq $currentNode.Params.is_in .File.BaseFileName }}
|
||||
{{ else if in $currentSession.Params.is_in .File.LogicalName }}
|
||||
<li><a class="sidebar-list text-base" href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">↖ topic ⦚ {{ .Title }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
@ -36,12 +35,6 @@
|
|||
|
||||
{{define "main" }}
|
||||
<article>
|
||||
{{ if eq .Params.last_modified "top" }}
|
||||
<div class="font-playfair italic text-base">Last modified: {{ dateFormat "Monday, Jan 2, 2006" .Lastmod }}</div>
|
||||
{{ end }}
|
||||
<div class="content-text">{{ .Content }}</div>
|
||||
{{ if eq .Params.last_modified "bottom" }}
|
||||
<div class="font-playfair italic text-base">Last modified: {{ dateFormat "Monday, Jan 2, 2006" .Lastmod }}</div>
|
||||
{{ end }}
|
||||
</article>
|
||||
{{ end }}
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
<label for="toggly-sessions" class="sidebar-title mb-1" tabindex="1">▒▒ has sessions ▽</label>
|
||||
<div class="hiddendiv">
|
||||
<ul class="mt-4">
|
||||
{{ range split .Params.has_sessions "," }}
|
||||
{{ with $.GetPage (printf "%s%s" "/session/" (trim . " ")) }}
|
||||
{{ range .Params.has_sessions }}
|
||||
{{ with $.GetPage (printf "%s%s" "/session/" . ) }}
|
||||
<li><a class="sidebar-list text-base" href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">> {{ .Title }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in New Issue