mirror of
https://github.com/yuzu-emu/shared-bulma-theme.git
synced 2024-11-23 01:55:47 +01:00
96 lines
3.5 KiB
HTML
96 lines
3.5 KiB
HTML
|
{{ define "header" }}
|
||
|
<div class="container">
|
||
|
<div class="section pb-xs">
|
||
|
<h1 class="title">Game Compatibility List</h1>
|
||
|
<p class="content">
|
||
|
The Citra Emulator compatibility list contains all the games we tested, sorted by how well they work on the emulator.
|
||
|
</p>
|
||
|
<table class="table is-fullwidth">
|
||
|
<tbody>
|
||
|
{{ range .Site.Data.compatibility }}
|
||
|
<tr>
|
||
|
<td>
|
||
|
<div class="is-square" style="background-color: {{ .color }}"></div> {{ .name }}
|
||
|
</td>
|
||
|
<td>{{ .description }}</td>
|
||
|
</tr>
|
||
|
{{ end }}
|
||
|
</tbody>
|
||
|
</table>
|
||
|
|
||
|
<div id="highchart-container" style="height: 100px; margin: 0 auto"></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
{{ end }}
|
||
|
|
||
|
{{ define "main" }}
|
||
|
<div class="section pt-xs">
|
||
|
<table class="table is-fullwidth">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th> </th>
|
||
|
<th>Game Title</th>
|
||
|
<th>Compatibility</th>
|
||
|
<th>Date Tested</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
{{ 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") }}
|
||
|
<tr data-key="{{ .Params.section_id }}">
|
||
|
<td class="is-hidden listing-metadata">
|
||
|
<span>{{ .Params.title }} {{ $type.name }} {{ $rating.name }} {{ dateFormat "January 2, 2006" .Params.testcase_date }}</span>
|
||
|
</td>
|
||
|
<td>
|
||
|
<img src="{{ .Site.BaseURL }}/images/game/icons/{{ .File.BaseFileName }}.png" />
|
||
|
</td>
|
||
|
<td data-title="{{ strings.TrimPrefix "The " .Params.title }}">
|
||
|
<a href="{{ .Permalink }}">{{ .Params.title }}</a>
|
||
|
</td>
|
||
|
<td data-compatibility="{{ $rating.key }}">
|
||
|
<div class="is-square" style="background-color: {{ $rating.color }}"></div> <span>{{ $rating.name }}</span>
|
||
|
</td>
|
||
|
<td data-timestamp="{{ .Params.testcase_date }}">
|
||
|
<span>{{ dateFormat "January 2, 2006" .Params.testcase_date }}</span>
|
||
|
</td>
|
||
|
</tr>
|
||
|
{{ end }}
|
||
|
{{ end }}
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
</div>
|
||
|
{{ end }}
|
||
|
|
||
|
{{ define "scripts" }}
|
||
|
<script type="text/javascript">
|
||
|
document.addEventListener('DOMContentLoaded', function() {
|
||
|
Highcharts.chart('highchart-container', {
|
||
|
chart: { type: 'bar', backgroundColor: null },
|
||
|
colors: [{{ range .Site.Data.compatibility }}"{{ .color }}", {{- end }}],
|
||
|
credits: { enabled: false },
|
||
|
exporting: { enabled: false },
|
||
|
title: { text: '' },
|
||
|
xAxis: { categories: [''] },
|
||
|
yAxis: { min: 0, max: {{ len .Data.Pages }}, title: { text: '' } },
|
||
|
legend: { enabled: false },
|
||
|
plotOptions: { series: {
|
||
|
stacking: 'normal',
|
||
|
cursor: 'pointer',
|
||
|
events: {
|
||
|
click: null
|
||
|
}
|
||
|
} },
|
||
|
series: [
|
||
|
{{- $dataPages := .Data.Pages }}
|
||
|
{{- range .Site.Data.compatibility }}
|
||
|
{{- $dataPagesFiltered := where $dataPages ".Params.compatibility" .key }}
|
||
|
{ "name": "{{ .name }}", "data": [ {{ len $dataPagesFiltered }} ] },
|
||
|
{{- end }}
|
||
|
]
|
||
|
});
|
||
|
}, false);
|
||
|
</script>
|
||
|
{{ end }}
|