Skip to content

Commit 9106081

Browse files
author
Shyamal Suhana Chandra
committed
Add clickable PDF hyperlinks to 'View PDF' text
- Convert 'View PDF →' spans to anchor tags with direct PDF links - Add proper link styling with hover effects - Add stopPropagation to prevent card click when clicking link - Links open in new tab for better UX - All three PDF cards now have working hyperlinks
1 parent 9563b7d commit 9106081

2 files changed

Lines changed: 21 additions & 3 deletions

File tree

assets/css/main.css

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -924,6 +924,24 @@ section {
924924
color: var(--primary-color);
925925
font-weight: 600;
926926
margin-top: auto;
927+
text-decoration: none;
928+
display: inline-block;
929+
transition: all var(--transition-fast);
930+
cursor: pointer;
931+
}
932+
933+
.doc-link:hover {
934+
color: var(--primary-dark);
935+
text-decoration: underline;
936+
transform: translateX(4px);
937+
}
938+
939+
.doc-link:visited {
940+
color: var(--primary-color);
941+
}
942+
943+
a.doc-link {
944+
cursor: pointer;
927945
}
928946

929947
/* Page Header */

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ <h3>Research Paper</h3>
156156
<span class="doc-pages">13 pages</span>
157157
<span class="doc-type">LaTeX</span>
158158
</div>
159-
<span class="doc-link">View PDF →</span>
159+
<a href="{{ site.baseurl }}/docs/paper.pdf" class="doc-link" target="_blank" onclick="event.stopPropagation();">View PDF →</a>
160160
</div>
161161
</div>
162162
<div class="doc-card" data-pdf-type="presentation" data-pdf-url="{{ site.baseurl }}/docs/presentation.pdf" data-pdf-title="Beamer Presentation">
@@ -168,7 +168,7 @@ <h3>Beamer Presentation</h3>
168168
<span class="doc-pages">25 slides</span>
169169
<span class="doc-type">Beamer</span>
170170
</div>
171-
<span class="doc-link">View PDF →</span>
171+
<a href="{{ site.baseurl }}/docs/presentation.pdf" class="doc-link" target="_blank" onclick="event.stopPropagation();">View PDF →</a>
172172
</div>
173173
</div>
174174
<div class="doc-card" data-pdf-type="reference" data-pdf-url="{{ site.baseurl }}/docs/reference.pdf" data-pdf-title="Reference Manual">
@@ -180,7 +180,7 @@ <h3>Reference Manual</h3>
180180
<span class="doc-pages">Full reference</span>
181181
<span class="doc-type">LaTeX</span>
182182
</div>
183-
<span class="doc-link">View PDF →</span>
183+
<a href="{{ site.baseurl }}/docs/reference.pdf" class="doc-link" target="_blank" onclick="event.stopPropagation();">View PDF →</a>
184184
</div>
185185
</div>
186186
<a href="{{ site.baseurl }}/docs/_paper.tex" class="doc-card doc-card-source" target="_blank">

0 commit comments

Comments
 (0)