From 3ee4035bcb12cde7b53ccf21e605a2f6d08bcd2a Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Sun, 31 Oct 2021 22:04:15 +0100 Subject: 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. --- src/js/app.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/js/app.js') 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). -- cgit v1.2.3