File tree Expand file tree Collapse file tree 4 files changed +34
-30
lines changed
Expand file tree Collapse file tree 4 files changed +34
-30
lines changed Original file line number Diff line number Diff line change 6161
6262 < script src ="https://cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js "> </ script >
6363
64- < script async
64+ < script defer
6565 src ="https://cdn.jsdelivr.net/combine/npm/popper.js@1.15.0,npm/bootstrap@4/dist/js/bootstrap.min.js "> </ script >
6666
6767 {% include js-selector.html %}
Original file line number Diff line number Diff line change 1818
1919{% if page.math %}
2020 <!-- MathJax -->
21- < script src ="https://polyfill.io/v3/polyfill.min.js?features=es6 "> </ script >
22- < script async src ="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js "> </ script >
21+ < script defer src ="https://polyfill.io/v3/polyfill.min.js?features=es6 "> </ script >
22+ < script defer src ="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js "> </ script >
2323{% endif %}
2424
2525{% if jekyll.environment == 'production' %}
Original file line number Diff line number Diff line change 33-->
44< script src ="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js "> </ script >
55< script >
6+ $ ( function ( ) {
7+ let initTheme = "default" ;
68
7- let initTheme = "default" ;
9+ if ( $ ( "html[mode=dark]" ) . length > 0
10+ || ( $ ( "html[mode]" ) . length == 0
11+ && window . matchMedia ( "(prefers-color-scheme: dark)" ) . matches ) ) {
12+ initTheme = "dark" ;
13+ }
814
9- if ( $ ( "html[mode=dark]" ) . length > 0
10- || ( $ ( "html[mode]" ) . length == 0
11- && window . matchMedia ( "(prefers-color-scheme: dark)" ) . matches ) ) {
12- initTheme = "dark" ;
13- }
15+ let mermaidConf = {
16+ theme : initTheme /* <default|dark|forest|neutral> */
17+ } ;
1418
15- let mermaidConf = {
16- theme : initTheme /* <default|dark|forest|neutral> */
17- } ;
1819
19- /* Markdown converts to HTML */
20- $ ( "pre" ) . has ( "code.language-mermaid" ) . each ( function ( ) {
21- let svgCode = $ ( this ) . children ( ) . html ( ) ;
22- $ ( this ) . addClass ( "unloaded" ) ;
23- $ ( this ) . after ( `<div class=\"mermaid\">${ svgCode } </div>` ) ;
24- } ) ;
25-
26- mermaid . initialize ( mermaidConf ) ;
20+ /* Markdown converts to HTML */
21+ $ ( "pre" ) . has ( "code.language-mermaid" ) . each ( function ( ) {
22+ let svgCode = $ ( this ) . children ( ) . html ( ) ;
23+ $ ( this ) . addClass ( "unloaded" ) ;
24+ $ ( this ) . after ( `<div class=\"mermaid\">${ svgCode } </div>` ) ;
25+ } ) ;
2726
27+ mermaid . initialize ( mermaidConf ) ;
28+ } ) ;
2829</ script >
Original file line number Diff line number Diff line change 11/*
22Reference: https://bootsnipp.com/snippets/featured/link-to-top-page
33*/
4- $ ( window ) . scroll ( function ( ) {
5- if ( $ ( this ) . scrollTop ( ) > 50
6- && $ ( "#sidebar-trigger" ) . css ( "display" ) === "none" ) {
7- $ ( "#back-to-top" ) . fadeIn ( ) ;
8- } else {
9- $ ( "#back-to-top" ) . fadeOut ( ) ;
10- }
11- } ) ;
124
135$ ( function ( ) {
6+ $ ( window ) . scroll ( function ( ) {
7+ if ( $ ( this ) . scrollTop ( ) > 50 &&
8+ $ ( "#sidebar-trigger" ) . css ( "display" ) === "none" ) {
9+ $ ( "#back-to-top" ) . fadeIn ( ) ;
10+ } else {
11+ $ ( "#back-to-top" ) . fadeOut ( ) ;
12+ }
13+ } ) ;
14+
1415 $ ( "#back-to-top" ) . click ( function ( ) {
15- $ ( "body,html" ) . animate ( { scrollTop : 0 } , 800 ) ;
16+ $ ( "body,html" ) . animate ( {
17+ scrollTop : 0
18+ } , 800 ) ;
1619 return false ;
1720 } ) ;
18- } ) ;
21+ } ) ;
You can’t perform that action at this time.
0 commit comments