compile
This commit is contained in:
@@ -101,7 +101,7 @@ params:
|
|||||||
# imageWidth: 120
|
# imageWidth: 120
|
||||||
# imageHeight: 120
|
# imageHeight: 120
|
||||||
buttons:
|
buttons:
|
||||||
- name: <svg style="width:16px;height:16px;display:inline-block;vertical-align:-2px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M0 32h448v448H0z" fill="currentColor"/><path d="M120 120c0-30.9 25.1-56 56-56h112c30.9 0 56 25.1 56 56v272c0 30.9-25.1 56-56 56H176c-30.9 0-56-25.1-56-56V120zm172 80c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm-76-20c-11 0-20 9-20 20v64c0 11 9 20 20 20h64c11 0 20-9 20-20s-9-20-20-20h-44v-44c0-11-9-20-20-20z"/></svg>
|
- name: 👤
|
||||||
url: aboutme
|
url: aboutme
|
||||||
- name: ✎
|
- name: ✎
|
||||||
url: article
|
url: article
|
||||||
|
|||||||
@@ -1,6 +1,28 @@
|
|||||||
<iframe
|
<div class="pdf-container" onclick="openPdfFullscreen('/cv_tiny.pdf')">
|
||||||
src="cv.pdf"
|
<iframe
|
||||||
width="100%"
|
src="/cv_tiny.pdf#view=FitH"
|
||||||
height="600px"
|
width="100%"
|
||||||
style="border: none;">
|
height="600px"
|
||||||
</iframe>
|
style="border: none;">
|
||||||
|
</iframe>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function openPdfFullscreen(pdfUrl) {
|
||||||
|
// 打开新窗口,尝试全屏
|
||||||
|
const features = `
|
||||||
|
width=${screen.width},
|
||||||
|
height=${screen.height},
|
||||||
|
left=0,
|
||||||
|
top=0,
|
||||||
|
scrollbars=yes,
|
||||||
|
resizable=yes,
|
||||||
|
fullscreen=yes
|
||||||
|
`;
|
||||||
|
|
||||||
|
window.open(pdfUrl, '_blank', features);
|
||||||
|
|
||||||
|
// 备选方案:直接打开PDF
|
||||||
|
// window.open(pdfUrl, '_blank');
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|||||||
Binary file not shown.
BIN
content/aboutme/cv_small.pdf
Normal file
BIN
content/aboutme/cv_small.pdf
Normal file
Binary file not shown.
BIN
content/aboutme/cv_tiny.pdf
Normal file
BIN
content/aboutme/cv_tiny.pdf
Normal file
Binary file not shown.
Reference in New Issue
Block a user