mirror of
https://github.com/hendricius/the-sourdough-framework
synced 2025-11-18 09:01:12 -06:00
Permalinks for website section heads (#272)
* Permalinks for website section heads * Tabs vs spaces strikes again
This commit is contained in:
@@ -8,4 +8,14 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Add permalinks to headers
|
||||
var heads = document.querySelectorAll('.sectionHead');
|
||||
heads.forEach(function (head) {
|
||||
let permalink = document.createElement("a");
|
||||
permalink.href = '#' + head.id;
|
||||
permalink.classList.add('permalink');
|
||||
permalink.append('🔗');
|
||||
head.append(permalink);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user