2022-11-18 13:42:22 +01:00
< nav class = "sidebar" >
2020-05-25 09:17:26 +02:00
< div class = "sidebar-content sidebar-scrolling" >
2022-11-18 13:42:22 +01:00
< a name = "menu" id = "menu" > < / a >
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
2022-11-18 13:42:22 +01:00
{{- $thumb := "" -}}
{{- if .Params.image -}}
{{- $thumb = .Params.image -}}
{{- else -}}
{{- if .Params.howlongtobeat_id -}}
{{- $thumb = (printf "%scover.jpg" .Page.Permalink) -}}
{{- 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" / >
2022-11-18 13:42:22 +01: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-11-20 09:22:19 +01:00
Played on: < a class = "p-category" href = "/games/{{ lower . }}" > {{ $platform }}< / a > < br / >
2022-11-18 13:42:22 +01:00
{{- end -}}
{{- end -}}
2018-05-14 17:06:10 +02:00
2022-11-18 13:42:22 +01:00
{{- with .Params.game_genre -}}
{{- $tag := replaceRE `\s` "-" . -}}
2021-07-02 11:36:35 +02:00
Genre: < a href = "/tags/{{ $tag | lower }}" > {{ . }}< / a > < br / >
2022-11-18 13:42:22 +01:00
{{- end -}}
{{- with .Params.game_release_year -}}
2018-05-14 17:06:10 +02:00
Release year: {{ . }}< br / >
2022-11-18 13:42:22 +01:00
{{- 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 / >
2022-11-18 13:42:22 +01:00
{{- end -}}
{{- 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 >
2022-11-18 13:42:22 +01:00
{{- end -}}
{{- with .Params.howlongtobeat_hrs -}}
2022-07-25 15:05:33 +02:00
: < code > {{ . }}< / code > hr{{ if gt . 1}}s{{ end }}< br / >
2022-11-18 13:42:22 +01:00
{{- end -}}
2018-05-14 07:41:47 +02:00
< / p >
< / div >
2022-11-18 13:42:22 +01:00
{{- end -}}
2022-04-12 09:59:47 +02:00
2022-11-18 13:42:22 +01:00
{{- $currRellink := substr .RelPermalink 0 -1 -}}
{{- $currContent := .Content -}}
2022-11-27 21:58:22 +01:00
{{- $currTitle := .Title -}}
2022-11-18 13:42:22 +01:00
{{- $backlinks := slice -}}
{{- $forwardlinks := slice -}}
{{- range (where (where .Site.Pages.ByDate.Reverse ".Section" "in" (slice "articles" "games")) ".Params.ignore" "!=" "true") -}}
{{- $found := findRE $currRellink .Content 1 -}}
2022-11-27 21:58:22 +01:00
{{- if and $found (ne .Title $currTitle) -}}
2022-11-18 13:42:22 +01:00
{{- $backlinks = $backlinks | append . -}}
{{- else -}}
{{- $rellink := substr .RelPermalink 0 -1 -}}
{{- $found = findRE $rellink $currContent 1 -}}
2022-11-27 21:58:22 +01:00
{{- if and $found (ne .Title $currTitle) -}}
2022-11-18 13:42:22 +01:00
{{- $forwardlinks = $forwardlinks | append . -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- $related := append $backlinks $forwardlinks -}}
{{- if and .Params.Date $related -}}
2018-05-14 07:41:47 +02:00
< div class = "sidebar-header" >
2023-04-16 15:05:46 +02:00
< span > Similar Codex Entries< / 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-11-18 13:42:22 +01:00
{{- range first 5 $related | uniq -}}
2018-05-14 07:41:47 +02:00
< li >
2021-03-25 17:49:44 +01:00
< a href = "{{ .RelPermalink }}" > {{ .Title }}< / a > < br / >
2022-11-18 13:42:22 +01:00
< span class = "sidebar-description" >
{{- if isset .Params "Description" -}}
2020-06-09 14:50:49 +02:00
{{ .Description }}
2022-11-18 13:42:22 +01:00
{{- else -}}
2020-06-09 14:50:49 +02:00
{{ .Summary }}
2022-11-18 13:42:22 +01:00
{{- end -}}
2020-06-09 14:50:49 +02:00
< / span >
2018-05-14 07:41:47 +02:00
< / li >
2022-11-18 13:42:22 +01:00
{{- end -}}
2018-05-14 07:41:47 +02:00
< / ul >
2020-05-25 09:17:26 +02:00
< hr / >
2022-11-18 13:42:22 +01:00
{{- 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" >
2022-11-18 13:42:22 +01: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 / >
2022-11-18 13:42:22 +01:00
< span class = "sidebar-description" >
{{- if .Description -}}
2020-06-09 14:50:49 +02:00
{{ .Description }}
2022-11-18 13:42:22 +01:00
{{- else if .Summary -}}
2020-06-09 14:50:49 +02:00
{{ .Summary }}
2022-11-18 13:42:22 +01: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.
2022-11-18 13:42:22 +01:00
{{- end -}}
2020-05-25 09:17:26 +02:00
< / span >
< / li >
2022-11-18 13:42:22 +01:00
{{- end -}}
2020-05-25 09:17:26 +02:00
< / 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" >
2022-11-18 13:42:22 +01:00
{{- range .Site.Params.navlinks -}}
2022-07-25 15:05:33 +02:00
< li > < a href = "{{ .url }}" > {{ .name }}< / a > < / li >
2022-11-18 13:42:22 +01:00
{{- end -}}
2020-05-25 09:17:26 +02:00
< / ul >
2018-05-14 07:41:47 +02:00
< div class = "copyright" >
< p class = "credit" >
2022-11-18 13:42:22 +01:00
{{- with .Site.Params.copyright -}}
2018-05-14 07:41:47 +02:00
{{ . | safeHTML }}
2022-11-18 13:42:22 +01:00
{{- end -}}
2018-05-14 07:41:47 +02:00
< / p >
< / div >
< / div >
2020-06-05 14:10:22 +02:00
< / nav >
2018-05-14 07:41:47 +02:00