From a986a0077d382c482384945e1d9fd20548286edf Mon Sep 17 00:00:00 2001 From: Oleksandr Babak Date: Sat, 10 Feb 2024 15:34:02 +0100 Subject: [PATCH] fix: show message when page is too small --- src/utils.rs | 2 +- styles/style.css | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/utils.rs b/src/utils.rs index 3508f9b..bae089f 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -1,4 +1,4 @@ -use js_sys::{wasm_bindgen, Array, Object}; +use js_sys::{Array, Object}; use wasm_bindgen::{prelude::*, JsCast, JsValue}; use web_sys::HtmlAnchorElement; diff --git a/styles/style.css b/styles/style.css index f6106ee..2979788 100644 --- a/styles/style.css +++ b/styles/style.css @@ -1,7 +1,16 @@ @media screen and (max-width: 767px) { - * { + body * { display: none !important; } + body { + padding: 1rem; + } + body::before { + content: "This website is not available on mobile devices. Please use a desktop or laptop to view this website."; + display: block; + font-size: 1.5rem; + color: #fff; + } } @@ -339,4 +348,4 @@ button.about-us:active { content: "Loading...."; color: #ffffff; display: block; -} \ No newline at end of file +}