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 beepEndpoint = "https://nelle.observer/api/beep";
|
||||||
const kaomojiEndpoint = "https://nelle.observer/api/kaomoji";
|
const kaomojiEndpoint = "https://nelle.observer/api/kaomoji";
|
||||||
var colorBool = Math.random() < 0.5;
|
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.
|
// loads all the functions to be loaded on load, pretty simple, it loads shit on load.
|
||||||
function onLoad() {
|
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.
|
// if javascript is enabled, this script will load, enabling all site elements that use javascript, by default these are all hidden.
|
||||||
function jsEnabled() {
|
function jsEnabled() {
|
||||||
// Get JS required element ids
|
// if on main page, activate widgets
|
||||||
|
if (is_root) {
|
||||||
const lastFmWidget = document.getElementById("lastfm-widget");
|
const lastFmWidget = document.getElementById("lastfm-widget");
|
||||||
const ntfyWidgetContainer = document.getElementById("ntfyWidgetContainer");
|
const ntfyWidgetContainer = document.getElementById("ntfyWidgetContainer");
|
||||||
|
|
||||||
|
|
||||||
|
lastFmWidget.style.display = "initial";
|
||||||
|
ntfyWidgetContainer.style.display = "initial";
|
||||||
|
}
|
||||||
|
// Get JS required element ids
|
||||||
const sgaButton = document.getElementById("sgaButton");
|
const sgaButton = document.getElementById("sgaButton");
|
||||||
const incrementButton = document.getElementById("incrementButton");
|
const incrementButton = document.getElementById("incrementButton");
|
||||||
|
|
||||||
// enable js required element ids
|
// enable js required element ids
|
||||||
lastFmWidget.style.display = "initial";
|
|
||||||
ntfyWidgetContainer.style.display = "initial";
|
|
||||||
sgaButton.style.display = "initial";
|
sgaButton.style.display = "initial";
|
||||||
incrementButton.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">
|
<section class="center nav">
|
||||||
<nav class="menu">
|
<nav class="menu">
|
||||||
<button
|
<button
|
||||||
|
@ -13,15 +11,6 @@
|
||||||
onclick="location.href='/'">
|
onclick="location.href='/'">
|
||||||
<span>home</span>
|
<span>home</span>
|
||||||
</button>
|
</button>
|
||||||
<!--
|
|
||||||
<button
|
|
||||||
class="custom-btn btn-1"
|
|
||||||
type="button"
|
|
||||||
onclick="location.href='/projects'"
|
|
||||||
>
|
|
||||||
<span>Projects</span>
|
|
||||||
</button>
|
|
||||||
-->
|
|
||||||
<button
|
<button
|
||||||
class="custom-btn btn-1"
|
class="custom-btn btn-1"
|
||||||
type="button"
|
type="button"
|
||||||
|
|
|
@ -31,8 +31,8 @@ const { title, description, pubDate, updatedDate } = Astro.props;
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|
|
@ -16,7 +16,7 @@ const { title } = Astro.props;
|
||||||
<head>
|
<head>
|
||||||
<Head title={title} />
|
<Head title={title} />
|
||||||
</head>
|
</head>
|
||||||
<body onload="onLoad()" id="green">
|
<body onload="onLoad()">
|
||||||
<Header />
|
<Header />
|
||||||
<section class="content center">
|
<section class="content center">
|
||||||
<h1 class="title">{title}</h1>
|
<h1 class="title">{title}</h1>
|
||||||
|
|
|
@ -8,15 +8,15 @@ const posts = (await getCollection("blog")).sort(
|
||||||
---
|
---
|
||||||
|
|
||||||
<Layout title="blog">
|
<Layout title="blog">
|
||||||
<div class="content">
|
|
||||||
<main>
|
<main>
|
||||||
|
<section class="content">
|
||||||
<h3 class="subtitle" style="text-align: center;">
|
<h3 class="subtitle" style="text-align: center;">
|
||||||
This is where I post things and stuff
|
This is where I post things and stuff
|
||||||
</h3>
|
</h3>
|
||||||
<h4 style="text-align: center;">
|
<h4 style="text-align: center;">
|
||||||
This list is in chronological order oldest first, newest last.
|
This list is in chronological order oldest first, newest last.
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</section>
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<hr />
|
<hr />
|
||||||
<a href="/rss.xml"><h3 style="text-align: center;">RSS Feed</h3></a>
|
<a href="/rss.xml"><h3 style="text-align: center;">RSS Feed</h3></a>
|
||||||
|
|
Loading…
Reference in a new issue