shared-bulma-theme/layouts/game/single.html

208 lines
7.3 KiB
HTML
Raw Normal View History

{{ define "sidebar" }}
{{ $gameId := .File.BaseFileName }}
{{ $rating := index .Site.Data.compatibility .Params.compatibility }}
<section class="section content pt-sm">
<div class="has-text-centered py-md">
{{ $boxart := resources.Get (printf "/images/game/boxart/%s.png" $gameId) }}
{{ if $boxart }} {{ $boxart_thumb := $boxart.Fill "328x300" }}
<img src="{{ $boxart_thumb.Permalink }}" />
{{ else }}
2019-03-18 05:12:30 +01:00
<img src="{{ .Site.BaseURL }}/images/boxart.png" />
{{ end }}
</div>
<div class="columns is-mobile">
<div class="column is-one-third">Compatibility</div>
<div class="column">
<div><span class="is-square" style="background-color: {{ $rating.color }};"></span> {{ $rating.name }}</div>
<div>{{ $rating.description }}</div>
</div>
</div>
<div class="columns is-mobile">
<div class="column is-one-third">Release(s)</div>
<div class="column">
{{ range .Params.releases }}
<div>
<div><img src="{{ .Site.BaseURL }}/images/regions/{{ .region | default "all" }}.png" /> {{ .id }}</div>
</div>
{{ end }}
</div>
</div>
</section>
{{ end }}
{{ define "main" }}
{{ $gameId := .File.BaseFileName }}
2018-11-11 01:11:17 +01:00
{{ $wikiId := .Params.wiki_override | default $gameId }}
{{ $rating := index .Site.Data.compatibility .Params.compatibility }}
2018-11-10 23:22:30 +01:00
<section class="section content pt-lg">
{{- if eq .Params.incomplete true }}
<article class="message is-danger is-size-7">
<div class="message-body">
<p>This page is considered <b>INCOMPLETE</b> due to any one of the following reasons:</p>
<ul>
<li>Missing screenshots</li>
<li>Missing/insufficient wiki article</li>
<li>Unverified game compatibility rating</li>
</ul>
<p>The information below may not accurately represent your experience.</p>
<p>Pages that are left incomplete may be subject for removal. We encourage you to submit additional
content.</p>
</div>
</article>
{{ end }}
<article class="message is-size-7">
<div class="message-body">
2018-11-10 23:22:30 +01:00
{{ if .Content }}
<p>The below game entry is based on user submitted content.</p>
2018-11-11 01:11:17 +01:00
<p>See a mistake? Want to contribute? <a href="{{ .Site.Params.GithubGamesWikiURL }}/wiki/{{ $wikiId }}/_edit/">Edit
this article on Github</a></p>
2018-11-10 23:22:30 +01:00
{{ else }}
<p>The below game entry is based on user submitted content.</p>
2018-11-11 01:11:17 +01:00
<p>See a mistake? Want to contribute? <a href="{{ .Site.Params.GithubGamesWikiURL }}/wiki/{{ $wikiId }}/">Edit
2018-11-10 23:22:30 +01:00
this article on Github</a></p>
{{ end }}
</div>
</article>
<h1>{{ .Params.title }}</h1>
2018-11-11 20:30:01 +01:00
{{ .Description }}
<h2>Summary</h2>
{{ if .Content }}
{{ .Content }}
{{ else }}
<p>This game does not yet have a wiki article.</p>
<p>Please use the edit button up above to create one.</p>
{{ end }}
{{ if gt (len .Params.issues) 0 }}
<h2>Known Issues</h2>
<table class="table">
<thead>
<tr>
<th>Title</th>
<th>Created</th>
<th>Last Updated</th>
</tr>
</thead>
<tbody>
{{ $githubUrl := .Site.Params.GithubURL }}
{{ range .Params.issues }}
<tr class="is-size-7">
<th>
<a href="{{ $githubUrl }}/issues/{{ .id }}">{{ .title }}</a>
</th>
<td>{{ dateFormat "January 2, 2006" .created_at }}</td>
<td>{{ dateFormat "January 2, 2006" .updated_at }}</td>
</tr>
{{ end }}
</tbody>
</table>
{{ end }}
<h2>Compatibility</h2>
2018-11-10 23:22:30 +01:00
{{ if gt (len .Params.testcases) 0 }}
<table class="table">
<thead>
<tr>
<th>Build Date</th>
<th>Tested By</th>
<th>Hardware</th>
2018-11-11 20:30:01 +01:00
<th>Version</th>
<th>Rating</th>
</tr>
</thead>
<tbody>
{{ $siteCompatibility := .Site.Data.compatibility }}
{{ range .Params.testcases }}
{{- $rating := index $siteCompatibility .compatibility }}
<tr class="is-size-7">
<td>{{ if isset . "buildDate" }} {{ dateFormat "01/2/2006" .buildDate }} {{ end }}</td>
<td>
<a href="https://community.citra-emu.org/u/{{ .author }}/summary">{{ .author }}</a>
<small>on {{ dateFormat "01/02/2006" .date }}</small>
</td>
<td>{{ .cpu }}<br />{{ .gpu }}<br />{{ .os }}</td>
<td>{{ if isset . "buildName" }}{{ .buildName }} Build<br />{{ end }}{{ .version }}</td>
<td>
2018-11-10 23:22:30 +01:00
<div>
<span class="is-square" style="background-color: {{ $rating.color }};"></span>
{{ $rating.name}}
2018-11-10 23:22:30 +01:00
</div>
</td>
</tr>
{{ end }}
</tbody>
</table>
{{ else }}
<p>This game is untested. Please play through this game and report your compatibility with this title.</p>
{{ end }}
2019-10-11 01:22:52 +02:00
{{ if eq .Params.title "The Legend of Zelda: Link's Awakening" }}
<h2>Game Mods</h2>
<small><a href="https://yuzu-emu.org/help/feature/game-modding/">See our game modding article on how to apply patches.</a></small>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="/mods/ZLA_Noblur_Mod.zip">ZLA_Noblur_Mod.zip</a></td>
<td>Disables blur and depth of field.</td>
</tr>
</tbody>
</table>
{{ end }}
2018-11-16 04:06:05 +01:00
{{ if gt (len .Params.savefiles) 0 }}
<h2>Savefiles</h2>
<table class="table">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
{{ range .Params.savefiles }}
<tr>
2018-11-16 04:52:51 +01:00
<td><a href="/savefiles/{{ $gameId }}/{{ .basename }}.zip">{{ .title }}</a></td>
2018-11-16 04:06:05 +01:00
<td>{{ .description }}</td>
</tr>
{{ end }}
</tbody>
</table>
{{ end }}
{{ $columns := 3 }}
{{ if (where (readDir "/static/images/screenshots0") "Name" .File.BaseFileName) }}
2018-11-16 04:06:05 +01:00
<h2>Screenshots</h2>
<div class="baguetteBox">
<div class="tile is-ancestor">
{{ $files := readDir (printf "/static/images/screenshots0/%s/" .File.BaseFileName) }}
2019-01-08 05:16:19 +01:00
{{ range $index, $element := $files }}
<div class="tile is-parent">
<div class="tile is-child is-boxed">
<a href="/images/screenshots0/{{ $gameId }}/{{ .Name }}">
<img src="/images/screenshots0/{{ $gameId }}/{{ .Name }}" />
</a>
</div>
</div>
{{ if eq (mod $index $columns) (sub $columns 1) }}
</div>
<div class="tile is-ancestor">
{{ end }}
{{ end }}
</div>
</div>
2018-11-11 23:51:47 +01:00
{{ end }}
</section>
2018-11-10 23:22:30 +01:00
{{ end }}