Update source.org

This commit is contained in:
2025-11-20 16:32:06 +01:00
parent b0910578ce
commit cec99cbdac
70 changed files with 5295 additions and 3335 deletions

View File

@@ -1,6 +1,38 @@
document.addEventListener('DOMContentLoaded', function() {
console.log("🦶🦶🦶🦶🦶 FOOTNOTES LOADED 🦶🦶🦶🦶🦶🦶")
function formatDayOfYear(dayOfYear, year) {
const date = new Date(year, 0, dayOfYear);
return date.toLocaleDateString('en-GB', {
day: 'numeric',
month: 'short',
year: 'numeric'
});
}
let selectedCell = null;
function showHabitPopup(cell) {
var bodyHtml = cell.getAttribute('data-body');
var doy = cell.getAttribute('data-doy');
var activity = cell.getAttribute('data-activity');
var status = cell.getAttribute('data-status');
activity = activity.replace(/^dailies-/, '').replace(/^./, c => c.toUpperCase())
if (!bodyHtml) bodyHtml = "<span class='center'><i>This section intentionally left blank.</i></span>"
bodyHtml = `<h3><span class="grid ${status}">${activity}</span> — ${formatDayOfYear(parseInt(doy), 2025)}</h3> ${bodyHtml}`
document.getElementById('habitPopupContent').innerHTML = bodyHtml;
if (selectedCell) {
selectedCell.classList.remove('habitgrid-selected');
}
cell.classList.add('habitgrid-selected');
selectedCell = cell;
enableFootnotes();
}
function enableFootnotes() {
const footnoteRefs = document.querySelectorAll('.footref')
footnoteRefs.forEach(ref => {
@@ -45,37 +77,6 @@ document.addEventListener('DOMContentLoaded', function() {
// Hide footnotes section
document.querySelector("#footnotes").style.display='none'
});
function formatDayOfYear(dayOfYear, year) {
const date = new Date(year, 0, dayOfYear);
return date.toLocaleDateString('en-GB', {
day: 'numeric',
month: 'short',
year: 'numeric'
});
}
let selectedCell = null;
function showHabitPopup(cell) {
var bodyHtml = cell.getAttribute('data-body');
var doy = cell.getAttribute('data-doy');
var activity = cell.getAttribute('data-activity');
var status = cell.getAttribute('data-status');
activity = activity.replace(/^dailies-/, '').replace(/^./, c => c.toUpperCase())
if (!bodyHtml) bodyHtml = "<span class='center'><i>This section intentionally left blank.</i></span>"
bodyHtml = `<h3><span class="grid ${status}">${activity}</span> — ${formatDayOfYear(parseInt(doy), 2025)}</h3> ${bodyHtml}`
document.getElementById('habitPopupContent').innerHTML = bodyHtml;
if (selectedCell) {
selectedCell.classList.remove('habitgrid-selected');
}
cell.classList.add('habitgrid-selected');
selectedCell = cell;
}
document.addEventListener('DOMContentLoaded', enableFootnotes);