|
| 1 | +<head> |
| 2 | + <meta charset="utf-8"> |
| 3 | + <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| 4 | + <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 5 | + {%- seo -%} |
| 6 | + <link href="https://unpkg.com/@primer/css/dist/primer.css" rel="stylesheet" /> |
| 7 | + <link rel="stylesheet" href="{{ "/assets/main.css" | relative_url }}"> |
| 8 | + {%- feed_meta -%} |
| 9 | + {%- if jekyll.environment == 'production' and site.google_analytics -%} |
| 10 | + {%- include google-analytics.html -%} |
| 11 | + {%- endif -%} |
| 12 | + |
| 13 | + {% if site.use_math %} |
| 14 | + <link rel=" stylesheet" href=" https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity=" sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin=" anonymous" > |
| 15 | + <script type="text/javascript" async src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"> </script> |
| 16 | + <script defer src=" https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity=" sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin=" anonymous" ></script> |
| 17 | + <script defer src=" https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" integrity=" sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin=" anonymous" ></script> |
| 18 | + <script> |
| 19 | + document.addEventListener("DOMContentLoaded", function() { |
| 20 | + renderMathInElement( document.body, { |
| 21 | + delimiters: [ |
| 22 | + {left: "$$", right: "$$", display: true}, |
| 23 | + {left: "[%", right: "%]", display: true}, |
| 24 | + {left: "$", right: "$", display: false} |
| 25 | + ]} |
| 26 | + ); |
| 27 | + }); |
| 28 | + </script> |
| 29 | + {% endif %} |
| 30 | + |
| 31 | + <script> |
| 32 | + function wrap_img(fn) { |
| 33 | + if (document.attachEvent ? document.readyState === "complete" : document.readyState !== "loading") { |
| 34 | + var elements = document.querySelectorAll(".post img"); |
| 35 | + Array.prototype.forEach.call(elements, function(el, i) { |
| 36 | + if (el.getAttribute("title")) { |
| 37 | + const caption = document.createElement('figcaption'); |
| 38 | + var node = document.createTextNode(el.getAttribute("title")); |
| 39 | + caption.appendChild(node); |
| 40 | + const wrapper = document.createElement('figure'); |
| 41 | + wrapper.className = 'image'; |
| 42 | + el.parentNode.insertBefore(wrapper, el); |
| 43 | + el.parentNode.removeChild(el); |
| 44 | + wrapper.appendChild(el); |
| 45 | + wrapper.appendChild(caption); |
| 46 | + } |
| 47 | + }); |
| 48 | + } else { document.addEventListener('DOMContentLoaded', fn); } |
| 49 | + } |
| 50 | + window.onload = wrap_img; |
| 51 | + </script> |
| 52 | + |
| 53 | +</head> |
0 commit comments