Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added more options to altmetric badge, changed to arxiv code first #1269

Merged
merged 1 commit into from
Mar 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 28 additions & 8 deletions _layouts/bib.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<img class="preview z-depth-1 rounded" src="{{ entry.preview }}">
{%- else -%}
{%- assign entry_path = entry.preview | prepend: '/assets/img/publication_preview/' -%}
{% include figure.html
path=entry_path
{% include figure.html
path=entry_path
class="preview z-depth-1 rounded"
alt=entry.preview -%}
{%- endif -%}
Expand Down Expand Up @@ -187,12 +187,32 @@
</div>
{% if site.badges %}
<div class="badges">
{%- if site.badges.altmetric_badge or entry.altmetric %}
<span class="altmetric-embed" {% if entry.doi %}data-doi="{{ entry.doi }}"{% else %}data-altmetric-id="{{ entry.altmetric }}"{% endif %} data-hide-no-mentions="true" data-hide-less-than="15" data-badge-type="2" data-badge-popover="right"></span>
{%- endif %}
{%- if site.badges.dimensions_badge or entry.dimensions %}
<span class="__dimensions_badge_embed__" {% if entry.doi %}data-doi="{{ entry.doi }}"{% else if entry.pmid %}data-pmid="{{ entry.pmid }}"{% else %}data-id="{{ entry.dimensions }}"{% endif %} data-hide-zero-citations="true" data-style="small_rectangle" data-legend="hover-right" style="margin-bottom: 6px;"></span>
{%- endif %}
{%- if site.badges.altmetric_badge %}
<span class="altmetric-embed" data-hide-no-mentions="true" data-hide-less-than="15" data-badge-type="2" data-badge-popover="right"
{% if entry.eprint %}
data-arxiv-id="{{ entry.eprint }}"
{% elsif entry.doi %}
data-doi="{{ entry.doi }}"
{% elsif entry.altmetric %}
data-altmetric-id="{{ entry.altmetric }}"
{% elsif entry.pmid %}
data-pmid="{{ entry.pmid }}"
{% elsif entry.isbn %}
data-isbn="{{ entry.isbn }}"
{% endif %}
></span>
{%- endif %}
{%- if site.badges.dimensions_badge %}
<span class="__dimensions_badge_embed__"
{% if entry.doi %}
data-doi="{{ entry.doi }}"
{% else if entry.pmid %}
data-pmid="{{ entry.pmid }}"
{% else %}
data-id="{{ entry.dimensions }}"
{% endif %}
data-hide-zero-citations="true" data-style="small_rectangle" data-legend="hover-right" style="margin-bottom: 6px;"></span>
{%- endif %}
</div>
{%- endif %}

Expand Down