Skip to content

Commit 33f29dd

Browse files
authored
Use figure for bib entry preview (alshedivat#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>
1 parent d0b0d9e commit 33f29dd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

_layouts/bib.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
{% if entry.preview contains '://' -%}
88
<img class="preview z-depth-1 rounded" src="{{ entry.preview }}">
99
{%- else -%}
10-
<img class="preview z-depth-1 rounded" src="{{ entry.preview | prepend: '/assets/img/publication_preview/' | relative_url }}">
10+
{%- assign entry_path = entry.preview | prepend: '/assets/img/publication_preview/' -%}
11+
{% include figure.html
12+
path=entry_path
13+
class="preview z-depth-1 rounded"
14+
alt=entry.preview -%}
1115
{%- endif -%}
1216
{%- elsif entry.abbr -%}
1317
{%- if site.data.venues[entry.abbr] -%}

0 commit comments

Comments
 (0)