<commit_before>//Bootstrap and jquery included via CodePen. Much js functionality is in minified Bootstrap.js and configured through data attributes.

$(document).ready(function() {
    function sendMail() {
        var name = $('#contactName').val();
        var email = $('#contactEmail').val();
        var message = $('#contactMessage').val();
        // message += "\n\n" + name;
        var msgString = `mailto:<EMAIL>?subject=new message from ${email}&body=${message}%0A${name}`;
        window.open(msgString);
    }

    $('#contactSubmit').click(function () {
        sendMail();
    });

    // Fix scrolling with a fixed navbar. 
    var navOffset = $('.navbar').height();
    
    $('.navbar li a').click(function(event) {
        var href = $(this).attr('href');
    
        // Don't let the browser scroll, but still update the current address
        // in the browser.
        event.preventDefault();
        window.location.hash = href;
    
        // Explicitly scroll to where the browser thinks the element
        // is, but apply the offset.
        $(href)[0].scrollIntoView();
        window.scrollBy(0, -navOffset);
    });
});
<commit_msg>Fix scrolling bug with contact me link<commit_after>//Bootstrap and jquery included via CodePen. Much js functionality is in minified Bootstrap.js and configured through data attributes.

$(document).ready(function() {
    function sendMail() {
        var name = $('#contactName').val();
        var email = $('#contactEmail').val();
        var message = $('#contactMessage').val();
        // message += "\n\n" + name;
        var msgString = `mailto:<EMAIL>?subject=new message from ${email}&body=${message}%0A${name}`;
        window.open(msgString);
    }

    $('#contactSubmit').click(function () {
        sendMail();
    });

    // Fix scrolling with a fixed navbar. 
    var navOffset = $('.navbar').height();
    
    $('.navbar li a').click(function(event) {
        var href = $(this).attr('href');
    
        // Don't let the browser scroll, but still update the current address
        // in the browser.
        event.preventDefault();
        window.location.hash = href;
    
        // Explicitly scroll to where the browser thinks the element
        // is, but apply the offset.
        $(href)[0].scrollIntoView();
        // Skip the offset for the last element. 
        if (href != "#contact-me") {
            window.scrollBy(0, -navOffset);
        }
    });
});

{'fraction_non_alphanumeric': 0.15312753858651504, 'fraction_numerical': 0.002437043054427295, 'mean_word_length': 2.4208333333333334, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3039535', 'n_tokens_mistral': 673, 'n_tokens_neox': 656, 'n_words': 198}