Skip to content

Commit ce8ebcb

Browse files
committed
Add timestamp to PDF export
1 parent 46209b7 commit ce8ebcb

1 file changed

Lines changed: 25 additions & 1 deletion

File tree

index.html

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,19 @@
170170
font-size: 1.5vmin;
171171
padding-top: 0.5vmin;
172172
}
173+
.print-pdf .license {
174+
margin-bottom: -2vmin;
175+
}
176+
#last-modified {
177+
display: none;
178+
font-size: 1.25vmin;
179+
}
180+
.print-pdf #last-modified {
181+
display: inline;
182+
}
183+
.print-pdf .footer > #website {
184+
display: none;
185+
}
173186
pre > code {
174187
padding: 20px !important;
175188
border-radius: 10px;
@@ -197,7 +210,7 @@
197210
<div class="reveal">
198211
<div id="footer-info" style="display: none">
199212
<div class="footer">
200-
<a href="https://stefaniemolin.com">stefaniemolin.com</a>
213+
<a id="website" href="https://stefaniemolin.com">stefaniemolin.com</a>
201214
<div class="license">
202215
License:
203216
<a
@@ -209,6 +222,13 @@
209222
CC BY-NC-SA 4.0
210223
</a>
211224
</div>
225+
<div id="last-modified">
226+
This was generated at
227+
<span id="page-loaded-at"></span>. The latest version is at
228+
<a href="https://stefaniemolin.com/pre-commit-workshop/"
229+
>stefaniemolin.com/pre-commit-workshop/</a
230+
>.
231+
</div>
212232
</div>
213233
</div>
214234
<div class="slides">
@@ -2176,6 +2196,10 @@ <h2>Thank you!</h2>
21762196
// for working with dates/times
21772197
const { DateTime, Duration } = luxon;
21782198

2199+
// show the time at which the PDF was generated
2200+
const now = DateTime.now();
2201+
document.getElementById("page-loaded-at").innerHTML = now.toISO();
2202+
21792203
// add exercise timer
21802204
let updateExerciseTimerInterval;
21812205
Reveal.addKeyBinding(

0 commit comments

Comments
 (0)