initial test partial template: author and reader
This commit is contained in:
parent
9f1d2d6372
commit
a6444dd2a0
3 changed files with 15 additions and 4 deletions
|
@ -13,14 +13,13 @@ length = 9363456
|
|||
external_mp3 = "yes"
|
||||
mp3 = "ting.shufang.org/kyoto-craft/kyoto-craft_01_v1.mp3"
|
||||
books = "jdsyr"
|
||||
readers = "daxia"
|
||||
author = "[日] 樱花编辑事务所 编著"
|
||||
reader = "daxia"
|
||||
reader_name = "大夏"
|
||||
episodes_amount = 4
|
||||
episodes_base_url = "kyoto-craft"
|
||||
+++
|
||||
|
||||
> 作者:[日] 樱花编辑事务所 编著
|
||||
> 朗读者:[大夏](/summer.html)
|
||||
|
||||
京都,世界首屈一指的手工艺之城。
|
||||
|
||||
纷繁多彩的手艺,既象征人类文明的缩影,也是传统文化未来的指针。
|
||||
|
|
11
layouts/partials/author-reader.html
Normal file
11
layouts/partials/author-reader.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
{{/* this is used to display the author and reader information on single page */}}
|
||||
|
||||
{{ if .Params.reader_name }}
|
||||
{{ $url := print .Site.Params.baseURL "/" .Params.reader ".html" }}
|
||||
|
||||
<blockquote>
|
||||
<p>作者:{{- .Params.author -}}
|
||||
<br>
|
||||
朗读者:<a href="{{- $url -}}">{{- .Params.reader_name -}}</a>
|
||||
</p>
|
||||
</blockquote>
|
|
@ -39,6 +39,7 @@
|
|||
{{ end }}
|
||||
</header>
|
||||
<div class="nested-copy-line-height lh-copy {{ $.Param "post_content_classes" | default "serif"}} f5 nested-links nested-img mid-gray pr4-l w-two-thirds-l">
|
||||
{{- partial "author-reader.html" . -}}
|
||||
{{- .Content -}}
|
||||
{{- partial "audio-player.html" . -}}
|
||||
{{- partial "episodes-list.html" . -}}
|
||||
|
|
Loading…
Reference in a new issue