Skip to content

Commit

Permalink
Merge pull request #4360 from ranjit-git/ranjit-git-patch-1
Browse files Browse the repository at this point in the history
Ranjit git patch 1
  • Loading branch information
alvarotrigo committed Apr 12, 2022
2 parents fc4873f + 1bfccc5 commit e7a5db4
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dist/fullpage.extensions.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/fullpage.js
Expand Up @@ -1829,7 +1829,7 @@

for (var i = 0; i < numSlides; i++) {
var slide = $(SLIDE_SEL, sectionElem)[i];
appendTo(createElementFromHTML('<li><a href="#"><span class="fp-sr-only">' + getBulletLinkName(i, 'Slide', slide) + '</span><span></span></a></li>'), $('ul', nav)[0]);
appendTo(createElementFromHTML('<li><a href="#"><span class="fp-sr-only">' + encodeURI(getBulletLinkName(i, 'Slide', slide)) + '</span><span></span></a></li>'), $('ul', nav)[0]);
} //centering it


Expand Down Expand Up @@ -2354,7 +2354,7 @@
link = section.anchor;
}

li += '<li><a href="#' + link + '"><span class="fp-sr-only">' + getBulletLinkName(section.index(), 'Section') + '</span><span></span></a>'; // Only add tooltip if needed (defined by user)
li += '<li><a href="#' + encodeURI(link) + '"><span class="fp-sr-only">' + encodeURI(getBulletLinkName(section.index(), 'Section')) + '</span><span></span></a>'; // Only add tooltip if needed (defined by user)

var tooltip = getOptions().navigationTooltips[section.index()];

Expand Down
2 changes: 1 addition & 1 deletion dist/fullpage.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/js/nav/sections.js
Expand Up @@ -64,7 +64,7 @@ export function addVerticalNavigation(){
link = section.anchor;
}

li += '<li><a href="#' + link + '"><span class="fp-sr-only">' + getBulletLinkName(section.index(), 'Section') + '</span><span></span></a>';
li += '<li><a href="#' + encodeURI(link) + '"><span class="fp-sr-only">' + encodeURI(getBulletLinkName(section.index(), 'Section')) + '</span><span></span></a>';

// Only add tooltip if needed (defined by user)
var tooltip = getOptions().navigationTooltips[section.index()];
Expand Down Expand Up @@ -98,4 +98,4 @@ export function sectionBulletHandler(e){
EventEmitter.emit('scrollPage', {
destination: getState().sections[indexBullet]
});
}
}
4 changes: 2 additions & 2 deletions src/js/nav/slides.js
Expand Up @@ -57,12 +57,12 @@ export function addSlidesNavigation(section){

for(var i=0; i< numSlides; i++){
var slide = utils.$(SLIDE_SEL, sectionElem)[i];
utils.appendTo(utils.createElementFromHTML('<li><a href="#"><span class="fp-sr-only">'+ getBulletLinkName(i, 'Slide', slide) +'</span><span></span></a></li>'), utils.$('ul', nav)[0] );
utils.appendTo(utils.createElementFromHTML('<li><a href="#"><span class="fp-sr-only">'+ encodeURI(getBulletLinkName(i, 'Slide', slide)) +'</span><span></span></a></li>'), utils.$('ul', nav)[0] );
}

//centering it
utils.css(nav, {'margin-left': '-' + (nav.innerWidth/2) + 'px'});

var activeSlideIndex = section.activeSlide ? section.activeSlide.index() : 0;
utils.addClass(utils.$('a', utils.$('li', nav)[activeSlideIndex] ), ACTIVE);
}
}

0 comments on commit e7a5db4

Please sign in to comment.