Rearranged layout. Updated page listings. Added proper pagination. Added downloads page as a unique page. Updated wiki layout for being just a header. Updated summary to be based on columns.

This commit is contained in:
Chris 2018-01-19 23:10:16 -05:00
parent 2a3192a467
commit 5a5f12732d
8 changed files with 147 additions and 61 deletions

View File

@ -6,9 +6,16 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<meta name="theme-color" content="#404040">
<meta property="og:title" content="{{ if ne .URL " / " }}{{ .Title }} &middot; {{ end }}{{ .Site.Title }}" />
<meta property="og:site_name" content="{{ .Site.Title }}" />
<meta property="og:url" content="{{ .Permalink }}" /> {{- if eq .IsPage true }} {{ .Render "meta" }} {{- end }} {{ .Hugo.Generator }}
<meta property="og:url" content="{{ .Permalink }}" />
{{- if eq .IsPage true }}
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{ .Summary }}{{ end }}" />
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ .Summary }}{{ end }}" />
<meta property="og:type" content="website" />
{{- end }}
<link rel="icon" href="{{ .Site.BaseURL }}/favicon.ico" />
<link rel="shortcut icon" href="{{ .Site.BaseURL }}/favicon.ico" type="image/x-icon" />
@ -39,7 +46,13 @@
</head>
<body>
{{- if not .IsHome }} {{ partial "layout/navbar" . }} {{- end }} {{ block "main" . }}{{ end }}
{{- if not .IsHome }}
{{ partial "layout/navbar" . }}
{{- end }}
{{ .Render "header" }}
{{ block "main" . }}{{ end }}
<div class="container">
<footer class="footer">
@ -48,14 +61,13 @@
</div>
<script src="{{ .Site.BaseURL }}/js/script.js"></script>
{{- block "scripts" . }}{{- end }}
{{- if eq (getenv "HUGO_ENV") "PRD" }}
<script type="text/javascript">
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
{{- end }}
{{- block "scripts" . }}{{- end }}
</body>
</html>

View File

View File

@ -1,11 +1,13 @@
{{ define "main" }}
{{ $paginator := .Paginate .Data.Pages }}
{{ define "main" }} {{ $paginator := .Paginate .Data.Pages }}
{{ range $paginator.Pages }}
<section class="section">
{{ .Render "summary" }}
</section>
{{ end }}
<section class="section">
<div class="container">
<h1 class="title">{{ .Title }}</h1>
{{ partial "layout/pagination" . }}
{{ end }}
<div class="columns is-multiline">
{{ range $paginator.Pages }} {{ .Render "summary" }} {{ end }}
</div>
</div>
</section>
{{ partial "layout/pagination" . }} {{ end }}

View File

@ -1,3 +0,0 @@
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{ .Summary }}{{ end }}" />
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ .Summary }}{{ end }}" />
<meta property="og:type" content="website" />

View File

@ -1,18 +1,8 @@
<a href="{{ .Permalink }}">
<div class="card">
<div class="card-image">
<figure class="image is-2by1">
<img src="{{ .Site.BaseURL }}/images/banners/{{ .Params.Banner | default (print .File.BaseFileName " .png ") }}" alt="">
</figure>
</div>
<div class="card-content">
<p class="title is-4">{{ .Title }}</p>
<p class="subtitle is-6">{{ .Date.Format "January 02 2006" }} by {{ .Params.author }}</p>
<div class="content">
{{ .Summary }}
</div>
</div>
</div>
</a>
<div class="column is-4">
<a class="is-size-5" href="{{ .Permalink }}">
<span class="icon">
<i class="fas fa-file-alt"></i>
</span>
{{ .Title }}
</a>
</div>

View File

@ -0,0 +1,86 @@
{{ define "main" }}
<section class="section">
<div class="container">
<h1 class="title">{{ .Title }}</h1>
<article class="message has-text-weight-semibold">
<div class="message-body">
<p>At this time, yuzu does not run any commercial Switch games. yuzu can boot some games, to varying degrees
of success, but does not implement any of the necessary GPU features to render 3D graphics. </p>
<p>
<a href="https://yuzu-emu.org/wiki/switch-homebrew/">Click here</a> for homebrew games you can download and test.</p>
</div>
</article>
<div class="content">
{{ .Content }}
</div>
</div>
</section>
<!-- Advertisement -->
<section class="hero is-info">
<div class="hero-body">
<div class="has-text-centered">
<ins class="adsbygoogle" style="display:inline-block;width:728px;height:90px" data-ad-client="{{ .Site.Params.GoogleAdsenseClient }}"
data-ad-slot="1038554045"></ins>
</div>
</div>
</section>
<div class="section">
<div class="container">
<div class="columns">
<!-- Nightly -->
<div class="column">
<h3>Nightly Build
<span style='font-size: smaller; margin-left: 6px;'>
Last release was
<span id='last-updated-nightly'></span>
</span>
</h3>
<div id="downloads-nightly">
</div>
<div id="unavailable-nightly" class="is-hidden">There was a problem checking GitHub. Click the link below to view them directly.</div>
<br />
<div class="has-text-centered">
<a href="https://github.com/yuzu-emu/yuzu-nightly/releases">Click here to view previous versions...</a>
</div>
</div>
<div class="column">
<h3>Canary Build
<span style='font-size: smaller; margin-left: 6px;'>
Last release was
<span id='last-updated-canary'></span>
</span>
</h3>
<div id="downloads-canary">
</div>
<div id="unavailable-canary" class="is-hidden">There was a problem checking GitHub. Click the link below to view them directly.</div>
<br />
<div class="has-text-centered">
<a href="https://github.com/yuzu-emu/yuzu-canary/releases">Click here to view previous versions...</a>
</div>
</div>
</div>
</div>
</div>
{{ end }}
{{ define "scripts" }}
<script type="text/javascript" src="/js/moment.min.js"></script>
<script type="text/javascript">
function fetchReleases() {
getRelease('nightly');
getRelease('canary');
}
fetchReleases();
</script>
{{ end }}

View File

@ -1,21 +1,27 @@
{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }}
<nav aria-label="...">
<ul class="pager">
{{ $paginator := .Paginator }}
{{ if .Paginator.HasPrev }}
<li class="previous">
<a rel="previous" href="{{.Paginator.Prev.URL | absURL}}"><span aria-hidden="true">&larr;</span> Previous</a>
</li>
<!-- If there's more than one page. -->
{{ if gt $paginator.TotalPages 1 }}
<div class="section">
<div class="container">
<nav class="pagination is-right" role="navigation" aria-label="pagination">
{{ if $paginator.HasPrev }}
<a class="pagination-previous" href="{{ $paginator.Prev.URL }}">Previous Page</a>
{{ end }}
{{ if .Paginator.HasNext }}
<li class="next">
<a rel="next" href="{{.Paginator.Next.URL | absURL}}"><span aria-hidden="true">&rarr;</span> Next</a>
</li>
{{ if $paginator.HasNext }}
<a class="pagination-next" href="{{ $paginator.Next.URL }}">Next Page</a>
{{ end }}
<ul class="pagination-list">
{{ range $paginator.Pagers }}
<li>
<a class="pagination-link" aria-label="Goto page {{ .PageNumber}}" href="{{ .URL }}">{{ .PageNumber }}</a>
</li>
{{ end }}
</ul>
</nav>
</div>
</div>
{{ end }}

View File

@ -1,5 +1,4 @@
{{ define "main" }}
<section class="section">
<section class="section" style="padding-bottom: 0px;">
<div class="container">
<article class="message">
<div class="message-body">
@ -7,11 +6,5 @@
<p>See a mistake? Want to contribute? <a href="{{ .Site.Params.GithubURL }}/wiki/{{ .File.BaseFileName }}/_edit/">Edit this article on Github</a></p>
</div>
</article>
<h1 class="title">{{ .Title }}</h1>
<div class="content">
{{ .Content }}
</div>
</div>
</section>
{{ end }}