feat: newspaper columnar layout - currently in newspaper order, though maybe left-right would be better

This commit is contained in:
Lewis Wynne 2026-03-27 17:34:48 +00:00
parent 880b92900f
commit d65342fd73
4 changed files with 49 additions and 26 deletions

View file

@ -31,11 +31,10 @@
document.documentElement.dataset.has = has;
has = has.toLowerCase();
document.addEventListener('DOMContentLoaded', function() {
document.querySelectorAll('section[data-section] pre').forEach(function(pre) {
var lines = pre.innerHTML.split('\n');
pre.innerHTML = lines.filter(function(line) {
return !line.trim() || line.toLowerCase().indexOf(has) !== -1;
}).join('\n');
document.querySelectorAll('section[data-section] .entry').forEach(function(entry) {
if (entry.textContent.toLowerCase().indexOf(has) === -1) {
entry.style.display = 'none';
}
});
document.querySelectorAll('.guestbook-entry').forEach(function(entry) {
if (entry.textContent.toLowerCase().indexOf(has) === -1) {