mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-13 08:15:44 +00:00
* Add APA citation style * Change `list_format` in pub. widgets and pub. `_index.md` archive * New options: 0 = Simple, 1 = Detailed, 2 = APA, 3 = MLA * Change default `list_format` in exampleSite * Link title in publication list items * Open most related links (e.g. PDF) in new tab
This commit is contained in:
1 parent
e70dd994d5
commit
a1b681758e
10 files changed
+48
-23
No files matched your search
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
<div class="pub-list-item" style="margin-bottom: 1rem" itemscope itemtype="http://schema.org/CreativeWork">
|
||||
<i class="fa fa-file-text-o pub-icon" aria-hidden="true"></i>
|
||||
<span itemprop="author">
|
||||
{{ with .Params.authors }}
|
||||
{{- delimit . ", " | markdownify -}}
|
||||
{{- end -}}
|
||||
</span>
|
||||
({{- .Date.Format "2006" -}}).
|
||||
<a href="{{ .Permalink }}" itemprop="name">{{ .Title }}</a>.
|
||||
{{ if .Params.publication_short }}
|
||||
{{- .Params.publication_short | markdownify -}}
|
||||
{{ else }}
|
||||
{{- .Params.publication | markdownify -}}
|
||||
{{ end }}.
|
||||
<p>{{ partial "publication_links" (dict "content" . "is_list" 1) }}</p>
|
||||
</div>
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
{{- delimit . ", " | markdownify -}}
|
||||
{{- end -}}
|
||||
</span>.
|
||||
<span itemprop="name">{{ .Title }}</span>.
|
||||
<a href="{{ .Permalink }}" itemprop="name">{{ .Title }}</a>.
|
||||
{{ if .Params.publication_short }}
|
||||
{{- .Params.publication_short | markdownify -}}
|
||||
{{ else }}
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="pub-list-item" style="margin-bottom: 1rem" itemscope itemtype="http://schema.org/CreativeWork">
|
||||
<i class="fa fa-file-text-o pub-icon" aria-hidden="true"></i>
|
||||
<span itemprop="name">{{ .Title }}</span>
|
||||
<a href="{{ .Permalink }}" itemprop="name">{{ .Title }}</a>
|
||||
<p>{{ partial "publication_links" (dict "content" . "is_list" 1) }}</p>
|
||||
</div>
|
||||
@@ -7,27 +7,27 @@
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ with $.Params.url_pdf }}
|
||||
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ . | absURL }}">
|
||||
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ . | absURL }}" target="_blank">
|
||||
{{ i18n "btn_pdf" }}
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ with $.Params.url_slides }}
|
||||
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ . | absURL }}">
|
||||
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ . | absURL }}" target="_blank">
|
||||
{{ i18n "btn_slides" }}
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ with $.Params.url_video }}
|
||||
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ . | absURL }}">
|
||||
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ . | absURL }}" target="_blank">
|
||||
{{ i18n "btn_video" }}
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ with $.Params.url_code }}
|
||||
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ . | absURL }}">
|
||||
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ . | absURL }}" target="_blank">
|
||||
{{ i18n "btn_code" }}
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ with $.Params.url_dataset }}
|
||||
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ . | absURL }}">
|
||||
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ . | absURL }}" target="_blank">
|
||||
{{ i18n "btn_dataset" }}
|
||||
</a>
|
||||
{{ end }}
|
||||
@@ -37,7 +37,7 @@
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ range $.Params.url_custom }}
|
||||
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ .url | absURL }}">
|
||||
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ .url | absURL }}" target="_blank">
|
||||
{{ .name }}
|
||||
</a>
|
||||
{{ end }}
|
||||
@@ -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 }}
|
||||
|
||||
@@ -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 }}
|
||||
|
||||
@@ -52,9 +52,11 @@
|
||||
|
||||
<div class="grid-sizer col-md-12 isotope-item pubtype-{{ $.Scratch.Get "pubtype" }} year-{{ .Date.Format "2006" }}">
|
||||
{{ 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 }}
|
||||
|
||||
Reference in new issue
Block a user