Formatting

This commit is contained in:
Ryan Prather 2024-05-15 22:40:13 -04:00
parent 090fd864b4
commit 98cb84acba

View File

@ -4,7 +4,7 @@
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
*/ */
(function($) { (function ($) {
var $window = $(window), var $window = $(window),
$head = $('head'), $head = $('head'),
@ -12,12 +12,12 @@
// Breakpoints. // Breakpoints.
breakpoints({ breakpoints({
xlarge: [ '1281px', '1680px' ], xlarge: ['1281px', '1680px'],
large: [ '981px', '1280px' ], large: ['981px', '1280px'],
medium: [ '737px', '980px' ], medium: ['737px', '980px'],
small: [ '481px', '736px' ], small: ['481px', '736px'],
xsmall: [ '361px', '480px' ], xsmall: ['361px', '480px'],
xxsmall: [ null, '360px' ], xxsmall: [null, '360px'],
'xlarge-to-max': '(min-width: 1681px)', 'xlarge-to-max': '(min-width: 1681px)',
'small-to-xlarge': '(min-width: 481px) and (max-width: 1680px)' 'small-to-xlarge': '(min-width: 481px) and (max-width: 1680px)'
}); });
@ -25,8 +25,8 @@
// Stops animations/transitions until the page has ... // Stops animations/transitions until the page has ...
// ... loaded. // ... loaded.
$window.on('load', function() { $window.on('load', function () {
window.setTimeout(function() { window.setTimeout(function () {
$body.removeClass('is-preload'); $body.removeClass('is-preload');
}, 100); }, 100);
}); });
@ -34,7 +34,7 @@
// ... stopped resizing. // ... stopped resizing.
var resizeTimeout; var resizeTimeout;
$window.on('resize', function() { $window.on('resize', function () {
// Mark as resizing. // Mark as resizing.
$body.addClass('is-resizing'); $body.addClass('is-resizing');
@ -42,7 +42,7 @@
// Unmark after delay. // Unmark after delay.
clearTimeout(resizeTimeout); clearTimeout(resizeTimeout);
resizeTimeout = setTimeout(function() { resizeTimeout = setTimeout(function () {
$body.removeClass('is-resizing'); $body.removeClass('is-resizing');
}, 100); }, 100);
@ -53,7 +53,7 @@
// Object fit images. // Object fit images.
if (!browser.canUse('object-fit') if (!browser.canUse('object-fit')
|| browser.name == 'safari') || browser.name == 'safari')
$('.image.object').each(function() { $('.image.object').each(function () {
var $this = $(this), var $this = $(this),
$img = $this.children('img'); $img = $this.children('img');
@ -74,11 +74,11 @@
$sidebar_inner = $sidebar.children('.inner'); $sidebar_inner = $sidebar.children('.inner');
// Inactive by default on <= large. // Inactive by default on <= large.
breakpoints.on('<=large', function() { breakpoints.on('<=large', function () {
$sidebar.addClass('inactive'); $sidebar.addClass('inactive');
}); });
breakpoints.on('>large', function() { breakpoints.on('>large', function () {
$sidebar.removeClass('inactive'); $sidebar.removeClass('inactive');
}); });
@ -91,7 +91,7 @@
// Toggle. // Toggle.
$('<a href="#sidebar" class="toggle">Toggle</a>') $('<a href="#sidebar" class="toggle">Toggle</a>')
.appendTo($sidebar) .appendTo($sidebar)
.on('click', function(event) { .on('click', function (event) {
// Prevent default. // Prevent default.
event.preventDefault(); event.preventDefault();
@ -105,7 +105,7 @@
// Events. // Events.
// Link clicks. // Link clicks.
$sidebar.on('click', 'a', function(event) { $sidebar.on('click', 'a', function (event) {
// >large? Bail. // >large? Bail.
if (breakpoints.active('>large')) if (breakpoints.active('>large'))
@ -128,7 +128,7 @@
$sidebar.addClass('inactive'); $sidebar.addClass('inactive');
// Redirect to href. // Redirect to href.
setTimeout(function() { setTimeout(function () {
if (target == '_blank') if (target == '_blank')
window.open(href); window.open(href);
@ -140,7 +140,7 @@
}); });
// Prevent certain events inside the panel from bubbling. // Prevent certain events inside the panel from bubbling.
$sidebar.on('click touchend touchstart touchmove', function(event) { $sidebar.on('click touchend touchstart touchmove', function (event) {
// >large? Bail. // >large? Bail.
if (breakpoints.active('>large')) if (breakpoints.active('>large'))
@ -152,7 +152,7 @@
}); });
// Hide panel on body click/tap. // Hide panel on body click/tap.
$body.on('click touchend', function(event) { $body.on('click touchend', function (event) {
// >large? Bail. // >large? Bail.
if (breakpoints.active('>large')) if (breakpoints.active('>large'))
@ -167,7 +167,7 @@
// Note: If you do anything to change the height of the sidebar's content, be sure to // Note: If you do anything to change the height of the sidebar's content, be sure to
// trigger 'resize.sidebar-lock' on $window so stuff doesn't get out of sync. // trigger 'resize.sidebar-lock' on $window so stuff doesn't get out of sync.
$window.on('load.sidebar-lock', function() { $window.on('load.sidebar-lock', function () {
var sh, wh, st; var sh, wh, st;
@ -176,7 +176,7 @@
$window.scrollTop(0); $window.scrollTop(0);
$window $window
.on('scroll.sidebar-lock', function() { .on('scroll.sidebar-lock', function () {
var x, y; var x, y;
@ -220,7 +220,7 @@
} }
}) })
.on('resize.sidebar-lock', function() { .on('resize.sidebar-lock', function () {
// Calculate heights. // Calculate heights.
wh = $window.height(); wh = $window.height();
@ -239,11 +239,11 @@
$menu_openers = $menu.children('ul').find('.opener'); $menu_openers = $menu.children('ul').find('.opener');
// Openers. // Openers.
$menu_openers.each(function() { $menu_openers.each(function () {
var $this = $(this); var $this = $(this);
$this.on('click', function(event) { $this.on('click', function (event) {
// Prevent default. // Prevent default.
event.preventDefault(); event.preventDefault();