From 6476f5f49b373cd4cf05f2e73389df83e437d597 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Thu, 13 Feb 2025 16:30:31 +0100 Subject: Axis legend formatting, update vignettes --- .../anchor-sections-1.0/anchor-sections.js | 33 ---------------------- 1 file changed, 33 deletions(-) delete mode 100644 docs/dev/articles/FOCUS_D_files/anchor-sections-1.0/anchor-sections.js (limited to 'docs/dev/articles/FOCUS_D_files/anchor-sections-1.0/anchor-sections.js') diff --git a/docs/dev/articles/FOCUS_D_files/anchor-sections-1.0/anchor-sections.js b/docs/dev/articles/FOCUS_D_files/anchor-sections-1.0/anchor-sections.js deleted file mode 100644 index 570f99a0..00000000 --- a/docs/dev/articles/FOCUS_D_files/anchor-sections-1.0/anchor-sections.js +++ /dev/null @@ -1,33 +0,0 @@ -// Anchor sections v1.0 written by Atsushi Yasumoto on Oct 3rd, 2020. -document.addEventListener('DOMContentLoaded', function() { - // Do nothing if AnchorJS is used - if (typeof window.anchors === 'object' && anchors.hasOwnProperty('hasAnchorJSLink')) { - return; - } - - const h = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); - - // Do nothing if sections are already anchored - if (Array.from(h).some(x => x.classList.contains('hasAnchor'))) { - return null; - } - - // Use section id when pandoc runs with --section-divs - const section_id = function(x) { - return ((x.classList.contains('section') || (x.tagName === 'SECTION')) - ? x.id : ''); - }; - - // Add anchors - h.forEach(function(x) { - const id = x.id || section_id(x.parentElement); - if (id === '') { - return null; - } - let anchor = document.createElement('a'); - anchor.href = '#' + id; - anchor.classList = ['anchor-section']; - x.classList.add('hasAnchor'); - x.appendChild(anchor); - }); -}); -- cgit v1.2.1