enhance reference interactions

This commit is contained in:
2025-05-20 11:47:23 +02:00
parent e05d811a1e
commit 57d061e0f5
6 changed files with 158 additions and 6 deletions

View File

@ -2,6 +2,34 @@
---
{{reference}}
{% if link %}
<br><a href="{{link}}"><button class="btn btnId btnPub--download" style="outline:none; position:relative;white-space: normal;">PDF</button></a>
{% endif %}
<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 - {{ entry.key | default: 'ref' }} - {{ 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 - {{ entry.key | default: 'ref' }} - {{ 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 - {{ entry.key | default: 'ref' }} - {{ 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>