Rework diary to focus on yearly pages
This commit is contained in:
@@ -6,12 +6,16 @@
|
||||
|
||||
// Section 0 is pre-heading content, editable via full-page edit.
|
||||
// Sections 1..N each start at a heading; that is the index sent to the server.
|
||||
// Skip headings that already carry a server-rendered edit link (the diary
|
||||
// slice templates bake their own edit URLs pointing at the year file).
|
||||
headings.forEach(function (h, i) {
|
||||
if (h.querySelector('a.btn')) return;
|
||||
var a = document.createElement('a');
|
||||
a.href = '?edit§ion=' + (i + 1);
|
||||
a.className = 'btn btn-small';
|
||||
a.textContent = 'edit';
|
||||
a.textContent = 'edit';
|
||||
h.appendChild(document.createTextNode(' '))
|
||||
h.appendChild(a);
|
||||
});
|
||||
}());
|
||||
``
|
||||
|
||||
Reference in New Issue
Block a user