Skip to content

Commit

Permalink
chore: license
Browse files Browse the repository at this point in the history
  • Loading branch information
zyrouge committed Apr 4, 2024
1 parent c174a0e commit b25d67b
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/components/base/Footer.astro
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
---
import sugar from "sugar";
import { ExternalUrls } from "~/core/urls";
import { Routes } from "~/core/routes";
import { Metadata } from "~/core/metadata";
import FooterLink from "~/components/base/FooterLink.astro";
import FooterSecondaryLink from "~/components/base/FooterSecondaryLink.astro";
---

<footer>
Expand All @@ -21,7 +23,19 @@ import FooterLink from "~/components/base/FooterLink.astro";
</div>

<div class="text-secondary-500">
<p>Last built at {new Date().toLocaleString()}</p>
<p class="mb-1">
Licensed under
<FooterSecondaryLink
name="Apache 2.0"
link={ExternalUrls.ghRepoLicense}
/>
and
<FooterSecondaryLink
name="CC BY 4.0"
link={ExternalUrls.ghRepoContentLicense}
/>
</p>
<p>Last built at {sugar.Date.format(new Date())}</p>
</div>
</div>
</footer>
14 changes: 14 additions & 0 deletions src/components/base/FooterSecondaryLink.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
interface Props {
name: string;
link: string;
}
const { name, link } = Astro.props;
---

<a
class="border-b border-secondary-800 hover:border-secondary-500"
href={link}
target="_blank">{name}</a
>
2 changes: 2 additions & 0 deletions src/core/urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ export class ExternalUrls {
static reddit = "https://www.reddit.com/user/zyrouge";

static ghRepo = `${ExternalUrls.github}/${domain}`;
static ghRepoLicense = `${ExternalUrls.ghRepo}/blob/main/LICENSE`;
static ghRepoContentLicense = `${ExternalUrls.ghRepo}/blob/main/src/content/articles/LICENSE`;
}

export class StaticAssets {
Expand Down

0 comments on commit b25d67b

Please sign in to comment.