diff --git a/scripts/games/app.js b/scripts/games/app.js index 8196e59..e19d6fe 100644 --- a/scripts/games/app.js +++ b/scripts/games/app.js @@ -123,6 +123,13 @@ function processGame(game) { model.compatibility = recent.compatibility; model.testcase_date = recent.date; } + + let section_id = `${model.title[0]}`.toLowerCase(); + if (!section_id.match(/[a-z]+/)) { + section_id = "#"; + } + + model.section_id = section_id; // END SHORTCUTS BLOCK // SAVEFILE BLOCK diff --git a/site/themes/citra-bs-theme/layouts/game/list.html b/site/themes/citra-bs-theme/layouts/game/list.html index febb8ab..3252e1f 100644 --- a/site/themes/citra-bs-theme/layouts/game/list.html +++ b/site/themes/citra-bs-theme/layouts/game/list.html @@ -3,38 +3,57 @@

The Citra Emulator compatibility list contains all the games we tested, sorted by how well they work on the emulator.

- {{ range .Site.Data.compatibility }} + {{ range .Site.Data.compatibility }} - - - - {{ end }} + + + + {{ end }}
{{ .name }}
{{ .description }}
{{ .name }}
{{ .description }}
- - - - - - - - - - - {{ range .Data.Pages }} - {{- $rating := index .Site.Data.compatibility .Params.compatibility }} - - - - - - +
+ +
+
+ # + {{ range (seq 'a' 'z') }} + {{ printf "%c" . }} {{ end }} -
-
TitleCompatibilityDate Tested
{{ .Params.title }}
{{ $rating.name }}
{{ dateFormat "January 2, 2006" .Params.testcase_date }}
+ + + + + + + + + + + + + + {{ range .Data.Pages.GroupByParam "section_id" }} + + + + + {{ range .Pages }} + {{- $rating := index .Site.Data.compatibility .Params.compatibility }} + + + + + + + {{ end }} + {{ end }} + +
TitleCompatibilityDate Tested
+

{{ .Key }}

+
{{ .Params.title }}
{{ $rating.name }}
{{ dateFormat "January 2, 2006" .Params.testcase_date }}
{{ end }} {{ define "scripts" }} diff --git a/site/themes/citra-bs-theme/layouts/game/list.json b/site/themes/citra-bs-theme/layouts/game/list.json index fc95370..e73dbc1 100644 --- a/site/themes/citra-bs-theme/layouts/game/list.json +++ b/site/themes/citra-bs-theme/layouts/game/list.json @@ -5,7 +5,8 @@ {{- $gameIndex := $index }} {{- $lenRegions := sub (len .Params.releases) 1 }} {{- range $regionIndex, $element := .Params.releases }} - "{{ $element.title }}": { "region": "{{ .region }}", "gameID": "{{ $game.File.BaseFileName }}", "gameName": "{{ $game.Title | plainify }}" }{{- if and (eq $gameIndex $lenGames) (eq $regionIndex $lenRegions) }}{{ else }},{{ end }} + "{{ $element.title }}": { "region": "{{ .region }}", "gameID": "{{ $game.File.BaseFileName }}", + "gameName": "{{ $game.Title | plainify }}" }{{- if and (eq $gameIndex $lenGames) (eq $regionIndex $lenRegions) }}{{ else }},{{ end }} {{- end }} {{- end }} } diff --git a/site/themes/citra-bs-theme/static/css/style.css b/site/themes/citra-bs-theme/static/css/style.css index 8a151d0..2e25d3b 100644 --- a/site/themes/citra-bs-theme/static/css/style.css +++ b/site/themes/citra-bs-theme/static/css/style.css @@ -323,3 +323,16 @@ a:hover, a:focus { /* Games Module */ .game-icon-list { } + +#game-sections { + display: table; + margin: 0 auto; +} + +#game-sections .btn { + padding: 6px 10px; +} + +#game-section-header { + border: 0; +}