File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7777 if ( ! boxes . length ) return ;
7878
7979 /* ── Progress bar + "next unchecked" ────────────────────────────────────── */
80- var slot = document . getElementById ( 'ps-progress-slot' ) ;
80+ // Must be a direct child of the tall column: position:sticky only travels while
81+ // its own parent is in view, so a wrapper sized to the bar would pin nothing.
82+ var column = article . parentElement ;
8183 var wrapEl = document . createElement ( 'div' ) ;
8284 wrapEl . className = 'progress' ;
8385 wrapEl . innerHTML =
8486 '<span class="progress__label"></span>' +
8587 '<span class="progress__bar"><span class="progress__fill"></span></span>' +
8688 '<button type="button" class="progress__next">next unchecked ↓</button>' +
8789 '<button type="button" class="progress__reset">reset</button>' ;
88- if ( slot ) slot . appendChild ( wrapEl ) ; else article . parentNode . insertBefore ( wrapEl , article ) ;
90+ column . insertBefore ( wrapEl , article ) ;
8991
9092 var label = wrapEl . querySelector ( '.progress__label' ) ;
9193 var fill = wrapEl . querySelector ( '.progress__fill' ) ;
Original file line number Diff line number Diff line change @@ -42,7 +42,6 @@ eleventyComputed:
4242 </aside >
4343
4444 <div class =" roadmap-main" >
45- <div id =" ps-progress-slot" ></div >
4645 <article class =" roadmap prose" >
4746 {{ roadmap .content | roadmapMarkdown (roadmap ) | safe }}
4847 </article >
You can’t perform that action at this time.
0 commit comments