main #8
5 changed files with 16 additions and 21 deletions
|
@ -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() {
|
||||
// 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 lastFmWidget = document.getElementById("lastfm-widget");
|
||||
const ntfyWidgetContainer = document.getElementById("ntfyWidgetContainer");
|
||||
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";
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -31,8 +31,8 @@ const { title, description, pubDate, updatedDate } = Astro.props;
|
|||
<div class="content">
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
</Layout>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue