Skip to content

Commit 4269973

Browse files
authored
Bs9 long urls (#308)
* First pass at replacing URLs with a button. * Cleanup from merging main to pull in citation work.
1 parent 92019c9 commit 4269973

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

layouts/bibliography/single.html

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,7 @@ <h1>{{ .Title }}</h1>
4646
{{- end -}}
4747
</p>
4848
<p>
49-
<strong>View document:</strong> {{ with .Params.url_source }}
50-
<a href="{{ . | safeURL }}" target="_blank" rel="noopener noreferrer">{{ . }}</a>
51-
{{- else -}}
52-
No URL to the document is available.
53-
{{- end -}}
54-
<br>
55-
</p>
56-
<p>
57-
<strong>Abstract:</strong>
49+
<strong>Abstract</strong>
5850
<br>
5951
{{- with .Params.abstract -}}
6052
{{- . | htmlEscape | markdownify -}}
@@ -201,11 +193,20 @@ <h1>{{ .Title }}</h1>
201193
{{ end }}
202194
{{- end -}}
203195
</p>
196+
<p>
197+
{{- if .Params.url_source -}}
198+
<a class="btn btn-primary btn-sm"
199+
href="{{ .Params.url_source | safeURL }}"
200+
target="_blank" rel="noopener noreferrer">View</a>
201+
{{ else }}
202+
No URL to the document is available.
203+
{{ end }}
204+
</p>
204205
<p>
205206
{{- if .Params.zotero_url -}}
206207
<a class="btn btn-primary btn-sm"
207208
href="{{ .Params.zotero_url | safeURL }}"
208-
target="_blank" rel="noopener noreferrer">View on Zotero</a>
209+
target="_blank" rel="noopener noreferrer">Zotero Record</a>
209210
{{- end -}}
210211
{{- /* Build Zotero API params (group id + item key + style) */ -}}
211212
{{- $gid := site.Params.zotero_group_id -}}
@@ -267,7 +268,7 @@ <h1>{{ .Title }}</h1>
267268
}
268269
.citation-header { display:flex; justify-content:space-between; align-items:center; padding:.75rem 1rem; border-bottom:1px solid #eee; }
269270
.citation-dismiss{ background:none; border:0; font-size:1.25rem; line-height:1; cursor:pointer; }
270-
.citation-close
271+
.citation-close
271272
.citation-tabs { display:flex; gap:.25rem; padding:.5rem 1rem; border-bottom:1px solid #eee; }
272273
.tab-btn {
273274
border: 1px solid #ddd; background:#f8f9fa; border-radius:4px; padding:.35rem .6rem; cursor:pointer;

0 commit comments

Comments
 (0)