Skip to content

Commit b83991e

Browse files
committed
update table of progress
1 parent b2808e6 commit b83991e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

themes/vocabulary_theme/templates/cc-search-guide.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ <h1>{{ this.title }}</h1>
1010
<div class="container body">
1111
<div class="columns">
1212
<div class="column is-one-quarter">
13-
<div class="table-of-progress">
13+
<div class="table-of-progress sticky-top">
1414
<h4 class="step-header">Steps</h4>
1515
<ul>
1616
{% for item in this.body.toc %}

webpack/js/main.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,20 @@ $(document).ready(function () {
3333
}
3434
});
3535

36-
// Internal Navigation for table of contents component
36+
// Internal Navigation for table of contents and table of progress component
3737
let hash = window.location.hash;
3838
if (hash.length > 0) {
3939
$('.menu-list').find('a[href=\"' + hash + '\"]').addClass('is-active');
40+
$('.step').find('a[href=\"' + hash + '\"]').find('.number').addClass('is-active');
4041
}
4142

4243
$(window).on('hashchange', function() {
4344
let hash = window.location.hash;
4445
$('.menu-list a[href*="#"]').closest('a').removeClass('is-active');
4546
$('.menu-list').find('a[href=\"' + hash + '\"]').addClass('is-active');
47+
48+
$('.step a[href*="#"]').closest('a').find('.number').removeClass('is-active');
49+
$('.step').find('a[href=\"' + hash + '\"]').find('.number').addClass('is-active');
4650
});
4751
});
4852

0 commit comments

Comments
 (0)