2020-03-05 04:10:52 +00:00
|
|
|
|
{{ $text_link := .Text }}
|
|
|
|
|
{{ if strings.HasPrefix .Destination "bib:" }}
|
|
|
|
|
{{ $destination := (substr .Destination 4) }}
|
|
|
|
|
{{ if index $.Page.Site.Data.books.piratecarecollection $destination }}
|
|
|
|
|
{{ $b := index $.Page.Site.Data.books.piratecarecollection $destination }}
|
|
|
|
|
{{ if not $text_link }}
|
|
|
|
|
<span>{{ delimit $b.authors ", " " & " }}, {{ substr $b.pubdate 0 4}}.<a href="/library/BROWSE_LIBRARY.html#/book/{{ $destination }}"{{ with $b.title}} title="{{ . }}"{{ end }} target="_blank"><i>‘{{ $b.title }}’</i></a>. {{ $b.publisher }}.</span>
|
|
|
|
|
{{ else }}
|
|
|
|
|
<a href="/library/BROWSE_LIBRARY.html#/book/{{ $destination }}"{{ with $b.title}} title="{{ . }}"{{ end }} target="_blank">{{ $text_link }}</a>
|
|
|
|
|
{{ end }}
|
|
|
|
|
{{ else }}
|
|
|
|
|
<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 }}
|
|
|
|
|
{{ else if strings.HasPrefix .Destination "sesssion:" }}
|
|
|
|
|
{{ $destination := (substr .Destination 9) }}
|
|
|
|
|
{{ if $.Page.Site.GetPage $destination }}
|
|
|
|
|
{{ $session := $.Page.Site.GetPage $destination }}
|
|
|
|
|
{{ if not $text_link }}
|
|
|
|
|
<a href="/session/{{ $destination }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}"{{ with $session.Title}} title="{{ $session.Title }}"{{ end }}>{{ $session.Title }}</a>
|
|
|
|
|
{{ else }}
|
|
|
|
|
<a href="/session/{{ $destination }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}"{{ with .Title}} title="{{ . }}"{{ end }}>{{ $text_link }}</a>
|
|
|
|
|
{{ end }}
|
|
|
|
|
{{ else }}
|
|
|
|
|
<a href="/session/{{ $destination }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ $text_link }}⦚<span class="text-xs font-bold p-1 bg-AuChico text-CoconutCream">session:{{ $destination }} not found</span></a>
|
|
|
|
|
{{ end }}
|
|
|
|
|
{{ else if strings.HasPrefix .Destination "topic:" }}
|
|
|
|
|
{{ $destination := (substr .Destination 6) }}
|
|
|
|
|
{{ if $.Page.Site.GetPage $destination }}
|
|
|
|
|
{{ $topic := $.Page.Site.GetPage $destination }}
|
|
|
|
|
{{ if not $text_link }}
|
|
|
|
|
<a href="/topic/{{ $destination }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}"{{ with $topic.Title}} title="{{ $topic.Title }}"{{ end }}>{{ $topic.Title }}</a>
|
|
|
|
|
{{ else }}
|
|
|
|
|
<a href="/topic/{{ $destination }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}"{{ with .Title}} title="{{ . }}"{{ end }}>{{ $text_link }}</a>
|
|
|
|
|
{{ end }}
|
|
|
|
|
{{ else }}
|
|
|
|
|
<a href="/topic/{{ $destination }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ $text_link }}⦚<span class="text-xs font-bold p-1 bg-AuChico text-CoconutCream">topic:{{ $destination }} not found</span></a>
|
|
|
|
|
{{ end }}
|
2020-03-05 11:54:42 +00:00
|
|
|
|
{{ else if findRE "^.*static" .Destination }}
|
|
|
|
|
<img src="{{ (replace "^.*static" "" .Destination ) | safeURL }}" alt="{{ .Text }}" {{ with .Title}} title="{{ . }}"{{ end }} />
|
2020-03-05 04:10:52 +00:00
|
|
|
|
{{ else }}
|
|
|
|
|
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" {{ with .Title}} title="{{ . }}"{{ end }} />
|
|
|
|
|
{{ end }}
|