compile
This commit is contained in:
@@ -1,6 +1,28 @@
|
||||
<iframe
|
||||
src="cv.pdf"
|
||||
width="100%"
|
||||
height="600px"
|
||||
style="border: none;">
|
||||
</iframe>
|
||||
<div class="pdf-container" onclick="openPdfFullscreen('/cv_tiny.pdf')">
|
||||
<iframe
|
||||
src="/cv_tiny.pdf#view=FitH"
|
||||
width="100%"
|
||||
height="600px"
|
||||
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>
|
||||
|
||||
Reference in New Issue
Block a user