Skip to content

Commit f2e22e2

Browse files
committed
Copilot suggestions
1 parent 3a97f94 commit f2e22e2

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

_includes/pdf-preview.html

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
type="application/pdf"
55
aria-label="{{ include.title | default: 'PDF preview' | regex_strip }}"
66
>
7-
<img
8-
src="{{ include.image | relative_url | uri_escape }}"
9-
alt="{{ include.title | default: 'preview image' | regex_strip }}"
10-
loading="lazy"
11-
{% include fallback.html %}
12-
>
7+
{% if include.image %}
8+
<img
9+
src="{{ include.image | relative_url | uri_escape }}"
10+
alt="{{ include.title | default: 'preview image' | regex_strip }}"
11+
loading="lazy"
12+
{% include fallback.html %}
13+
>
14+
{% endif %}
1315
</object>
1416
{% endif %}

_includes/poster-list.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
<div class="citation-container">
44
<div class="citation">
55
<a href="{{ poster.pdf | relative_url }}" target="_blank" class="citation-image" aria-label="{{ poster.title | default: 'poster link' | regex_strip }}">
6-
{% include pdf-preview.html pdf=poster.pdf image=poster.image title=poster.title %}
6+
{% assign poster_image = poster.image | default: '/assets/img/poster-placeholder.png' %}
7+
{% include pdf-preview.html pdf=poster.pdf image=poster_image title=poster.title %}
78
</a>
89
<div class="citation-text">
910
{% include icon.html icon="fa-solid fa-chalkboard" %}

0 commit comments

Comments
 (0)