Files
website/_layouts/bibtemplate.html
2025-05-22 18:21:29 +02:00

42 lines
1.9 KiB
HTML

---
---
{{reference}}
<div class="publication-actions" style="margin-top: 0.5em;">
{% if link %}
<a href="{{ link }}" style="text-decoration: none;">
<button class="btn btnId btnPub--action btnPub--pdf-download"
data-umami-event="PDF Download"
data-umami-event-bibkey="{{ entry.key | default: 'ref' }}"
data-umami-event-slug="{{ page.slug | default: 'unknown-page' }}"
style="outline:none; position:relative; white-space: normal; margin-right: 5px; vertical-align: middle;">
<i class="fas fa-download"></i> PDF
</button>
</a>
{% endif %}
{% if entry and entry.bibtex %}
{% assign bibtex_filename = entry.key | default: "citation" | append: ".bib" %}
{% assign bibtex_json_data = entry.bibtex | jsonify %}
<button type="button" class="btn btnId btnPub--action btnPub--bibtex-download-direct"
data-umami-event="BibTeX File Download"
data-umami-event-bibkey="{{ entry.key | default: 'ref' }}"
data-umami-event-slug="{{ page.slug | default: 'unknown-page' }}"
data-bibtex-json='{{ bibtex_json_data }}'
data-bibtex-filename='{{ bibtex_filename }}'
style="outline:none; position:relative; white-space: normal; margin-right: 5px; vertical-align: middle;">
<i class="fas fa-download"></i> BibTeX
</button>
<button type="button" class="btn btnId btnPub--action btnPub--bibtex-copy-direct"
data-umami-event="BibTeX Copy"
data-umami-event-bibkey="{{ entry.key | default: 'ref' }}"
data-umami-event-slug="{{ page.slug | default: 'unknown-page' }}"
data-bibtex-json='{{ bibtex_json_data }}'
style="outline:none; position:relative; white-space: normal; vertical-align: middle;">
<i class="fas fa-clipboard"></i> Copy
</button>
{% endif %}
</div>