From dcafd64efebd6b3750e52326e3f5f779b55aeba5 Mon Sep 17 00:00:00 2001 From: "chris062689@gmail.com" Date: Sun, 3 Mar 2019 17:22:47 -0500 Subject: [PATCH] Updated listing to support a large amount of entries. Use the default boxart if none exists. --- layouts/game/list.html | 110 +++------------------------------------ layouts/game/single.html | 8 ++- 2 files changed, 13 insertions(+), 105 deletions(-) diff --git a/layouts/game/list.html b/layouts/game/list.html index 512ff05..31a5eb0 100644 --- a/layouts/game/list.html +++ b/layouts/game/list.html @@ -28,130 +28,34 @@ - - - {{ range .Data.Pages.GroupByParam "section_id" }} + {{ range .Pages }} {{ $rating := index .Site.Data.compatibility .Params.compatibility }} - {{ $type := index .Site.Data.gameTypes (.Params.game_type | default "3ds") }} - - - {{ end }} - {{ end }}
  Game Title Compatibility Date Tested
- - + {{ .Params.title }}
{{ $rating.name }}
- {{ dateFormat "January 2, 2006" .Params.testcase_date }} + {{ if .Params.testcase_date }} + {{ dateFormat "January 2, 2006" .Params.testcase_date }} + {{ else }} + + {{ end }}
{{ end }} {{ define "scripts" }} - {{ end }} diff --git a/layouts/game/single.html b/layouts/game/single.html index 894181a..a8b5d43 100644 --- a/layouts/game/single.html +++ b/layouts/game/single.html @@ -3,7 +3,11 @@ {{ $rating := index .Site.Data.compatibility .Params.compatibility }}
- + {{ if (fileExists (print "static/images/game/boxart/" .File.BaseFileName ".png")) }} + + {{ else }} + + {{ end }}
@@ -19,7 +23,7 @@
{{ range .Params.releases }}
-
{{ .id }}
+
{{ .id }}
{{ end }}