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 Alpha by HTML5 UP
html5up.net | @ajlkn html5up.net | @ajlkn
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() {
$(function() { var $body = $('body');
var $window = $(window), // Fix: Placeholder polyfill.
$body = $('body'), $('form').placeholder();
$header = $('#header'),
$banner = $('#banner');
// Fix: Placeholder polyfill. // Dropdowns.
$('form').placeholder(); $('#nav > ul').dropotron({
alignment: 'right'
});
// Dropdowns. // Navigation Button.
$('#nav > ul').dropotron({ $(
alignment: 'right' '<div id="navButton">' +
}); '<a href="#navPanel" class="toggle"></a>' +
'</div>'
).appendTo($body);
// Off-Canvas Navigation. // Navigation Panel.
$(
// Navigation Button. '<div id="navPanel">' +
$( '<nav>' +
'<div id="navButton">' + $('#nav').navList() +
'<a href="#navPanel" class="toggle"></a>' + '</nav>' +
'</div>' '</div>'
) )
.appendTo($body); .appendTo($body)
.panel({
// Navigation Panel. delay: 500,
$( hideOnClick: true,
'<div id="navPanel">' + hideOnSwipe: true,
'<nav>' + resetScroll: true,
$('#nav').navList() + resetForms: true,
'</nav>' + side: 'left',
'</div>' target: $body,
) visibleClass: 'navPanel-visible'
.appendTo($body) });
.panel({ });
delay: 500,
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;