summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlmightyMiau <almightymeow612@gmail.com>2025-05-31 00:37:33 -0700
committerAlmightyMiau <almightymeow612@gmail.com>2025-05-31 00:37:33 -0700
commit9507fa48215779e00342536419400a912a4dbeb2 (patch)
treecedb45d0e6a0149927abf183f1c586ace2585ba0
parent235a215dc42d395535de11b2cc3dd76543cef088 (diff)
5/30 Background persists across site, journal
-rw-r--r--art.html1
-rw-r--r--cats.html1
-rw-r--r--factorio.html1
-rw-r--r--index.html24
-rw-r--r--rememberBackground.js12
-rw-r--r--silly.html2
-rw-r--r--ultrakill/ultrakill0P.webpbin0 -> 223580 bytes
-rw-r--r--ultrakill/ultrakill1P.webpbin0 -> 191666 bytes
-rw-r--r--ultrakill/ultrakillP.webp (renamed from ultrakillP.webp)bin189124 -> 189124 bytes
9 files changed, 40 insertions, 1 deletions
diff --git a/art.html b/art.html
index c82ce85..c4eb4b7 100644
--- a/art.html
+++ b/art.html
@@ -9,6 +9,7 @@
<link href="styles.css" rel="stylesheet">
<title>Miau - Art</title>
<link rel="icon" type="image/x-icon" href="miau.jpg">
+ <script src="rememberBackground.js"></script>
<script>
function hidePages() {
let status = document.getElementById("pages").style.display;
diff --git a/cats.html b/cats.html
index cfb3937..0c9cb08 100644
--- a/cats.html
+++ b/cats.html
@@ -9,6 +9,7 @@
<link href="styles.css" rel="stylesheet">
<title>Miau - cats</title>
<link rel="icon" type="image/x-icon" href="miau.jpg">
+ <script src="rememberBackground.js"></script>
<script>
function hidePages() {
let status = document.getElementById("pages").style.display;
diff --git a/factorio.html b/factorio.html
index 0e8c5ed..571d6f1 100644
--- a/factorio.html
+++ b/factorio.html
@@ -9,6 +9,7 @@
<link href="styles.css" rel="stylesheet">
<title>Miau - factorio</title>
<link rel="icon" type="image/x-icon" href="miau.jpg">
+ <script src="rememberBackground.js"></script>
<script>
function hidePages() {
let status = document.getElementById("pages").style.display;
diff --git a/index.html b/index.html
index 19e56ef..548195d 100644
--- a/index.html
+++ b/index.html
@@ -10,6 +10,7 @@
<link href="styles.css" rel="stylesheet">
<title>Miau :3</title>
<link rel="icon" type="image/x-icon" href="miau.jpg">
+ <script src="rememberBackground.js"></script>
<script>
function hidePages() {
let status = document.getElementById("pages").style.display;
@@ -48,9 +49,30 @@
</div>
<div class="title">&nbsp; Website Journal</div>
<div class="content">
+ <div class="date">5/30/2025</div>
+ <p>
+ I showed off this site to a friend recently, and she said she was disappointed the background
+ from <a href="silly.html">Silly</a> didn't stay when she changed pages, so I used some of what
+ I learned from my computer science projects this semester, along with looking at how
+ <a href="https://goblin-heart.net/" target="_blank">this person</a> did their themes, to make
+ the images load on other pages.
+ </p>
+ <p>
+ How it works is, on <a href="silly.html">Silly</a>, when you click an available image, it
+ stores the file name in local storage as "background". Then, whenever a page is loaded, it
+ changes the background image to whatever that clicked image was. This took far longer than it
+ needed to, but I learned a lot about using local storage instead of cookies. ^-^
+ </p>
+ <p>
+ Also I bought Ultrakill and I P ranked the prelude again, as well as layer 1. :3
+ </p>
+ <img src="ultrakill/ultrakill0P.webp" style="width:48%">
+ <img src="ultrakill/ultrakill1P.webp" style="width:48%">
+ </div>
+ <div class="content">
<div class="date">5/22/2025</div>
<p>
- <img src="ultrakillP.webp" style="width:100%">
+ <img src="ultrakill/ultrakillP.webp" style="width:100%">
AAAAAAAA look! :3333
</div>
<div class="content">
diff --git a/rememberBackground.js b/rememberBackground.js
new file mode 100644
index 0000000..3cdc4de
--- /dev/null
+++ b/rememberBackground.js
@@ -0,0 +1,12 @@
+function remember(img) {
+ localStorage.setItem('background', img);
+}
+function recall() {
+ if (localStorage.getItem("background")) {
+ console.log(localStorage.getItem("background"));
+ document.body.style.backgroundImage = 'url("https://almightymiau.gay/' + localStorage.getItem("background") + '")';
+ }
+}
+window.onload = () => {
+ recall();
+} \ No newline at end of file
diff --git a/silly.html b/silly.html
index 289d221..f6dc86d 100644
--- a/silly.html
+++ b/silly.html
@@ -9,6 +9,7 @@
<link href="styles.css" rel="stylesheet">
<title>Miau - Silly</title>
<link rel="icon" type="image/x-icon" href="miau.jpg">
+ <script src="rememberBackground.js"></script>
<script>
function hidePages() {
let status = document.getElementById("pages").style.display;
@@ -27,6 +28,7 @@
}
}
function sillyBackground(argument) {
+ remember(argument);
let image = document.body.style.backgroundImage
console.log(image);
console.log(argument);
diff --git a/ultrakill/ultrakill0P.webp b/ultrakill/ultrakill0P.webp
new file mode 100644
index 0000000..fc3c865
--- /dev/null
+++ b/ultrakill/ultrakill0P.webp
Binary files differ
diff --git a/ultrakill/ultrakill1P.webp b/ultrakill/ultrakill1P.webp
new file mode 100644
index 0000000..3411ea4
--- /dev/null
+++ b/ultrakill/ultrakill1P.webp
Binary files differ
diff --git a/ultrakillP.webp b/ultrakill/ultrakillP.webp
index 60122bc..60122bc 100644
--- a/ultrakillP.webp
+++ b/ultrakill/ultrakillP.webp
Binary files differ