1
Fork 0

Fix lint on main js files

This commit is contained in:
Jake Howard 2017-05-06 14:58:44 +01:00
parent a0fe313f61
commit b72f70384b
4 changed files with 54 additions and 63 deletions

View file

@ -2,5 +2,8 @@
"extends": [ "extends": [
"dabapps/commonjs", "dabapps/commonjs",
"dabapps/browser", "dabapps/browser",
] ],
"globals": {
"$": true
}
} }

View file

@ -1,61 +1,45 @@
/* 'use strict';
Alpha by HTML5 UP /*
html5up.net | @ajlkn Alpha by HTML5 UP
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) html5up.net | @ajlkn
*/ Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
*/
(function($) {
$(function() { $(function() {
var $body = $('body');
var $window = $(window),
$body = $('body'), // Fix: Placeholder polyfill.
$header = $('#header'), $('form').placeholder();
$banner = $('#banner');
// Dropdowns.
// Fix: Placeholder polyfill. $('#nav > ul').dropotron({
$('form').placeholder(); alignment: 'right'
});
// Dropdowns.
$('#nav > ul').dropotron({ // Navigation Button.
alignment: 'right' $(
}); '<div id="navButton">' +
'<a href="#navPanel" class="toggle"></a>' +
// Off-Canvas Navigation. '</div>'
).appendTo($body);
// Navigation Button.
$( // Navigation Panel.
'<div id="navButton">' + $(
'<a href="#navPanel" class="toggle"></a>' + '<div id="navPanel">' +
'</div>' '<nav>' +
) $('#nav').navList() +
.appendTo($body); '</nav>' +
'</div>'
// Navigation Panel. )
$( .appendTo($body)
'<div id="navPanel">' + .panel({
'<nav>' + delay: 500,
$('#nav').navList() + hideOnClick: true,
'</nav>' + hideOnSwipe: true,
'</div>' resetScroll: true,
) resetForms: true,
.appendTo($body) side: 'left',
.panel({ target: $body,
delay: 500, visibleClass: 'navPanel-visible'
hideOnClick: true, });
hideOnSwipe: true, });
resetScroll: true,
resetForms: true,
side: 'left',
target: $body,
visibleClass: 'navPanel-visible'
});
// Fix: Remove navPanel transitions on WP<10 (poor/buggy performance).
// Header.
// If the header is using "alt" styling and #banner is present, use scrollwatch
// to revert it back to normal styling once the user scrolls past the banner.
// Note: This is disabled on mobile devices.
});
})(jQuery);

View file

@ -1,3 +1,5 @@
'use strict';
require('./jquery-global'); require('./jquery-global');
require('bootstrap'); require('bootstrap');

View file

@ -1,4 +1,6 @@
const jQuery = require('jquery'); 'use strict';
var jQuery = require('jquery');
window.$ = jQuery; window.$ = jQuery;
window.jQuery = jQuery; window.jQuery = jQuery;