mirror of
https://github.com/kemko/liquid.git
synced 2026-01-01 15:55:40 +03:00
Standard format
This commit is contained in:
30
Gruntfile.js
30
Gruntfile.js
@@ -1,6 +1,6 @@
|
|||||||
// Gruntfile
|
// Gruntfile
|
||||||
module.exports = function(grunt) {
|
module.exports = function (grunt) {
|
||||||
require('load-grunt-tasks')(grunt);
|
require('load-grunt-tasks')(grunt)
|
||||||
|
|
||||||
// Project configuration.
|
// Project configuration.
|
||||||
grunt.initConfig({
|
grunt.initConfig({
|
||||||
@@ -16,7 +16,7 @@ require('load-grunt-tasks')(grunt);
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
jekyll: {
|
jekyll: {
|
||||||
files: ['index.md', '_includes/*.html', 'filters/*.*', '_layouts/*.*', 'tags/*.*', 'basics/*.*'],
|
files: ['index.md', '_includes/*.html', 'filters/*.*', '_layouts/*.*', 'tags/*.*', 'basics/*.*'],
|
||||||
tasks: ['shell:jekyllBuild']
|
tasks: ['shell:jekyllBuild']
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -24,22 +24,22 @@ require('load-grunt-tasks')(grunt);
|
|||||||
sass: {
|
sass: {
|
||||||
dist: {
|
dist: {
|
||||||
options: {
|
options: {
|
||||||
style: 'expanded',
|
style: 'compact',
|
||||||
sourcemap: 'none'
|
sourcemap: 'none'
|
||||||
},
|
},
|
||||||
files: {
|
files: {
|
||||||
'_site/css/main.css':'_sass/main.scss'
|
'_site/css/main.css': '_sass/main.scss'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
shell: {
|
shell: {
|
||||||
jekyllServe: {
|
jekyllServe: {
|
||||||
command: 'jekyll serve --no-watch'
|
command: 'bundle exec jekyll serve --no-watch'
|
||||||
},
|
},
|
||||||
|
|
||||||
jekyllBuild: {
|
jekyllBuild: {
|
||||||
command: 'jekyll build'
|
command: 'bundle exec jekyll build'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@ require('load-grunt-tasks')(grunt);
|
|||||||
options: {
|
options: {
|
||||||
map: true,
|
map: true,
|
||||||
processors: [
|
processors: [
|
||||||
require('autoprefixer-core')({browsers: 'last 2 versions'})
|
require('autoprefixer')({browsers: 'last 2 versions'})
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
dist: {
|
dist: {
|
||||||
@@ -61,12 +61,12 @@ require('load-grunt-tasks')(grunt);
|
|||||||
logConcurrentOutput: true
|
logConcurrentOutput: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
|
|
||||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
grunt.loadNpmTasks('grunt-contrib-watch')
|
||||||
grunt.loadNpmTasks('grunt-contrib-sass');
|
grunt.loadNpmTasks('grunt-contrib-sass')
|
||||||
grunt.loadNpmTasks('grunt-postcss');
|
grunt.loadNpmTasks('grunt-postcss')
|
||||||
grunt.loadNpmTasks('grunt-concurrent');
|
grunt.loadNpmTasks('grunt-concurrent')
|
||||||
|
|
||||||
grunt.registerTask('default', ['concurrent']);
|
grunt.registerTask('default', ['concurrent'])
|
||||||
};
|
}
|
||||||
|
|||||||
28
js/script.js
28
js/script.js
@@ -1,17 +1,15 @@
|
|||||||
var menuButton = document.querySelector('.menu-button');
|
var menuButton = document.querySelector('.menu-button')
|
||||||
var sidebar = document.querySelector('.sidebar');
|
var sidebar = document.querySelector('.sidebar')
|
||||||
var contentOverlay = document.querySelector('.content__overlay');
|
var contentOverlay = document.querySelector('.content__overlay')
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
|
menuButton.addEventListener('click', function () {
|
||||||
|
sidebar.classList.toggle('sidebar--is-visible')
|
||||||
|
contentOverlay.classList.toggle('content__overlay--is-active')
|
||||||
|
})
|
||||||
|
|
||||||
menuButton.addEventListener('click', function() {
|
contentOverlay.addEventListener('click', function () {
|
||||||
sidebar.classList.toggle('sidebar--is-visible');
|
sidebar.classList.toggle('sidebar--is-visible')
|
||||||
contentOverlay.classList.toggle('content__overlay--is-active');
|
contentOverlay.classList.toggle('content__overlay--is-active')
|
||||||
});
|
})
|
||||||
|
})
|
||||||
contentOverlay.addEventListener('click', function() {
|
|
||||||
sidebar.classList.toggle('sidebar--is-visible');
|
|
||||||
contentOverlay.classList.toggle('content__overlay--is-active');
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|||||||
Reference in New Issue
Block a user