Skip to content

Commit ad9fd1a

Browse files
committed
wip
1 parent 4b3b994 commit ad9fd1a

File tree

278 files changed

+32914
-12310
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

278 files changed

+32914
-12310
lines changed

_layouts/post.html

Lines changed: 83 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -14,55 +14,55 @@
1414
{% include seo_head.html %}
1515
<!-- MathJax Configuration (loaded early) -->
1616
{% if page.mathjax or site.mathjax %}
17-
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/svg-pan-zoom.min.js"></script>
18-
<style>
19-
.mermaid-modal {
20-
display: none;
21-
position: fixed;
22-
z-index: 10000;
23-
left: 0;
24-
top: 0;
25-
width: 100%;
26-
height: 100%;
27-
overflow: hidden;
28-
background-color: rgba(0,0,0,0.9);
29-
}
30-
.mermaid-modal-content {
31-
margin: auto;
32-
display: block;
33-
width: 95%;
34-
height: 95%;
35-
position: relative;
36-
top: 2.5%;
37-
background: white;
38-
border-radius: 4px;
39-
overflow: hidden;
40-
}
41-
.mermaid-modal-close {
42-
position: absolute;
43-
top: 10px;
44-
right: 25px;
45-
color: #f1f1f1;
46-
font-size: 35px;
47-
font-weight: bold;
48-
transition: 0.3s;
49-
z-index: 10001;
50-
cursor: pointer;
51-
}
52-
.mermaid-modal-close:hover,
53-
.mermaid-modal-close:focus {
54-
color: #bbb;
55-
text-decoration: none;
56-
cursor: pointer;
57-
}
58-
.mermaid svg {
59-
cursor: pointer;
60-
}
61-
</style>
62-
<div id="mermaid-modal" class="mermaid-modal">
63-
<span class="mermaid-modal-close">&times;</span>
64-
<div id="mermaid-modal-content" class="mermaid-modal-content"></div>
65-
</div>
17+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/svg-pan-zoom.min.js"></script>
18+
<style>
19+
.mermaid-modal {
20+
display: none;
21+
position: fixed;
22+
z-index: 10000;
23+
left: 0;
24+
top: 0;
25+
width: 100%;
26+
height: 100%;
27+
overflow: hidden;
28+
background-color: rgba(0,0,0,0.9);
29+
}
30+
.mermaid-modal-content {
31+
margin: auto;
32+
display: block;
33+
width: 95%;
34+
height: 95%;
35+
position: relative;
36+
top: 2.5%;
37+
background: white;
38+
border-radius: 4px;
39+
overflow: hidden;
40+
}
41+
.mermaid-modal-close {
42+
position: absolute;
43+
top: 10px;
44+
right: 25px;
45+
color: #f1f1f1;
46+
font-size: 35px;
47+
font-weight: bold;
48+
transition: 0.3s;
49+
z-index: 10001;
50+
cursor: pointer;
51+
}
52+
.mermaid-modal-close:hover,
53+
.mermaid-modal-close:focus {
54+
color: #bbb;
55+
text-decoration: none;
56+
cursor: pointer;
57+
}
58+
.mermaid svg {
59+
cursor: pointer;
60+
}
61+
</style>
62+
<div id="mermaid-modal" class="mermaid-modal">
63+
<span class="mermaid-modal-close">&times;</span>
64+
<div id="mermaid-modal-content" class="mermaid-modal-content"></div>
65+
</div>
6666
<script>
6767
window.MathJax = {
6868
tex: {
@@ -245,10 +245,39 @@ <h3>Related Posts</h3>
245245
addRandomGlitch();
246246
}
247247
</script>
248-
248+
<script>
249+
MathJax = {
250+
tex: {
251+
inlineMath: [['$', '$'], ['\\(', '\\)']],
252+
displayMath: [['$$', '$$'], ['\\[', '\\]']],
253+
processEscapes: true,
254+
processEnvironments: true,
255+
tags: 'ams',
256+
packages: {'[+]': ['ams', 'newcommand', 'configmacros']}
257+
},
258+
options: {
259+
skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code'],
260+
ignoreHtmlClass: 'tex2jax_ignore',
261+
processHtmlClass: 'tex2jax_process'
262+
},
263+
startup: {
264+
pageReady: () => {
265+
return MathJax.startup.defaultPageReady().then(() => {
266+
console.log('MathJax initial typesetting complete');
267+
});
268+
}
269+
},
270+
svg: {
271+
fontCache: 'global'
272+
}
273+
};
274+
</script>
275+
<script type="text/javascript" id="MathJax-script" async
276+
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js">
277+
</script>
249278
<!-- Mermaid.js integration -->
250-
{% if page.mermaid or site.mermaid %}
251-
<script src="https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js"></script>
279+
{% if page.mermaid or site.mermaid %}
280+
<script src="https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js"></script>
252281
<script>
253282
document.addEventListener('DOMContentLoaded', function() {
254283
mermaid.initialize({
@@ -328,8 +357,8 @@ <h3>Related Posts</h3>
328357
});
329358
});
330359
});
331-
</script>
332-
{% endif %}
360+
</script>
361+
{% endif %}
333362

334363
</body>
335364
</html>

_plugins/mathjax_config.rb

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

0 commit comments

Comments
 (0)