citra-emu
/
citra-web
Archived
1
0
Fork 0

Added support for VC, eShop, etc.

This commit is contained in:
chris062689 2017-06-15 20:09:46 -04:00
parent 5c04f40997
commit 8613c7c483
4 changed files with 37 additions and 6 deletions

6
site/data/gameTypes.json Normal file
View File

@ -0,0 +1,6 @@
{
"3ds": { "key": "3ds", "name": "3DS Game" },
"dsiware": { "key": "dsiware", "name": "DSI Ware" },
"eshop": { "key": "eshop", "name": "eShop" },
"vc": { "key": "vc", "name": "Virtual Console" }
}

8
site/data/vcSystems.json Normal file
View File

@ -0,0 +1,8 @@
{
"nes": { "key": "nes", "name": "Nintendo Entertainment System" },
"snes": { "key": "snes", "name": "Super Nintendo Entertainment System" },
"gb": { "key": "gb", "name": "Game Boy" },
"gbc": { "key": "gbc", "name": "Game Boy Color" },
"gba": { "key": "gba", "name": "Game Boy Advance" },
"gg": { "key": "gg", "name": "Game Gear" }
}

View File

@ -30,6 +30,7 @@
<tr> <tr>
<th></th> <th></th>
<th>Title</th> <th>Title</th>
<th>Type</th>
<th>Compatibility</th> <th>Compatibility</th>
<th>Date Tested</th> <th>Date Tested</th>
</tr> </tr>
@ -44,12 +45,14 @@
{{ range .Pages }} {{ range .Pages }}
{{- $rating := index .Site.Data.compatibility .Params.compatibility }} {{- $rating := index .Site.Data.compatibility .Params.compatibility }}
<tr> {{- $type := index .Site.Data.gameTypes (.Params.game_type | default "3ds") }}
<td style="width: 55px;"><img class="img-responsive game-icon-list" src="{{ .Site.BaseURL }}images/game/icons/{{ default (print .File.BaseFileName ".png") }}" /></td> <tr>
<td><a href="{{ .Permalink }}">{{ .Params.title }}</a></td> <td class="col-md-1"><img src="{{ .Site.BaseURL }}images/game/icons/{{ .File.BaseFileName }}.png" /></td>
<td class="compatibility-row"><div class="square-icon" style="background-color: {{ $rating.color }}"></div> {{ $rating.name }}</td> <td class="col-md-6"><a href="{{ .Permalink }}">{{ .Params.title }}</a></td>
<td>{{ dateFormat "January 2, 2006" .Params.testcase_date }}</td> <td class="col-md-1"><img src="{{ .Site.BaseURL }}images/game/types/{{ $type.key }}.png" title="{{ $type.name }}" /></td>
</tr> <td class="col-md-1"><div class="square-icon" style="background-color: {{ $rating.color }}"></div> {{ $rating.name }}</td>
<td class="col-md-3">{{ dateFormat "January 2, 2006" .Params.testcase_date }}</td>
</tr>
{{ end }} {{ end }}
{{ end }} {{ end }}
</tbody> </tbody>

View File

@ -1,6 +1,7 @@
{{ define "main" }} {{ define "main" }}
{{ $BaseURL := .Site.BaseURL }} {{ $BaseURL := .Site.BaseURL }}
{{ $gameName := .File.BaseFileName }} {{ $gameName := .File.BaseFileName }}
{{- $type := index .Site.Data.gameTypes (.Params.game_type | default "3ds") }}
<div class="alert alert-info"> <div class="alert alert-info">
<div class="row"> <div class="row">
@ -41,6 +42,19 @@
<td style="width: 120px;">Rating</td> <td style="width: 120px;">Rating</td>
<td><b><div class="square-icon" style="background-color: {{ $rating.color }}"></div> {{ $rating.name }}</b><br />{{ $rating.description }}</td> <td><b><div class="square-icon" style="background-color: {{ $rating.color }}"></div> {{ $rating.name }}</b><br />{{ $rating.description }}</td>
</tr> </tr>
<tr>
<td>Type</td>
<td>
<img src="{{ .Site.BaseURL }}images/game/types/{{ $type.key }}.png" title="{{ $type.name }}" />
{{- if eq $type.key "3ds" }}
{{- else if eq $type.key "vc" }}
{{- $vcSystem := index .Site.Data.vcSystems .Params.vc_system }}
{{ $vcSystem.name }}
{{- else }}
{{ $type.name }}
{{ end }}
</td>
</tr>
<tr> <tr>
<td>Game Icon</td> <td>Game Icon</td>
<td><img class="img-responsive" src="{{ .Site.BaseURL }}images/game/icons/{{ .File.BaseFileName }}.png" /></td> <td><img class="img-responsive" src="{{ .Site.BaseURL }}images/game/icons/{{ .File.BaseFileName }}.png" /></td>