add authors & modify layout (#3)

* add authors & modify layout
This commit is contained in:
Vamsi Krishna 2020-11-01 03:13:57 +05:30 committed by GitHub
parent 2a7eec6bef
commit 5a87667766
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 21 deletions

View file

@ -10,6 +10,8 @@
"jmc47": { "key": "jmc47", "name": "JMC47", "avatar": "https://community.citra-emu.org/user_avatar/community.citra-emu.org/jmc47/45/1487_1.png" },
"anodium": { "key": "anodium", "name": "anodium", "avatar": "https://community.citra-emu.org/user_avatar/community.citra-emu.org/anodium/120/485_1.png"},
"saphiresurf": {"key": "saphiresurf", "name": "saphiresurf", "avatar": "https://community.citra-emu.org/user_avatar/community.citra-emu.org/saphiresurf/120/695_1.png"},
"CaptV0rt3x": {"key": "CaptV0rt3x", "name": "CaptV0rt3x", "avatar": "https://community.citra-emu.org/user_avatar/community.citra-emu.org/captv0rt3x/120/98_1.png"},
"GoldenX86": {"key": "GoldenX86", "name": "GoldenX86", "avatar": "https://community.citra-emu.org/user_avatar/community.citra-emu.org/goldenx86/120/42271_2.png"}
"CaptV0rt3x": {"key": "CaptV0rt3x", "name": "CaptV0rt3x", "avatar": "https://community.citra-emu.org/user_avatar/community.citra-emu.org/captv0rt3x/9136_2.png"},
"GoldenX86": {"key": "GoldenX86", "name": "GoldenX86", "avatar": "https://community.citra-emu.org/user_avatar/community.citra-emu.org/goldenx86/120/42271_2.png"},
"Honghoa": {"key": "Honghoa", "name": "Honghoa", "avatar": "https://community.citra-emu.org/user_avatar/community.citra-emu.org/honghoa/120/61668_2.png"},
"Morph": {"key": "Morph", "name": "Morph", "avatar": "https://community.citra-emu.org/user_avatar/community.citra-emu.org/morph/120/57082_2.png"}
}

View file

@ -1,30 +1,39 @@
{{ define "header" }}
{{ $author := index .Site.Data.authors ( .Params.author | default "" ) }}
<div class="container">
<div class="mb-md blog-entry-header single" style="background-image: url('{{ .Site.BaseURL }}/{{ .Dir }}banner.png')">
<div>
<span class="title px-md py-sm has-background-dark">{{ .Title }}</span>
</div>
{{ if $author }}
<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 $.Site.Params.fmt.Date }}
</span>
</div>
{{ else }}
<div>
<span class="h3 px-md py-sm has-background-dark">
Written on {{ .Date.Format $.Site.Params.fmt.Date }}
</span>
</div>
{{ end }}
{{ $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>