oh the js just wasnt working anywhere lmfao lmao lol rofl

This commit is contained in:
nelle 2024-10-30 21:06:25 -06:00
parent 67e58504ad
commit 074dbb14c4
5 changed files with 16 additions and 21 deletions

View file

@ -2,6 +2,7 @@ const meowEndpoint = "https://nelle.observer/api/meow";
const beepEndpoint = "https://nelle.observer/api/beep";
const kaomojiEndpoint = "https://nelle.observer/api/kaomoji";
var colorBool = Math.random() < 0.5;
var is_root = location.pathname == "/";
// loads all the functions to be loaded on load, pretty simple, it loads shit on load.
function onLoad() {
@ -18,15 +19,20 @@ function onLoad() {
// if javascript is enabled, this script will load, enabling all site elements that use javascript, by default these are all hidden.
function jsEnabled() {
// Get JS required element ids
// if on main page, activate widgets
if (is_root) {
const lastFmWidget = document.getElementById("lastfm-widget");
const ntfyWidgetContainer = document.getElementById("ntfyWidgetContainer");
lastFmWidget.style.display = "initial";
ntfyWidgetContainer.style.display = "initial";
}
// Get JS required element ids
const sgaButton = document.getElementById("sgaButton");
const incrementButton = document.getElementById("incrementButton");
// enable js required element ids
lastFmWidget.style.display = "initial";
ntfyWidgetContainer.style.display = "initial";
sgaButton.style.display = "initial";
incrementButton.style.display = "initial";
}

View file

@ -1,10 +1,8 @@
---
---
import NormalScripts from "./scripts/normal-scripts.astro";
import Head from "./Head.astro";---
<!--
onmouseover="PlaySound('hoverSound')"
onmouseout="StopSound('hoverSound')" -->
<section class="center nav">
<nav class="menu">
<button
@ -13,15 +11,6 @@
onclick="location.href='/'">
<span>home</span>
</button>
<!--
<button
class="custom-btn btn-1"
type="button"
onclick="location.href='/projects'"
>
<span>Projects</span>
</button>
-->
<button
class="custom-btn btn-1"
type="button"

View file

@ -31,8 +31,8 @@ const { title, description, pubDate, updatedDate } = Astro.props;
<div class="content">
<slot />
</div>
</div>
</article>
</div>
</main>
</Layout>

View file

@ -16,7 +16,7 @@ const { title } = Astro.props;
<head>
<Head title={title} />
</head>
<body onload="onLoad()" id="green">
<body onload="onLoad()">
<Header />
<section class="content center">
<h1 class="title">{title}</h1>

View file

@ -8,15 +8,15 @@ const posts = (await getCollection("blog")).sort(
---
<Layout title="blog">
<div class="content">
<main>
<section class="content">
<h3 class="subtitle" style="text-align: center;">
This is where I post things and stuff
</h3>
<h4 style="text-align: center;">
This list is in chronological order oldest first, newest last.
</h4>
</div>
</section>
<section class="content">
<hr />
<a href="/rss.xml"><h3 style="text-align: center;">RSS Feed</h3></a>