Skip to content
Merged
Show file tree
Hide file tree
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
32 changes: 19 additions & 13 deletions _layouts/bib.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,12 @@
{% endif %}
</div>
{% if site.enable_publication_badges %}
{% assign thesis_types = 'thesis,mastersthesis,phdthesis' | split: ',' %}
{% assign entry_is_thesis = false %}
{% if thesis_types contains entry.type %}
{% assign entry_is_thesis = true %}
{% endif %}

{% assign entry_has_altmetric_badge = false %}
{% if entry.altmetric != 'false' %}
{% if entry.altmetric or entry.arxiv or entry.eprint or entry.doi or entry.pmid or entry.isbn %}
Expand All @@ -260,7 +266,7 @@
{% endif %}

{% assign entry_has_dimensions_badge = false %}
{% if entry.dimensions != 'false' %}
{% if entry.dimensions != 'false' and entry_is_thesis == false %}
{% if entry.doi or entry.pmid %}
{% assign entry_has_dimensions_badge = true %}
{% endif %}
Expand Down Expand Up @@ -314,6 +320,18 @@
{% endif %}
></span>
{% endif %}
{% if site.enable_publication_badges.dimensions and entry_has_dimensions_badge %}
<span
class="__dimensions_badge_embed__"
{% if entry.doi %}
data-doi="{{ entry.doi }}"
{% else %}
data-pmid="{{ entry.pmid }}"
{% endif %}
data-style="small_rectangle"
style="margin-bottom: 3px;"
></span>
{% endif %}
{% if entry_has_openalex_badge %}
{% capture openalex_api_url %}https://api.openalex.org/works/{{ entry.openalex_id }}?select=cited_by_count{% endcapture %}
<a
Expand All @@ -328,18 +346,6 @@
>
</a>
{% endif %}
{% if site.enable_publication_badges.dimensions and entry_has_dimensions_badge %}
<span
class="__dimensions_badge_embed__"
{% if entry.doi %}
data-doi="{{ entry.doi }}"
{% else %}
data-pmid="{{ entry.pmid }}"
{% endif %}
data-style="small_rectangle"
style="margin-bottom: 3px;"
></span>
{% endif %}
{% if site.enable_publication_badges.google_scholar and entry_has_google_scholar_badge %}
<a
href="https://scholar.google.com/citations?view_op=view_citation&hl=en&user={{ site.scholar_userid }}&citation_for_view={{ site.scholar_userid }}:{{ entry.google_scholar_id }}"
Expand Down
2 changes: 1 addition & 1 deletion _pages/publications.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ nav_order: 2

</div>

<script src="{{ '/assets/js/publication-badges.js' | relative_url }}"></script>
<script src="{{ '/assets/js/publication-badges.js' | relative_url }}?v={{ site.github.build_revision | default: site.time | date: '%s' }}"></script>
Loading