about summary refs log tree commit diff
diff options
context:
space:
mode:
authorStarfall <us@starfall.systems>2023-09-05 18:44:07 -0500
committerStarfall <us@starfall.systems>2023-09-05 18:44:07 -0500
commit4d23385b4f0aa0e4cd52faf624d264d697919e7b (patch)
tree8de953be3e62efb516788d006a2e6866e05fb257
parent6bd9a272fc7e80b5d2fce515cc1ac5e3ad3b1178 (diff)
add moon phase decoration, make feed icon bigger
-rw-r--r--html/blog/2023-W25/index.html2
-rw-r--r--html/blog/centralization-through-decentralization/index.html2
-rw-r--r--html/blog/index.html8
-rw-r--r--html/blog/java-timezones/index.html2
-rw-r--r--html/blog/lament-for-the-commons/index.html2
-rw-r--r--html/index.html4
-rw-r--r--html/resources/index.html4
-rw-r--r--html/resources/mutant-standard/index.html4
-rw-r--r--js/moon-phase.js48
9 files changed, 70 insertions, 6 deletions
diff --git a/html/blog/2023-W25/index.html b/html/blog/2023-W25/index.html
index a36405d..4e01fcb 100644
--- a/html/blog/2023-W25/index.html
+++ b/html/blog/2023-W25/index.html
@@ -6,6 +6,7 @@
 	<meta name=robots content="noindex, nofollow">
 	<meta name=viewport content="width=device-width, initial-scale=1">
 	<link rel=stylesheet href=/css/terminal.css>
+	<script src='/js/moon-phase.js'></script>
 	
 </head>
 
@@ -14,6 +15,7 @@
 
 <header>
 	<h1>Things We Read This Week</h1>
+	<span style="float: right; user-select: none" id=decor-moons aria-hidden=true></span>
 	<nav aria-label=primary>
 		
 		<ul>
diff --git a/html/blog/centralization-through-decentralization/index.html b/html/blog/centralization-through-decentralization/index.html
index 8532c5c..a3b8895 100644
--- a/html/blog/centralization-through-decentralization/index.html
+++ b/html/blog/centralization-through-decentralization/index.html
@@ -6,6 +6,7 @@
 	<meta name=robots content="noindex, nofollow">
 	<meta name=viewport content="width=device-width, initial-scale=1">
 	<link rel=stylesheet href=/css/terminal.css>
+	<script src='/js/moon-phase.js'></script>
 	
 </head>
 
@@ -14,6 +15,7 @@
 
 <header>
 	<h1>Centralization Through Decentralization</h1>
+	<span style="float: right; user-select: none" id=decor-moons aria-hidden=true></span>
 	<nav aria-label=primary>
 		
 		<ul>
diff --git a/html/blog/index.html b/html/blog/index.html
index 8493127..ef8e9d4 100644
--- a/html/blog/index.html
+++ b/html/blog/index.html
@@ -6,6 +6,7 @@
 	<meta name=robots content="noindex, nofollow">
 	<meta name=viewport content="width=device-width, initial-scale=1">
 	<link rel=stylesheet href=/css/terminal.css>
+	<script src='/js/moon-phase.js'></script>
 	<link rel=alternate type=application/atom+xml title=Atom href=/blog/feed.xml>
 </head>
 
@@ -14,6 +15,7 @@
 
 <header>
 	<h1>~/blog</h1>
+	<span style="float: right; user-select: none" id=decor-moons aria-hidden=true></span>
 	<nav aria-label=primary>
 		
 		<ul>
@@ -38,8 +40,8 @@
 .feed-icon {
 	display: block;
 	float: right;
-	height: 1em;
-	width: 1em;
+	height: 1.5em;
+	width: 1.5em;
 	background: url('/img/feed-icon.svg') center/contain, var(--fg);
 	background-blend-mode: luminosity;
 	mask: url('/img/feed-icon.svg') 0 0/100% 100%;
@@ -87,7 +89,7 @@ Web&quot;</a>. It makes a lot of basic factual errors, conflates valid reasons t
 <section>
 	<p>This site is 100% <a href=https://git.starfall.systems/web>source-available</a>. © 2020-2023 Starfall. See <a href=https://git.starfall.systems/web/tree/COPYING.md rel=license>COPYING.md</a>.
 </section>
-<div style=text-align:center>⋁/⋀</div>
+<div style=text-align:center>∨/∧</div>
 </footer>
 
 </body>
diff --git a/html/blog/java-timezones/index.html b/html/blog/java-timezones/index.html
index 9432dfa..b1e3bb6 100644
--- a/html/blog/java-timezones/index.html
+++ b/html/blog/java-timezones/index.html
@@ -6,6 +6,7 @@
 	<meta name=robots content="noindex, nofollow">
 	<meta name=viewport content="width=device-width, initial-scale=1">
 	<link rel=stylesheet href=/css/terminal.css>
+	<script src='/js/moon-phase.js'></script>
 	
 </head>
 
@@ -14,6 +15,7 @@
 
 <header>
 	<h1>Timezones in Java</h1>
+	<span style="float: right; user-select: none" id=decor-moons aria-hidden=true></span>
 	<nav aria-label=primary>
 		
 		<ul>
diff --git a/html/blog/lament-for-the-commons/index.html b/html/blog/lament-for-the-commons/index.html
index ac18a8c..b77cc67 100644
--- a/html/blog/lament-for-the-commons/index.html
+++ b/html/blog/lament-for-the-commons/index.html
@@ -6,6 +6,7 @@
 	<meta name=robots content="noindex, nofollow">
 	<meta name=viewport content="width=device-width, initial-scale=1">
 	<link rel=stylesheet href=/css/terminal.css>
+	<script src='/js/moon-phase.js'></script>
 	
 </head>
 
@@ -14,6 +15,7 @@
 
 <header>
 	<h1>Lament for the Commons</h1>
+	<span style="float: right; user-select: none" id=decor-moons aria-hidden=true></span>
 	<nav aria-label=primary>
 		
 		<ul>
diff --git a/html/index.html b/html/index.html
index 4ffa897..ae79523 100644
--- a/html/index.html
+++ b/html/index.html
@@ -6,6 +6,7 @@
 	<meta name=robots content="noindex, nofollow">
 	<meta name=viewport content="width=device-width, initial-scale=1">
 	<link rel=stylesheet href=/css/terminal.css>
+	<script src='/js/moon-phase.js'></script>
 	
 </head>
 
@@ -14,6 +15,7 @@
 
 <header>
 	<h1>starfall.systems</h1>
+	<span style="float: right; user-select: none" id=decor-moons aria-hidden=true></span>
 	<nav aria-label=primary>
 		
 		<ul>
@@ -68,7 +70,7 @@
 <section>
 	<p>This site is 100% <a href=https://git.starfall.systems/web>source-available</a>. © 2020-2023 Starfall. See <a href=https://git.starfall.systems/web/tree/COPYING.md rel=license>COPYING.md</a>.
 </section>
-<div style=text-align:center>⋁/⋀</div>
+<div style=text-align:center>∨/∧</div>
 </footer>
 
 </body>
diff --git a/html/resources/index.html b/html/resources/index.html
index 08b62f3..dfca4f3 100644
--- a/html/resources/index.html
+++ b/html/resources/index.html
@@ -6,6 +6,7 @@
 	<meta name=robots content="noindex, nofollow">
 	<meta name=viewport content="width=device-width, initial-scale=1">
 	<link rel=stylesheet href=/css/terminal.css>
+	<script src='/js/moon-phase.js'></script>
 	
 </head>
 
@@ -14,6 +15,7 @@
 
 <header>
 	<h1>~/resources</h1>
+	<span style="float: right; user-select: none" id=decor-moons aria-hidden=true></span>
 	<nav aria-label=primary>
 		
 		<ul>
@@ -82,7 +84,7 @@
 <section>
 	<p>This site is 100% <a href=https://git.starfall.systems/web>source-available</a>. © 2020-2023 Starfall. See <a href=https://git.starfall.systems/web/tree/COPYING.md rel=license>COPYING.md</a>.
 </section>
-<div style=text-align:center>⋁/⋀</div>
+<div style=text-align:center>∨/∧</div>
 </footer>
 
 </body>
diff --git a/html/resources/mutant-standard/index.html b/html/resources/mutant-standard/index.html
index 1c55d0f..23cc233 100644
--- a/html/resources/mutant-standard/index.html
+++ b/html/resources/mutant-standard/index.html
@@ -6,6 +6,7 @@
 	<meta name=robots content="noindex, nofollow">
 	<meta name=viewport content="width=device-width, initial-scale=1">
 	<link rel=stylesheet href=/css/terminal.css>
+	<script src='/js/moon-phase.js'></script>
 	
 </head>
 
@@ -14,6 +15,7 @@
 
 <header>
 	<h1>Mutant Standard Shortcodes</h1>
+	<span style="float: right; user-select: none" id=decor-moons aria-hidden=true></span>
 	<nav aria-label=primary>
 		
 		<ul>
@@ -176,7 +178,7 @@
 <section>
 	<p>This site is 100% <a href=https://git.starfall.systems/web>source-available</a>. © 2020-2023 Starfall. See <a href=https://git.starfall.systems/web/tree/COPYING.md rel=license>COPYING.md</a>.
 </section>
-<div style=text-align:center>⋁/⋀</div>
+<div style=text-align:center>∨/∧</div>
 </footer>
 
 </body>
diff --git a/js/moon-phase.js b/js/moon-phase.js
new file mode 100644
index 0000000..8feaced
--- /dev/null
+++ b/js/moon-phase.js
@@ -0,0 +1,48 @@
+// truncated to the day, America/Chicago time
+// only includes moons through end of 2024 (brown lunation number 1262)
+moons = [
+19585, 19593, 19599, 19606,
+19614, 19622, 19629, 19636,
+19644, 19651, 19658, 19666,
+19674, 19681, 19688, 19695,
+19703, 19710, 19717, 19725,
+19733, 19739, 19747, 19755,
+19762, 19769, 19777, 19785,
+19792, 19798, 19807, 19814,
+19821, 19828, 19836, 19844,
+19850, 19858, 19866, 19873,
+19880, 19888, 19895, 19902,
+19909, 19917, 19925, 19931,
+19939, 19947, 19954, 19961,
+19968, 19977, 19983, 19990,
+19998, 20006, 20013, 20020,
+20028, 20035, 20042, 20049,
+20058, 20065, 20072, 20079,
+20087, 20094, 20101, 20109
+]
+icons = ['\u{1f311}', '\u{1f313}', '\u{1f315}', '\u{1f317}']
+icons_inverted = ['\u{1f315}', '\u{1f317}', '\u{1f311}', '\u{1f313}']
+
+function getMoonsString(disable_emoji, inverted_icons) {
+	today = Math.floor((Date.now() - 18e6) / 86.4e6)
+
+	next_index = moons.findIndex((element) => element > today)
+	next_days = moons.slice(next_index, next_index + 4)
+
+	str = ""
+	for (let i = today; i < today + 30; i++) {
+		j = next_days.indexOf(i) + 1
+		if(j != 0) {
+			icon = disable_emoji && inverted_icons ? icons_inverted[j%4] : icons[j%4]
+			str = str.concat(icon)
+			if(disable_emoji)
+				str = str.concat('\ufe0e')
+		}
+		else str = str.concat('\u2500')
+	}
+	return str
+}
+
+document.addEventListener('DOMContentLoaded', (event) => {
+	document.getElementById('decor-moons').innerHTML = getMoonsString(true, true)
+})