initial commit
This commit is contained in:
commit
5c664be9a8
55 changed files with 8825 additions and 0 deletions
34
layouts/partials/books/rows/authors.html
Normal file
34
layouts/partials/books/rows/authors.html
Normal file
|
@ -0,0 +1,34 @@
|
|||
{{- with .Author -}}
|
||||
<p class="authors">{{ . }}</p>
|
||||
{{- else -}}
|
||||
{{- $authors_names := slice -}}
|
||||
|
||||
{{- range .authors -}}
|
||||
{{- $authors_names = $authors_names | append .name -}}
|
||||
{{- end -}}
|
||||
{{- range .work.authors -}}
|
||||
{{- $authors_names = $authors_names | append .name -}}
|
||||
{{- end -}}
|
||||
{{- if .contributors -}}
|
||||
{{- range ( where .contributors "role" "like" `[aA]uthor` ) -}}
|
||||
{{- $authors_names = $authors_names | append .name -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
<p class="authors">{{ delimit ( uniq $authors_names ) ", " }}</p>
|
||||
{{- end -}}
|
||||
|
||||
{{- if .contributors -}}
|
||||
{{- $translators_names := slice -}}
|
||||
|
||||
{{- range ( where .contributors "role" "like" `[tT]ranslat` ) -}}
|
||||
{{- $translators_names = $translators_names | append .name -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with $translators_names -}}
|
||||
<p class="authors--additional">Translator(s): {{ delimit ( uniq . ) ", " }}</p>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with ( index . "Additional Authors" ) -}}
|
||||
<p class="authors--additional">Additional Author(s): {{ . }}</p>
|
||||
{{- end -}}
|
7
layouts/partials/books/rows/publish-date.html
Normal file
7
layouts/partials/books/rows/publish-date.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
<p class="year">{{- .publish_date -}}
|
||||
{{- if .first_publish_date -}}
|
||||
{{- if ( ne .first_publish_date .publish_date ) -}}
|
||||
<span class="year--original">(<abbr title="original publication year">orig.</abbr> {{ .first_publish_date }})</span>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</p>
|
9
layouts/partials/books/rows/read-dates.html
Normal file
9
layouts/partials/books/rows/read-dates.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
{{- with .date_started -}}
|
||||
{{- time.Format "Jan 2, 2006" . -}}
|
||||
{{- else -}}
|
||||
Unknown
|
||||
{{- end -}}–{{- with .date_finished -}}
|
||||
{{- time.Format "Jan 2, 2006" . -}}
|
||||
{{- else -}}
|
||||
Unknown
|
||||
{{- end -}}
|
23
layouts/partials/books/rows/title.html
Normal file
23
layouts/partials/books/rows/title.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
{{-
|
||||
$cite_options := ( dict
|
||||
"c" .c
|
||||
"g" .g
|
||||
"section" "books"
|
||||
"schemaType" "Book"
|
||||
"title" ( cond ( isset .c "subtitle" ) (
|
||||
printf "%s: %s" .c.title .c.subtitle
|
||||
) (
|
||||
.c.title
|
||||
)
|
||||
)
|
||||
"edition" (
|
||||
default .c.edition_name .c.Edition
|
||||
)
|
||||
)
|
||||
-}}
|
||||
|
||||
{{- if .c.work.original_language -}}
|
||||
{{- $cite_options = merge $cite_options ( dict "titleLang" .c.work.original_language "titleTrans" .c.work.title ) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- partial "cite" $cite_options -}}
|
Loading…
Add table
Add a link
Reference in a new issue