diff --git a/exampleSite/content/home/publications.md b/exampleSite/content/home/publications.md index 8a947f4d..fe8b76a1 100644 --- a/exampleSite/content/home/publications.md +++ b/exampleSite/content/home/publications.md @@ -17,9 +17,10 @@ count = 10 # List format. # 0 = Simple -# 1 = Classic -# 2 = Detailed -list_format = 0 +# 1 = Detailed +# 2 = APA +# 3 = MLA +list_format = 3 # Filter by publication type. # -1: Any diff --git a/exampleSite/content/home/publications_selected.md b/exampleSite/content/home/publications_selected.md index 072e0716..ee6ab2be 100644 --- a/exampleSite/content/home/publications_selected.md +++ b/exampleSite/content/home/publications_selected.md @@ -15,9 +15,10 @@ weight = 10 # List format. # 0 = Simple -# 1 = Classic -# 2 = Detailed -list_format = 2 +# 1 = Detailed +# 2 = APA +# 3 = MLA +list_format = 1 # Filter by publication type. # -1: Any diff --git a/exampleSite/content/publication/_index.md b/exampleSite/content/publication/_index.md index 956fa6ef..a0a60455 100644 --- a/exampleSite/content/publication/_index.md +++ b/exampleSite/content/publication/_index.md @@ -6,9 +6,10 @@ highlight = false # List format. # 0 = Simple -# 1 = Classic -# 2 = Detailed -list_format = 0 +# 1 = Detailed +# 2 = APA +# 3 = MLA +list_format = 3 # Optional featured image (relative to `static/img/` folder). [header] diff --git a/layouts/partials/publication_li_apa.html b/layouts/partials/publication_li_apa.html new file mode 100644 index 00000000..dee7bcbf --- /dev/null +++ b/layouts/partials/publication_li_apa.html @@ -0,0 +1,16 @@ +
+ + + ({{- .Date.Format "2006" -}}). + {{ .Title }}. + {{ if .Params.publication_short }} + {{- .Params.publication_short | markdownify -}} + {{ else }} + {{- .Params.publication | markdownify -}} + {{ end }}. +

{{ partial "publication_links" (dict "content" . "is_list" 1) }}

+
diff --git a/layouts/partials/publication_li_classic.html b/layouts/partials/publication_li_mla.html similarity index 90% rename from layouts/partials/publication_li_classic.html rename to layouts/partials/publication_li_mla.html index 0eb93c91..4debf845 100644 --- a/layouts/partials/publication_li_classic.html +++ b/layouts/partials/publication_li_mla.html @@ -5,7 +5,7 @@ {{- delimit . ", " | markdownify -}} {{- end -}} . - {{ .Title }}. + {{ .Title }}. {{ if .Params.publication_short }} {{- .Params.publication_short | markdownify -}} {{ else }} diff --git a/layouts/partials/publication_li_simple.html b/layouts/partials/publication_li_simple.html index 91384bfa..0ce93344 100644 --- a/layouts/partials/publication_li_simple.html +++ b/layouts/partials/publication_li_simple.html @@ -1,5 +1,5 @@
- {{ .Title }} + {{ .Title }}

{{ partial "publication_links" (dict "content" . "is_list" 1) }}

diff --git a/layouts/partials/publication_links.html b/layouts/partials/publication_links.html index d1f56247..e871dab8 100644 --- a/layouts/partials/publication_links.html +++ b/layouts/partials/publication_links.html @@ -7,27 +7,27 @@ {{ end }} {{ with $.Params.url_pdf }} - + {{ i18n "btn_pdf" }} {{ end }} {{ with $.Params.url_slides }} - + {{ i18n "btn_slides" }} {{ end }} {{ with $.Params.url_video }} - + {{ i18n "btn_video" }} {{ end }} {{ with $.Params.url_code }} - + {{ i18n "btn_code" }} {{ end }} {{ with $.Params.url_dataset }} - + {{ i18n "btn_dataset" }} {{ end }} @@ -37,7 +37,7 @@ {{ end }} {{ range $.Params.url_custom }} - + {{ .name }} {{ end }} diff --git a/layouts/partials/widgets/publications.html b/layouts/partials/widgets/publications.html index 4ad9adce..d2823b76 100644 --- a/layouts/partials/widgets/publications.html +++ b/layouts/partials/widgets/publications.html @@ -28,9 +28,11 @@ {{ $recent_pubs := $.Scratch.Get "recent_pubs" }} {{ range first $page.Params.count $recent_pubs }} {{ if eq $page.Params.list_format 1 }} - {{ partial "publication_li_classic" . }} - {{ else if eq $page.Params.list_format 2 }} {{ partial "publication_li_detailed" . }} + {{ else if eq $page.Params.list_format 2 }} + {{ partial "publication_li_apa" . }} + {{ else if eq $page.Params.list_format 3 }} + {{ partial "publication_li_mla" . }} {{ else }} {{ partial "publication_li_simple" . }} {{ end }} diff --git a/layouts/partials/widgets/publications_selected.html b/layouts/partials/widgets/publications_selected.html index 48f2153e..d442448d 100644 --- a/layouts/partials/widgets/publications_selected.html +++ b/layouts/partials/widgets/publications_selected.html @@ -19,9 +19,11 @@ {{ $sel_pubs := $.Scratch.Get "sel_pubs" }} {{ range $sel_pubs }} {{ if eq $page.Params.list_format 1 }} - {{ partial "publication_li_classic" . }} - {{ else if eq $page.Params.list_format 2 }} {{ partial "publication_li_detailed" . }} + {{ else if eq $page.Params.list_format 2 }} + {{ partial "publication_li_apa" . }} + {{ else if eq $page.Params.list_format 3 }} + {{ partial "publication_li_mla" . }} {{ else }} {{ partial "publication_li_simple" . }} {{ end }} diff --git a/layouts/section/publication.html b/layouts/section/publication.html index 16ebd5ff..c9e5109d 100644 --- a/layouts/section/publication.html +++ b/layouts/section/publication.html @@ -52,9 +52,11 @@
{{ if eq $.Params.list_format 1 }} - {{ partial "publication_li_classic" . }} - {{ else if eq $.Params.list_format 2 }} {{ partial "publication_li_detailed" . }} + {{ else if eq $.Params.list_format 2 }} + {{ partial "publication_li_apa" . }} + {{ else if eq $.Params.list_format 3 }} + {{ partial "publication_li_mla" . }} {{ else }} {{ partial "publication_li_simple" . }} {{ end }}