Use figure for bib entry preview (#1152)

This makes sure that the image is resized per media type by imagemagick.
The result is still a bit too big (1400 width on desktop), but better
than nothing.

Signed-off-by: Zuhair AlSader <zalsader@hotmail.com>
This commit is contained in:
Zuhair AlSader 2023-02-04 21:16:23 -05:00 committed by GitHub
parent d0b0d9e014
commit 33f29dd3bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -7,7 +7,11 @@
{% if entry.preview contains '://' -%} {% if entry.preview contains '://' -%}
<img class="preview z-depth-1 rounded" src="{{ entry.preview }}"> <img class="preview z-depth-1 rounded" src="{{ entry.preview }}">
{%- else -%} {%- else -%}
<img class="preview z-depth-1 rounded" src="{{ entry.preview | prepend: '/assets/img/publication_preview/' | relative_url }}"> {%- assign entry_path = entry.preview | prepend: '/assets/img/publication_preview/' -%}
{% include figure.html
path=entry_path
class="preview z-depth-1 rounded"
alt=entry.preview -%}
{%- endif -%} {%- endif -%}
{%- elsif entry.abbr -%} {%- elsif entry.abbr -%}
{%- if site.data.venues[entry.abbr] -%} {%- if site.data.venues[entry.abbr] -%}