From ae34b59676b3a49f4f3e84a8a98afa5a531fb247 Mon Sep 17 00:00:00 2001
From: badbl0cks <4161747+badbl0cks@users.noreply.github.com>
Date: Sun, 22 Mar 2026 13:58:01 -0700
Subject: [PATCH] Add license page, update LICENSE file, and link license page
on the base layout instead of ext. MIT license.
Add src/pages/license.astro to render LICENSE with basic escaping
and newline-to-
handling. Update LICENSE formatting, and also add
new
third-party icon attributions.
---
LICENSE | 34 +++++++++++++++++++++++++++++-----
src/pages/license.astro | 35 +++++++++++++++++++++++++++++++++++
2 files changed, 64 insertions(+), 5 deletions(-)
create mode 100644 src/pages/license.astro
diff --git a/LICENSE b/LICENSE
index 3dd6b7c..e027e8c 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,7 +1,7 @@
Copyright 2026 badblocks
Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the “Software”), to deal in
+this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
@@ -10,7 +10,7 @@ so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
-THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
@@ -19,11 +19,11 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
This software also contains various permissively-licensed 3rd-party
-components, the licenses for which are listed below.
+components, the licenses for which are listed below:
-––– public/goat.js; ISC license ––––––––––––––––––––––––––––––––––––––––––––––
+--- public/goat.js; ISC license ---
-Copyright © Martin Tournoij
+Copyright Martin Tournoij
Permission to use, copy, modify, and/or distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright notice
@@ -36,3 +36,27 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
+
+--- public/crt.svg; CC BY 3.0 license ---
+
+Icon made by Delapouite: https://game-icons.net
+
+Used under CC BY 3.0 https://creativecommons.org/licenses/by/3.0/
+
+Modified from original
+
+--- public/hi-res.svg; CC BY 4.0 license ---
+
+Icon made by Streamline professional team: https://streamlinehq.com
+
+Used under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
+
+Modified from original
+
+--- public/mit.svg; PD ---
+
+Icon made by ZyMOS: https://commons.wikimedia.org/wiki/User:ZyMOS
+
+Released by author into the Public Domain
+
+Modified from original
diff --git a/src/pages/license.astro b/src/pages/license.astro
new file mode 100644
index 0000000..0ae1770
--- /dev/null
+++ b/src/pages/license.astro
@@ -0,0 +1,35 @@
+---
+import Layout from "@layouts/BaseLayout.astro";
+import fs from "node:fs";
+
+const txtToHtml = (string: string) => {
+ return string
+ .replace(/[^\x0A\x20-\x7E]/g, "") //remove non-printable ascii chars, except newline
+ .replaceAll("&", "&")
+ .replaceAll("<", "<")
+ .replaceAll(">", ">")
+ .replaceAll('"', """)
+ .replaceAll("'", "'")
+ .replaceAll("\n\n", "
");
+};
+
+const license_file_contents = txtToHtml(
+ fs.readFileSync("./LICENSE", {
+ encoding: "utf8",
+ }),
+);
+---
+
+
+ LICENSE
+
+
+
+
+