Add license page, update LICENSE file, and link license page on the base
Some checks failed
Build And Deploy / build-and-deploy (push) Failing after 1m4s
Some checks failed
Build And Deploy / build-and-deploy (push) Failing after 1m4s
layout instead of ext. MIT license. Add src/pages/license.astro to render LICENSE with basic escaping and newline-to-<br> handling. Update LICENSE formatting, and also add new third-party icon attributions.
This commit is contained in:
parent
da4925753d
commit
ae34b59676
2 changed files with 64 additions and 5 deletions
34
LICENSE
34
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 <martin@arp242.net>
|
||||
Copyright Martin Tournoij <martin@arp242.net>
|
||||
|
||||
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
|
||||
|
|
|
|||
35
src/pages/license.astro
Normal file
35
src/pages/license.astro
Normal file
|
|
@ -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", "<br><br>");
|
||||
};
|
||||
|
||||
const license_file_contents = txtToHtml(
|
||||
fs.readFileSync("./LICENSE", {
|
||||
encoding: "utf8",
|
||||
}),
|
||||
);
|
||||
---
|
||||
|
||||
<Layout>
|
||||
<title slot="head">LICENSE</title>
|
||||
<Fragment slot="main">
|
||||
<header>
|
||||
<h1>
|
||||
<a href="https://opensource.org/license/mit" target="_blank"
|
||||
>MIT License</a
|
||||
>
|
||||
</h1>
|
||||
</header>
|
||||
<p set:html={license_file_contents} />
|
||||
</Fragment>
|
||||
</Layout>
|
||||
Loading…
Add table
Add a link
Reference in a new issue