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 http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"> <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<meta name="theme-color" content="#404040"> <meta name="theme-color" content="#404040">
<meta property="og:title" content="{{ if ne .URL " / " }}{{ .Title }} &middot; {{ end }}{{ .Site.Title }}" /> <meta property="og:title" content="{{ if ne .URL " / " }}{{ .Title }} &middot; {{ end }}{{ .Site.Title }}" />
<meta property="og:site_name" content="{{ .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="icon" href="{{ .Site.BaseURL }}/favicon.ico" />
<link rel="shortcut icon" href="{{ .Site.BaseURL }}/favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="{{ .Site.BaseURL }}/favicon.ico" type="image/x-icon" />
@ -39,7 +46,13 @@
</head> </head>
<body> <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"> <div class="container">
<footer class="footer"> <footer class="footer">
@ -48,14 +61,13 @@
</div> </div>
<script src="{{ .Site.BaseURL }}/js/script.js"></script> <script src="{{ .Site.BaseURL }}/js/script.js"></script>
{{- block "scripts" . }}{{- end }}
{{- if eq (getenv "HUGO_ENV") "PRD" }} {{- if eq (getenv "HUGO_ENV") "PRD" }}
<script type="text/javascript"> <script type="text/javascript">
(adsbygoogle = window.adsbygoogle || []).push({}); (adsbygoogle = window.adsbygoogle || []).push({});
</script> </script>
{{- end }} {{- end }}
{{- block "scripts" . }}{{- end }}
</body> </body>
</html> </html>

View file

View file

@ -1,11 +1,13 @@
{{ define "main" }} {{ define "main" }} {{ $paginator := .Paginate .Data.Pages }}
{{ $paginator := .Paginate .Data.Pages }}
{{ range $paginator.Pages }} <section class="section">
<section class="section"> <div class="container">
{{ .Render "summary" }} <h1 class="title">{{ .Title }}</h1>
</section>
{{ end }}
{{ partial "layout/pagination" . }} <div class="columns is-multiline">
{{ end }} {{ 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="column is-4">
<div class="card"> <a class="is-size-5" href="{{ .Permalink }}">
<div class="card-image"> <span class="icon">
<figure class="image is-2by1"> <i class="fas fa-file-alt"></i>
<img src="{{ .Site.BaseURL }}/images/banners/{{ .Params.Banner | default (print .File.BaseFileName " .png ") }}" alt=""> </span>
</figure> {{ .Title }}
</div> </a>
</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>

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) }} {{ $paginator := .Paginator }}
<nav aria-label="...">
<ul class="pager">
{{ if .Paginator.HasPrev }} <!-- If there's more than one page. -->
<li class="previous"> {{ if gt $paginator.TotalPages 1 }}
<a rel="previous" href="{{.Paginator.Prev.URL | absURL}}"><span aria-hidden="true">&larr;</span> Previous</a> <div class="section">
</li> <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 }} {{ end }}
{{ if $paginator.HasNext }}
{{ if .Paginator.HasNext }} <a class="pagination-next" href="{{ $paginator.Next.URL }}">Next Page</a>
<li class="next">
<a rel="next" href="{{.Paginator.Next.URL | absURL}}"><span aria-hidden="true">&rarr;</span> Next</a>
</li>
{{ end }} {{ 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> </ul>
</nav> </nav>
</div>
</div>
{{ end }} {{ end }}

View file

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