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

<!DOCTYPE html>
<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">
MathJax = {
tex: {
inlineMath: [['$','$']],
displayMath: [['$$', '$$']],
tags: "ams"
chtml: {
// scale: 1.4,
// minScale: 1.4
<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 ( === 'js-gen') continue;
if (e.type === 'tree') result.push(e);
if ( === 'index.html') continue;
if ( === 'About.html') continue;
if ('.html')) result.push(e);
return result;
function displayName(entry) {
if (entry.type === 'tree') {
return[.]html$/, '');
function newContent(el, headers) {
return MathJax.typesetPromise([el]);
let revProxy = undefined;
let giteaHost = undefined;
if (location.href.indexOf('')>=0) {
revProxy = new RevProxySpec('x', 'x');
giteaHost = ''
} else {
revProxy = new RevProxySpec('/codeberg', '');
giteaHost = 'http://localhost/codeberg';
const gfb =
new GiteaFileBrowser(giteaHost, 'harald', 'pages', 'main', revProxy);
const sps = new SinglePageSite();
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));
<div style="display:none;">$
<div class="header">
<h1><a href=".">Harald Kirsch</a></h1>
<a class="about" href="./About.html">about this blog</a>
<div class="middle">
<div class="sitetoc">
<div class="mainContent article" addPreviews="4">
<p>Sadly, this is currently broken when served from :-/</p>
<!-- could add preview manually too like this
<div class="preview" useSitetoc="url"></div>
<div class="footer">
<span>&copy;2022 Harald Kirsch</span>
<span>Blog's <a href="" target="_blank">source code</a></span>
<script type="module" src="./js-gen/SinglePageSite.js"></script>