From 20c5bc62cac8c9170a8a597d5647f5a46282a314 Mon Sep 17 00:00:00 2001 From: "chris062689@gmail.com" Date: Sat, 10 Nov 2018 01:03:59 -0500 Subject: [PATCH] Added left_sidebar support. Updated GameDB section. Updated screenshots section, moved js to vendor folder, not cdn. --- layouts/_default/baseof.html | 14 +++ layouts/game/list.html | 6 +- layouts/game/single.html | 157 ++++++++++++++++++++++++++++++++ layouts/screenshots/single.html | 38 +++----- static/images/regions/all.png | Bin 0 -> 616 bytes static/images/regions/aus.png | Bin 0 -> 673 bytes static/images/regions/chn.png | Bin 0 -> 472 bytes static/images/regions/eur.png | Bin 0 -> 479 bytes static/images/regions/jpn.png | Bin 0 -> 420 bytes static/images/regions/kor.png | Bin 0 -> 592 bytes static/images/regions/twn.png | Bin 0 -> 465 bytes static/images/regions/usa.png | Bin 0 -> 609 bytes 12 files changed, 185 insertions(+), 30 deletions(-) create mode 100644 layouts/game/single.html create mode 100644 static/images/regions/all.png create mode 100644 static/images/regions/aus.png create mode 100644 static/images/regions/chn.png create mode 100644 static/images/regions/eur.png create mode 100644 static/images/regions/jpn.png create mode 100644 static/images/regions/kor.png create mode 100644 static/images/regions/twn.png create mode 100644 static/images/regions/usa.png diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 64cc4ed..ef74318 100755 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -51,6 +51,7 @@ {{ block "header" . }}{{ end }} {{ $full_width := .Params.FullWidth | default false }} + {{ $left_sidebar := .Params.left_sidebar | default false }} {{- if .IsHome }}
{{ block "main" . }}{{ end }} @@ -59,6 +60,18 @@
{{ block "main" . }}{{ end }}
+ {{ else if eq $left_sidebar true }} +
+
+
+ {{ block "sidebar" . }}{{ end }} + {{ partial "layout/sidebar" }} +
+
+ {{ block "main" . }}{{ end }} +
+
+
{{ else }}
@@ -66,6 +79,7 @@ {{ block "main" . }}{{ end }}
+ {{ block "sidebar" . }}{{ end }} {{ partial "layout/sidebar" }}
diff --git a/layouts/game/list.html b/layouts/game/list.html index 10539b5..512ff05 100644 --- a/layouts/game/list.html +++ b/layouts/game/list.html @@ -18,7 +18,7 @@ -
+
{{ end }} @@ -64,7 +64,7 @@ {{ end }} {{ define "scripts" }} - --> {{ end }} diff --git a/layouts/game/single.html b/layouts/game/single.html new file mode 100644 index 0000000..d5413d8 --- /dev/null +++ b/layouts/game/single.html @@ -0,0 +1,157 @@ +{{ define "sidebar" }} +{{ $gameId := .File.BaseFileName }} +{{ $rating := index .Site.Data.compatibility .Params.compatibility }} +
+
+ +
+ +
+
Compatibility
+
+
{{ $rating.name }}
+
{{ $rating.description }}
+
+
+ +
+
Release(s)
+
+ {{ range .Params.releases }} +
+
{{ .id }}
+
+ {{ end }} +
+
+
+{{ end }} + +{{ define "main" }} +{{ $gameId := .File.BaseFileName }} +{{ $rating := index .Site.Data.compatibility .Params.compatibility }} +
+ {{- if eq .Params.incomplete true }} +
+
+

This page is considered INCOMPLETE due to any one of the following reasons:

+
    +
  • Missing screenshots
  • +
  • Missing/insufficient wiki article
  • +
  • Unverified game compatibility rating
  • +
+

The information below may not accurately represent your experience.

+

Pages that are left incomplete may be subject for removal. We encourage you to submit additional + content.

+
+
+ {{ end }} + + + +

{{ .Params.title }}

+ +

Summary

+ {{ if .Content }} + {{ .Content }} + {{ else }} +

This game does not yet have a wiki article.

+

Please use the edit button up above to create one.

+ {{ end }} + +

Compatibility

+ {{ if gt (len .Params.issues) 0 }} + + + + + + + + + + + + + {{ $siteCompatibility := .Site.Data.compatibility }} + {{ range .Params.testcases }} + {{- $rating := index $siteCompatibility .compatibility }} + + + + + + + + + {{ end }} + +
IDBuild DateTested ByHardwareCitra VersionRating
{{ if isset . "id" }} {{ .id }} {{ end }}{{ if isset . "buildDate" }} {{ dateFormat "01/2/2006" .buildDate }} {{ end }} + {{ .author }} + on {{ dateFormat "01/02/2006" .date }} + {{ .cpu }}
{{ .gpu }}
{{ .os }}
{{ if isset . "buildName" }}{{ .buildName }} Build
{{ end }}{{ .version }}
+ +
+ {{ $rating.name}} +
+
+ {{ else }} +

This game is untested. Please play through this game and report your compatibility with this title.

+ {{ end }} + + {{ if gt (len .Params.issues) 0 }} +

Known Issues

+ + + + + + + + + + + + + + + +
TitleCreatedLast Updated
+ Pokemon Main Series (XY, ORAS, SM, USUM) - Hangs When Soft Resetting + 4/30/20187/08/2018
+ {{ end }} + +

Screenshots

+ {{ $columns := 3 }} + {{ if (where (readDir "/static/images/screenshots0") "Name" .File.BaseFileName) }} +
+
+ {{ $files := readDir (printf "/static/images/screenshots0/%s/" .File.BaseFileName) }} + {{ range $index, $element := (shuffle $files) }} + {{ $fileTitle := (index (split .Name "-") 1) }} + {{ $fileTitle := (index (split $fileTitle ".") 0) }} +
+
+ + + +
+
+ {{ if eq (mod $index $columns) (sub $columns 1) }} +
+
+ {{ end }} + {{ end }} +
+
+ {{ else }} +

No screenshots have been uploaded for this game.

+ {{ end }} +
+{{ end }} \ No newline at end of file diff --git a/layouts/screenshots/single.html b/layouts/screenshots/single.html index 9560686..aefda32 100644 --- a/layouts/screenshots/single.html +++ b/layouts/screenshots/single.html @@ -1,43 +1,27 @@ {{ define "main" }} -