Make publication thumbnails optional + fix small layout bugs (#1797)
This commit is contained in:
parent
da661b1662
commit
51d367c765
|
|
@ -297,9 +297,10 @@ scholar:
|
|||
group_by: year
|
||||
group_order: descending
|
||||
|
||||
badges: # Display different badges for your publications
|
||||
altmetric_badge: true # Altmetric badge (https://www.altmetric.com/products/altmetric-badges/)
|
||||
dimensions_badge: true # Dimensions badge (https://badge.dimensions.ai/)
|
||||
# Display different badges withs stats for your publications
|
||||
enable_publication_badges:
|
||||
altmetric: true # Altmetric badge (https://www.altmetric.com/products/altmetric-badges/)
|
||||
dimensions: true # Dimensions badge (https://badge.dimensions.ai/)
|
||||
|
||||
# Filter out certain bibtex entry keywords used internally from the bib output
|
||||
filtered_bibtex_keywords: [abbr, abstract, arxiv, bibtex_show, html, pdf, selected, supp, blog, code, poster, slides, website, preview, altmetric]
|
||||
|
|
@ -308,6 +309,8 @@ filtered_bibtex_keywords: [abbr, abstract, arxiv, bibtex_show, html, pdf, select
|
|||
max_author_limit: 3 # leave blank to always show all authors
|
||||
more_authors_animation_delay: 10 # more authors are revealed on click using animation; smaller delay means faster animation
|
||||
|
||||
# Enables publication thumbnails. If disabled, none of the publications will display thumbnails, even if specified in the bib entry.
|
||||
enable_publication_thumbnails: true
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Jekyll Link Attributes
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{%- if site.badges.altmetric_badge %}
|
||||
{%- if site.enable_publication_badges.altmetric %}
|
||||
<script async src="https://d1bxh8uas1mnw7.cloudfront.net/assets/embed.js"></script>
|
||||
{%- endif %}
|
||||
{%- if site.badges.dimensions_badge %}
|
||||
{%- if site.enable_publication_badges.dimensions %}
|
||||
<script async src="https://badge.dimensions.ai/badge.js"></script>
|
||||
{%- endif %}
|
||||
|
|
|
|||
|
|
@ -2,16 +2,17 @@
|
|||
---
|
||||
<!-- _layouts/bib.html -->
|
||||
<div class="row">
|
||||
{%- if site.enable_publication_thumbnails -%}
|
||||
<div class="col-sm-2 {% if entry.preview %}preview{% else %}abbr{% endif %}">
|
||||
{%- if entry.preview -%}
|
||||
{% if entry.preview contains '://' -%}
|
||||
<img data-zoomable class="preview z-depth-1 rounded" src="{{ entry.preview }}">
|
||||
<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
|
||||
class="preview z-depth-1 rounded"
|
||||
zoomable=true
|
||||
zoomable=false
|
||||
alt=entry.preview -%}
|
||||
{%- endif -%}
|
||||
{%- elsif entry.abbr -%}
|
||||
|
|
@ -26,9 +27,10 @@
|
|||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
</div>
|
||||
{%- endif -%}
|
||||
|
||||
<!-- Entry bib key -->
|
||||
<div id="{{entry.key}}" class="col-sm-8">
|
||||
<div id="{{entry.key}}" class="{% if site.enable_publication_thumbnails %}col-sm-8{% else %}col-sm-10{% endif %}">
|
||||
<!-- Title -->
|
||||
<div class="title">{{entry.title}}</div>
|
||||
<!-- Author -->
|
||||
|
|
@ -186,9 +188,12 @@
|
|||
<a href="{{ entry.website }}" class="btn btn-sm z-depth-0" role="button">Website</a>
|
||||
{%- endif %}
|
||||
</div>
|
||||
{% if site.badges %}
|
||||
{% if site.enable_publication_badges %}
|
||||
{% assign entry_has_altmetric_badge = entry.altmetric or entry.doi or entry.eprint or entry.pmid or entry.isbn %}
|
||||
{% assign entry_has_dimensions_badge = entry.dimensions or entry.doi or entry.pmid %}
|
||||
{% if entry_has_altmetric_badge or entry_has_dimensions_badge %}
|
||||
<div class="badges">
|
||||
{%- if site.badges.altmetric_badge %}
|
||||
{%- if site.enable_publication_badges.altmetric and entry_has_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 }}"
|
||||
|
|
@ -203,7 +208,7 @@
|
|||
{% endif %}
|
||||
></span>
|
||||
{%- endif %}
|
||||
{%- if site.badges.dimensions_badge %}
|
||||
{%- if site.enable_publication_badges.dimensions and entry_has_dimensions_badge %}
|
||||
<span class="__dimensions_badge_embed__"
|
||||
{% if entry.doi %}
|
||||
data-doi="{{ entry.doi }}"
|
||||
|
|
@ -216,6 +221,7 @@
|
|||
{%- endif %}
|
||||
</div>
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
|
||||
{% if entry.abstract -%}
|
||||
<!-- Hidden abstract block -->
|
||||
|
|
|
|||
Loading…
Reference in New Issue