2018-05-14 22:32:52 +02:00
{{ $url := .Site.BaseURL }}
2020-06-05 14:10:22 +02:00
< nav class = "sidebar col-xs-6 col-sm-4 col-md-3 sidebar-offcanvas" >
2020-05-25 09:17:26 +02:00
< div class = "sidebar-content sidebar-scrolling" >
2018-05-14 07:41:47 +02:00
< h1 class = "sidebar-heading" > < a href = "{{ .Site.BaseURL }}" > {{ .Site.Title }}< / a > < / h1 >
2021-07-01 14:23:00 +02:00
{{ $thumb := "" }}
{{ if .Params.image }}
{{ $thumb = .Params.image }}
{{ else }}
{{ if .Params.howlongtobeat_id }}
{{ $thumb = printf "%s%d%s" "img/hltb/" .Params.howlongtobeat_id ".jpg" }}
{{ end }}
{{ end }}
{{ if ne $thumb "" }}
2018-05-14 07:41:47 +02:00
< div class = "sidebar-game-info" >
< p style = "position: relative;" >
2021-07-01 14:23:00 +02:00
< img src = "{{ $url }}{{ $thumb }}" 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 }}
< img src = "{{ $url }}img/{{ lower . }}.jpg" alt = "{{ $platform }}" alt = "platform" class = "sidebar-game-platform img-responsive" / >
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 }}
2020-12-13 21:19:52 +01:00
Developer: < a href = "https://en.wikipedia.org/wiki/{{ . }}" 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 }}
{{ with .Params.howlongtobeat_hrs }}
2022-04-08 18:01:26 +02:00
: < code > {{ . }}< / code > hr{{ if gt . 1}}s{{ end }}< br / >
{{ end }}
{{ $name := .Params.game_name }}
{{ with .Params.cost }}
< a href = "https://www.pricecharting.com/search-products?q={{ $name }}&type=prices" > Game Value< / a > : < code > €{{ . }}< / code > < br / >
2020-12-09 09:00:00 +01:00
{{ end }}
2018-05-14 07:41:47 +02:00
< / p >
< / div >
{{ end }}
<!-- ripped from BB's minimal theme -->
2020-06-01 09:52:47 +02:00
{{ $related := first 4 (where (where .Site.Pages.ByDate.Reverse ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }}
2018-05-14 07:41:47 +02:00
{{ if $related }}
< 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" >
{{ range $related }}
< 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 }}
< li > < a href = "{{ $url }}{{ .url }}" > {{ .name }}< / a > < / li >
{{ 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