From f9a77c5c27aede4e5978eb55d9b7af781b680a1d Mon Sep 17 00:00:00 2001 From: João Augusto Costa Branco Marado Torres Date: Tue, 24 Jun 2025 12:08:41 -0300 Subject: feat!: initial commit 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/licenses/CC.astro | 120 ++++++++++++++++++++++++++++++++++++ src/components/licenses/WTFPL.astro | 53 ++++++++++++++++ 2 files changed, 173 insertions(+) create mode 100644 src/components/licenses/CC.astro create mode 100644 src/components/licenses/WTFPL.astro (limited to 'src/components/licenses') diff --git a/src/components/licenses/CC.astro b/src/components/licenses/CC.astro new file mode 100644 index 0000000..61f9114 --- /dev/null +++ b/src/components/licenses/CC.astro @@ -0,0 +1,120 @@ +--- +import type { Props as BaseProps } from "../CopyRightNotice.astro"; +interface Props extends BaseProps {} + +let { title, website, author, dateCreated, license } = Astro.props; +const publicdomain = license === "CC0"; +const sa = /SA/.test(license); +const nd = /ND/.test(license); +const nc = /NC/.test(license); +const licenseURL = `https://creativecommons.org/licenses/${ + license.slice(3).toLowerCase() +}/4.0/`; +--- + +
+ { + publicdomain ? ( +

+ + {title} by { + website ? ( + + ) : author + } is marked CC0 1.0 + + + +

+ ) : ( +

+ + {title} © { + dateCreated.getFullYear() + } by { + website ? ( + + ) : author + } is licensed under {license.replace("CC-", "CC ")} 4.0 + + + { + nc && ( + + ) + } + { + sa && ( + <>{" "} + ) + } + { + nd && ( + <>{" "} + ) + } + +

+ ) + } +
diff --git a/src/components/licenses/WTFPL.astro b/src/components/licenses/WTFPL.astro new file mode 100644 index 0000000..feab7ec --- /dev/null +++ b/src/components/licenses/WTFPL.astro @@ -0,0 +1,53 @@ +--- +import type { Props as BaseProps } from "../CopyrightNotice.astro"; +interface Props extends BaseProps {} + +let { website, author, email, dateCreated } = Astro.props; +--- + + -- cgit v1.2.3