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

209 lines
7.4 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">
{{ if (fileExists (print "static/images/game/boxart/" .File.BaseFileName ".png")) }}
<img src="{{ .Site.BaseURL }}/images/game/boxart/{{ .File.BaseFileName }}.png" />
{{ else }}
2019-03-18 04:12:30 +00: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 00:11:17 +00:00
{{ $wikiId := .Params.wiki_override | default $gameId }}
{{ $rating := index .Site.Data.compatibility .Params.compatibility }}
2018-11-10 22:22:30 +00: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 22:22:30 +00:00
{{ if .Content }}
<p>The below game entry is based on user submitted content.</p>
2018-11-11 00:11:17 +00: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 22:22:30 +00:00
{{ else }}
<p>The below game entry is based on user submitted content.</p>
2018-11-11 00:11:17 +00:00
<p>See a mistake? Want to contribute? <a href="{{ .Site.Params.GithubGamesWikiURL }}/wiki/{{ $wikiId }}/">Edit
2018-11-10 22:22:30 +00:00
this article on Github</a></p>
{{ end }}
</div>
</article>
<h1>{{ .Params.title }}</h1>
2018-11-11 19:30:01 +00: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 22:22:30 +00: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 19:30:01 +00: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 22:22:30 +00:00
<div>
<span class="is-square" style="background-color: {{ $rating.color }};"></span>
{{ $rating.name}}
2018-11-10 22:22:30 +00: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-10 23:22:52 +00: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 03:06:05 +00: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 03:52:51 +00:00
<td><a href="/savefiles/{{ $gameId }}/{{ .basename }}.zip">{{ .title }}</a></td>
2018-11-16 03:06:05 +00:00
<td>{{ .description }}</td>
</tr>
{{ end }}
</tbody>
</table>
{{ end }}
{{ $columns := 3 }}
{{ if (where (readDir "/static/images/screenshots0") "Name" .File.BaseFileName) }}
2018-11-16 03:06:05 +00:00
<h2>Screenshots</h2>
<div class="baguetteBox">
<div class="tile is-ancestor">
{{ $files := readDir (printf "/static/images/screenshots0/%s/" .File.BaseFileName) }}
2019-01-08 04:16:19 +00:00
{{ range $index, $element := $files }}
{{ $fileTitle := (index (split .Name "-") 1) }}
{{ $fileTitle := (index (split $fileTitle ".") 0) }}
<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 22:51:47 +00:00
{{ end }}
</section>
2018-11-10 22:22:30 +00:00
{{ end }}