From 0af094770c4ebabc56ff761a8bd215bc397c0f7e Mon Sep 17 00:00:00 2001 From: João Augusto Costa Branco Marado Torres Date: Tue, 5 Aug 2025 18:50:37 +0100 Subject: refactor: reading page review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: João Augusto Costa Branco Marado Torres --- src/components/templates/CopyrightNotice.astro | 70 ++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 src/components/templates/CopyrightNotice.astro (limited to 'src/components/templates/CopyrightNotice.astro') diff --git a/src/components/templates/CopyrightNotice.astro b/src/components/templates/CopyrightNotice.astro new file mode 100644 index 0000000..8335293 --- /dev/null +++ b/src/components/templates/CopyrightNotice.astro @@ -0,0 +1,70 @@ +--- +import { + CREATIVE_COMMONS_LICENSES, + type LICENSES, +} from "@lib/collection/schemas"; +import CC from "./licenses/CC.astro"; +import WTFPL from "./licenses/WTFPL.astro"; +import type { Person } from "@lib/collection/types"; + +export interface Props { + title: string; + holders: Person[]; + years: number[]; + license?: typeof LICENSES[number]; +} + +let { license = "public domain" } = Astro.props; + +let Notice = undefined; +if (license !== undefined) { + if (license === "WTFPL") { + Notice = WTFPL; + } else if ( + CREATIVE_COMMONS_LICENSES.some((x) => license.localeCompare(x) === 0) + ) { + Notice = CC; + } +} +--- + +{Notice &&
} + +{ + /* + https://spdx.org/licenses/WTFPL.html + https://spdx.org/licenses/GFDL-1.3-or-later.html + https://spdx.org/licenses/FSFAP.html + https://artlibre.org/licence/lal/en/ + https://harmful.cat-v.org/software/ + + IPL-1.0 + IPA + Intel + HPND + EUPL-1.2 + EUPL-1.1 + EUDatagrid + EPL-2.0 + EPL-1.0 + EFL-2.0 + ECL-2.0 + CPL-1.0 + CPAL-1.0 + CDDL-1.0 + BSL-1.0 + BSD-3-Clause + BSD-2-Clause + Artistic-2.0 + APSL-2.0 + Apache-2.0 + Apache-1.1 + AGPL-3.0-or-later + AGPL-3.0-only + AFL-3.0 + AFL-2.1 + AFL-2.0 + AFL-1.2 + AFL-1.1 + */ +} -- cgit v1.2.3