2022-10-30 21:34:55 +01:00
< nav class = "sidebar sidebar-offcanvas" >
2020-05-25 09:17:26 +02:00
< div class = "sidebar-content sidebar-scrolling" >
2022-10-30 21:34:55 +01:00
< h1 class = "sidebar-heading" > < a href = "{{ .Site.BaseURL }}" title = "{{ .Site.Title }} Home" > {{ .Site.Title }}< / a > < / h1 >
2018-05-14 07:41:47 +02:00
2021-07-01 14:23:00 +02:00
{{ $thumb := "" }}
{{ if .Params.image }}
{{ $thumb = .Params.image }}
{{ else }}
{{ if .Params.howlongtobeat_id }}
2022-11-06 09:19:54 +01:00
{{ $thumb = (printf "%scover.jpg" .Page.Permalink) }}
2021-07-01 14:23:00 +02:00
{{ end }}
{{ end }}
{{ if ne $thumb "" }}
2018-05-14 07:41:47 +02:00
< div class = "sidebar-game-info" >
< p style = "position: relative;" >
2022-11-06 09:19:54 +01:00
< img src = "{{ $thumb | absURL }}" alt = "game cover image" alt = "game cover" class = "img-responsive img-inactive" style = "border: 1px solid black" / >
2018-05-14 22:32:52 +02:00
2022-04-09 21:49:21 +02:00
{{ if ne .CurrentSection.Params.platform .Params.platform }}
{{ $platform := .CurrentSection.Title }}
{{ with .CurrentSection.Params.platform }}
2022-07-25 15:05:33 +02:00
< img src = "/img/{{ lower . }}.jpg" alt = "{{ $platform }}" alt = "platform" class = "sidebar-game-platform img-responsive" / >
2022-04-09 21:49:21 +02:00
Played on: < a href = "/games/{{ lower . }}" > {{ $platform }}< / a > < br / >
{{ end }}
2018-05-14 22:32:52 +02:00
{{ end }}
2018-05-14 17:06:10 +02:00
{{ with .Params.game_genre }}
2021-07-02 11:36:35 +02:00
{{ $tag := replaceRE `\s` "-" . }}
Genre: < a href = "/tags/{{ $tag | lower }}" > {{ . }}< / a > < br / >
2018-05-14 17:06:10 +02:00
{{ end }}
{{ with .Params.game_release_year }}
Release year: {{ . }}< br / >
{{ end }}
{{ with .Params.game_developer }}
2022-09-10 21:28:46 +02:00
Developer: < a href = "https://www.mobygames.com/search/quick?sFilter=1&offset=0&q={{ . }}&p=-1&sC=on" target = "_blank" rel = "noopener" class = "external" > {{ . }}< / a > < br / >
2018-05-14 17:06:10 +02:00
{{ end }}
2020-12-09 09:00:00 +01:00
{{ with .Params.howlongtobeat_id }}
2020-12-13 21:19:52 +01:00
< a href = "https://howlongtobeat.com/game?id={{ . }}" target = "_blank" rel = "noopener" class = "external" > How long to beat< / a >
2020-12-09 09:00:00 +01:00
{{ end }}
2022-07-25 15:05:33 +02:00
{{ with .Params.howlongtobeat_hrs }}
: < code > {{ . }}< / code > hr{{ if gt . 1}}s{{ end }}< br / >
2022-04-08 18:01:26 +02:00
{{ end }}
2018-05-14 07:41:47 +02:00
< / p >
< / div >
{{ end }}
2022-04-12 09:59:47 +02:00
{{ $currRellink := substr .RelPermalink 0 -1 }}
{{ $currContent := .Content }}
{{ $backlinks := slice }}
{{ $forwardlinks := slice }}
2022-04-19 21:47:03 +02:00
{{ range (where (where .Site.Pages.ByDate.Reverse ".Section" "in" (slice "articles" "games")) ".Params.ignore" "!=" "true") }}
2022-04-12 09:59:47 +02:00
{{ $found := findRE $currRellink .Content 1 }}
{{ if $found }}
{{ $backlinks = $backlinks | append . }}
{{ else }}
{{ $rellink := substr .RelPermalink 0 -1 }}
{{ $found = findRE $rellink $currContent 1 }}
{{ if $found }}
{{ $forwardlinks = $forwardlinks | append . }}
{{ end }}
{{ end }}
{{ end }}
{{ $related := append $backlinks $forwardlinks }}
2022-04-14 11:20:51 +02:00
{{ if and .Params.Date $related }}
2018-05-14 07:41:47 +02:00
< div class = "sidebar-header" >
2021-07-01 14:23:00 +02:00
< span > Related Posts< / span >
2020-06-05 14:10:22 +02:00
< img src = "/img/gob_purse.gif" alt = "related articles" / >
2018-05-14 07:41:47 +02:00
< / div >
< ul class = "sidebar-menu" >
2022-04-19 21:47:03 +02:00
{{ range first 5 $related }}
2018-05-14 07:41:47 +02:00
< li >
2021-03-25 17:49:44 +01:00
< a href = "{{ .RelPermalink }}" > {{ .Title }}< / a > < br / >
2020-06-09 14:50:49 +02:00
< span class = "sidebar-date" >
{{ if isset .Params "Description" }}
{{ .Description }}
{{ else }}
{{ .Summary }}
{{ end }}
< / span >
2018-05-14 07:41:47 +02:00
< / li >
{{ end }}
< / ul >
2020-05-25 09:17:26 +02:00
< hr / >
{{ end }}
2018-05-14 07:41:47 +02:00
2020-05-25 09:17:26 +02:00
< div class = "sidebar-header" >
2022-04-08 18:01:26 +02:00
< span > Recent Codex Entries< / span >
2020-06-05 14:10:22 +02:00
< img src = "/img/gob_letter.gif" alt = "latest articles" / >
2020-05-25 09:17:26 +02:00
< / div >
< ul class = "sidebar-menu" >
2021-07-01 14:23:00 +02:00
{{ range first 5 (where (where .Site.Pages.ByDate.Reverse ".Section" "in" (slice "articles" "games")) ".Params.ignore" "!=" "true") }}
2020-05-25 09:17:26 +02:00
< li >
2021-03-25 17:49:44 +01:00
< a href = "{{ .RelPermalink }}" > {{ .Title }}< / a > < br / >
2020-05-25 09:17:26 +02:00
< span class = "sidebar-date" >
2022-04-08 18:01:26 +02:00
{{ if .Description }}
2020-06-09 14:50:49 +02:00
{{ .Description }}
2022-04-08 18:01:26 +02:00
{{ else if .Summary }}
2020-06-09 14:50:49 +02:00
{{ .Summary }}
2022-04-08 18:01:26 +02:00
{{ else }}
2022-04-09 21:49:21 +02:00
A {{ .Params.game_genre }} game by {{ .Params.game_developer }} in {{ .Params.game_release_year }} that takes about {{ .Params.howlongtobeat_hrs }} hour(s) to beat.
2020-06-09 14:50:49 +02:00
{{ end }}
2020-05-25 09:17:26 +02:00
< / span >
< / li >
{{ end }}
< / ul >
2018-05-14 07:41:47 +02:00
2020-05-25 09:17:26 +02:00
< div class = "sidebar-header" >
2020-06-09 14:50:49 +02:00
< span > Looking For More?< / span >
2020-06-05 14:10:22 +02:00
< img src = "/img/gob_waypoint.gif" alt = "More information" / >
2020-05-25 09:17:26 +02:00
< / div >
< ul class = "sidebar-menu" >
{{ range .Site.Params.navlinks }}
2022-07-25 15:05:33 +02:00
< li > < a href = "{{ .url }}" > {{ .name }}< / a > < / li >
2020-05-25 09:17:26 +02:00
{{ end }}
< / ul >
2018-05-14 07:41:47 +02:00
< div class = "copyright" >
< p class = "credit" >
{{ with .Site.Params.copyright }}
{{ . | safeHTML }}
{{ end }}
< / p >
< / div >
< / div >
2020-06-05 14:10:22 +02:00
< / nav >
2018-05-14 07:41:47 +02:00