diff --git a/_assets/_old/js/listing.js b/_assets/_old/js/listing.js index 1edfab26..04e3c562 100644 --- a/_assets/_old/js/listing.js +++ b/_assets/_old/js/listing.js @@ -82,33 +82,9 @@ listing.addDoubleTapEvent = function () { document.addEventListener('DOMContentLoaded', event => { - listing.updateColumns() listing.addDoubleTapEvent() - - document.getElementById('multiple-selection-activate').addEventListener('click', event => { - listing.selectMultiple = true - clickOverlay.click() - - document.getElementById('multiple-selection').classList.add('active') - document.querySelector('body').style.paddingBottom = '4em' - }) - - document.getElementById('multiple-selection-cancel').addEventListener('click', event => { - listing.selectMultiple = false - - document.querySelector('body').style.paddingBottom = '0' - document.getElementById('multiple-selection').classList.remove('active') - }) - - if (user.AllowEdit) { - buttons.move.addEventListener('click', listing.moveEvent) - buttons.rename.addEventListener('click', listing.rename) - } - - let items = document.getElementsByClassName('item') - + if (user.AllowNew) { - buttons.new.addEventListener('click', listing.newFileButton) } }) diff --git a/_assets/build/config.js b/_assets/build/config.js index cc26c4b6..7525a0df 100644 --- a/_assets/build/config.js +++ b/_assets/build/config.js @@ -6,10 +6,10 @@ module.exports = { env: { NODE_ENV: '"production"' }, - index: path.resolve(__dirname, '../dist/index.html'), + index: path.resolve(__dirname, '../dist/templates/index.html'), assetsRoot: path.resolve(__dirname, '../dist'), - assetsSubDirectory: 'static', - assetsPublicPath: '/', + assetsSubDirectory: '_', + assetsPublicPath: '{{ .BaseURL }}', productionSourceMap: true, // Gzip off by default as many popular static hosts such as // Surge or Netlify already gzip all static assets for you. diff --git a/_assets/build/service-worker-prod.js b/_assets/build/service-worker-prod.js index dd6f0063..cc9d4936 100644 --- a/_assets/build/service-worker-prod.js +++ b/_assets/build/service-worker-prod.js @@ -16,7 +16,7 @@ window.addEventListener('load', function() { if ('serviceWorker' in navigator && (window.location.protocol === 'https:' || isLocalhost)) { - navigator.serviceWorker.register('service-worker.js') + navigator.serviceWorker.register('{{ .BaseURL }}/_/service-worker.js') .then(function(registration) { // updatefound is fired if service-worker.js changes. registration.onupdatefound = function() { diff --git a/_assets/build/webpack.prod.conf.js b/_assets/build/webpack.prod.conf.js index 8cba2668..2f1e461c 100644 --- a/_assets/build/webpack.prod.conf.js +++ b/_assets/build/webpack.prod.conf.js @@ -58,7 +58,8 @@ var webpackConfig = merge(baseWebpackConfig, { minify: { removeComments: true, collapseWhitespace: true, - removeAttributeQuotes: true + removeAttributeQuotes: true, + minifyCSS: true // more options: // https://github.com/kangax/html-minifier#options-quick-reference }, diff --git a/_assets/index.html b/_assets/index.html index 0f6f04b9..6951984a 100644 --- a/_assets/index.html +++ b/_assets/index.html @@ -20,38 +20,135 @@ + <% for (var chunk of webpack.chunks) { - for (var file of chunk.files) { - if (file.match(/\.(js|css)$/)) { %> + for (var file of chunk.files) { + if (file.match(/\.(js|css)$/)) { %> <% }}} %> - - + + + {{- if ne .User.StyleSheet "" -}} {{- end -}} -
- -