Reformat JS to make indentation correct

This commit is contained in:
Anna Sidwell 2019-11-14 01:19:32 +00:00
parent a533060c88
commit 81481b23df

View File

@ -5,59 +5,56 @@
*/ */
(function($) { (function($) {
skel skel.breakpoints({
.breakpoints({ xlarge: "(max-width: 1680px)",
xlarge: '(max-width: 1680px)', large: "(max-width: 1280px)",
large: '(max-width: 1280px)', medium: "(max-width: 980px)",
medium: '(max-width: 980px)', small: "(max-width: 736px)",
small: '(max-width: 736px)', xsmall: "(max-width: 480px)"
xsmall: '(max-width: 480px)'
}); });
$(function() { $(function() {
var $window = $(window), var $window = $(window),
$body = $('body'), $body = $("body"),
$wrapper = $('#page-wrapper'), $wrapper = $("#page-wrapper"),
$banner = $('#banner'), $banner = $("#banner"),
$header = $('#header'); $header = $("#header");
// Disable animations/transitions until the page has loaded. // Disable animations/transitions until the page has loaded.
$body.addClass('is-loading'); $body.addClass("is-loading");
$window.on('load', function() { $window.on("load", function() {
window.setTimeout(function() { window.setTimeout(function() {
$body.removeClass('is-loading'); $body.removeClass("is-loading");
}, 100); }, 100);
}); });
// Mobile? // Mobile?
if (skel.vars.mobile) if (skel.vars.mobile) $body.addClass("is-mobile");
$body.addClass('is-mobile');
else else
skel skel
.on('-medium !medium', function() { .on("-medium !medium", function() {
$body.removeClass('is-mobile'); $body.removeClass("is-mobile");
}) })
.on('+medium', function() { .on("+medium", function() {
$body.addClass('is-mobile'); $body.addClass("is-mobile");
}); });
// Fix: Placeholder polyfill. // Fix: Placeholder polyfill.
$('form').placeholder(); $("form").placeholder();
// Prioritize "important" elements on medium. // Prioritize "important" elements on medium.
skel.on('+medium -medium', function() { skel.on("+medium -medium", function() {
$.prioritize( $.prioritize(
'.important\\28 medium\\29', ".important\\28 medium\\29",
skel.breakpoint('medium').active skel.breakpoint("medium").active
); );
}); });
$("#menu").show(); $("#menu").show();
// Menu. // Menu.
$('#menu') $("#menu")
.append('<a href="#menu" class="close"></a>') .append('<a href="#menu" class="close"></a>')
.appendTo($body) .appendTo($body)
.panel({ .panel({
@ -66,148 +63,146 @@
hideOnSwipe: true, hideOnSwipe: true,
resetScroll: true, resetScroll: true,
resetForms: true, resetForms: true,
side: 'right', side: "right",
target: $body, target: $body,
visibleClass: 'is-menu-visible' visibleClass: "is-menu-visible"
}); });
// Header. // Header.
if (skel.vars.IEVersion < 9) if (skel.vars.IEVersion < 9) $header.removeClass("alt");
$header.removeClass('alt');
if ($banner.length > 0 && if ($banner.length > 0 && $header.hasClass("alt")) {
$header.hasClass('alt')) { $window.on("resize", function() {
$window.trigger("scroll");
$window.on('resize', function() {
$window.trigger('scroll');
}); });
$banner.scrollex({ $banner.scrollex({
bottom: $header.outerHeight() + 1, bottom: $header.outerHeight() + 1,
terminate: function() { terminate: function() {
$header.removeClass('alt'); $header.removeClass("alt");
}, },
enter: function() { enter: function() {
$header.addClass('alt'); $header.addClass("alt");
}, },
leave: function() { leave: function() {
$header.removeClass('alt'); $header.removeClass("alt");
} }
}); });
// Particles // Particles
if ($(window).width() > 980) { if ($(window).width() > 980) {
particlesJS('banner', { particlesJS("banner", {
"particles": { particles: {
"number": { number: {
"value": 65, value: 65,
"density": { density: {
"enable": false, enable: false,
"value_area": 800 value_area: 800
} }
}, },
"color": { color: {
"value": "#f99081" value: "#f99081"
}, },
"shape": { shape: {
"type": "circle", type: "circle",
"stroke": { stroke: {
"width": 0, width: 0,
"color": "#000000" color: "#000000"
}, },
"polygon": { polygon: {
"nb_sides": 5 nb_sides: 5
}, },
"image": { image: {
"src": "img/github.svg", src: "img/github.svg",
"width": 100, width: 100,
"height": 100 height: 100
} }
}, },
"opacity": { opacity: {
"value": 0.6, value: 0.6,
"random": true, random: true,
"anim": { anim: {
"enable": false, enable: false,
"speed": 1, speed: 1,
"opacity_min": 0.4, opacity_min: 0.4,
"sync": false sync: false
} }
}, },
"size": { size: {
"value": 14, value: 14,
"random": true, random: true,
"anim": { anim: {
"enable": true, enable: true,
"speed": 6, speed: 6,
"size_min": 4, size_min: 4,
"sync": false sync: false
} }
}, },
"line_linked": { line_linked: {
"enable": true, enable: true,
"distance": 250, distance: 250,
"color": "#f99081", color: "#f99081",
"opacity": 0.8, opacity: 0.8,
"width": 2 width: 2
}, },
"move": { move: {
"enable": true, enable: true,
"speed": 0.4, speed: 0.4,
"direction": "none", direction: "none",
"random": true, random: true,
"straight": false, straight: false,
"out_mode": "out", out_mode: "out",
"bounce": false, bounce: false,
"attract": { attract: {
"enable": false, enable: false,
"rotateX": 600, rotateX: 600,
"rotateY": 1200 rotateY: 1200
} }
} }
}, },
"interactivity": { interactivity: {
"detect_on": "canvas", detect_on: "canvas",
"events": { events: {
"onhover": { onhover: {
"enable": true, enable: true,
"mode": "grab" mode: "grab"
}, },
"onclick": { onclick: {
"enable": true, enable: true,
"mode": "push" mode: "push"
}, },
"resize": true resize: true
}, },
"modes": { modes: {
"grab": { grab: {
"distance": 200, distance: 200,
"line_linked": { line_linked: {
"opacity": 0.8 opacity: 0.8
} }
}, },
"bubble": { bubble: {
"distance": 400, distance: 400,
"size": 40, size: 40,
"duration": 2, duration: 2,
"opacity": 8, opacity: 8,
"speed": 3 speed: 3
}, },
"repulse": { repulse: {
"distance": 200, distance: 200,
"duration": 0.4 duration: 0.4
}, },
"push": { push: {
"particles_nb": 2 particles_nb: 2
}, },
"remove": { remove: {
"particles_nb": 2 particles_nb: 2
} }
} }
}, },
"retina_detect": true retina_detect: true
}); });
} }
} }
}); });
})(jQuery); })(jQuery);