You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
115 lines
3.9 KiB
115 lines
3.9 KiB
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Harald's Blog</title>
|
|
<link rel="icon" href="data:,">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<link type="text/css" rel="stylesheet" href="style.css">
|
|
<script>
|
|
MathJax = {
|
|
tex: {
|
|
inlineMath: [['$','$']],
|
|
displayMath: [['$$', '$$']],
|
|
tags: "ams"
|
|
},
|
|
chtml: {
|
|
// scale: 1.4,
|
|
// minScale: 1.4
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<script
|
|
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"
|
|
type="text/javascript">
|
|
</script>
|
|
<script type="module">
|
|
import {SinglePageSite} from './js-gen/SinglePageSite.js';
|
|
import {GiteaFileBrowser, RevProxySpec} from './js-gen/GiteaFileBrowser.js';
|
|
import {multiLinebreaksAsParagraph as x} from './js-gen/MultiLinebreaksAsParagraph.js';
|
|
import {scrollableMarker} from './js-gen/ScrollableMarker.js';
|
|
import {SiteToc} from './js-gen/SiteToc.js';
|
|
|
|
function disposedContent(disposedEl) {
|
|
return Promise.resolve(MathJax.typesetClear([disposedEl]));
|
|
}
|
|
function quatsch(text, headers) {
|
|
//return text.replace(/,/, ' UUUUU ');
|
|
return text;
|
|
}
|
|
function filter(dirEntries) {
|
|
const result = [];
|
|
for(const e of dirEntries) {
|
|
if (e.name === 'js-gen') continue;
|
|
if (e.type === 'tree') result.push(e);
|
|
if (e.name === 'index.html') continue;
|
|
if (e.name === 'About.html') continue;
|
|
if (e.name.endsWith('.html')) result.push(e);
|
|
}
|
|
return result;
|
|
}
|
|
function displayName(entry) {
|
|
if (entry.type === 'tree') {
|
|
return entry.name;
|
|
}
|
|
return entry.name.replace(/[.]html$/, '');
|
|
}
|
|
function newContent(el, headers) {
|
|
MathJax.texReset(1)
|
|
return MathJax.typesetPromise([el]);
|
|
}
|
|
let revProxy = undefined;
|
|
let giteaHost = undefined;
|
|
if (location.href.indexOf('codeberg.page')>=0) {
|
|
revProxy = new RevProxySpec('x', 'x');
|
|
giteaHost = 'https://codeberg.org'
|
|
} else {
|
|
revProxy = new RevProxySpec('/codeberg', 'https://codeberg.org');
|
|
giteaHost = 'http://localhost/codeberg';
|
|
}
|
|
const gfb =
|
|
new GiteaFileBrowser(giteaHost, 'harald', 'pages', 'main', revProxy);
|
|
const sps = new SinglePageSite();
|
|
sps.addDisposeElementHandlers(disposedContent);
|
|
sps.addNewTextHandlers(x, quatsch);
|
|
sps.addNewElementHandlers(newContent, scrollableMarker('y', 'scrollable'));
|
|
const siteToc = new SiteToc(gfb, filter, displayName);
|
|
sps.setSiteToc((container, params) => siteToc.create(container, params));
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div style="display:none;">$
|
|
\def\Vec#1{\mathbf{#1}}
|
|
\def\vt#1{\Vec{v}_{#1}(t)}
|
|
\def\v#1{\Vec{v}_{#1}}
|
|
\def\vx#1{\Vec{x}_{#1}}
|
|
\def\av{\bar{\Vec{v}}}
|
|
\def\vdel{\Vec{\Delta}}
|
|
$
|
|
</div>
|
|
|
|
<div class="header">
|
|
<h1><a href=".">Harald Kirsch</a></h1>
|
|
<a class="about" href="./About.html">about this blog</a>
|
|
</div>
|
|
<div class="middle">
|
|
<div class="sitetoc">
|
|
<h1>Pages</h1>
|
|
</div>
|
|
<div class="mainContent article" addPreviews="4">
|
|
<p>Sadly, this is currently broken when served from harald.codeberg.page :-/</p>
|
|
<!-- could add preview manually too like this
|
|
<div class="preview" useSitetoc="url"></div>
|
|
-->
|
|
</div>
|
|
</div>
|
|
<div class="footer">
|
|
<span>©2022 Harald Kirsch</span>
|
|
<span>Blog's <a href="https://codeberg.org/harald/pages" target="_blank">source code</a></span>
|
|
</div>
|
|
<script type="module" src="./js-gen/SinglePageSite.js"></script>
|
|
</body>
|
|
</html>
|
|
|