Skip to content

Commit 1074f1b

Browse files
authored
Merge pull request #184 from stumbo/bs7_citations
Bs7 citations
2 parents b42652e + 882630d commit 1074f1b

File tree

1 file changed

+24
-20
lines changed

1 file changed

+24
-20
lines changed

layouts/bibliography/single.html

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -52,24 +52,8 @@ <h1>{{ .Title }}</h1>
5252
No URL to the document is available.
5353
{{ end }}
5454
<br>
55-
56-
<!-- Citation -->
57-
{{/* Build Zotero API params (group id + item key + style) */}}
58-
{{ $gid := "2914042" }}
59-
60-
{{ $key := .File.TranslationBaseName }}
61-
62-
{{ $style := or site.Params.zotero.style "apa" }}
63-
64-
{{ if and $gid $key }}
65-
<br>
66-
<a href="#" id="citeBtn"
67-
data-gid="{{ $gid }}"
68-
data-key="{{ $key }}"
69-
data-style="{{ $style }}"
70-
>Citation</a>
71-
{{ end }}
7255
</p>
56+
7357
<p>
7458
<strong>Abstract</strong>
7559
<br>
@@ -226,9 +210,29 @@ <h1>{{ .Title }}</h1>
226210
{{ end }}
227211
</p>
228212
<p>
229-
{{- if .Params.zotero_url }}
230-
<a href="{{ .Params.zotero_url | safeURL }}" target="_blank" rel="noopener noreferrer">View on Zotero</a>
231-
{{- end -}}
213+
{{- if .Params.zotero_url }}
214+
<a class="btn btn-primary btn-sm"
215+
href="{{ .Params.zotero_url | safeURL }}"
216+
target="_blank" rel="noopener noreferrer">View on Zotero</a>
217+
{{- end -}}
218+
219+
<!-- Citation -->
220+
{{/* Build Zotero API params (group id + item key + style) */}}
221+
{{ $gid := "2914042" }}
222+
223+
{{ $key := .File.TranslationBaseName }}
224+
225+
{{ $style := or site.Params.zotero.style "apa" }}
226+
227+
{{ if and $gid $key }}
228+
<button type="button" id="citeBtn"
229+
class="btn btn-primary btn-sm"
230+
data-gid="{{ $gid }}"
231+
data-key="{{ $key }}"
232+
data-style="{{ $style }}">
233+
Citation
234+
</button>
235+
{{ end }}
232236
</p>
233237

234238
<div class="summary">

0 commit comments

Comments
 (0)