aboutsummaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'index.html')
-rw-r--r--index.html58
1 files changed, 56 insertions, 2 deletions
diff --git a/index.html b/index.html
index 59dabb7..87881bf 100644
--- a/index.html
+++ b/index.html
@@ -7,6 +7,15 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/src/style.css">
<title>altaf-files</title>
+
+ <!-- KaTeX -->
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.17.0/dist/katex.min.css" integrity="sha384-vlBdW0r3AcZO/HboRPznQNowvexd3fY8qHOWkBi5q7KGgqJ+F48+DceybYmrVbmB" crossorigin="anonymous">
+ <!-- The loading of KaTeX is deferred to speed up page rendering -->
+ <script defer src="https://cdn.jsdelivr.net/npm/katex@0.17.0/dist/katex.min.js" integrity="sha384-AtrdNsnxl/75rvBneBVH7DtOvCxSVahR2zWqle1coBKd8DEmLoviqNeJSx64gNAs" crossorigin="anonymous"></script>
+ <!-- To automatically render math in text elements, include the auto-render extension: -->
+ <script defer src="https://cdn.jsdelivr.net/npm/katex@0.17.0/dist/contrib/auto-render.min.js" integrity="sha384-bjyGPfbij8/NDKJhSGZNP/khQVgtHUE5exjm4Ydllo42FwIgYsdLO2lXGmRBf5Mz" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
+ <!-- https://github.com/KaTeX/KaTeX/blob/main/contrib/mhchem/README.md -->
+ <script defer src="https://cdn.jsdelivr.net/npm/katex@0.17.0/dist/contrib/mhchem.min.js" integrity="sha384-fB8BH//9nBzROkMUsu/Dr35jWHIbnKesUo9rW0hfEgw8mZGnkAyBAjKX9F98OVuo" crossorigin="anonymous"></script>
</head>
<body>
<div class="sidebar">
@@ -14,14 +23,59 @@
<span class="sidebar-text">altaf-files</span>
</div>
<div class="content">
- <section>
+ <section id="breadcrumb-container-section">
<div class="div-sizing" id="breadcrumb-container">
</div>
</section>
- <section>
+ <section id="list-container-section">
<div class="list-container" id="list-container">
</div>
</section>
+ <section id="file-content-section">
+ <div id="file-content" class="div-sizing">
+ </div>
+ </section>
</div>
+ <!-- https://facelessuser.github.io/pymdown-extensions/extensions/arithmatex/ -->
+ <script>
+(function () {
+'use strict';
+
+var katexMath = (function () {
+ var maths = document.querySelectorAll('.arithmatex'),
+ tex;
+
+ for (var i = 0; i < maths.length; i++) {
+ tex = maths[i].textContent || maths[i].innerText;
+ if (tex.startsWith('\\(') && tex.endsWith('\\)')) {
+ katex.render(tex.slice(2, -2), maths[i], {'displayMode': false});
+ } else if (tex.startsWith('\\[') && tex.endsWith('\\]')) {
+ katex.render(tex.slice(2, -2), maths[i], {'displayMode': true});
+ }
+ }
+});
+
+(function () {
+ var onReady = function onReady(fn) {
+ if (document.addEventListener) {
+ document.addEventListener("DOMContentLoaded", fn);
+ } else {
+ document.attachEvent("onreadystatechange", function () {
+ if (document.readyState === "interactive") {
+ fn();
+ }
+ });
+ }
+ };
+
+ onReady(function () {
+ if (typeof katex !== "undefined") {
+ katexMath();
+ }
+ });
+})();
+
+}());
+ </script>
</body>
</html>