Skip to content

Commit b9a1f83

Browse files
authored
Added more options to altmetric badge, changed to arxiv code first (alshedivat#1269)
1 parent bacddc7 commit b9a1f83

File tree

1 file changed

+28
-8
lines changed

1 file changed

+28
-8
lines changed

_layouts/bib.html

+28-8
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
<img class="preview z-depth-1 rounded" src="{{ entry.preview }}">
99
{%- else -%}
1010
{%- assign entry_path = entry.preview | prepend: '/assets/img/publication_preview/' -%}
11-
{% include figure.html
12-
path=entry_path
11+
{% include figure.html
12+
path=entry_path
1313
class="preview z-depth-1 rounded"
1414
alt=entry.preview -%}
1515
{%- endif -%}
@@ -187,12 +187,32 @@
187187
</div>
188188
{% if site.badges %}
189189
<div class="badges">
190-
{%- if site.badges.altmetric_badge or entry.altmetric %}
191-
<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>
192-
{%- endif %}
193-
{%- if site.badges.dimensions_badge or entry.dimensions %}
194-
<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>
195-
{%- endif %}
190+
{%- if site.badges.altmetric_badge %}
191+
<span class="altmetric-embed" data-hide-no-mentions="true" data-hide-less-than="15" data-badge-type="2" data-badge-popover="right"
192+
{% if entry.eprint %}
193+
data-arxiv-id="{{ entry.eprint }}"
194+
{% elsif entry.doi %}
195+
data-doi="{{ entry.doi }}"
196+
{% elsif entry.altmetric %}
197+
data-altmetric-id="{{ entry.altmetric }}"
198+
{% elsif entry.pmid %}
199+
data-pmid="{{ entry.pmid }}"
200+
{% elsif entry.isbn %}
201+
data-isbn="{{ entry.isbn }}"
202+
{% endif %}
203+
></span>
204+
{%- endif %}
205+
{%- if site.badges.dimensions_badge %}
206+
<span class="__dimensions_badge_embed__"
207+
{% if entry.doi %}
208+
data-doi="{{ entry.doi }}"
209+
{% else if entry.pmid %}
210+
data-pmid="{{ entry.pmid }}"
211+
{% else %}
212+
data-id="{{ entry.dimensions }}"
213+
{% endif %}
214+
data-hide-zero-citations="true" data-style="small_rectangle" data-legend="hover-right" style="margin-bottom: 6px;"></span>
215+
{%- endif %}
196216
</div>
197217
{%- endif %}
198218

0 commit comments

Comments
 (0)