diff options
| author | Armand Philippot <git@armandphilippot.com> | 2021-10-31 22:04:15 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2021-10-31 22:04:15 +0100 |
| commit | 3ee4035bcb12cde7b53ccf21e605a2f6d08bcd2a (patch) | |
| tree | 63af767dfdf7e6631031269f800a534d82ff64fb /src/js | |
| parent | c64a7bd26fefb53aee53667cf33e2c72b7d07311 (diff) | |
chore: move isSmallVw function to main file
Since helpers contains only one small function, I don't think it is
useful to keep it separated from the rest.
Diffstat (limited to 'src/js')
| -rw-r--r-- | src/js/app.js | 9 | ||||
| -rw-r--r-- | src/js/utilities/helpers.js | 10 |
2 files changed, 8 insertions, 11 deletions
diff --git a/src/js/app.js b/src/js/app.js index 8e23ca9..48e3725 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -11,7 +11,14 @@ import { showFromBottom, showFromLeft, } from './utilities/animations'; -import { isSmallVw } from './utilities/helpers'; + +/** + * Check the size of the current viewport. + * @returns {Boolean} True if viewport lower than 1200px; false otherwise. + */ +function isSmallVw() { + return window.innerWidth < 1200; +} /** * Show/hide header and footer with slide animation (left). diff --git a/src/js/utilities/helpers.js b/src/js/utilities/helpers.js deleted file mode 100644 index 8cc88c9..0000000 --- a/src/js/utilities/helpers.js +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Check the size of the current viewport. - * @returns {Boolean} True if viewport lower than 1200px; false otherwise. - */ -function isSmallVw() { - return window.innerWidth < 1200; -} - -// eslint-disable-next-line import/prefer-default-export -export { isSmallVw }; |
