From 5a876677666f346cf2ab8dd8c1cde2484aeb6790 Mon Sep 17 00:00:00 2001 From: Vamsi Krishna Date: Sun, 1 Nov 2020 03:13:57 +0530 Subject: [PATCH] add authors & modify layout (#3) * add authors & modify layout --- data/authors.json | 6 +++-- layouts/entry/single.html | 47 +++++++++++++++++++++++---------------- 2 files changed, 32 insertions(+), 21 deletions(-) diff --git a/data/authors.json b/data/authors.json index 4dbe024..3ad7931 100644 --- a/data/authors.json +++ b/data/authors.json @@ -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"} } diff --git a/layouts/entry/single.html b/layouts/entry/single.html index e594959..8d8df31 100644 --- a/layouts/entry/single.html +++ b/layouts/entry/single.html @@ -1,30 +1,39 @@ {{ define "header" }} {{ $author := index .Site.Data.authors ( .Params.author | default "" ) }} -
-
-
- {{ .Title }} -
- {{ if $author }} -
- - Written by {{ $author.name }} - on {{ .Date.Format $.Site.Params.fmt.Date }} - -
- {{ else }} -
- - Written on {{ .Date.Format $.Site.Params.fmt.Date }} - -
- {{ end }} +{{ $coauthor := index .Site.Data.authors ( .Params.coauthor | default "" ) }} +
+
+
+ {{ .Title }}
+ {{ if and $author $coauthor }} +
+ + Written by {{ $author.name }} + and {{ $coauthor.name }} + on {{ .Date.Format $.Site.Params.fmt.Date }} + +
+ {{ else if $author }} +
+ + Written by {{ $author.name }} + on {{ .Date.Format $.Site.Params.fmt.Date }} + +
+ {{ else }} +
+ + Written on {{ .Date.Format $.Site.Params.fmt.Date }} + +
+ {{ end }}
{{ end }} {{ define "main" }}
+
{{ .Content }}