diff --git a/docs/site/desktop.js b/docs/site/desktop.js new file mode 100644 index 000000000..89bc0216c --- /dev/null +++ b/docs/site/desktop.js @@ -0,0 +1 @@ +import './mourn'; diff --git a/docs/site/mobile.js b/docs/site/mobile.js index a27993dd5..63c6222b4 100644 --- a/docs/site/mobile.js +++ b/docs/site/mobile.js @@ -1,3 +1,4 @@ +import './mourn'; import Vue from 'vue'; import Locale from '../../src/locale'; import Lazyload from '../../src/lazyload'; diff --git a/docs/site/mourn.js b/docs/site/mourn.js new file mode 100644 index 000000000..38bb426ec --- /dev/null +++ b/docs/site/mourn.js @@ -0,0 +1,12 @@ +const now = new Date(); + +if (now.getFullYear() === 2020 && now.getMonth() === 3 && now.getDate() === 4) { + const filter = ` + html{ + filter: grayscale(100%); + -webkit-filter: grayscale(100%); + -moz-filter: grayscale(100%); + } + `; + document.head.insertAdjacentHTML('beforeend', ``); +} diff --git a/webpack.config.js b/webpack.config.js index 80501ebbc..3921dc523 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,10 +1,11 @@ -module.exports = function() { +module.exports = function () { if (process.env.BUILD_TARGET === 'package') { return {}; } return { entry: { + 'site-desktop': ['./docs/site/desktop'], 'site-mobile': ['./docs/site/mobile'], }, };