Updated shared-bulma-theme with updates to partials, added updated entry partials.

This commit is contained in:
Chris 2018-04-14 16:19:56 -04:00
parent 4409426205
commit c7760b9895
19 changed files with 109 additions and 136 deletions

View File

@ -11,11 +11,14 @@
<meta property="og:site_name" content="{{ .Site.Title }}" />
<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 }}" />
{{ if .IsHome }}
<meta property="og:description" content="{{ .Summary }}" />
<meta name="description" content="{{ .Summary }}" />
<meta property="og:type" content="website" />
{{- end }}
<meta property="og:image" content="{{ .Site.BaseURL }}/images/logo.png" />
{{ else if .IsPage }}
{{ .Render "meta" }}
{{ end }}
<link rel="icon" href="{{ .Site.BaseURL }}/favicon.ico" />
<link rel="shortcut icon" href="{{ .Site.BaseURL }}/favicon.ico" type="image/x-icon" />
@ -55,7 +58,11 @@
{{ block "header" . }}{{ end }}
{{ $full_width := .Params.FullWidth | default false }}
{{ if eq $full_width true }}
{{- if .IsHome }}
<div class="container">
{{ block "main" . }}{{ end }}
</div>
{{ else if eq $full_width true }}
<div class="container">
{{ block "main" . }}{{ end }}
</div>
@ -74,7 +81,7 @@
<div class="container">
<footer class="footer">
{{ partial "layout/footer_contents.html" . }}
{{ partial "layout/footerContents" . }}
</footer>
</div>

View File

@ -1,12 +1,14 @@
{{ define "main" }} {{ $paginator := .Paginate .Data.Pages }}
<section class="section">
<div class="container">
<h1 class="title">{{ .Title }}</h1>
<div class="columns is-multiline">
{{ range $paginator.Pages }} {{ .Render "summary" }} {{ end }}
{{ range $paginator.Pages }}
<div class="column is-6">
{{ .Render "summary" }}
</div>
{{ end }}
</div>
</section>

View File

@ -0,0 +1,4 @@
<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" />
<meta property="og:image" content="{{ .Site.BaseURL }}/logo.png" />

View File

@ -1,8 +1,6 @@
<div class="column is-4">
<a class="is-size-5" href="{{ .Permalink }}">
<a class="is-size-6" href="{{ .Permalink }}">
<span class="icon">
<i class="fas fa-file-alt"></i>
</span>
{{ .Title }}
</a>
</div>
</a>

4
layouts/entry/meta.html Normal file
View File

@ -0,0 +1,4 @@
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{ .Summary }}{{ end }}" />
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ .Summary }}{{ end }}" />
<meta property="og:type" content="article" />
<meta property="og:image" content="{{ .Permalink }}banner.png" />

View File

@ -1,37 +1,30 @@
{{ define "header" }}
{{ $author := index .Site.Data.authors ( .Params.author | default "" ) }}
<div class="container">
<div>
<div class="blog-entry-header-image is-3by1" style="background-image: url('./banner.png')">
&nbsp;
</div>
<div class="blog-entry-header-content is-3by1">
<div style="position: absolute; bottom: 3em;">
<div class="mb-md blog-entry-header single" style="background-image: url('{{ .Site.BaseURL }}/{{ .Dir }}banner.png')" data-href="{{ .Permalink }}">
<div>
<span class="title px-md py-sm has-background-dark">{{ .Title }}</span>
</div>
{{ if $author }}
<div style="padding-top: 2em;">
<div class="mt-lg">
<span class="h3 px-md py-sm has-background-dark">
Written by <a href="https://community.citra-emu.org/users/{{ $author.key }}">{{ $author.name }}</a>
on {{ .Date.Format "January 02 2006" }}
</span>
</div>
{{ else }}
<div style="padding-top: 2em;">
<div>
<span class="h3 px-md py-sm has-background-dark">
Written on {{ .Date.Format "January 02 2006" }}
</span>
</div>
{{ end }}
</div>
</div>
</div>
</div>
{{ end }}
{{ define "main" }}
<div class="content pt-lg">
<div class="content pt-sm">
{{ .Content }}
</div>

View File

@ -74,13 +74,12 @@
{{ end }}
{{ define "scripts" }}
<script type="text/javascript" src="/js/moment.min.js"></script>
<script type="text/javascript">
function fetchReleases() {
function fetchReleases() {
getRelease('nightly');
getRelease('canary');
}
}
fetchReleases();
fetchReleases();
</script>
{{ end }}

View File

@ -1,48 +1,33 @@
{{ if .Params.twitter }}
<div class="column is-4">
<a class="is-size-5" href="{{ .Params.twitterUrl }}">
<span class="icon">
<i class="fas fa-file-alt"></i>
<div class="mb-md blog-entry-header summary twitter" data-href="{{ .Params.twitterUrl }}">
<div class="px-md">
<span class="h3 moment-timeago">{{ .Date.Format $.Site.Params.fmt.ISO8601 }}</span>
</div>
<div class="mt-md px-md">
<span class="h3">{{ .Content }}</span>
</div>
<div style="position: absolute; bottom: 0; right: 0;">
<span class="h3 px-md py-sm has-background-dark">
<a href="{{ .Params.twitterUrl }}">View Tweet</a>
</span>
TWITTER {{ .Title }}
</a>
</div>
</div>
{{ else }}
{{ $author := index .Site.Data.authors ( .Params.author | default "" ) }}
<div class="mb-md blog-entry-summary" data-href="{{ .Permalink }}">
<div class="blog-entry-header-image is-3by1" style="background-image: url('/{{ .Dir }}/banner.png')">
&nbsp;
<div class="mb-md blog-entry-header summary" style="background-image: url('/{{ .Dir }}/banner.png')" data-href="{{ .Permalink }}">
<div class="px-md">
<span class="title">{{ .Title }}</span>
</div>
<div class="blog-entry-header-content is-3by1">
<div style="position: absolute; bottom: 1em;">
<div>
<span class="title px-md py-sm has-background-dark">{{ .Title }}</span>
<div class="px-md">
<span class="h3 moment-timeago">{{ .Date.Format $.Site.Params.fmt.ISO8601 }}</span>
</div>
{{ if $author }}
<div style="padding-top: 2em;">
<span class="h3 px-md py-sm has-background-dark">
Written by <a href="https://community.citra-emu.org/users/{{ $author.key }}">{{ $author.name }}</a>
on {{ .Date.Format "January 02 2006" }}
</span>
<div class="mt-md px-md">
<span class="h3">{{ .Summary }}</span>
</div>
{{ else }}
<div style="padding-top: 2em;">
<span class="h3 px-md py-sm has-background-dark">
Written on {{ .Date.Format "January 02 2006" }}
</span>
</div>
{{ end }}
<div style="padding-top: 2em;">
<span class="h3 px-md py-sm has-background-dark">
{{ .Summary }}
</span>
</div>
<div style="padding-top: 2em;">
<div style="position: absolute; bottom: 0; right: 0;">
<span class="h3 px-md py-sm has-background-dark">
<a href="{{ .Permalink }}">Read More</a>
</span>
</div>
</div>
</div>
</div>
{{ end }}

View File

@ -1,28 +0,0 @@
<section id="homepage-hero" class="hero is-primary is-bold">
<div class="hero-head">
<!-- is-dark / is-light is set by hero.js for the homepage hero -->
<nav id="hero-navbar" class="navbar is-size-6 is-fixed-top" role="navigation" aria-label="main navigation">
{{ partial "layout/navbar_contents" . }}
</nav>
</div>
<div class="hero-body pt-lg pb-xxs">
<section class="section">
<div class="container">
<div class="columns">
<!-- Left panel -->
<div class="column is-centered-vertically is-5">
{{ partial "home_hero_contents" . }}
</div>
<!-- Right panel -->
<div class="column is-centered-vertically is-7 is-hidden-mobile">
<figure class="image">
{{ partial "jumbotron.html" . }}
</figure>
</div>
</div>
</div>
</section>
</div>
</section>

View File

@ -0,0 +1,16 @@
<section id="homepage-hero" class="hero is-primary is-bold">
<div class="hero-head">
<!-- is-dark / is-light is set by hero.js for the homepage hero -->
<nav id="hero-navbar" class="navbar is-size-6 is-fixed-top" role="navigation" aria-label="main navigation">
{{ partial "layout/navbarContents" . }}
</nav>
</div>
<div class="hero-body pt-lg pb-xxs">
<section class="section">
<div class="container">
{{ partial "homepage/heroContents" . }}
</div>
</section>
</div>
</section>

View File

@ -0,0 +1 @@
<code>Cannot find override file: `./layouts/partials/homepage/heroContents.html`</code>

View File

@ -0,0 +1 @@
<code>Cannot find override file: `./layouts/partials/inline/heroSvg.html`</code>

View File

@ -0,0 +1 @@
<code>Cannot find override file: `./layouts/partials/inline/menuSvg.html`</code>

View File

@ -0,0 +1 @@
<code>Cannot find override file: `./layouts/partials/layout/footerContents.html`</code>

View File

@ -1,3 +1,3 @@
<nav class="navbar {{ .Site.Params.BulmaPrimaryShade }} is-size-6 is-fixed-top" role="navigation" aria-label="main navigation">
{{ partial "layout/navbar_contents" . }}
{{ partial "layout/navbarContents" . }}
</nav>

View File

@ -1,7 +1,7 @@
<div class="container">
<div class="navbar-brand">
<a class="navbar-item" href="{{ .Site.BaseURL }}">
{{ partial "menu.html" . }}
{{ partial "inline/menuSvg" }}
</a>
<div class="burger navbar-burger {{ .Site.Params.BulmaPrimaryShade }}" data-target="navMenu">
@ -14,7 +14,7 @@
<div class="navbar-start">
{{ $currentPage := . }} {{ range .Site.Menus.main }} {{ if .HasChildren }}
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-item px-sm">
<a class="navbar-item px-lg">
{{ .Name }}
<span class="icon">
@ -23,14 +23,14 @@
</a>
<div class="navbar-dropdown">
{{ range .Children }}
<a class="navbar-item {{ if $currentPage.IsMenuCurrent " main " . }} is-active{{ end }}" href="{{ .URL }}">
<a class="navbar-item{{ if $currentPage.IsMenuCurrent "main" . }} is-active{{ end }}" href="{{ .URL }}">
{{ .Name }}
</a>
{{ end }}
</div>
</div>
{{ else }}
<a class="navbar-item px-md {{ if $currentPage.IsMenuCurrent " main " . }} is-active{{ end }}" href="{{ .URL }}">
<a class="navbar-item px-lg{{ if $currentPage.IsMenuCurrent "main" . }} is-active{{ end }}" href="{{ .URL }}">
{{ .Name }}
</a>
{{ end }} {{ end }}
@ -48,17 +48,17 @@
<div class="navbar-end">
<!-- Navbar icons -->
<a class="navbar-item px-md is-hidden-touch" href="{{ .Site.Params.DiscordURL }}" target="_blank">
<a class="navbar-item px-lg is-hidden-touch" href="{{ .Site.Params.DiscordURL }}" target="_blank">
<span class="icon">
<i class="fab fa-2x fa-discord"></i>
</span>
</a>
<a class="navbar-item px-md is-hidden-touch" href="{{ .Site.Params.TwitterURL }}" target="_blank">
<a class="navbar-item px-lg is-hidden-touch" href="{{ .Site.Params.TwitterURL }}" target="_blank">
<span class="icon">
<i class="fab fa-2x fa-twitter"></i>
</span>
</a>
<a class="navbar-item px-md is-hidden-touch" href="{{ .Site.Params.GithubURL }}" target="_blank">
<a class="navbar-item px-lg is-hidden-touch" href="{{ .Site.Params.GithubURL }}" target="_blank">
<span class="icon">
<i class="fab fa-2x fa-github"></i>
</span>

View File

@ -1 +1 @@
<code>Cannot find override file: `./layouts/partials/sidebar.html`</code>
<code>Cannot find override file: `./layouts/partials/layout/sidebar.html`</code>

View File

@ -1,11 +0,0 @@
<a href="https://twitter.com/yuzuemu/status/{{ .id }}">
<div class="card">
<div class="card-content">
<p class="title is-4">@{{ .author }}</p>
<div class="content">
{{ .message }}
</div>
<div><time datetime="2016-1-1">Posted on {{ .date }}</time></div>
</div>
</div>
</a>