Skip to content

Commit 4db0ada

Browse files
committed
updated with better links
1 parent f7922c9 commit 4db0ada

File tree

7 files changed

+260
-27
lines changed

7 files changed

+260
-27
lines changed

content/iop-book/chapter-1/chapter-1.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

content/posts/iop-book-chapter-posted.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ author: "Danny Caballero"
1212

1313

1414
I've just posted the first chapter of our book, ["Computing in Physics Education"](/iop-book/), which is going through the editorial process at the [Institute of Physics Publishing](https://ioppublishing.org/). This chapter serves as an introduction to the book, outlining its key themes and objectives.
15+
{{< embed-pdf url="/pdf/iop-book/CH01.pdf" >}}
1516

16-
IOP agreed to let me post the first chapter online, so you can get a sneak peek at what the book is all about. The chapter discusses the importance of integrating computing into physics education and sets the stage for the contributions from various educators that will follow in subsequent chapters.
17+
<br>
18+
19+
📂 [Download First Chapter](/pdf/iop-book/CH01.pdf)
1720

18-
You can read the first chapter [here](/iop-book/chapter-1/).
21+
IOP agreed to let me post the first chapter online, so you can get a sneak peek at what the book is all about. The chapter discusses the importance of integrating computing into physics education and sets the stage for the contributions from various educators that will follow in subsequent chapters.
131 Bytes
Binary file not shown.

public/posts/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ <h2 class="entry-hint-parent">First chapter of Computing in Physics Education bo
175175
<div class="entry-content">
176176
<p>The first chapter of the book ‘Computing in Physics Education’ is now available online. This chapter introduces the key themes and objectives of the book, setting the stage for the contributions from various educators.</p>
177177
</div>
178-
<footer class="entry-footer"><span title='2025-08-01 00:00:00 +0000 UTC'>August 2025</span>&nbsp;&middot;&nbsp;1 min&nbsp;&middot;&nbsp;99 words&nbsp;&middot;&nbsp;Danny Caballero</footer>
178+
<footer class="entry-footer"><span title='2025-08-01 00:00:00 +0000 UTC'>August 2025</span>&nbsp;&middot;&nbsp;1 min&nbsp;&middot;&nbsp;107 words&nbsp;&middot;&nbsp;Danny Caballero</footer>
179179
<a class="entry-link" aria-label="post link to First chapter of Computing in Physics Education book available" href="http://localhost:1313/posts/iop-book-chapter-posted/"></a>
180180
</article>
181181

public/posts/iop-book-chapter-posted/index.html

Lines changed: 254 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@
7676
"keywords": [
7777
"book", "IOP", "computing education", "physics education"
7878
],
79-
"articleBody": "I’ve just posted the first chapter of our book, “Computing in Physics Education”, which is going through the editorial process at the Institute of Physics Publishing. This chapter serves as an introduction to the book, outlining its key themes and objectives.\nIOP agreed to let me post the first chapter online, so you can get a sneak peek at what the book is all about. The chapter discusses the importance of integrating computing into physics education and sets the stage for the contributions from various educators that will follow in subsequent chapters.\nYou can read the first chapter here.\n",
80-
"wordCount" : "99",
79+
"articleBody": "I’ve just posted the first chapter of our book, “Computing in Physics Education”, which is going through the editorial process at the Institute of Physics Publishing. This chapter serves as an introduction to the book, outlining its key themes and objectives. Previous Next / [pdf] View the PDF file here. 📂 Download First Chapter\nIOP agreed to let me post the first chapter online, so you can get a sneak peek at what the book is all about. The chapter discusses the importance of integrating computing into physics education and sets the stage for the contributions from various educators that will follow in subsequent chapters.\n",
80+
"wordCount" : "107",
8181
"inLanguage": "en",
8282
"image": "http://localhost:1313/img/IOP/cover.png","datePublished": "2025-08-01T00:00:00Z",
8383
"dateModified": "2025-08-01T00:00:00Z",
@@ -211,13 +211,262 @@
211211
<h1 class="post-title entry-hint-parent">
212212
First chapter of Computing in Physics Education book available
213213
</h1>
214-
<div class="post-meta"><span title='2025-08-01 00:00:00 +0000 UTC'>August 2025</span>&nbsp;&middot;&nbsp;1 min&nbsp;&middot;&nbsp;99 words&nbsp;&middot;&nbsp;Danny Caballero
214+
<div class="post-meta"><span title='2025-08-01 00:00:00 +0000 UTC'>August 2025</span>&nbsp;&middot;&nbsp;1 min&nbsp;&middot;&nbsp;107 words&nbsp;&middot;&nbsp;Danny Caballero
215215

216216
</div>
217217
</header>
218-
<div class="post-content"><p>I&rsquo;ve just posted the first chapter of our book, <a href="/iop-book/">&ldquo;Computing in Physics Education&rdquo;</a>, which is going through the editorial process at the <a href="https://ioppublishing.org/" target="_blank">Institute of Physics Publishing</a>. This chapter serves as an introduction to the book, outlining its key themes and objectives.</p>
218+
<div class="post-content"><p>I&rsquo;ve just posted the first chapter of our book, <a href="/iop-book/">&ldquo;Computing in Physics Education&rdquo;</a>, which is going through the editorial process at the <a href="https://ioppublishing.org/" target="_blank">Institute of Physics Publishing</a>. This chapter serves as an introduction to the book, outlining its key themes and objectives.
219+
<script type="text/javascript" src= '/js/pdf-js/build/pdf.js'></script>
220+
221+
<style>
222+
#embed-pdf-container {
223+
position: relative;
224+
width: 100%;
225+
height: auto;
226+
min-height: 20vh;
227+
228+
}
229+
230+
.pdf-canvas {
231+
border: 1px solid black;
232+
direction: ltr;
233+
width: 100%;
234+
height: auto;
235+
display: none;
236+
}
237+
238+
#the-canvas {
239+
border: 1px solid black;
240+
direction: ltr;
241+
width: 100%;
242+
height: auto;
243+
display: none;
244+
}
245+
246+
247+
.pdf-loadingWrapper {
248+
display: none;
249+
justify-content: center;
250+
align-items: center;
251+
width: 100%;
252+
height: 350px;
253+
}
254+
255+
.pdf-loading {
256+
display: inline-block;
257+
width: 50px;
258+
height: 50px;
259+
border: 3px solid #d2d0d0;;
260+
border-radius: 50%;
261+
border-top-color: #383838;
262+
animation: spin 1s ease-in-out infinite;
263+
-webkit-animation: spin 1s ease-in-out infinite;
264+
}
265+
266+
267+
268+
269+
270+
#overlayText {
271+
word-wrap: break-word;
272+
display: grid;
273+
justify-content: end;
274+
}
275+
276+
#overlayText a {
277+
position: relative;
278+
top: 10px;
279+
right: 4px;
280+
color: #000;
281+
margin: auto;
282+
background-color: #eeeeee;
283+
padding: 0.3em 1em;
284+
border: solid 2px;
285+
border-radius: 12px;
286+
border-color: #00000030;
287+
text-decoration: none;
288+
}
289+
290+
#overlayText svg {
291+
height: clamp(1em, 2vw, 1.4em);
292+
width: clamp(1em, 2vw, 1.4em);
293+
}
294+
295+
296+
297+
@keyframes spin {
298+
to { -webkit-transform: rotate(360deg); }
299+
}
300+
@-webkit-keyframes spin {
301+
to { -webkit-transform: rotate(360deg); }
302+
}
303+
</style><div class="embed-pdf-container" id="embed-pdf-container-ad450921">
304+
<div class="pdf-loadingWrapper" id="pdf-loadingWrapper-ad450921">
305+
<div class="pdf-loading" id="pdf-loading-ad450921"></div>
306+
</div>
307+
<div id="overlayText">
308+
<a href="/pdf/iop-book/CH01.pdf" aria-label="Download" download>
309+
<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
310+
<path d="M9 13c.3 0 .5-.1.7-.3L15.4 7 14 5.6l-4 4V1H8v8.6l-4-4L2.6 7l5.7 5.7c.2.2.4.3.7.3zm-7 2h14v2H2z" />
311+
</svg>
312+
</a>
313+
</div>
314+
<canvas class="pdf-canvas" id="pdf-canvas-ad450921"></canvas>
315+
</div>
316+
317+
<div class="pdf-paginator" id="pdf-paginator-ad450921">
318+
<button id="pdf-prev-ad450921">Previous</button>
319+
<button id="pdf-next-ad450921">Next</button> &nbsp; &nbsp;
320+
<span>
321+
<span class="pdf-pagenum" id="pdf-pagenum-ad450921"></span> / <span class="pdf-pagecount" id="pdf-pagecount-ad450921"></span>
322+
</span>
323+
<a class="pdf-source" id="pdf-source-ad450921" href="/pdf/iop-book/CH01.pdf">[pdf]</a>
324+
</div>
325+
326+
<noscript>
327+
View the PDF file <a class="pdf-source" id="pdf-source-noscript-ad450921" href="/pdf/iop-book/CH01.pdf">here</a>.
328+
</noscript>
329+
330+
<script type="text/javascript">
331+
(function(){
332+
var url = '\/pdf\/iop-book\/CH01.pdf';
333+
334+
var hidePaginator = "" === "true";
335+
var hideLoader = "" === "true";
336+
var selectedPageNum = parseInt("") || 1;
337+
338+
339+
var pdfjsLib = window['pdfjs-dist/build/pdf'];
340+
341+
342+
if (pdfjsLib.GlobalWorkerOptions.workerSrc == '')
343+
pdfjsLib.GlobalWorkerOptions.workerSrc = "http:\/\/localhost:1313\/" + 'js/pdf-js/build/pdf.worker.js';
344+
345+
346+
var pdfDoc = null,
347+
pageNum = selectedPageNum,
348+
pageRendering = false,
349+
pageNumPending = null,
350+
scale = 3,
351+
canvas = document.getElementById('pdf-canvas-ad450921'),
352+
ctx = canvas.getContext('2d'),
353+
paginator = document.getElementById("pdf-paginator-ad450921"),
354+
loadingWrapper = document.getElementById('pdf-loadingWrapper-ad450921');
355+
356+
357+
358+
showPaginator();
359+
showLoader();
360+
361+
362+
363+
function renderPage(num) {
364+
pageRendering = true;
365+
366+
pdfDoc.getPage(num).then(function(page) {
367+
var viewport = page.getViewport({scale: scale});
368+
canvas.height = viewport.height;
369+
canvas.width = viewport.width;
370+
371+
372+
var renderContext = {
373+
canvasContext: ctx,
374+
viewport: viewport
375+
};
376+
var renderTask = page.render(renderContext);
377+
378+
379+
renderTask.promise.then(function() {
380+
pageRendering = false;
381+
showContent();
382+
383+
if (pageNumPending !== null) {
384+
385+
renderPage(pageNumPending);
386+
pageNumPending = null;
387+
}
388+
});
389+
});
390+
391+
392+
document.getElementById('pdf-pagenum-ad450921').textContent = num;
393+
}
394+
395+
396+
397+
function showContent() {
398+
loadingWrapper.style.display = 'none';
399+
canvas.style.display = 'block';
400+
}
401+
402+
403+
404+
function showLoader() {
405+
if(hideLoader) return
406+
loadingWrapper.style.display = 'flex';
407+
canvas.style.display = 'none';
408+
}
409+
410+
411+
412+
function showPaginator() {
413+
if(hidePaginator) return
414+
paginator.style.display = 'block';
415+
}
416+
417+
418+
419+
function queueRenderPage(num) {
420+
if (pageRendering) {
421+
pageNumPending = num;
422+
} else {
423+
renderPage(num);
424+
}
425+
}
426+
427+
428+
429+
function onPrevPage() {
430+
if (pageNum <= 1) {
431+
return;
432+
}
433+
pageNum--;
434+
queueRenderPage(pageNum);
435+
}
436+
document.getElementById('pdf-prev-ad450921').addEventListener('click', onPrevPage);
437+
438+
439+
440+
function onNextPage() {
441+
if (pageNum >= pdfDoc.numPages) {
442+
return;
443+
}
444+
pageNum++;
445+
queueRenderPage(pageNum);
446+
}
447+
document.getElementById('pdf-next-ad450921').addEventListener('click', onNextPage);
448+
449+
450+
451+
pdfjsLib.getDocument(url).promise.then(function(pdfDoc_) {
452+
pdfDoc = pdfDoc_;
453+
var numPages = pdfDoc.numPages;
454+
document.getElementById('pdf-pagecount-ad450921').textContent = numPages;
455+
456+
457+
if(pageNum > numPages) {
458+
pageNum = numPages
459+
}
460+
461+
462+
renderPage(pageNum);
463+
});
464+
})();
465+
</script>
466+
</p>
467+
<br>
468+
<p>📂 <a href="/pdf/iop-book/CH01.pdf">Download First Chapter</a></p>
219469
<p>IOP agreed to let me post the first chapter online, so you can get a sneak peek at what the book is all about. The chapter discusses the importance of integrating computing into physics education and sets the stage for the contributions from various educators that will follow in subsequent chapters.</p>
220-
<p>You can read the first chapter <a href="/iop-book/chapter-1/">here</a>.</p>
221470

222471

223472
</div>

static/pdf/iop-book/CH01.pdf

131 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)