mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-09-25 04:28:15 +00:00
+1
-6
@@ -75,7 +75,7 @@ gulp.task('init-watch', () => {
|
||||
});
|
||||
$.watch('src/sass/**/*.scss', () => gulp.start('sass'));
|
||||
$.watch('node_modules/rancher-website-theme/**/*.scss', () => gulp.start('sass'));
|
||||
$.watch('src/js/**/*.js', () => gulp.start('js-watch'));
|
||||
$.watch('src/js/**/*.js', () => gulp.start('js'));
|
||||
$.watch('src/img/**/*', () => gulp.start('img'));
|
||||
$.watch(['archetypes/**/*', 'data/**/*', 'content/**/*', 'layouts/**/*', 'static/**/*', 'themes/**/*', 'node_modules/rancher-website-theme/**/*', 'config.toml'], () => gulp.start('hugo-dev'));
|
||||
});
|
||||
@@ -98,11 +98,6 @@ gulp.task('sass', () => {
|
||||
.pipe(browserSync.stream());
|
||||
});
|
||||
|
||||
gulp.task('js-watch', ['js'], (cb) => {
|
||||
browserSync.reload();
|
||||
cb();
|
||||
});
|
||||
|
||||
const vendors = ['ml-stack-nav', 'lory.js', 'tingle.js', 'moment', 'jquery'];
|
||||
|
||||
gulp.task('build:vendor', () => {
|
||||
|
||||
+7
-3
@@ -189,14 +189,18 @@ const bootstrapNav = function () {
|
||||
let target = e.target;
|
||||
|
||||
if (!target.href) {
|
||||
let sub = $(e.currentTarget).find('>ul.tree-nav-sublist');
|
||||
|
||||
// stop it from affecting other nodes
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
// parent li rather then actual el clicked
|
||||
$(e.currentTarget).toggleClass('open');
|
||||
if (sub.length > 0) {
|
||||
sub.toggleClass('hide');
|
||||
|
||||
$(e.target).find('>ul.tree-nav-sublist').toggleClass('hide');
|
||||
// parent li rather then actual el clicked
|
||||
$(e.currentTarget).toggleClass('open');
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user