Skip to content

Commit c0ff670

Browse files
committed
Fix 2
1 parent eb5bd52 commit c0ff670

File tree

4 files changed

+12
-24
lines changed

4 files changed

+12
-24
lines changed

_includes/citation.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,14 @@
2828
<div class="citation">
2929
{% if include.style == "rich" %}
3030
{% if citation_pdf %}
31-
<div
31+
<a
32+
href="{{ citation_pdf | relative_url | uri_escape }}"
33+
target="_blank"
3234
class="citation-image"
33-
aria-label="{{ citation.title | default: "citation preview" | regex_strip }}"
35+
aria-label="{{ citation.title | default: "citation pdf" | regex_strip }}"
3436
>
3537
{% include pdf-preview.html pdf=citation_pdf image=citation.image title=citation.title %}
36-
</div>
38+
</a>
3739
{% else %}
3840
<a
3941
{% if citation.link %}

_includes/pdf-preview.html

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
{% if include.pdf %}
2-
<object
3-
data="{{ include.pdf | relative_url | uri_escape }}#page=1&view=FitH"
4-
type="application/pdf"
5-
aria-label="{{ include.title | default: 'PDF preview' | regex_strip }}"
2+
<img
3+
src="{{ include.image | relative_url | uri_escape }}"
4+
alt="{{ include.title | default: 'preview image' | regex_strip }}"
5+
loading="lazy"
6+
{% include fallback.html %}
67
>
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-
>
13-
</object>
148
{% endif %}

_includes/poster-list.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
{% for poster in posters %}
33
<div class="citation-container">
44
<div class="citation">
5-
<div class="citation-image" aria-label="{{ poster.title | default: 'poster preview' | regex_strip }}">
5+
<a href="{{ poster.pdf | relative_url }}" target="_blank" class="citation-image" aria-label="{{ poster.title | default: 'poster pdf' | regex_strip }}">
66
{% include pdf-preview.html pdf=poster.pdf image=poster.image title=poster.title %}
7-
</div>
7+
</a>
88
<div class="citation-text">
99
{% include icon.html icon="fa-solid fa-chalkboard" %}
1010
<a href="{{ poster.pdf | relative_url }}" target="_blank" class="citation-title">{{ poster.title }}</a>

_styles/citation.scss

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,6 @@ $wrap: 800px;
3232
object-fit: contain;
3333
}
3434

35-
.citation-image object {
36-
position: absolute;
37-
inset: 0;
38-
width: 100%;
39-
height: 100%;
40-
border: 0;
41-
}
42-
4335
.citation-text {
4436
position: relative;
4537
display: inline-flex;

0 commit comments

Comments
 (0)