Move info to YAML data

This commit is contained in:
Marc Riera Irigoyen 2022-04-09 16:37:28 +02:00
parent c54a03cb7d
commit 11ea53a1d3
10 changed files with 93 additions and 34 deletions

View file

@ -0,0 +1,36 @@
## Game details
<table>
<tr>
<td rowspan="4">{{ if (index .Site.Data.games (.Get 0)).cover}}<img src="/images/covers/{{ (index .Site.Data.games (.Get 0)).cover }}"/>{{ end }}</td>
<td><strong>Name</strong></td>
<td>{{ (index .Site.Data.games (.Get 0)).name }}</td>
</tr>
<tr>
<td><strong>Japanese name</strong></td>
<td>{{ (index .Site.Data.games (.Get 0)).namejp }}</td>
</tr>
<tr>
<td><strong>Release date</strong></td>
<td>{{ (index .Site.Data.games (.Get 0)).date | time.Format ":date_long" }}</td>
</tr>
<tr>
<td><strong>Serial code</strong></td>
<td>{{ (index .Site.Data.games (.Get 0)).code }}</td>
</tr>
</table>
## Controller compatibility
<table>
<tr>
<th>Model</th>
<th>Notes</th>
</tr>
{{ range (index .Site.Data.games (.Get 0)).controllers }}
<tr id="{{ if .adapter }}adapter{{ else }}native{{ end }}">
<td>{{ (index $.Site.Data.controllers .model).code }}: {{ (index $.Site.Data.controllers .model).name }}</td>
<td>{{ .notes }}</td>
</tr>
{{ end }}
</table>

View file

@ -1,19 +0,0 @@
<table>
<tr>
<td rowspan="4"><img src="cover.jpg"/></td>
<td><strong>Name</strong></td>
<td>{{ (index .Site.Data.games "wii_shinkansen").name }}</td>
</tr>
<tr>
<td><strong>Japanese name</strong></td>
<td>{{ (index .Site.Data.games "wii_shinkansen").namejp }}</td>
</tr>
<tr>
<td><strong>Release date</strong></td>
<td>{{ (index .Site.Data.games "wii_shinkansen").date }}</td>
</tr>
<tr>
<td><strong>Serial code</strong></td>
<td>{{ (index .Site.Data.games "wii_shinkansen").code }}</td>
</tr>
</table>