hopefully ready for the latest hugo on server too...

This commit is contained in:
Marcell Mars 2020-03-16 01:12:36 +01:00
parent 91e756c1b9
commit 0be76f6a79
3 changed files with 22 additions and 10 deletions

View File

@ -12,7 +12,7 @@
<a href="/library/BROWSE_LIBRARY.html#/book/{{ $destination }}"{{ with .Title}} title="{{ . }}"{{ end }}>{{ $text_link }}⦚<span class="text-xs font-bold p-1 bg-AuChico text-CoconutCream">bib:{{ $destination }} not found</span></a> <a href="/library/BROWSE_LIBRARY.html#/book/{{ $destination }}"{{ with .Title}} title="{{ . }}"{{ end }}>{{ $text_link }}⦚<span class="text-xs font-bold p-1 bg-AuChico text-CoconutCream">bib:{{ $destination }} not found</span></a>
{{ end }} {{ end }}
{{ else if strings.HasPrefix .Destination "session:" }} {{ else if strings.HasPrefix .Destination "session:" }}
{{ $s_destination := (substr .Destination 8) }} {{ $s_destination := printf "/session/%s" (substr .Destination 8) }}
{{ if $.Page.Site.GetPage $s_destination }} {{ if $.Page.Site.GetPage $s_destination }}
{{ $session := $.Page.Site.GetPage $s_destination }} {{ $session := $.Page.Site.GetPage $s_destination }}
{{ if not $text_link }} {{ if not $text_link }}
@ -24,7 +24,7 @@
<a href="/session/{{ $s_destination }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ $text_link }}⦚<span class="text-xs font-bold p-1 bg-AuChico text-CoconutCream">session:{{ $s_destination }} not found</span></a> <a href="/session/{{ $s_destination }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ $text_link }}⦚<span class="text-xs font-bold p-1 bg-AuChico text-CoconutCream">session:{{ $s_destination }} not found</span></a>
{{ end }} {{ end }}
{{ else if strings.HasPrefix .Destination "topic:" }} {{ else if strings.HasPrefix .Destination "topic:" }}
{{ $t_destination := (substr .Destination 6) }} {{ $t_destination := printf "/topic/%s" (substr .Destination 6) }}
{{ if $.Page.Site.GetPage $t_destination }} {{ if $.Page.Site.GetPage $t_destination }}
{{ $topic := $.Page.Site.GetPage $t_destination }} {{ $topic := $.Page.Site.GetPage $t_destination }}
{{ if not $text_link }} {{ if not $text_link }}

View File

@ -1,7 +1,13 @@
{{ define "main" }} {{ define "main" }}
<div class="sidebar-title mb-1 pb-8">▒▒ all sessions:</div> {{ $relpermalink := "" }}
{{ range .Data.Pages }} <div class="sidebar-title mb-1 pb-8">▒▒ all sessions:</div>
<div><a class="sidebar-list text-base" href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">> {{ .Title }}</a></div> {{ range .Data.Pages }}
{{ if .Site.Data.myvars.edit }}
{{ $relpermalink = printf "%s%s" "/_preview" .RelPermalink }}
{{ else }}
{{ $relpermalink = .RelPermalink }}
{{ end }} {{ end }}
<div class="pb-8"></div> <div><a class="sidebar-list text-base" href="{{ $relpermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">> {{ .Title }}</a></div>
{{ end }}
<div class="pb-8"></div>
{{ end }} {{ end }}

View File

@ -1,7 +1,13 @@
{{ define "main" }} {{ define "main" }}
<div class="sidebar-title mb-1 pb-8">▒▒ all topics:</div> {{ $relpermalink := "" }}
<div class="sidebar-title mb-1 pb-8">▒▒ all topics:</div>
{{ range .Data.Pages }} {{ range .Data.Pages }}
<div><a class="sidebar-list text-base" href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">> {{ .Title }}</a></div> {{ if .Site.Data.myvars.edit }}
{{ end }} {{ $relpermalink = printf "%s%s" "/_preview" .RelPermalink }}
<div class="pb-8"></div> {{ else }}
{{ $relpermalink = .RelPermalink }}
{{ end }}
<div><a class="sidebar-list text-base" href="{{ $relpermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">> {{ .Title }}</a></div>
{{ end }}
<div class="pb-8"></div>
{{ end }} {{ end }}