a basic pdf poster display grid.
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
<script src='https://cdn.jsdelivr.net/npm/@fullcalendar/timegrid@6.1.15/index.global.min.js'></script>
|
||||
<script src='https://cdn.jsdelivr.net/npm/@fullcalendar/interaction@6.1.15/index.global.min.js'></script>
|
||||
<script async data-id="101473225" src="//static.getclicky.com/js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.16.105/pdf.min.js"></script>
|
||||
|
||||
|
||||
<!--Keyword tags-->
|
||||
<meta name="keywords" content="7T kardiale MRT, Herzinsuffizienz ,Magnetresonanztomographie, Elektromagnetische Feldverteilung, Deep Learning,Medizinische Bildgebung, Hochfeld-MRT, Kardiale Bildgebungstechniken, Universität Würzburg, Deutsches Zentrum für Herzinsuffizienz, Klinische Anwendung, Kardiologie ,7T cardiac MRI, Physics-informed machine learning, Heart failure, Electromagnetic field distribution, Maxwell's equations, Deep learning, Medical imaging, High-field MRI, Cardiac imaging techniques, Spring School 2025, University of Würzburg, German Center for Heart Failure, Clinical application, Numerical simulations, Heartdisease">
|
||||
@@ -95,6 +95,47 @@ p, div {
|
||||
margin: 2px 2px !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.grid {
|
||||
display: grid;
|
||||
padding: 20px;
|
||||
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Responsive wrapping */
|
||||
gap: 20px;
|
||||
|
||||
}
|
||||
.pdf-box {
|
||||
border: 1px solid #ddd;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
canvas {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@import "minimal-mistakes/skins/{{ site.minimal_mistakes_skin | default: 'default' }}"; // skin
|
||||
|
||||
@@ -100,7 +100,7 @@ if (form){
|
||||
|
||||
|
||||
|
||||
|
||||
// Requirement: To make calendar events clickable and navigate to the corresponding event details on detailed_program_schedule page.
|
||||
const fullCalendarElement = document.querySelector('full-calendar');
|
||||
if (fullCalendarElement) {
|
||||
|
||||
@@ -122,5 +122,48 @@ if (s.get('event_id')){
|
||||
|
||||
|
||||
|
||||
const pdfFiles = [
|
||||
// { url: "/assets/posters/test.pdf", name: "Document 1" },
|
||||
];
|
||||
|
||||
function renderPDF(url, canvasElement) {
|
||||
const loadingTask = pdfjsLib.getDocument(url);
|
||||
loadingTask.promise.then(pdf => {
|
||||
pdf.getPage(1).then(page => {
|
||||
const scale = 1.5;
|
||||
const viewport = page.getViewport({ scale });
|
||||
const context = canvasElement.getContext('2d');
|
||||
canvasElement.height = viewport.height;
|
||||
canvasElement.width = viewport.width;
|
||||
|
||||
const renderContext = {
|
||||
canvasContext: context,
|
||||
viewport: viewport
|
||||
};
|
||||
page.render(renderContext);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function loadPDFs() {
|
||||
const grid = document.getElementById("pdf-grid");
|
||||
|
||||
pdfFiles.forEach(file => {
|
||||
const box = document.createElement("div");
|
||||
box.classList.add("pdf-box");
|
||||
|
||||
const canvas = document.createElement("canvas");
|
||||
renderPDF(file.url, canvas);
|
||||
|
||||
const button = document.createElement("button");
|
||||
button.textContent = "Download";
|
||||
button.onclick = () => window.open(file.url, "_blank");
|
||||
button.classList.add("btn","btn-primary");
|
||||
|
||||
box.appendChild(canvas);
|
||||
box.appendChild(button);
|
||||
grid.appendChild(box);
|
||||
});
|
||||
}
|
||||
|
||||
loadPDFs();
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
google-site-verification: google9f748088153c412c.html
|
||||
@@ -22,4 +22,8 @@ The posters will be printed in DIN A0 (84,1 x 118,9 cm).
|
||||
Please make sure that you poster is adjusted to this size
|
||||
|
||||
## Posters
|
||||
After the spring school all posters will be posted here.
|
||||
After the spring school all posters will be posted here.
|
||||
|
||||
|
||||
<div class="grid" id="pdf-grid"></div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user