touch repository
All checks were successful
Deploy / trigger (push) Successful in 21s

This commit is contained in:
2026-05-26 12:51:29 +02:00
parent 5c837d81cf
commit 9568774e35
2 changed files with 14 additions and 7 deletions

View File

@@ -8,14 +8,17 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="style.css">
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<script> <script>
window.MathJax = { window.MathJax = {
tex: { tex: {
inlineMath: [['$', '$'], ['\\(', '\\)']] inlineMath: [['$', '$'], ['\\(', '\\)']]
},
options: {
skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre']
} }
}; };
</script> </script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
</head> </head>
<body> <body>

View File

@@ -2,7 +2,7 @@
async function showfile(filename, target) { async function showfile(filename, target) {
const bottoni = document.querySelectorAll('.btn-appunto'); const bottoni = document.querySelectorAll('.btn-appunto');
bottoni.forEach(b => b.classList.remove('active')); bottoni.forEach(b => b.classList.remove('active'));
if(target) target.classList.add('active'); if (target) target.classList.add('active');
const container = document.getElementById('markdown-content'); const container = document.getElementById('markdown-content');
container.innerHTML = "<p>Caricamento in corso...</p>"; container.innerHTML = "<p>Caricamento in corso...</p>";
@@ -15,8 +15,12 @@ async function showfile(filename, target) {
container.innerHTML = marked.parse(markdownRaw); container.innerHTML = marked.parse(markdownRaw);
if (window.MathJax) { if (window.MathJax && typeof MathJax.typesetPromise === 'function') {
MathJax.typesetPromise([container]); MathJax.typesetPromise([container]).catch(function (err) {
console.error("Errore nel rendering di MathJax: ", err);
});
} else if (window.MathJax && window.MathJax.typeset) {
MathJax.typeset([container]);
} }
} catch (error) { } catch (error) {