2018-04-26 02:55:34 +00:00
|
|
|
{{ define "header" }}
|
|
|
|
<div class="container">
|
|
|
|
<div class="section pb-xs">
|
|
|
|
<h1 class="title">Game Compatibility List</h1>
|
|
|
|
<p class="content">
|
2018-10-17 00:33:45 +00:00
|
|
|
The compatibility list contains all the games we tested, sorted by how well they work on the emulator.
|
2018-04-26 02:55:34 +00:00
|
|
|
</p>
|
|
|
|
<table class="table is-fullwidth">
|
|
|
|
<tbody>
|
2018-10-17 00:33:45 +00:00
|
|
|
{{ range .Site.Data.compatibility }}
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<div class="is-square" style="background-color: {{ .color }}"></div> {{ .name }}
|
|
|
|
</td>
|
|
|
|
<td>{{ .description }}</td>
|
|
|
|
</tr>
|
|
|
|
{{ end }}
|
2018-04-26 02:55:34 +00:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
2018-11-10 06:03:59 +00:00
|
|
|
<!-- <div id="highchart-container" style="height: 100px; margin: 0 auto"></div> -->
|
2018-04-26 02:55:34 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ define "main" }}
|
2018-10-17 00:33:45 +00:00
|
|
|
<div class="section pt-xs">
|
|
|
|
<table class="table is-fullwidth">
|
2018-04-26 02:55:34 +00:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th> </th>
|
|
|
|
<th>Game Title</th>
|
|
|
|
<th>Compatibility</th>
|
|
|
|
<th>Date Tested</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{{ range .Data.Pages.GroupByParam "section_id" }}
|
2018-10-17 00:33:45 +00:00
|
|
|
{{ 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" style="width: 48px; height: 48px;" />
|
|
|
|
</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 }}
|
2018-04-26 02:55:34 +00:00
|
|
|
{{ end }}
|
|
|
|
</tbody>
|
2018-10-17 00:33:45 +00:00
|
|
|
</table>
|
2018-04-26 02:55:34 +00:00
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ define "scripts" }}
|
2018-11-10 06:03:59 +00:00
|
|
|
<!-- <script type="text/javascript">
|
2018-10-17 00:35:35 +00:00
|
|
|
$(function() {
|
|
|
|
function getLastSorted(list){
|
|
|
|
var currentSorted = $(list.listContainer).find(".asc, .desc").attr("data-sort");
|
|
|
|
if ('undefined' !== typeof currentSorted)
|
|
|
|
list.lastSorted = currentSorted;
|
|
|
|
return list.lastSorted;
|
|
|
|
}
|
|
|
|
|
|
|
|
function filterTable(_) {
|
|
|
|
var rating = this.name;
|
|
|
|
var index = this.index;
|
|
|
|
|
|
|
|
$("#search-box").val(rating);
|
|
|
|
list.search(index, ['compatibility']);
|
|
|
|
}
|
|
|
|
|
|
|
|
function clearSearch() {
|
|
|
|
$("#search-box").val("");
|
|
|
|
list.search();
|
|
|
|
}
|
|
|
|
|
|
|
|
var options = {
|
|
|
|
valueNames: [
|
|
|
|
'listing-metadata',
|
|
|
|
{ name: 'title', attr: 'data-title' },
|
|
|
|
{ name: 'type', attr: 'data-type' },
|
|
|
|
{ name: 'compatibility', attr: 'data-compatibility' },
|
|
|
|
{ name: 'date-tested', attr: 'data-timestamp' }
|
|
|
|
],
|
|
|
|
searchColumns: [ 'listing-metadata' ],
|
|
|
|
pagination: [
|
|
|
|
{ paginationClass: "paginationTop" },
|
|
|
|
{ paginationClass: "paginationBottom" }
|
|
|
|
],
|
|
|
|
indexAsync: true,
|
|
|
|
page: 50
|
|
|
|
};
|
|
|
|
|
|
|
|
var list = new List('game-listing', options);
|
|
|
|
|
|
|
|
list.sort("title", {order: "asc"});
|
|
|
|
|
|
|
|
list.on("updated", function(list){
|
|
|
|
var $list = $(list.list);
|
|
|
|
var $items = $list.children();
|
|
|
|
$items.removeClass("key");
|
|
|
|
if ('title' == getLastSorted(list)){
|
|
|
|
$items.each(function(){
|
|
|
|
var key = $(this).attr("data-key")
|
|
|
|
if (
|
|
|
|
$list
|
|
|
|
.children("[data-key='" + key + "']")
|
|
|
|
.first()
|
|
|
|
.is( $(this) )
|
|
|
|
){
|
|
|
|
$(this).addClass("key");
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#game-listing .clear-search').click(clearSearch);
|
|
|
|
|
|
|
|
Highcharts.chart('highchart-container', {
|
|
|
|
chart: { type: 'bar' },
|
|
|
|
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: filterTable
|
|
|
|
}
|
|
|
|
} },
|
|
|
|
series: [
|
|
|
|
{{- $dataPages := .Data.Pages }}
|
|
|
|
{{- range .Site.Data.compatibility }}
|
|
|
|
{{- $dataPagesFiltered := where $dataPages ".Params.compatibility" .key }}
|
|
|
|
{ "name": "{{ .name }}", "data": [ {{ len $dataPagesFiltered }} ] },
|
|
|
|
{{- end }}
|
|
|
|
]
|
|
|
|
});
|
|
|
|
});
|
2018-11-10 06:03:59 +00:00
|
|
|
</script> -->
|
2018-10-17 00:33:45 +00:00
|
|
|
{{ end }}
|