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)
*/
(function($) {
(function ($) {
var $window = $(window),
$head = $('head'),
@ -12,12 +12,12 @@
// Breakpoints.
breakpoints({
xlarge: [ '1281px', '1680px' ],
large: [ '981px', '1280px' ],
medium: [ '737px', '980px' ],
small: [ '481px', '736px' ],
xsmall: [ '361px', '480px' ],
xxsmall: [ null, '360px' ],
xlarge: ['1281px', '1680px'],
large: ['981px', '1280px'],
medium: ['737px', '980px'],
small: ['481px', '736px'],
xsmall: ['361px', '480px'],
xxsmall: [null, '360px'],
'xlarge-to-max': '(min-width: 1681px)',
'small-to-xlarge': '(min-width: 481px) and (max-width: 1680px)'
});
@ -25,8 +25,8 @@
// Stops animations/transitions until the page has ...
// ... loaded.
$window.on('load', function() {
window.setTimeout(function() {
$window.on('load', function () {
window.setTimeout(function () {
$body.removeClass('is-preload');
}, 100);
});
@ -34,7 +34,7 @@
// ... stopped resizing.
var resizeTimeout;
$window.on('resize', function() {
$window.on('resize', function () {
// Mark as resizing.
$body.addClass('is-resizing');
@ -42,7 +42,7 @@
// Unmark after delay.
clearTimeout(resizeTimeout);
resizeTimeout = setTimeout(function() {
resizeTimeout = setTimeout(function () {
$body.removeClass('is-resizing');
}, 100);
@ -53,7 +53,7 @@
// Object fit images.
if (!browser.canUse('object-fit')
|| browser.name == 'safari')
$('.image.object').each(function() {
$('.image.object').each(function () {
var $this = $(this),
$img = $this.children('img');
@ -74,11 +74,11 @@
$sidebar_inner = $sidebar.children('.inner');
// Inactive by default on <= large.
breakpoints.on('<=large', function() {
breakpoints.on('<=large', function () {
$sidebar.addClass('inactive');
});
breakpoints.on('>large', function() {
breakpoints.on('>large', function () {
$sidebar.removeClass('inactive');
});
@ -91,7 +91,7 @@
// Toggle.
$('<a href="#sidebar" class="toggle">Toggle</a>')
.appendTo($sidebar)
.on('click', function(event) {
.on('click', function (event) {
// Prevent default.
event.preventDefault();
@ -105,7 +105,7 @@
// Events.
// Link clicks.
$sidebar.on('click', 'a', function(event) {
$sidebar.on('click', 'a', function (event) {
// >large? Bail.
if (breakpoints.active('>large'))
@ -128,7 +128,7 @@
$sidebar.addClass('inactive');
// Redirect to href.
setTimeout(function() {
setTimeout(function () {
if (target == '_blank')
window.open(href);
@ -140,7 +140,7 @@
});
// 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.
if (breakpoints.active('>large'))
@ -152,7 +152,7 @@
});
// Hide panel on body click/tap.
$body.on('click touchend', function(event) {
$body.on('click touchend', function (event) {
// >large? Bail.
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
// 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;
@ -176,7 +176,7 @@
$window.scrollTop(0);
$window
.on('scroll.sidebar-lock', function() {
.on('scroll.sidebar-lock', function () {
var x, y;
@ -220,7 +220,7 @@
}
})
.on('resize.sidebar-lock', function() {
.on('resize.sidebar-lock', function () {
// Calculate heights.
wh = $window.height();
@ -239,11 +239,11 @@
$menu_openers = $menu.children('ul').find('.opener');
// Openers.
$menu_openers.each(function() {
$menu_openers.each(function () {
var $this = $(this);
$this.on('click', function(event) {
$this.on('click', function (event) {
// Prevent default.
event.preventDefault();