shared-bulma-theme/layouts/entry/single.html
Vamsi Krishna 5a87667766
add authors & modify layout (#3)
* add authors & modify layout
2020-11-01 03:13:57 +05:30

60 lines
2 KiB
HTML

{{ define "header" }}
{{ $author := index .Site.Data.authors ( .Params.author | default "" ) }}
{{ $coauthor := index .Site.Data.authors ( .Params.coauthor | default "" ) }}
<div class="mb-md blog-entry-header single" style="background-image: url('{{ .Site.BaseURL }}/{{ .Dir }}banner.png')"></div>
<div class="has-text-centered">
<div>
<span class="title px-md py-sm">{{ .Title }}</span>
</div>
{{ if and $author $coauthor }}
<div>
<span class="h3 px-md py-sm">
Written by <a href="https://community.citra-emu.org/users/{{ $author.key }}">{{ $author.name }}</a>
and <a href="https://community.citra-emu.org/users/{{ $coauthor.key }}">{{ $coauthor.name }}</a>
on {{ .Date.Format $.Site.Params.fmt.Date }}
</span>
</div>
{{ else if $author }}
<div>
<span class="h3 px-md py-sm">
Written by <a href="https://community.citra-emu.org/users/{{ $author.key }}">{{ $author.name }}</a>
on {{ .Date.Format $.Site.Params.fmt.Date }}
</span>
</div>
{{ else }}
<div>
<span class="h3 px-md py-sm">
Written on {{ .Date.Format $.Site.Params.fmt.Date }}
</span>
</div>
{{ end }}
</div>
{{ end }}
{{ define "main" }}
<section class="section content pt-sm">
<br>
{{ .Content }}
</section>
{{ if .Params.forum }}
<div class="has-text-centered">
<a class="pagination-next" href="https://community.citra-emu.org/t/{{ .Params.forum }}">Continue the discussion on our forums.</a>
</div>
{{ end }}
{{ end }}
{{ define "css" }}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/baguettebox.js/1.11.1/baguetteBox.min.css" type="text/css" />
{{ end }}
{{ define "scripts" }}
<script src="https://cdnjs.cloudflare.com/ajax/libs/baguettebox.js/1.11.1/baguetteBox.min.js" type="text/javascript"></script>
<script type="text/javascript">
window.addEventListener("DOMContentLoaded", function() {
baguetteBox.run('.is-img-preview');
});
</script>
{{ end }}