1
0
Fork 0
forked from nin0/website

Compare commits

...
Sign in to create a new pull request.

4 commits
main ... main

Author SHA1 Message Date
058139a8d7 selectively show ass card 2025-06-25 16:37:15 -04:00
49803ba398 fix firefox assness 2025-06-25 16:34:38 -04:00
7271006f49 add dark reader lock 2025-06-25 15:56:10 -04:00
sadan
96194316d3
use a static file for your avatar
this way, others can link to it statically and always have an up to date
copy of your avatar
2025-06-25 15:51:12 -04:00
7 changed files with 67 additions and 2 deletions

View file

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Before After
Before After

View file

@ -0,0 +1,31 @@
---
import GroupBox from "@components/GroupBox.astro";
---
<style is:global>
.ua {
font-family: monospace;
}
</style>
<ass-browser>
<GroupBox>
<p>
<h2>YOUR BROWSER IS ASS</h2>
<span>
Your browser, <span class="ua"></span> 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.
<br />
<br />
Consider switching to a browser that is not ass such as <a
href="https://www.apple.com/ca/safari/">Safari</a
>, <a href="https://brave.com/">Brave</a>, or if you really have
no option, <a href="https://www.google.com/intl/en_ca/chrome/"
>Chrome</a
>. (these are personal preferences and I am not paid to say
this)
</span>
</p>
</GroupBox>
</ass-browser>

View file

@ -1,12 +1,11 @@
---
import { Image } from "astro:assets";
import logo from "@assets/logo.png";
---
<div class="avatar-wrapper">
<Image
alt="My profile picture"
src={logo}
src={"/logo.png"}
class="avatar"
width={80}
height={80}

View file

@ -3,6 +3,28 @@ import LastFMIcon from "@assets/svg/fm.svg";
import HeartIcon from "@assets/svg/heart.svg";
---
<style is:global>
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;
}
}
</style>
<div class="spotify-card-wrapper-shadow">
<h3 style="margin-bottom: 10px;">Listening to</h3>
<div class="spotify-card-wrapper">

View file

@ -13,6 +13,7 @@
}
}
}
.spotify-card-wrapper {
background: var(--album-color);
position: relative;

View file

@ -9,6 +9,7 @@ const { tabTitle } = Astro.props;
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width" />
<meta name="generator" content={Astro.generator} />
<meta name="darkreader-lock">
<title>{tabTitle}</title>
</head>
<body>
@ -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));
});
</script>
</body>

View file

@ -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";
---
<BaseLayout tabTitle="nin0.dev">
<Noscript />
<AssBrowser />
<MainWindow />
<CodeWindow />
</BaseLayout>