Skip to content

Commit 1ade12a

Browse files
committed
Update.
1 parent f72be0c commit 1ade12a

20 files changed

+323
-10
lines changed

_freeze/site_libs/revealjs/dist/theme/fonts/league-gothic/league-gothic.eot

100644100755
File mode changed.

_freeze/site_libs/revealjs/dist/theme/fonts/league-gothic/league-gothic.ttf

100644100755
File mode changed.

_freeze/site_libs/revealjs/dist/theme/fonts/league-gothic/league-gothic.woff

100644100755
File mode changed.

_freeze/site_libs/revealjs/dist/theme/fonts/source-sans-pro/source-sans-pro-italic.eot

100644100755
File mode changed.

_freeze/site_libs/revealjs/dist/theme/fonts/source-sans-pro/source-sans-pro-italic.woff

100644100755
File mode changed.

_freeze/site_libs/revealjs/dist/theme/fonts/source-sans-pro/source-sans-pro-regular.eot

100644100755
File mode changed.

_freeze/site_libs/revealjs/dist/theme/fonts/source-sans-pro/source-sans-pro-regular.woff

100644100755
File mode changed.

_freeze/site_libs/revealjs/dist/theme/fonts/source-sans-pro/source-sans-pro-semibold.eot

100644100755
File mode changed.

_freeze/site_libs/revealjs/dist/theme/fonts/source-sans-pro/source-sans-pro-semibold.woff

100644100755
File mode changed.

_freeze/site_libs/revealjs/dist/theme/fonts/source-sans-pro/source-sans-pro-semibolditalic.eot

100644100755
File mode changed.

_freeze/site_libs/revealjs/dist/theme/fonts/source-sans-pro/source-sans-pro-semibolditalic.woff

100644100755
File mode changed.

_freeze/site_libs/revealjs/dist/theme/quarto.css

Lines changed: 5 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

_freeze/site_libs/revealjs/plugin/markdown/plugin.js

100644100755
File mode changed.

_freeze/site_libs/revealjs/plugin/math/katex.js

100644100755
File mode changed.

_freeze/site_libs/revealjs/plugin/quarto-line-highlight/line-highlight.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ window.QuartoLineHighlight = function () {
3838
divSourceCode.forEach((el) => {
3939
if (el.hasAttribute(kCodeLineNumbersAttr)) {
4040
const codeLineAttr = el.getAttribute(kCodeLineNumbersAttr);
41-
el.removeAttribute("data-code-line-numbers");
41+
el.removeAttribute(kCodeLineNumbersAttr);
4242
if (handleLinesSelector(deck, codeLineAttr)) {
4343
// Only process if attr is a string to select lines to highlights
4444
// e.g "1|3,6|8-11"
@@ -165,17 +165,17 @@ window.QuartoLineHighlight = function () {
165165
if (typeof highlight.last === "number") {
166166
spanToHighlight = [].slice.call(
167167
codeBlock.querySelectorAll(
168-
":scope > span:nth-child(n+" +
168+
":scope > span:nth-of-type(n+" +
169169
highlight.first +
170-
"):nth-child(-n+" +
170+
"):nth-of-type(-n+" +
171171
highlight.last +
172172
")"
173173
)
174174
);
175175
} else if (typeof highlight.first === "number") {
176176
spanToHighlight = [].slice.call(
177177
codeBlock.querySelectorAll(
178-
":scope > span:nth-child(" + highlight.first + ")"
178+
":scope > span:nth-of-type(" + highlight.first + ")"
179179
)
180180
);
181181
}

_freeze/site_libs/revealjs/plugin/quarto-support/support.js

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@ window.QuartoSupport = function () {
44
return /print-pdf/gi.test(window.location.search);
55
}
66

7+
// helper for theme toggling
8+
function toggleBackgroundTheme(el, onDarkBackground, onLightBackground) {
9+
if (onDarkBackground) {
10+
el.classList.add('has-dark-background')
11+
} else {
12+
el.classList.remove('has-dark-background')
13+
}
14+
if (onLightBackground) {
15+
el.classList.add('has-light-background')
16+
} else {
17+
el.classList.remove('has-light-background')
18+
}
19+
}
20+
721
// implement controlsAudo
822
function controlsAuto(deck) {
923
const config = deck.getConfig();
@@ -111,8 +125,19 @@ window.QuartoSupport = function () {
111125
}
112126
}
113127

114-
// add footer text
115-
function addFooter(deck) {
128+
// tweak slide-number element
129+
function tweakSlideNumber(deck) {
130+
deck.on("slidechanged", function (ev) {
131+
const revealParent = deck.getRevealElement();
132+
const slideNumberEl = revealParent.querySelector(".slide-number");
133+
const onDarkBackground = Reveal.getSlideBackground(ev.indexh, ev.indexv).classList.contains('has-dark-background');
134+
const onLightBackground = Reveal.getSlideBackground(ev.indexh, ev.indexv).classList.contains('has-light-background');
135+
toggleBackgroundTheme(slideNumberEl, onDarkBackground, onLightBackground);
136+
})
137+
}
138+
139+
// add footer text
140+
function addFooter(deck) {
116141
const revealParent = deck.getRevealElement();
117142
const defaultFooterDiv = document.querySelector(".footer-default");
118143
if (defaultFooterDiv) {
@@ -127,13 +152,17 @@ window.QuartoSupport = function () {
127152
prevSlideFooter.remove();
128153
}
129154
const currentSlideFooter = ev.currentSlide.querySelector(".footer");
155+
const onDarkBackground = Reveal.getSlideBackground(ev.indexh, ev.indexv).classList.contains('has-dark-background')
156+
const onLightBackground = Reveal.getSlideBackground(ev.indexh, ev.indexv).classList.contains('has-light-background')
130157
if (currentSlideFooter) {
131158
defaultFooterDiv.style.display = "none";
132159
const slideFooter = currentSlideFooter.cloneNode(true);
133160
handleLinkClickEvents(deck, slideFooter);
134161
deck.getRevealElement().appendChild(slideFooter);
162+
toggleBackgroundTheme(slideFooter, onDarkBackground, onLightBackground)
135163
} else {
136164
defaultFooterDiv.style.display = "block";
165+
toggleBackgroundTheme(defaultFooterDiv, onDarkBackground, onLightBackground)
137166
}
138167
});
139168
}
@@ -272,6 +301,23 @@ window.QuartoSupport = function () {
272301
}
273302
}
274303

304+
function handleWhiteSpaceInColumns(deck) {
305+
for (const outerDiv of window.document.querySelectorAll("div.columns")) {
306+
// remove all whitespace text nodes
307+
// whitespace nodes cause the columns to be misaligned
308+
// since they have inline-block layout
309+
//
310+
// Quarto emits no whitespace nodes, but third-party tooling
311+
// has bugs that can cause whitespace nodes to be emitted.
312+
// See https://github.com/quarto-dev/quarto-cli/issues/8382
313+
for (const node of outerDiv.childNodes) {
314+
if (node.nodeType === 3 && node.nodeValue.trim() === "") {
315+
outerDiv.removeChild(node);
316+
}
317+
}
318+
}
319+
}
320+
275321
return {
276322
id: "quarto-support",
277323
init: function (deck) {
@@ -280,11 +326,13 @@ window.QuartoSupport = function () {
280326
fixupForPrint(deck);
281327
applyGlobalStyles(deck);
282328
addLogoImage(deck);
329+
tweakSlideNumber(deck);
283330
addFooter(deck);
284331
addChalkboardButtons(deck);
285332
handleTabbyClicks();
286333
handleSlideChanges(deck);
287334
workaroundMermaidDistance(deck);
335+
handleWhiteSpaceInColumns(deck);
288336
},
289337
};
290338
};

_quarto.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ project:
33

44
website:
55
# favicon:
6-
title: "My Personal Blog"
6+
title: "Chengkun Li"
77
site-url: https://pipme.github.io
88
repo-url: https://github.com/pipme/pipme.github.io
99
repo-actions: [edit]

about.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ aliases:
1010

1111
I am Chengkun, currently a PhD student at the [University of Helsinki](https://www.helsinki.fi/en/researchgroups/machine-and-human-intelligence), supervised by [Luigi Acerbi](https://lacerbi.github.io/). My research focuses on Bayesian posterior computation, namely,
1212
$$p(\text{parameters})p(\text{data}|\text{parameters}) \rightarrow p(\text{parameters}|\text{data}),$$
13-
exploring an alternative path other than MCMC sampling and variational inference. I used to work on computer vision and robotics too.
13+
exploring an alternative path other than direct MCMC sampling and variational inference. I used to work on computer vision and robotics too.
1414

1515
# About the site
1616

0 commit comments

Comments
 (0)