Skip to content

Commit

Permalink
Use figure for bib entry preview (alshedivat#1152)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
zalsader authored and alackles committed Feb 9, 2023
1 parent 2d6d708 commit 454f5a2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion _layouts/bib.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
{% if entry.preview contains '://' -%}
<img class="preview z-depth-1 rounded" src="{{ entry.preview }}">
{%- 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 -%}
{%- elsif entry.abbr -%}
{%- if site.data.venues[entry.abbr] -%}
Expand Down

0 comments on commit 454f5a2

Please sign in to comment.