diff --git a/src/assets/logo.png b/public/logo.png similarity index 100% rename from src/assets/logo.png rename to public/logo.png diff --git a/src/components/AssBrowser.astro b/src/components/AssBrowser.astro new file mode 100644 index 0000000..9a141f6 --- /dev/null +++ b/src/components/AssBrowser.astro @@ -0,0 +1,31 @@ +--- +import GroupBox from "@components/GroupBox.astro"; +--- + + + + + +

+

YOUR BROWSER IS ASS

+ + Your browser, does not support the full + set of web features which means that nin0.dev may not work as well + as it would on a non-ass browser. +
+
+ Consider switching to a browser that is not ass such as Safari, Brave, or if you really have + no option, Chrome. (these are personal preferences and I am not paid to say + this) +
+

+
+
diff --git a/src/components/Avatar.astro b/src/components/Avatar.astro index b54f0dc..d40280f 100644 --- a/src/components/Avatar.astro +++ b/src/components/Avatar.astro @@ -1,12 +1,11 @@ --- import { Image } from "astro:assets"; -import logo from "@assets/logo.png"; ---
My profile picture + ass-browser { + display: none; + } + .ass-browser { + ass-browser { + display: block !important; + } + .spotify-card { + background-color: #2b2b3b !important; + } + + .spotify-card-wrapper { + background-color: #2b2b3b !important; + } + + .spotify-card-background { + display: none !important; + } + } + +

Listening to

diff --git a/src/css/me.css b/src/css/me.css index 70753cf..f720c4f 100644 --- a/src/css/me.css +++ b/src/css/me.css @@ -13,6 +13,7 @@ } } } + .spotify-card-wrapper { background: var(--album-color); position: relative; diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index 78ebe16..71490e5 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -9,6 +9,7 @@ const { tabTitle } = Astro.props; + {tabTitle} @@ -19,6 +20,15 @@ const { tabTitle } = Astro.props; document .querySelectorAll(".window") .forEach(window => WindowManager.observe(window)); + + const isBrowserAss = () => + ["Firefox"].some(ass => navigator.userAgent.includes(ass)); + if (isBrowserAss()) document.body.classList.add("ass-browser"); + + document + .querySelectorAll(".ua") + // @ts-ignore + .forEach(u => (u.innerText = navigator.userAgent)); }); diff --git a/src/pages/index.astro b/src/pages/index.astro index 754a97a..a156c29 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -3,10 +3,12 @@ import Noscript from "@components/Noscript.astro"; import MainWindow from "@components/windows/main/MainWindow.astro"; import BaseLayout from "../layouts/BaseLayout.astro"; import CodeWindow from "@components/windows/code/CodeWindow.astro"; +import AssBrowser from "@components/AssBrowser.astro"; ---