mirror of
https://github.com/sascha-hemi/pycom-documentation.git
synced 2026-03-21 10:05:56 +01:00
refactor: iOS page improvements and css fixes
1. Changed active colour of the links and buttons. 2. Fixed the issue with scrolling to the anchor point. 3. Changed content of the Pybytes iOS page
This commit is contained in:
23
themes/doc-theme/static/js/smooth-scroll.js
Normal file
23
themes/doc-theme/static/js/smooth-scroll.js
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Smooth scroll to anchor link
|
||||
*/
|
||||
|
||||
|
||||
$(document).ready(function(){
|
||||
$( 'a[href^="#"]' ).on( 'click', function( e ) {
|
||||
|
||||
if ( this.hash !== '' ) {
|
||||
e.preventDefault();
|
||||
|
||||
var hash = this.hash;
|
||||
var nav = $( '.navbar' ).outerHeight();
|
||||
var targetOffset = $( hash ).offset().top - nav;
|
||||
|
||||
$( 'html, body' ).animate( {
|
||||
scrollTop: targetOffset
|
||||
}, 1100, function() {
|
||||
//window.location.hash = hash;
|
||||
} );
|
||||
}
|
||||
} );
|
||||
} );
|
||||
Reference in New Issue
Block a user