diff options
-rw-r--r-- | i18n/en.yaml | 3 | ||||
-rw-r--r-- | i18n/fr.yaml | 3 | ||||
-rw-r--r-- | layouts/_default/single.html | 7 | ||||
-rw-r--r-- | layouts/partials/postInfo.html | 34 |
4 files changed, 46 insertions, 1 deletions
diff --git a/i18n/en.yaml b/i18n/en.yaml index b9786e4..7c22fbd 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -1,2 +1,5 @@ translations: other: "Available translations" + +BookShare: + other: "If I write a book review, that means I own a copy of that book. Send me an email if you want me to send you the copy." diff --git a/i18n/fr.yaml b/i18n/fr.yaml index c305b10..4db5e06 100644 --- a/i18n/fr.yaml +++ b/i18n/fr.yaml @@ -1,2 +1,5 @@ translations: other: "Des traductions disponibles" + +BookShare: + other: "Quand j'écris un critique d'un livre, ça signifie que j'ai un copie de lui. Si vous le voulez, envoyez-moi un couriel et je vais vous l'envoyer." diff --git a/layouts/_default/single.html b/layouts/_default/single.html index f74ec16..b3783eb 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -13,14 +13,19 @@ </header> <div class="content e-content"> {{ .Content }} + {{ if in .Params.categories "book review" }} + <hr> + {{ i18n "BookShare" }} + {{ end }} </div> {{ partial "postInfo.html" . }} </article> {{ if and (.Site.Params.paginationSinglePost) (ne .Type "page") }} -{{ partial "paginationPost.html" . }} + {{ partial "paginationPost.html" . }} {{ end }} + {{ partial "custom-webring.html" }} {{ end }} diff --git a/layouts/partials/postInfo.html b/layouts/partials/postInfo.html new file mode 100644 index 0000000..d7146fd --- /dev/null +++ b/layouts/partials/postInfo.html @@ -0,0 +1,34 @@ +{{ $dateFormat := "2006-01-02" }} +{{ if .Site.Params.dateFormat }} + {{ $dateFormat = .Site.Params.dateFormat }} +{{ end }} + +<div class="post-info"> + {{ if .Params.date }} + <div class="post-date dt-published">{{ .Params.date.Format $dateFormat }}</div> + {{ end }} + + <a class="post-hidden-url u-url" href="{{ .Permalink }}">{{ .Permalink }}</a> + <a href={{ .Site.BaseURL }} class="p-name p-author post-hidden-author h-card" rel="me">{{ .Params.author | default .Site.Params.author }}</a> + + + <div class="post-taxonomies"> + {{ if .Params.categories }} + categories: + <ul class="post-categories"> + {{ range .Params.categories }} + <li><a href="{{ "categories/" | urlize | absLangURL }}">{{ . }}</a></li> + {{ end }} + </ul> + {{ end }} + <br> + tagged: + {{ if .Params.tags }} + <ul class="post-tags"> + {{ range .Params.tags }} + <li><a href="{{ "tags/" | absLangURL }}{{ . | urlize }}">#{{ . }}</a></li> + {{ end }} + </ul> + {{ end }} + </div> +</div> |