2017-06-04 00:00:44 +02:00
|
|
|
{{ define "main" }}
|
2017-06-04 01:19:19 +02:00
|
|
|
<h1>Game Compatibility List</h1>
|
|
|
|
<p>The Citra Emulator compatibility list contains all the games we tested, sorted by how well they work on the emulator.</p>
|
2017-06-04 20:06:33 +02:00
|
|
|
<table class="table table-striped table-bordered">
|
2017-06-04 01:19:19 +02:00
|
|
|
<tbody>
|
2017-06-11 14:38:58 +02:00
|
|
|
{{ range .Site.Data.compatibility }}
|
2017-07-09 19:04:05 +02:00
|
|
|
<tr>
|
2017-06-11 14:38:58 +02:00
|
|
|
<td style="width: 120px;"><div class="square-icon" style="background-color: {{ .color }}"></div> {{ .name }}</td>
|
|
|
|
<td class="row-compat-desc">{{ .description }}</td>
|
|
|
|
</tr>
|
|
|
|
{{ end }}
|
2017-06-04 01:19:19 +02:00
|
|
|
</tbody>
|
|
|
|
</table>
|
2017-06-04 19:57:52 +02:00
|
|
|
|
2017-06-05 23:34:27 +02:00
|
|
|
<div id="highchart-container" style="height: 100px; margin: 0 auto"></div>
|
|
|
|
|
2017-06-11 14:38:58 +02:00
|
|
|
<hr />
|
|
|
|
|
2017-07-04 06:10:07 +02:00
|
|
|
<div id="game-listing">
|
|
|
|
<div>
|
|
|
|
<form class="pull-right">
|
|
|
|
<div class="form-group">
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<div class="input-group search-box">
|
2017-07-25 03:16:08 +02:00
|
|
|
<input type="text" class="form-control search" id="search-box" placeholder="Search...">
|
2017-10-03 21:57:02 +02:00
|
|
|
<span class="clear-search input-group-addon">X</span>
|
2017-07-04 06:10:07 +02:00
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<a href="https://services.citra-emu.org/game/" class="btn btn-default">Add a Game</a>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</form>
|
2017-06-11 14:38:58 +02:00
|
|
|
</div>
|
|
|
|
|
2017-10-24 16:19:56 +02:00
|
|
|
<ul class="pagination paginationTop pull-left"></ul>
|
2017-06-11 14:38:58 +02:00
|
|
|
|
2017-07-04 06:10:07 +02:00
|
|
|
<table id="compatibility-list" class="table table-responsive">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th></th>
|
2017-07-09 19:04:05 +02:00
|
|
|
<th class="sort" data-sort="title">Title</th>
|
|
|
|
<th class="sort" data-sort="type">Type</th>
|
|
|
|
<th class="sort" data-sort="compatibility">Compatibility</th>
|
|
|
|
<th class="sort" data-sort="date-tested">Date Tested</th>
|
2017-07-04 06:10:07 +02:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody class="list">
|
|
|
|
{{ range .Data.Pages.GroupByParam "section_id" }}
|
|
|
|
|
|
|
|
{{ range .Pages }}
|
2017-07-10 01:47:13 +02:00
|
|
|
{{- $key := substr .Params.title 0 1 }}
|
2017-07-19 01:10:57 +02:00
|
|
|
{{- $rating := index .Site.Data.compatibility .Params.compatibility }}
|
2017-07-04 06:10:07 +02:00
|
|
|
{{- $type := index .Site.Data.gameTypes (.Params.game_type | default "3ds") }}
|
2017-07-10 01:47:13 +02:00
|
|
|
<tr data-key="{{ $key }}">
|
2017-07-04 06:10:07 +02:00
|
|
|
<td class="hidden listing-metadata">
|
2017-07-19 01:10:57 +02:00
|
|
|
<span>{{ .Params.title }} {{ $type.name }} {{ $rating.name }} {{ dateFormat "January 2, 2006" .Params.testcase_date }}</span>
|
2017-07-04 06:10:07 +02:00
|
|
|
</td>
|
2017-07-09 19:04:05 +02:00
|
|
|
<td class="col-md-1 icon">
|
2017-07-04 06:10:07 +02:00
|
|
|
<img src="/images/game/icons/{{ .File.BaseFileName }}.png" />
|
|
|
|
</td>
|
2017-07-19 01:21:09 +02:00
|
|
|
<td class="col-md-6 title" data-title="{{ .Params.title }}">
|
2017-07-04 06:10:07 +02:00
|
|
|
<a href="{{ .Permalink }}">{{ .Params.title }}</a>
|
|
|
|
</td>
|
2017-07-19 01:21:09 +02:00
|
|
|
<td class="col-md-1 type" data-type="{{ $type.name }}">
|
2017-07-04 06:10:07 +02:00
|
|
|
<img src="/images/game/types/{{ $type.key }}.png" title="{{ $type.name }}" />
|
|
|
|
</td>
|
2017-07-19 01:21:09 +02:00
|
|
|
<td class="col-md-1 compatibility" data-compatibility="{{ $rating.key }}">
|
2017-07-19 01:10:57 +02:00
|
|
|
<div class="square-icon" style="background-color: {{ $rating.color }}"></div> <span>{{ $rating.name }}</span>
|
2017-07-04 06:10:07 +02:00
|
|
|
</td>
|
2017-07-19 01:21:09 +02:00
|
|
|
<td class="col-md-3 date-tested" data-timestamp="{{ .Params.testcase_date }}">
|
2017-07-19 01:10:57 +02:00
|
|
|
<span>{{ dateFormat "January 2, 2006" .Params.testcase_date }}</span>
|
2017-07-04 06:10:07 +02:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{ end }}
|
2017-06-11 14:38:58 +02:00
|
|
|
{{ end }}
|
2017-07-04 06:10:07 +02:00
|
|
|
</tbody>
|
|
|
|
</table>
|
2017-10-24 16:19:56 +02:00
|
|
|
<ul class="pagination paginationBottom pull-left"></ul>
|
2017-07-04 06:10:07 +02:00
|
|
|
</div>
|
2017-06-04 00:00:44 +02:00
|
|
|
{{ end }}
|
2017-06-05 23:34:27 +02:00
|
|
|
|
|
|
|
{{ define "scripts" }}
|
|
|
|
<script src="https://code.highcharts.com/highcharts.js"></script>
|
|
|
|
<script src="https://code.highcharts.com/modules/exporting.js"></script>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
2017-08-30 04:16:03 +02:00
|
|
|
$(function() {
|
2017-10-03 21:57:02 +02:00
|
|
|
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();
|
|
|
|
}
|
|
|
|
|
2017-08-30 04:16:03 +02:00
|
|
|
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' ],
|
2017-10-24 16:19:56 +02:00
|
|
|
pagination: [
|
|
|
|
{ paginationClass: "paginationTop" },
|
|
|
|
{ paginationClass: "paginationBottom" }
|
|
|
|
],
|
2017-08-30 04:16:03 +02:00
|
|
|
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");
|
|
|
|
}
|
|
|
|
})
|
2017-07-04 06:10:07 +02:00
|
|
|
}
|
2017-08-30 04:16:03 +02:00
|
|
|
});
|
|
|
|
|
2017-10-03 21:57:02 +02:00
|
|
|
$('#game-listing .clear-search').click(clearSearch);
|
|
|
|
|
2017-08-30 04:16:03 +02:00
|
|
|
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 }}
|
|
|
|
]
|
|
|
|
});
|
2017-07-04 06:10:07 +02:00
|
|
|
});
|
2017-06-05 23:34:27 +02:00
|
|
|
</script>
|
|
|
|
{{ end }}
|